target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void get_primary_keys() throws TException { PrimaryKeysRequest request = new PrimaryKeysRequest(DB_P, "table"); PrimaryKeysRequest inboundRequest = new PrimaryKeysRequest(); PrimaryKeysResponse response = new PrimaryKeysResponse(); PrimaryKeysResponse expected = new PrimaryKeysResponse(); when(primaryMappi...
@Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, TException { DatabaseMapping mapping = databaseMappingService.databaseMapping(request.getDb_name()); return mapp...
FederatedHMSHandler extends FacebookBase implements CloseableIHMSHandler { @Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, TException { DatabaseMapping mapping ...
FederatedHMSHandler extends FacebookBase implements CloseableIHMSHandler { @Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, TException { DatabaseMapping mapping ...
FederatedHMSHandler extends FacebookBase implements CloseableIHMSHandler { @Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, TException { DatabaseMapping mapping ...
FederatedHMSHandler extends FacebookBase implements CloseableIHMSHandler { @Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public PrimaryKeysResponse get_primary_keys(PrimaryKeysRequest request) throws MetaException, NoSuchObjectException, TException { DatabaseMapping mapping ...
@Test public void get_partition_values() throws TException { PartitionValuesRequest request = new PartitionValuesRequest(DB_P, "table", Collections.singletonList(new FieldSchema())); List<PartitionValuesRow> partitionValues = Collections.singletonList(new PartitionValuesRow()); PartitionValuesResponse response = new Pa...
@Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public PartitionValuesResponse get_partition_values(PartitionValuesRequest req) throws MetaException, NoSuchObjectException, TException { DatabaseMapping mapping = databaseMappingService.databaseMapping(req.getDbName()); return m...
FederatedHMSHandler extends FacebookBase implements CloseableIHMSHandler { @Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public PartitionValuesResponse get_partition_values(PartitionValuesRequest req) throws MetaException, NoSuchObjectException, TException { DatabaseMapping ...
FederatedHMSHandler extends FacebookBase implements CloseableIHMSHandler { @Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public PartitionValuesResponse get_partition_values(PartitionValuesRequest req) throws MetaException, NoSuchObjectException, TException { DatabaseMapping ...
FederatedHMSHandler extends FacebookBase implements CloseableIHMSHandler { @Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public PartitionValuesResponse get_partition_values(PartitionValuesRequest req) throws MetaException, NoSuchObjectException, TException { DatabaseMapping ...
FederatedHMSHandler extends FacebookBase implements CloseableIHMSHandler { @Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public PartitionValuesResponse get_partition_values(PartitionValuesRequest req) throws MetaException, NoSuchObjectException, TException { DatabaseMapping ...
@Test public void correctType() throws Exception { TProcessor processor = factory.getProcessor(transport); assertThat(TSetIpAddressProcessor.class.isAssignableFrom(processor.getClass()), is(true)); }
@Override public TProcessor getProcessor(TTransport transport) { try { if (transport instanceof TSocket) { Socket socket = ((TSocket) transport).getSocket(); log.debug("Received a connection from ip: {}", socket.getInetAddress().getHostAddress()); } CloseableIHMSHandler baseHandler = federatedHMSHandlerFactory.create()...
TSetIpAddressProcessorFactory extends TProcessorFactory { @Override public TProcessor getProcessor(TTransport transport) { try { if (transport instanceof TSocket) { Socket socket = ((TSocket) transport).getSocket(); log.debug("Received a connection from ip: {}", socket.getInetAddress().getHostAddress()); } CloseableIHM...
TSetIpAddressProcessorFactory extends TProcessorFactory { @Override public TProcessor getProcessor(TTransport transport) { try { if (transport instanceof TSocket) { Socket socket = ((TSocket) transport).getSocket(); log.debug("Received a connection from ip: {}", socket.getInetAddress().getHostAddress()); } CloseableIHM...
TSetIpAddressProcessorFactory extends TProcessorFactory { @Override public TProcessor getProcessor(TTransport transport) { try { if (transport instanceof TSocket) { Socket socket = ((TSocket) transport).getSocket(); log.debug("Received a connection from ip: {}", socket.getInetAddress().getHostAddress()); } CloseableIHM...
TSetIpAddressProcessorFactory extends TProcessorFactory { @Override public TProcessor getProcessor(TTransport transport) { try { if (transport instanceof TSocket) { Socket socket = ((TSocket) transport).getSocket(); log.debug("Received a connection from ip: {}", socket.getInetAddress().getHostAddress()); } CloseableIHM...
@Test public void connectionIsMonitored() throws Exception { factory.getProcessor(transport); ArgumentCaptor<TTransport> transportCaptor = ArgumentCaptor.forClass(TTransport.class); ArgumentCaptor<Closeable> handlerCaptor = ArgumentCaptor.forClass(Closeable.class); verify(transportMonitor).monitor(transportCaptor.captu...
@Override public TProcessor getProcessor(TTransport transport) { try { if (transport instanceof TSocket) { Socket socket = ((TSocket) transport).getSocket(); log.debug("Received a connection from ip: {}", socket.getInetAddress().getHostAddress()); } CloseableIHMSHandler baseHandler = federatedHMSHandlerFactory.create()...
TSetIpAddressProcessorFactory extends TProcessorFactory { @Override public TProcessor getProcessor(TTransport transport) { try { if (transport instanceof TSocket) { Socket socket = ((TSocket) transport).getSocket(); log.debug("Received a connection from ip: {}", socket.getInetAddress().getHostAddress()); } CloseableIHM...
TSetIpAddressProcessorFactory extends TProcessorFactory { @Override public TProcessor getProcessor(TTransport transport) { try { if (transport instanceof TSocket) { Socket socket = ((TSocket) transport).getSocket(); log.debug("Received a connection from ip: {}", socket.getInetAddress().getHostAddress()); } CloseableIHM...
TSetIpAddressProcessorFactory extends TProcessorFactory { @Override public TProcessor getProcessor(TTransport transport) { try { if (transport instanceof TSocket) { Socket socket = ((TSocket) transport).getSocket(); log.debug("Received a connection from ip: {}", socket.getInetAddress().getHostAddress()); } CloseableIHM...
TSetIpAddressProcessorFactory extends TProcessorFactory { @Override public TProcessor getProcessor(TTransport transport) { try { if (transport instanceof TSocket) { Socket socket = ((TSocket) transport).getSocket(); log.debug("Received a connection from ip: {}", socket.getInetAddress().getHostAddress()); } CloseableIHM...
@Test public void get_databaseNoExceptions() throws Exception { IHMSHandler handler = ExceptionWrappingHMSHandler.newProxyInstance(baseHandler); handler.get_database("bdp"); verify(baseHandler).get_database("bdp"); }
public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); }
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } }
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
@Test public void get_databaseWaggleDanceServerException() throws Exception { expectedException.expect(MetaException.class); IHMSHandler handler = ExceptionWrappingHMSHandler.newProxyInstance(baseHandler); when(baseHandler.get_database("bdp")).thenThrow(new WaggleDanceServerException("waggle waggle!")); handler.get_dat...
public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); }
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } }
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
@Test public void get_databasNotAllowedException() throws Exception { expectedException.expect(MetaException.class); IHMSHandler handler = ExceptionWrappingHMSHandler.newProxyInstance(baseHandler); when(baseHandler.get_database("bdp")).thenThrow(new NotAllowedException("waggle waggle!")); handler.get_database("bdp"); }
public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); }
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } }
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
@Test public void get_databaseRunTimeExceptionIsNotWrapped() throws Exception { expectedException.expect(RuntimeException.class); expectedException.expectMessage("generic non waggle dance exception"); IHMSHandler handler = ExceptionWrappingHMSHandler.newProxyInstance(baseHandler); when(baseHandler.get_database("bdp"))....
public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); }
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } }
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
@Test public void negativePort() { graphiteConfiguration.setPort(-1); Set<ConstraintViolation<GraphiteConfiguration>> violations = validator.validate(graphiteConfiguration); assertThat(violations.size(), is(1)); }
public void setPort(int port) { this.port = port; }
GraphiteConfiguration { public void setPort(int port) { this.port = port; } }
GraphiteConfiguration { public void setPort(int port) { this.port = port; } }
GraphiteConfiguration { public void setPort(int port) { this.port = port; } @PostConstruct void init(); boolean isEnabled(); int getPort(); void setPort(int port); String getHost(); void setHost(String host); String getPrefix(); void setPrefix(String prefix); long getPollInterval(); void setPollInterval(long pollInter...
GraphiteConfiguration { public void setPort(int port) { this.port = port; } @PostConstruct void init(); boolean isEnabled(); int getPort(); void setPort(int port); String getHost(); void setHost(String host); String getPrefix(); void setPrefix(String prefix); long getPollInterval(); void setPollInterval(long pollInter...
@Test public void get_databaseCheckedExceptionIsNotWrapped() throws Exception { expectedException.expect(NoSuchObjectException.class); expectedException.expectMessage("Does not exist!"); IHMSHandler handler = ExceptionWrappingHMSHandler.newProxyInstance(baseHandler); when(baseHandler.get_database("bdp")).thenThrow(new ...
public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); }
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } }
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
ExceptionWrappingHMSHandler implements InvocationHandler { public static IHMSHandler newProxyInstance(IHMSHandler baseHandler) { return (IHMSHandler) Proxy.newProxyInstance(ExceptionWrappingHMSHandler.class.getClassLoader(), new Class[] { IHMSHandler.class }, new ExceptionWrappingHMSHandler(baseHandler)); } ExceptionWr...
@Test public void typical() throws Exception { when(waggleDanceConfiguration.getDatabaseResolution()).thenReturn(DatabaseResolution.MANUAL); CloseableIHMSHandler handler = factory.create(); assertThat(handler, is(instanceOf(FederatedHMSHandler.class))); }
public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFederationService); HiveConf conf =...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
@Test public void prefixedDatabase() throws Exception { when(waggleDanceConfiguration.getDatabaseResolution()).thenReturn(DatabaseResolution.PREFIXED); factory = new FederatedHMSHandlerFactory(hiveConf, notifyingFederationService, metaStoreMappingFactory, waggleDanceConfiguration, queryMapping); CloseableIHMSHandler ha...
public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFederationService); HiveConf conf =...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
@Test(expected = WaggleDanceException.class) public void noMode() { factory = new FederatedHMSHandlerFactory(hiveConf, notifyingFederationService, metaStoreMappingFactory, waggleDanceConfiguration, queryMapping); factory.create(); }
public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFederationService); HiveConf conf =...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
FederatedHMSHandlerFactory { public CloseableIHMSHandler create() { MappingEventListener service = createDatabaseMappingService(); MonitoredDatabaseMappingService monitoredService = new MonitoredDatabaseMappingService(service); CloseableIHMSHandler baseHandler = new FederatedHMSHandler(monitoredService, notifyingFedera...
@Test public void zeroPollInterval() { graphiteConfiguration.setPollInterval(0); Set<ConstraintViolation<GraphiteConfiguration>> violations = validator.validate(graphiteConfiguration); assertThat(violations.size(), is(1)); }
public void setPollInterval(long pollInterval) { this.pollInterval = pollInterval; }
GraphiteConfiguration { public void setPollInterval(long pollInterval) { this.pollInterval = pollInterval; } }
GraphiteConfiguration { public void setPollInterval(long pollInterval) { this.pollInterval = pollInterval; } }
GraphiteConfiguration { public void setPollInterval(long pollInterval) { this.pollInterval = pollInterval; } @PostConstruct void init(); boolean isEnabled(); int getPort(); void setPort(int port); String getHost(); void setHost(String host); String getPrefix(); void setPrefix(String prefix); long getPollInterval(); vo...
GraphiteConfiguration { public void setPollInterval(long pollInterval) { this.pollInterval = pollInterval; } @PostConstruct void init(); boolean isEnabled(); int getPort(); void setPort(int port); String getHost(); void setHost(String host); String getPrefix(); void setPrefix(String prefix); long getPollInterval(); vo...
@Test public void negativePollInterval() { graphiteConfiguration.setPollInterval(-1); Set<ConstraintViolation<GraphiteConfiguration>> violations = validator.validate(graphiteConfiguration); assertThat(violations.size(), is(1)); }
public void setPollInterval(long pollInterval) { this.pollInterval = pollInterval; }
GraphiteConfiguration { public void setPollInterval(long pollInterval) { this.pollInterval = pollInterval; } }
GraphiteConfiguration { public void setPollInterval(long pollInterval) { this.pollInterval = pollInterval; } }
GraphiteConfiguration { public void setPollInterval(long pollInterval) { this.pollInterval = pollInterval; } @PostConstruct void init(); boolean isEnabled(); int getPort(); void setPort(int port); String getHost(); void setHost(String host); String getPrefix(); void setPrefix(String prefix); long getPollInterval(); vo...
GraphiteConfiguration { public void setPollInterval(long pollInterval) { this.pollInterval = pollInterval; } @PostConstruct void init(); boolean isEnabled(); int getPort(); void setPort(int port); String getHost(); void setHost(String host); String getPrefix(); void setPrefix(String prefix); long getPollInterval(); vo...
@Test public void nullPollIntervalTimeUnit() { graphiteConfiguration.setPollIntervalTimeUnit(null); Set<ConstraintViolation<GraphiteConfiguration>> violations = validator.validate(graphiteConfiguration); assertThat(violations.size(), is(1)); }
public void setPollIntervalTimeUnit(TimeUnit pollIntervalTimeUnit) { this.pollIntervalTimeUnit = pollIntervalTimeUnit; }
GraphiteConfiguration { public void setPollIntervalTimeUnit(TimeUnit pollIntervalTimeUnit) { this.pollIntervalTimeUnit = pollIntervalTimeUnit; } }
GraphiteConfiguration { public void setPollIntervalTimeUnit(TimeUnit pollIntervalTimeUnit) { this.pollIntervalTimeUnit = pollIntervalTimeUnit; } }
GraphiteConfiguration { public void setPollIntervalTimeUnit(TimeUnit pollIntervalTimeUnit) { this.pollIntervalTimeUnit = pollIntervalTimeUnit; } @PostConstruct void init(); boolean isEnabled(); int getPort(); void setPort(int port); String getHost(); void setHost(String host); String getPrefix(); void setPrefix(String...
GraphiteConfiguration { public void setPollIntervalTimeUnit(TimeUnit pollIntervalTimeUnit) { this.pollIntervalTimeUnit = pollIntervalTimeUnit; } @PostConstruct void init(); boolean isEnabled(); int getPort(); void setPort(int port); String getHost(); void setHost(String host); String getPrefix(); void setPrefix(String...
@Test public void nullRemoteMetaStoreUris() { metaStore.setRemoteMetaStoreUris(null); Set<ConstraintViolation<T>> violations = validator.validate(metaStore); assertThat(violations.size(), is(1)); }
public void setRemoteMetaStoreUris(String remoteMetaStoreUris) { this.remoteMetaStoreUris = remoteMetaStoreUris; }
AbstractMetaStore { public void setRemoteMetaStoreUris(String remoteMetaStoreUris) { this.remoteMetaStoreUris = remoteMetaStoreUris; } }
AbstractMetaStore { public void setRemoteMetaStoreUris(String remoteMetaStoreUris) { this.remoteMetaStoreUris = remoteMetaStoreUris; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStor...
AbstractMetaStore { public void setRemoteMetaStoreUris(String remoteMetaStoreUris) { this.remoteMetaStoreUris = remoteMetaStoreUris; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStor...
AbstractMetaStore { public void setRemoteMetaStoreUris(String remoteMetaStoreUris) { this.remoteMetaStoreUris = remoteMetaStoreUris; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStor...
@Test public void nullPort() { waggleDanceConfiguration.setPort(null); Set<ConstraintViolation<WaggleDanceConfiguration>> violations = validator.validate(waggleDanceConfiguration); assertThat(violations.size(), is(1)); }
public void setPort(Integer port) { this.port = port; }
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } }
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } }
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int disconnectConnectionDelay); TimeUnit getDisconnectTimeUnit()...
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int disconnectConnectionDelay); TimeUnit getDisconnectTimeUnit()...
@Test public void zeroPort() { waggleDanceConfiguration.setPort(0); Set<ConstraintViolation<WaggleDanceConfiguration>> violations = validator.validate(waggleDanceConfiguration); assertThat(violations.size(), is(1)); }
public void setPort(Integer port) { this.port = port; }
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } }
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } }
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int disconnectConnectionDelay); TimeUnit getDisconnectTimeUnit()...
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int disconnectConnectionDelay); TimeUnit getDisconnectTimeUnit()...
@Test public void negativePort() { waggleDanceConfiguration.setPort(-1); Set<ConstraintViolation<WaggleDanceConfiguration>> violations = validator.validate(waggleDanceConfiguration); assertThat(violations.size(), is(1)); }
public void setPort(Integer port) { this.port = port; }
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } }
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } }
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int disconnectConnectionDelay); TimeUnit getDisconnectTimeUnit()...
WaggleDanceConfiguration { public void setPort(Integer port) { this.port = port; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int disconnectConnectionDelay); TimeUnit getDisconnectTimeUnit()...
@Test public void zeroDisconnectConnectionDelay() { waggleDanceConfiguration.setDisconnectConnectionDelay(0); Set<ConstraintViolation<WaggleDanceConfiguration>> violations = validator.validate(waggleDanceConfiguration); assertThat(violations.size(), is(1)); }
public void setDisconnectConnectionDelay(int disconnectConnectionDelay) { this.disconnectConnectionDelay = disconnectConnectionDelay; }
WaggleDanceConfiguration { public void setDisconnectConnectionDelay(int disconnectConnectionDelay) { this.disconnectConnectionDelay = disconnectConnectionDelay; } }
WaggleDanceConfiguration { public void setDisconnectConnectionDelay(int disconnectConnectionDelay) { this.disconnectConnectionDelay = disconnectConnectionDelay; } }
WaggleDanceConfiguration { public void setDisconnectConnectionDelay(int disconnectConnectionDelay) { this.disconnectConnectionDelay = disconnectConnectionDelay; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnect...
WaggleDanceConfiguration { public void setDisconnectConnectionDelay(int disconnectConnectionDelay) { this.disconnectConnectionDelay = disconnectConnectionDelay; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnect...
@Test public void negativeDisconnectConnectionDelay() { waggleDanceConfiguration.setDisconnectConnectionDelay(-1); Set<ConstraintViolation<WaggleDanceConfiguration>> violations = validator.validate(waggleDanceConfiguration); assertThat(violations.size(), is(1)); }
public void setDisconnectConnectionDelay(int disconnectConnectionDelay) { this.disconnectConnectionDelay = disconnectConnectionDelay; }
WaggleDanceConfiguration { public void setDisconnectConnectionDelay(int disconnectConnectionDelay) { this.disconnectConnectionDelay = disconnectConnectionDelay; } }
WaggleDanceConfiguration { public void setDisconnectConnectionDelay(int disconnectConnectionDelay) { this.disconnectConnectionDelay = disconnectConnectionDelay; } }
WaggleDanceConfiguration { public void setDisconnectConnectionDelay(int disconnectConnectionDelay) { this.disconnectConnectionDelay = disconnectConnectionDelay; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnect...
WaggleDanceConfiguration { public void setDisconnectConnectionDelay(int disconnectConnectionDelay) { this.disconnectConnectionDelay = disconnectConnectionDelay; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnect...
@Test public void nullDisconnectTimeUnit() { waggleDanceConfiguration.setDisconnectTimeUnit(null); Set<ConstraintViolation<WaggleDanceConfiguration>> violations = validator.validate(waggleDanceConfiguration); assertThat(violations.size(), is(1)); }
public void setDisconnectTimeUnit(TimeUnit disconnectTimeUnit) { this.disconnectTimeUnit = disconnectTimeUnit; }
WaggleDanceConfiguration { public void setDisconnectTimeUnit(TimeUnit disconnectTimeUnit) { this.disconnectTimeUnit = disconnectTimeUnit; } }
WaggleDanceConfiguration { public void setDisconnectTimeUnit(TimeUnit disconnectTimeUnit) { this.disconnectTimeUnit = disconnectTimeUnit; } }
WaggleDanceConfiguration { public void setDisconnectTimeUnit(TimeUnit disconnectTimeUnit) { this.disconnectTimeUnit = disconnectTimeUnit; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int dis...
WaggleDanceConfiguration { public void setDisconnectTimeUnit(TimeUnit disconnectTimeUnit) { this.disconnectTimeUnit = disconnectTimeUnit; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int dis...
@Test public void nullConfigurationProperties() { waggleDanceConfiguration.setConfigurationProperties(null); Set<ConstraintViolation<WaggleDanceConfiguration>> violations = validator.validate(waggleDanceConfiguration); assertThat(violations.size(), is(0)); }
public void setConfigurationProperties(Map<String, String> configurationProperties) { this.configurationProperties = configurationProperties; }
WaggleDanceConfiguration { public void setConfigurationProperties(Map<String, String> configurationProperties) { this.configurationProperties = configurationProperties; } }
WaggleDanceConfiguration { public void setConfigurationProperties(Map<String, String> configurationProperties) { this.configurationProperties = configurationProperties; } }
WaggleDanceConfiguration { public void setConfigurationProperties(Map<String, String> configurationProperties) { this.configurationProperties = configurationProperties; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDi...
WaggleDanceConfiguration { public void setConfigurationProperties(Map<String, String> configurationProperties) { this.configurationProperties = configurationProperties; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDi...
@Test public void emptyConfigurationProperties() { waggleDanceConfiguration.setConfigurationProperties(ImmutableMap.of()); Set<ConstraintViolation<WaggleDanceConfiguration>> violations = validator.validate(waggleDanceConfiguration); assertThat(violations.size(), is(0)); }
public void setConfigurationProperties(Map<String, String> configurationProperties) { this.configurationProperties = configurationProperties; }
WaggleDanceConfiguration { public void setConfigurationProperties(Map<String, String> configurationProperties) { this.configurationProperties = configurationProperties; } }
WaggleDanceConfiguration { public void setConfigurationProperties(Map<String, String> configurationProperties) { this.configurationProperties = configurationProperties; } }
WaggleDanceConfiguration { public void setConfigurationProperties(Map<String, String> configurationProperties) { this.configurationProperties = configurationProperties; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDi...
WaggleDanceConfiguration { public void setConfigurationProperties(Map<String, String> configurationProperties) { this.configurationProperties = configurationProperties; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDi...
@Test public void nullDatabaseResolution() { waggleDanceConfiguration.setDatabaseResolution(null); Set<ConstraintViolation<WaggleDanceConfiguration>> violations = validator.validate(waggleDanceConfiguration); assertThat(violations.size(), is(1)); }
public void setDatabaseResolution(DatabaseResolution databaseResolution) { this.databaseResolution = databaseResolution; }
WaggleDanceConfiguration { public void setDatabaseResolution(DatabaseResolution databaseResolution) { this.databaseResolution = databaseResolution; } }
WaggleDanceConfiguration { public void setDatabaseResolution(DatabaseResolution databaseResolution) { this.databaseResolution = databaseResolution; } }
WaggleDanceConfiguration { public void setDatabaseResolution(DatabaseResolution databaseResolution) { this.databaseResolution = databaseResolution; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDel...
WaggleDanceConfiguration { public void setDatabaseResolution(DatabaseResolution databaseResolution) { this.databaseResolution = databaseResolution; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDel...
@Test public void setterGetterStatusPollingDelayDefault() { assertThat(waggleDanceConfiguration.getStatusPollingDelay(), is(5)); }
public int getStatusPollingDelay() { return statusPollingDelay; }
WaggleDanceConfiguration { public int getStatusPollingDelay() { return statusPollingDelay; } }
WaggleDanceConfiguration { public int getStatusPollingDelay() { return statusPollingDelay; } }
WaggleDanceConfiguration { public int getStatusPollingDelay() { return statusPollingDelay; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int disconnectConnectionDelay); TimeUnit getDisconnect...
WaggleDanceConfiguration { public int getStatusPollingDelay() { return statusPollingDelay; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int disconnectConnectionDelay); TimeUnit getDisconnect...
@Test public void emptyRemoteMetaStoreUris() { metaStore.setRemoteMetaStoreUris(" "); Set<ConstraintViolation<T>> violations = validator.validate(metaStore); assertThat(violations.size(), is(1)); }
public void setRemoteMetaStoreUris(String remoteMetaStoreUris) { this.remoteMetaStoreUris = remoteMetaStoreUris; }
AbstractMetaStore { public void setRemoteMetaStoreUris(String remoteMetaStoreUris) { this.remoteMetaStoreUris = remoteMetaStoreUris; } }
AbstractMetaStore { public void setRemoteMetaStoreUris(String remoteMetaStoreUris) { this.remoteMetaStoreUris = remoteMetaStoreUris; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStor...
AbstractMetaStore { public void setRemoteMetaStoreUris(String remoteMetaStoreUris) { this.remoteMetaStoreUris = remoteMetaStoreUris; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStor...
AbstractMetaStore { public void setRemoteMetaStoreUris(String remoteMetaStoreUris) { this.remoteMetaStoreUris = remoteMetaStoreUris; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStor...
@Test public void setterGetterStatusPollingDelayTimeUnitDefault() { assertThat(waggleDanceConfiguration.getStatusPollingDelayTimeUnit(), is(TimeUnit.MINUTES)); }
public TimeUnit getStatusPollingDelayTimeUnit() { return statusPollingDelayTimeUnit; }
WaggleDanceConfiguration { public TimeUnit getStatusPollingDelayTimeUnit() { return statusPollingDelayTimeUnit; } }
WaggleDanceConfiguration { public TimeUnit getStatusPollingDelayTimeUnit() { return statusPollingDelayTimeUnit; } }
WaggleDanceConfiguration { public TimeUnit getStatusPollingDelayTimeUnit() { return statusPollingDelayTimeUnit; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int disconnectConnectionDelay); T...
WaggleDanceConfiguration { public TimeUnit getStatusPollingDelayTimeUnit() { return statusPollingDelayTimeUnit; } Integer getPort(); void setPort(Integer port); boolean isVerbose(); void setVerbose(boolean verbose); int getDisconnectConnectionDelay(); void setDisconnectConnectionDelay(int disconnectConnectionDelay); T...
@Test public void defaultFactory() { ArgumentCaptor<HiveConf> hiveConfCaptor = ArgumentCaptor.forClass(HiveConf.class); factory.newInstance(newFederatedInstance("fed1", THRIFT_URI)); verify(defaultMetaStoreClientFactory).newInstance(hiveConfCaptor.capture(), eq( "waggledance-fed1"), eq(3), eq(2000)); verifyZeroInteract...
public CloseableThriftHiveMetastoreIface newInstance(AbstractMetaStore metaStore) { String uris = MetaStoreUriNormaliser.normaliseMetaStoreUris(metaStore.getRemoteMetaStoreUris()); String name = metaStore.getName().toLowerCase(Locale.ROOT); int connectionTimeout = Math.max(1, defaultConnectionTimeout + (int) metaStore....
CloseableThriftHiveMetastoreIfaceClientFactory { public CloseableThriftHiveMetastoreIface newInstance(AbstractMetaStore metaStore) { String uris = MetaStoreUriNormaliser.normaliseMetaStoreUris(metaStore.getRemoteMetaStoreUris()); String name = metaStore.getName().toLowerCase(Locale.ROOT); int connectionTimeout = Math.m...
CloseableThriftHiveMetastoreIfaceClientFactory { public CloseableThriftHiveMetastoreIface newInstance(AbstractMetaStore metaStore) { String uris = MetaStoreUriNormaliser.normaliseMetaStoreUris(metaStore.getRemoteMetaStoreUris()); String name = metaStore.getName().toLowerCase(Locale.ROOT); int connectionTimeout = Math.m...
CloseableThriftHiveMetastoreIfaceClientFactory { public CloseableThriftHiveMetastoreIface newInstance(AbstractMetaStore metaStore) { String uris = MetaStoreUriNormaliser.normaliseMetaStoreUris(metaStore.getRemoteMetaStoreUris()); String name = metaStore.getName().toLowerCase(Locale.ROOT); int connectionTimeout = Math.m...
CloseableThriftHiveMetastoreIfaceClientFactory { public CloseableThriftHiveMetastoreIface newInstance(AbstractMetaStore metaStore) { String uris = MetaStoreUriNormaliser.normaliseMetaStoreUris(metaStore.getRemoteMetaStoreUris()); String name = metaStore.getName().toLowerCase(Locale.ROOT); int connectionTimeout = Math.m...
@Test public void tunnelingFactory() { MetastoreTunnel metastoreTunnel = new MetastoreTunnel(); metastoreTunnel.setLocalhost("local-machine"); metastoreTunnel.setPort(2222); metastoreTunnel.setRoute("a -> b -> c"); metastoreTunnel.setKnownHosts("knownHosts"); metastoreTunnel.setPrivateKeys("privateKeys"); metastoreTunn...
public CloseableThriftHiveMetastoreIface newInstance(AbstractMetaStore metaStore) { String uris = MetaStoreUriNormaliser.normaliseMetaStoreUris(metaStore.getRemoteMetaStoreUris()); String name = metaStore.getName().toLowerCase(Locale.ROOT); int connectionTimeout = Math.max(1, defaultConnectionTimeout + (int) metaStore....
CloseableThriftHiveMetastoreIfaceClientFactory { public CloseableThriftHiveMetastoreIface newInstance(AbstractMetaStore metaStore) { String uris = MetaStoreUriNormaliser.normaliseMetaStoreUris(metaStore.getRemoteMetaStoreUris()); String name = metaStore.getName().toLowerCase(Locale.ROOT); int connectionTimeout = Math.m...
CloseableThriftHiveMetastoreIfaceClientFactory { public CloseableThriftHiveMetastoreIface newInstance(AbstractMetaStore metaStore) { String uris = MetaStoreUriNormaliser.normaliseMetaStoreUris(metaStore.getRemoteMetaStoreUris()); String name = metaStore.getName().toLowerCase(Locale.ROOT); int connectionTimeout = Math.m...
CloseableThriftHiveMetastoreIfaceClientFactory { public CloseableThriftHiveMetastoreIface newInstance(AbstractMetaStore metaStore) { String uris = MetaStoreUriNormaliser.normaliseMetaStoreUris(metaStore.getRemoteMetaStoreUris()); String name = metaStore.getName().toLowerCase(Locale.ROOT); int connectionTimeout = Math.m...
CloseableThriftHiveMetastoreIfaceClientFactory { public CloseableThriftHiveMetastoreIface newInstance(AbstractMetaStore metaStore) { String uris = MetaStoreUriNormaliser.normaliseMetaStoreUris(metaStore.getRemoteMetaStoreUris()); String name = metaStore.getName().toLowerCase(Locale.ROOT); int connectionTimeout = Math.m...
@Test public void get_table_req() throws Exception { CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory.newInstance(delegate); GetTableRequest tableRequest = new GetTableRequest(DB_NAME, TABLE_NAME); when(delegate.get_table_req(tableRequest)).thenThrow(new TApplicationException("Error")); when(delegat...
public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
@Test public void get_table_objects_by_name_req() throws Exception { CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory.newInstance(delegate); GetTablesRequest tablesRequest = new GetTablesRequest(DB_NAME); tablesRequest.addToTblNames(TABLE_NAME); when(delegate.get_table_objects_by_name_req(tablesRequ...
public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
@Test public void normalGetTableCallWorks() throws Exception { CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory.newInstance(delegate); when(delegate.get_table(DB_NAME, TABLE_NAME)).thenReturn(table); Table tableResult = thriftHiveMetastoreIface.get_table(DB_NAME, TABLE_NAME); assertThat(tableResult,...
public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
@Test public void underlyingExceptionIsThrownWhenCompatibilityFails() throws Exception { CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory.newInstance(delegate); TApplicationException cause = new TApplicationException("CAUSE"); when(delegate.get_all_databases()).thenThrow(cause); try { thriftHiveMeta...
public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
@Test public void compatibilityExceptionIsThrownWhenCompatibilityFailsOnTException() throws Exception { CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory.newInstance(delegate); GetTableRequest tableRequest = new GetTableRequest(DB_NAME, TABLE_NAME); when(delegate.get_table_req(tableRequest)) .thenThr...
public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
@Test public void underlyingyExceptionIsThrownWhenCompatibilityFailsOnTApplication() throws Exception { CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory.newInstance(delegate); GetTableRequest tableRequest = new GetTableRequest(DB_NAME, TABLE_NAME); TApplicationException cause = new TApplicationExcep...
public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
@Test public void nonTApplicationExceptionsAreThrown() throws Exception { CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory.newInstance(delegate); GetTableRequest tableRequest = new GetTableRequest(DB_NAME, TABLE_NAME); NoSuchObjectException cause = new NoSuchObjectException("Normal Error nothing to ...
public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
@Test public void validMetastoreTunnel() { metaStore.setMetastoreTunnel(newMetastoreTunnel()); Set<ConstraintViolation<T>> violations = validator.validate(metaStore); assertThat(violations.size(), is(0)); }
public void setMetastoreTunnel(MetastoreTunnel metastoreTunnel) { this.metastoreTunnel = metastoreTunnel; }
AbstractMetaStore { public void setMetastoreTunnel(MetastoreTunnel metastoreTunnel) { this.metastoreTunnel = metastoreTunnel; } }
AbstractMetaStore { public void setMetastoreTunnel(MetastoreTunnel metastoreTunnel) { this.metastoreTunnel = metastoreTunnel; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, ...
AbstractMetaStore { public void setMetastoreTunnel(MetastoreTunnel metastoreTunnel) { this.metastoreTunnel = metastoreTunnel; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, ...
AbstractMetaStore { public void setMetastoreTunnel(MetastoreTunnel metastoreTunnel) { this.metastoreTunnel = metastoreTunnel; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, ...
@Test public void get_primary_keys() throws Exception { CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory.newInstance(delegate); PrimaryKeysRequest primaryKeysRequest = new PrimaryKeysRequest(DB_NAME, TABLE_NAME); when(delegate.get_primary_keys(primaryKeysRequest)).thenThrow(new TApplicationException...
public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
@Test public void get_foreign_keys() throws Exception { CloseableThriftHiveMetastoreIface thriftHiveMetastoreIface = factory.newInstance(delegate); ForeignKeysRequest foreignKeysRequest = new ForeignKeysRequest(null, null, DB_NAME, TABLE_NAME); when(delegate.get_foreign_keys(foreignKeysRequest)).thenThrow(new TApplicat...
public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } }
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
HiveCompatibleThriftHiveMetastoreIfaceFactory { public CloseableThriftHiveMetastoreIface newInstance(ThriftHiveMetastore.Client delegate) { HiveThriftMetaStoreIfaceCompatibility compatibility = new HiveThriftMetaStoreIfaceCompatibility1xx(delegate); return newInstance(delegate, compatibility); } CloseableThriftHiveMet...
@Test public void newInstance() { tunnelingMetaStoreClientFactory.newInstance(METASTORE_URI, metastoreTunnel, NAME, RECONNECTION_RETRIES, CONNECTION_TIMEOUT); verify(tunnelableFactory) .wrap(tunnelableSupplierCaptor.capture(), eq(tunnelingMetaStoreClientFactory.METHOD_CHECKER), eq(metastoreTunnel.getLocalhost()), anyIn...
public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't support multiple uris '{}' for tunne...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
@Test public void newInstanceMultipleUris() { String metastoreUris = METASTORE_URI + ",thrift: tunnelingMetaStoreClientFactory.newInstance(metastoreUris, metastoreTunnel, NAME, RECONNECTION_RETRIES, CONNECTION_TIMEOUT); verify(tunnelableFactory) .wrap(tunnelableSupplierCaptor.capture(), eq(tunnelingMetaStoreClientFacto...
public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't support multiple uris '{}' for tunne...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
@Test public void localHiveConfigUsesCorrectParameters() { tunnelingMetaStoreClientFactory.newInstance(METASTORE_URI, metastoreTunnel, NAME, RECONNECTION_RETRIES, CONNECTION_TIMEOUT); ArgumentCaptor<String> localHostCaptor = ArgumentCaptor.forClass(String.class); ArgumentCaptor<HiveConf> hiveConfCaptor = ArgumentCaptor...
public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't support multiple uris '{}' for tunne...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
TunnelingMetaStoreClientFactory { public CloseableThriftHiveMetastoreIface newInstance( String uris, MetastoreTunnel metastoreTunnel, String name, int reconnectionRetries, int connectionTimeout) { String uri = uris; String[] urisSplit = uri.split(","); if (urisSplit.length > 1) { uri = urisSplit[0]; LOG.debug("Can't su...
@Test public void get() { TunnelableFactory<CloseableThriftHiveMetastoreIface> tunnelableFactory = supplier.get(metastoreTunnel); assertNotNull(tunnelableFactory); }
public TunnelableFactory<CloseableThriftHiveMetastoreIface> get(MetastoreTunnel metastoreTunnel) { return new TunnelableFactory<>(buildSshSettings(metastoreTunnel)); }
TunnelableFactorySupplier { public TunnelableFactory<CloseableThriftHiveMetastoreIface> get(MetastoreTunnel metastoreTunnel) { return new TunnelableFactory<>(buildSshSettings(metastoreTunnel)); } }
TunnelableFactorySupplier { public TunnelableFactory<CloseableThriftHiveMetastoreIface> get(MetastoreTunnel metastoreTunnel) { return new TunnelableFactory<>(buildSshSettings(metastoreTunnel)); } }
TunnelableFactorySupplier { public TunnelableFactory<CloseableThriftHiveMetastoreIface> get(MetastoreTunnel metastoreTunnel) { return new TunnelableFactory<>(buildSshSettings(metastoreTunnel)); } TunnelableFactory<CloseableThriftHiveMetastoreIface> get(MetastoreTunnel metastoreTunnel); }
TunnelableFactorySupplier { public TunnelableFactory<CloseableThriftHiveMetastoreIface> get(MetastoreTunnel metastoreTunnel) { return new TunnelableFactory<>(buildSshSettings(metastoreTunnel)); } TunnelableFactory<CloseableThriftHiveMetastoreIface> get(MetastoreTunnel metastoreTunnel); }
@Test public void buildSshSettings() { SshSettings sshSettings = supplier.buildSshSettings(metastoreTunnel); assertThat(sshSettings.getRoute(), is(TUNNEL_ROUTE)); assertThat(sshSettings.getPrivateKeys(), is(Lists.newArrayList(TUNNEL_PRIVATE_KEY))); assertThat(sshSettings.getKnownHosts(), is(TUNNEL_KNOWN_HOSTS)); assert...
@VisibleForTesting SshSettings buildSshSettings(MetastoreTunnel metastoreTunnel) { return SshSettings .builder() .withSshPort(metastoreTunnel.getPort()) .withSessionTimeout(metastoreTunnel.getTimeout()) .withRoute(metastoreTunnel.getRoute()) .withKnownHosts(metastoreTunnel.getKnownHosts()) .withLocalhost(metastoreTunne...
TunnelableFactorySupplier { @VisibleForTesting SshSettings buildSshSettings(MetastoreTunnel metastoreTunnel) { return SshSettings .builder() .withSshPort(metastoreTunnel.getPort()) .withSessionTimeout(metastoreTunnel.getTimeout()) .withRoute(metastoreTunnel.getRoute()) .withKnownHosts(metastoreTunnel.getKnownHosts()) ....
TunnelableFactorySupplier { @VisibleForTesting SshSettings buildSshSettings(MetastoreTunnel metastoreTunnel) { return SshSettings .builder() .withSshPort(metastoreTunnel.getPort()) .withSessionTimeout(metastoreTunnel.getTimeout()) .withRoute(metastoreTunnel.getRoute()) .withKnownHosts(metastoreTunnel.getKnownHosts()) ....
TunnelableFactorySupplier { @VisibleForTesting SshSettings buildSshSettings(MetastoreTunnel metastoreTunnel) { return SshSettings .builder() .withSshPort(metastoreTunnel.getPort()) .withSessionTimeout(metastoreTunnel.getTimeout()) .withRoute(metastoreTunnel.getRoute()) .withKnownHosts(metastoreTunnel.getKnownHosts()) ....
TunnelableFactorySupplier { @VisibleForTesting SshSettings buildSshSettings(MetastoreTunnel metastoreTunnel) { return SshSettings .builder() .withSshPort(metastoreTunnel.getPort()) .withSessionTimeout(metastoreTunnel.getTimeout()) .withRoute(metastoreTunnel.getRoute()) .withKnownHosts(metastoreTunnel.getKnownHosts()) ....
@Test public void getMetaStoreClientFactoryInstance() { String name = "test"; int reconnectionRetries = 10; int connectionTimeout = 10; HiveMetaStoreClientSupplier supplier = new HiveMetaStoreClientSupplier(factory, hiveConf, name, reconnectionRetries, connectionTimeout); supplier.get(); verify(factory).newInstance(hiv...
@Override public CloseableThriftHiveMetastoreIface get() { return factory.newInstance(hiveConf, name, reconnectionRetries, connectionTimeout); }
HiveMetaStoreClientSupplier implements TunnelableSupplier<CloseableThriftHiveMetastoreIface> { @Override public CloseableThriftHiveMetastoreIface get() { return factory.newInstance(hiveConf, name, reconnectionRetries, connectionTimeout); } }
HiveMetaStoreClientSupplier implements TunnelableSupplier<CloseableThriftHiveMetastoreIface> { @Override public CloseableThriftHiveMetastoreIface get() { return factory.newInstance(hiveConf, name, reconnectionRetries, connectionTimeout); } HiveMetaStoreClientSupplier(MetaStoreClientFactory factory, HiveConf hiveConf, S...
HiveMetaStoreClientSupplier implements TunnelableSupplier<CloseableThriftHiveMetastoreIface> { @Override public CloseableThriftHiveMetastoreIface get() { return factory.newInstance(hiveConf, name, reconnectionRetries, connectionTimeout); } HiveMetaStoreClientSupplier(MetaStoreClientFactory factory, HiveConf hiveConf, S...
HiveMetaStoreClientSupplier implements TunnelableSupplier<CloseableThriftHiveMetastoreIface> { @Override public CloseableThriftHiveMetastoreIface get() { return factory.newInstance(hiveConf, name, reconnectionRetries, connectionTimeout); } HiveMetaStoreClientSupplier(MetaStoreClientFactory factory, HiveConf hiveConf, S...
@Test public void getCorrectHiveConf() { String localHost = "localHost"; int localPort = 10; String expectedUri = "thrift: HiveConf hiveConf = new HiveConf(); HiveConf conf = new LocalHiveConfFactory().newInstance(localHost, localPort, hiveConf); assertThat(conf.getVar(HiveConf.ConfVars.METASTOREURIS), is(expectedUri))...
HiveConf newInstance(String localHost, int localPort, HiveConf hiveConf) { HiveConf localHiveConf = new HiveConf(hiveConf); String proxyMetaStoreUris = "thrift: localHiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, proxyMetaStoreUris); return localHiveConf; }
LocalHiveConfFactory { HiveConf newInstance(String localHost, int localPort, HiveConf hiveConf) { HiveConf localHiveConf = new HiveConf(hiveConf); String proxyMetaStoreUris = "thrift: localHiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, proxyMetaStoreUris); return localHiveConf; } }
LocalHiveConfFactory { HiveConf newInstance(String localHost, int localPort, HiveConf hiveConf) { HiveConf localHiveConf = new HiveConf(hiveConf); String proxyMetaStoreUris = "thrift: localHiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, proxyMetaStoreUris); return localHiveConf; } }
LocalHiveConfFactory { HiveConf newInstance(String localHost, int localPort, HiveConf hiveConf) { HiveConf localHiveConf = new HiveConf(hiveConf); String proxyMetaStoreUris = "thrift: localHiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, proxyMetaStoreUris); return localHiveConf; } }
LocalHiveConfFactory { HiveConf newInstance(String localHost, int localPort, HiveConf hiveConf) { HiveConf localHiveConf = new HiveConf(hiveConf); String proxyMetaStoreUris = "thrift: localHiveConf.setVar(HiveConf.ConfVars.METASTOREURIS, proxyMetaStoreUris); return localHiveConf; } }
@Test public void isOpen() { when(base.isOpen()).thenReturn(true); CloseableThriftHiveMetastoreIface iface = factory.newInstance("name", RECONNECTION_RETRIES, base); boolean result = iface.isOpen(); assertThat(result, is(true)); verify(base, never()).reconnect(); }
@Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleThriftHiveMetastoreIfaceFactory(), connectionTimeout)); }
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
@Test public void invalidMetastoreTunnel() { MetastoreTunnel metastoreTunnel = newMetastoreTunnel(); metastoreTunnel.setPort(-1); metaStore.setMetastoreTunnel(metastoreTunnel); Set<ConstraintViolation<T>> violations = validator.validate(metaStore); assertThat(violations.size(), is(1)); }
public void setMetastoreTunnel(MetastoreTunnel metastoreTunnel) { this.metastoreTunnel = metastoreTunnel; }
AbstractMetaStore { public void setMetastoreTunnel(MetastoreTunnel metastoreTunnel) { this.metastoreTunnel = metastoreTunnel; } }
AbstractMetaStore { public void setMetastoreTunnel(MetastoreTunnel metastoreTunnel) { this.metastoreTunnel = metastoreTunnel; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, ...
AbstractMetaStore { public void setMetastoreTunnel(MetastoreTunnel metastoreTunnel) { this.metastoreTunnel = metastoreTunnel; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, ...
AbstractMetaStore { public void setMetastoreTunnel(MetastoreTunnel metastoreTunnel) { this.metastoreTunnel = metastoreTunnel; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, ...
@Test public void isOpenWithReconnection() { when(base.isOpen()).thenReturn(false).thenReturn(true); CloseableThriftHiveMetastoreIface iface = factory.newInstance("name", RECONNECTION_RETRIES, base); boolean result = iface.isOpen(); assertThat(result, is(true)); verify(base).reconnect(); }
@Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleThriftHiveMetastoreIfaceFactory(), connectionTimeout)); }
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
@Test public void isOpenThrowsException() { when(base.isOpen()).thenThrow(new RuntimeException()); CloseableThriftHiveMetastoreIface iface = factory.newInstance("name", RECONNECTION_RETRIES, base); boolean result = iface.isOpen(); assertThat(result, is(false)); }
@Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleThriftHiveMetastoreIfaceFactory(), connectionTimeout)); }
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
@Test public void closeNullBase() throws Exception { CloseableThriftHiveMetastoreIface iface = factory.newInstance("name", RECONNECTION_RETRIES, null); iface.close(); verify(base, never()).close(); }
@Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleThriftHiveMetastoreIfaceFactory(), connectionTimeout)); }
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
@Test public void defaultMethodCall() throws Exception { when(base.getClient()).thenReturn(client); when(client.getName()).thenReturn("ourName"); CloseableThriftHiveMetastoreIface iface = factory.newInstance("name", RECONNECTION_RETRIES, base); String result = iface.getName(); assertThat(result, is("ourName")); }
@Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleThriftHiveMetastoreIfaceFactory(), connectionTimeout)); }
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
@Test public void defaultMethodCallThrowsTransportExceptionRetries() throws TException { when(base.getClient()).thenReturn(client); when(client.getName()).thenThrow(new TTransportException()).thenReturn("ourName"); CloseableThriftHiveMetastoreIface iface = factory.newInstance("name", RECONNECTION_RETRIES, base); String...
@Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleThriftHiveMetastoreIfaceFactory(), connectionTimeout)); }
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
@Test(expected = MetastoreUnavailableException.class) public void shutdownThrowsTransportExceptionNoRetry() throws TException { when(base.getClient()).thenReturn(client); doThrow(new TTransportException()).when(client).shutdown(); CloseableThriftHiveMetastoreIface iface = factory.newInstance("name", RECONNECTION_RETRIE...
@Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleThriftHiveMetastoreIfaceFactory(), connectionTimeout)); }
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
@Test(expected = MetastoreUnavailableException.class) public void defaultMethodCallThrowsTransportExceptionNoRetriesLeft() throws TException { when(base.getClient()).thenReturn(client); when(client.getName()).thenThrow(new TTransportException()); CloseableThriftHiveMetastoreIface iface = factory.newInstance("name", 0, ...
@Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleThriftHiveMetastoreIfaceFactory(), connectionTimeout)); }
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
@Test(expected = TException.class) public void defaultMethodCallThrowsRealException() throws TException { when(base.getClient()).thenReturn(client); when(client.getName()).thenThrow(new TException()); CloseableThriftHiveMetastoreIface iface = factory.newInstance("name", RECONNECTION_RETRIES, base); iface.getName(); }
@Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleThriftHiveMetastoreIfaceFactory(), connectionTimeout)); }
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
DefaultMetaStoreClientFactory implements MetaStoreClientFactory { @Override public CloseableThriftHiveMetastoreIface newInstance( HiveConf hiveConf, String name, int reconnectionRetries, int connectionTimeout) { return newInstance(name, reconnectionRetries, new ThriftMetastoreClientManager(hiveConf, new HiveCompatibleT...
@Test(expected = RuntimeException.class) public void openSlowConnection() { client = new ThriftMetastoreClientManager(hiveConf, hiveCompatibleThriftHiveMetastoreIfaceFactory, 1); client.open(); }
void open() { if (isConnected) { return; } TException te = null; boolean useSasl = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_SASL); boolean useFramedTransport = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_FRAMED_TRANSPORT); boolean useCompactProtocol = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_COMPACT_PROTOCO...
ThriftMetastoreClientManager implements Closeable { void open() { if (isConnected) { return; } TException te = null; boolean useSasl = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_SASL); boolean useFramedTransport = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_FRAMED_TRANSPORT); boolean useCompactProtocol = conf.getB...
ThriftMetastoreClientManager implements Closeable { void open() { if (isConnected) { return; } TException te = null; boolean useSasl = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_SASL); boolean useFramedTransport = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_FRAMED_TRANSPORT); boolean useCompactProtocol = conf.getB...
ThriftMetastoreClientManager implements Closeable { void open() { if (isConnected) { return; } TException te = null; boolean useSasl = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_SASL); boolean useFramedTransport = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_FRAMED_TRANSPORT); boolean useCompactProtocol = conf.getB...
ThriftMetastoreClientManager implements Closeable { void open() { if (isConnected) { return; } TException te = null; boolean useSasl = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_SASL); boolean useFramedTransport = conf.getBoolVar(ConfVars.METASTORE_USE_THRIFT_FRAMED_TRANSPORT); boolean useCompactProtocol = conf.getB...
@Test public void typicalPrefixed() { when(waggleDanceConfiguration.getDatabaseResolution()).thenReturn(DatabaseResolution.PREFIXED); AbstractMetaStore federatedMetaStore = newFederatedInstance("fed1", thrift.getThriftConnectionUri()); MetaStoreMapping mapping = factory.newInstance(federatedMetaStore); assertThat(mappi...
@SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreMapping = new MetaStoreMappingImpl(prefixNameFor(metaStore), metaS...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
@Test public void nullName() { metaStore.setName(null); Set<ConstraintViolation<T>> violations = validator.validate(metaStore); assertThat(violations.size(), is(1)); }
public void setName(String name) { this.name = name; }
AbstractMetaStore { public void setName(String name) { this.name = name; } }
AbstractMetaStore { public void setName(String name) { this.name = name; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, AccessControlType accessControlType, List...
AbstractMetaStore { public void setName(String name) { this.name = name; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, AccessControlType accessControlType, List...
AbstractMetaStore { public void setName(String name) { this.name = name; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, AccessControlType accessControlType, List...
@Test public void typicalNonPrefixed() { AbstractMetaStore federatedMetaStore = newFederatedInstance("fed1", thrift.getThriftConnectionUri()); MetaStoreMapping mapping = factory.newInstance(federatedMetaStore); assertThat(mapping, is(notNullValue())); verify(prefixNamingStrategy).apply(federatedMetaStore); verify(acces...
@SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreMapping = new MetaStoreMappingImpl(prefixNameFor(metaStore), metaS...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
@Test public void reconnection() throws Exception { MetaStoreMapping mapping = factory.newInstance(newFederatedInstance("fed1", thrift.getThriftConnectionUri())); assertThat(mapping.getClient().get_all_databases(), is(Arrays.asList("default", "test_db"))); mapping.close(); assertThat(mapping.getClient().get_all_databas...
@SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreMapping = new MetaStoreMappingImpl(prefixNameFor(metaStore), metaS...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
@Test public void connectionLost() throws Exception { MetaStoreMapping mapping = factory.newInstance(newFederatedInstance("fed1", thrift.getThriftConnectionUri())); assertThat(mapping.getClient().get_all_databases(), is(Arrays.asList("default", "test_db"))); thrift.client().reconnect(); assertThat(mapping.getClient().g...
@SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreMapping = new MetaStoreMappingImpl(prefixNameFor(metaStore), metaS...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
@Test public void unreachableMetastoreClient() { CloseableThriftHiveMetastoreIfaceClientFactory closeableThriftHiveMetastoreIfaceClientFactory = Mockito .mock(CloseableThriftHiveMetastoreIfaceClientFactory.class); MetaStoreMappingFactoryImpl factory = new MetaStoreMappingFactoryImpl(waggleDanceConfiguration, prefixNami...
@SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreMapping = new MetaStoreMappingImpl(prefixNameFor(metaStore), metaS...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
MetaStoreMappingFactoryImpl implements MetaStoreMappingFactory { @SuppressWarnings("resource") @Override public MetaStoreMapping newInstance(AbstractMetaStore metaStore) { LOG .info("Mapping databases with name '{}' to metastore: {}", metaStore.getName(), metaStore.getRemoteMetaStoreUris()); MetaStoreMapping metaStoreM...
@Test public void checkWritePermissions() throws Exception { decorator.checkWritePermissions("db"); verify(metaStoreMapping).checkWritePermissions("db"); }
@Override public MetaStoreMapping checkWritePermissions(String databaseName) { return metaStoreMapping.checkWritePermissions(databaseName); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public MetaStoreMapping checkWritePermissions(String databaseName) { return metaStoreMapping.checkWritePermissions(databaseName); } }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public MetaStoreMapping checkWritePermissions(String databaseName) { return metaStoreMapping.checkWritePermissions(databaseName); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public MetaStoreMapping checkWritePermissions(String databaseName) { return metaStoreMapping.checkWritePermissions(databaseName); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String transformOutboundDatabaseName(String databa...
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public MetaStoreMapping checkWritePermissions(String databaseName) { return metaStoreMapping.checkWritePermissions(databaseName); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String transformOutboundDatabaseName(String databa...
@Test public void close() throws Exception { decorator.close(); verify(metaStoreMapping).close(); }
@Override public void close() throws IOException { metaStoreMapping.close(); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public void close() throws IOException { metaStoreMapping.close(); } }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public void close() throws IOException { metaStoreMapping.close(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public void close() throws IOException { metaStoreMapping.close(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String transformOutboundDatabaseName(String databaseName); @Override List<String> transformOutboundDatabaseNameMu...
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public void close() throws IOException { metaStoreMapping.close(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String transformOutboundDatabaseName(String databaseName); @Override List<String> transformOutboundDatabaseNameMu...
@Test public void createDatabase() throws Exception { Database database = new Database(); decorator.createDatabase(database); verify(metaStoreMapping).createDatabase(database); }
@Override public void createDatabase(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException { metaStoreMapping.createDatabase(database); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public void createDatabase(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException { metaStoreMapping.createDatabase(database); } }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public void createDatabase(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException { metaStoreMapping.createDatabase(database); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public void createDatabase(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException { metaStoreMapping.createDatabase(database); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String t...
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public void createDatabase(Database database) throws AlreadyExistsException, InvalidObjectException, MetaException, TException { metaStoreMapping.createDatabase(database); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String t...
@Test public void getClient() throws Exception { when(metaStoreMapping.getClient()).thenReturn(client); Iface result = decorator.getClient(); assertThat(result, is(client)); }
@Override public Iface getClient() { return metaStoreMapping.getClient(); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public Iface getClient() { return metaStoreMapping.getClient(); } }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public Iface getClient() { return metaStoreMapping.getClient(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public Iface getClient() { return metaStoreMapping.getClient(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String transformOutboundDatabaseName(String databaseName); @Override List<String> transformOutboundDatabaseNameMulti...
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public Iface getClient() { return metaStoreMapping.getClient(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String transformOutboundDatabaseName(String databaseName); @Override List<String> transformOutboundDatabaseNameMulti...
@Test public void getDatabasePrefix() throws Exception { when(metaStoreMapping.getDatabasePrefix()).thenReturn("pre"); String result = decorator.getDatabasePrefix(); assertThat(result, is("pre")); }
@Override public String getDatabasePrefix() { return metaStoreMapping.getDatabasePrefix(); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public String getDatabasePrefix() { return metaStoreMapping.getDatabasePrefix(); } }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public String getDatabasePrefix() { return metaStoreMapping.getDatabasePrefix(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public String getDatabasePrefix() { return metaStoreMapping.getDatabasePrefix(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String transformOutboundDatabaseName(String databaseName); @Override List<String> transformOutbound...
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public String getDatabasePrefix() { return metaStoreMapping.getDatabasePrefix(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String transformOutboundDatabaseName(String databaseName); @Override List<String> transformOutbound...
@Test public void getLatency() throws Exception { when(metaStoreMapping.getLatency()).thenReturn(1L); long result = decorator.getLatency(); assertThat(result, is(1L)); }
@Override public long getLatency() { return metaStoreMapping.getLatency(); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public long getLatency() { return metaStoreMapping.getLatency(); } }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public long getLatency() { return metaStoreMapping.getLatency(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); }
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public long getLatency() { return metaStoreMapping.getLatency(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String transformOutboundDatabaseName(String databaseName); @Override List<String> transformOutboundDatabaseNameMult...
MetaStoreMappingDecorator implements MetaStoreMapping { @Override public long getLatency() { return metaStoreMapping.getLatency(); } MetaStoreMappingDecorator(MetaStoreMapping metaStoreMapping); @Override String transformOutboundDatabaseName(String databaseName); @Override List<String> transformOutboundDatabaseNameMult...
@Test public void emptyName() { metaStore.setName(" "); Set<ConstraintViolation<T>> violations = validator.validate(metaStore); assertThat(violations.size(), is(1)); }
public void setName(String name) { this.name = name; }
AbstractMetaStore { public void setName(String name) { this.name = name; } }
AbstractMetaStore { public void setName(String name) { this.name = name; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, AccessControlType accessControlType, List...
AbstractMetaStore { public void setName(String name) { this.name = name; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, AccessControlType accessControlType, List...
AbstractMetaStore { public void setName(String name) { this.name = name; } AbstractMetaStore(); AbstractMetaStore(String name, String remoteMetaStoreUris, AccessControlType accessControlType); AbstractMetaStore( String name, String remoteMetaStoreUris, AccessControlType accessControlType, List...
@Test(expected = IllegalStateException.class) public void test_invalid_xpath_compilation_throws_exception() throws Exception { new SimpleXPathBasedCheck() { XPathExpression failing = getXPathExpression("boolean(a"); @Override public void scanFile(XmlFile file) { } }; }
public XPathExpression getXPathExpression(String expression) { try { return xpath.compile(expression); } catch (XPathExpressionException e) { throw new IllegalStateException(String.format("[%s] Fail to compile XPath expression '%s'.", ruleKey(), expression), e); } }
SimpleXPathBasedCheck extends SonarXmlCheck { public XPathExpression getXPathExpression(String expression) { try { return xpath.compile(expression); } catch (XPathExpressionException e) { throw new IllegalStateException(String.format("[%s] Fail to compile XPath expression '%s'.", ruleKey(), expression), e); } } }
SimpleXPathBasedCheck extends SonarXmlCheck { public XPathExpression getXPathExpression(String expression) { try { return xpath.compile(expression); } catch (XPathExpressionException e) { throw new IllegalStateException(String.format("[%s] Fail to compile XPath expression '%s'.", ruleKey(), expression), e); } } }
SimpleXPathBasedCheck extends SonarXmlCheck { public XPathExpression getXPathExpression(String expression) { try { return xpath.compile(expression); } catch (XPathExpressionException e) { throw new IllegalStateException(String.format("[%s] Fail to compile XPath expression '%s'.", ruleKey(), expression), e); } } XPathE...
SimpleXPathBasedCheck extends SonarXmlCheck { public XPathExpression getXPathExpression(String expression) { try { return xpath.compile(expression); } catch (XPathExpressionException e) { throw new IllegalStateException(String.format("[%s] Fail to compile XPath expression '%s'.", ruleKey(), expression), e); } } XPathE...
@Test public void fails_when_activating_rules_more_than_once() { NewBuiltInQualityProfile newProfile = testContext.createBuiltInQualityProfile(PROFILE_NAME, LANGUAGE); BuiltInQualityProfileJsonLoader.load(newProfile, REPOSITORY_KEY, PROFILE_PATH); thrown.expect(IllegalArgumentException.class); thrown.expectMessage("The...
public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } }
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } }
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
@Test public void fails_when_no_profile_found() { thrown.expect(IllegalStateException.class); thrown.expectMessage("Can't read resource: /wrong/path/Sonar_way_profile.json"); NewBuiltInQualityProfile newProfile = testContext.createBuiltInQualityProfile(PROFILE_NAME, LANGUAGE); BuiltInQualityProfileJsonLoader.load(newPr...
public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } }
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } }
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
@Test public void fails_when_no_rule_keys_in_profile() { thrown.expect(IllegalStateException.class); thrown.expectMessage("missing 'ruleKeys'"); NewBuiltInQualityProfile newProfile = testContext.createBuiltInQualityProfile(PROFILE_NAME, LANGUAGE); BuiltInQualityProfileJsonLoader.load(newProfile, REPOSITORY_KEY, "org/so...
public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } }
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } }
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
@Test public void should_activate_hotspots() { NewBuiltInQualityProfile newProfile = testContext.createBuiltInQualityProfile(PROFILE_NAME, LANGUAGE); String profilePath = "org/sonarsource/analyzer/commons/Sonar_way_profile_with_hotspots.json"; BuiltInQualityProfileJsonLoader.load(newProfile, REPOSITORY_KEY, profilePath...
public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } }
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } }
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
BuiltInQualityProfileJsonLoader { public static void load(NewBuiltInQualityProfile profile, String repositoryKey, String jsonProfilePath) { Set<String> activeKeys = loadActiveKeysFromJsonProfile(jsonProfilePath); for (String activeKey : activeKeys) { profile.activateRule(repositoryKey, activeKey); } } private BuiltInQ...
@Test public void load_rule_S100() throws Exception { @Rule(key = "S100") class TestRule { } ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); newRepository.done(); RulesDefinition.Repository repository = context.repository(RULE_REPOSITORY_KEY); RulesDefinition.Rule ...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void load_rule_S110() throws Exception { @Rule(key = "S110") class TestRule { } ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); newRepository.done(); RulesDefinition.Repository repository = context.repository(RULE_REPOSITORY_KEY); RulesDefinition.Rule ...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void load_rules_key_based() throws Exception { ruleMetadataLoader.addRulesByRuleKey(newRepository, Arrays.asList("S110", "S100")); newRepository.done(); RulesDefinition.Repository repository = context.repository(RULE_REPOSITORY_KEY); RulesDefinition.Rule ruleS110 = repository.rule("S110"); assertThat(ruleS...
public void addRulesByRuleKey(NewRepository repository, List<String> ruleKeys) { for (String ruleKey : ruleKeys) { addRuleByRuleKey(repository, ruleKey); } }
RuleMetadataLoader { public void addRulesByRuleKey(NewRepository repository, List<String> ruleKeys) { for (String ruleKey : ruleKeys) { addRuleByRuleKey(repository, ruleKey); } } }
RuleMetadataLoader { public void addRulesByRuleKey(NewRepository repository, List<String> ruleKeys) { for (String ruleKey : ruleKeys) { addRuleByRuleKey(repository, ruleKey); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath); private RuleMetadataLoader...
RuleMetadataLoader { public void addRulesByRuleKey(NewRepository repository, List<String> ruleKeys) { for (String ruleKey : ruleKeys) { addRuleByRuleKey(repository, ruleKey); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath); private RuleMetadataLoader...
RuleMetadataLoader { public void addRulesByRuleKey(NewRepository repository, List<String> ruleKeys) { for (String ruleKey : ruleKeys) { addRuleByRuleKey(repository, ruleKey); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath); private RuleMetadataLoader...
@Test public void load_rule_S123() throws Exception { @Rule(key = "S123") class TestRule { } ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); newRepository.done(); RulesDefinition.Repository repository = context.repository(RULE_REPOSITORY_KEY); RulesDefinition.Rule ...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void load_rule_with_deprecated_key() throws Exception { @Rule(key = "S123") @DeprecatedRuleKey(repositoryKey = "oldRepo", ruleKey = "oldKey") class TestRule { } ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); newRepository.done(); RulesDefinition.Repos...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void load_rule_with_many_deprecated_keys() throws Exception { @Rule(key = "S123") @DeprecatedRuleKey(repositoryKey = "oldRepo1", ruleKey = "oldKey1") @DeprecatedRuleKey(repositoryKey = "oldRepo2", ruleKey = "oldKey2") class TestRule { } ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void test_createXMLInputFactory() { assertThat(SafetyFactory.createXMLInputFactory()).isNotNull(); }
@Deprecated public static XMLInputFactory createXMLInputFactory() { return SafeStaxParserFactory.createXMLInputFactory(); }
SafetyFactory { @Deprecated public static XMLInputFactory createXMLInputFactory() { return SafeStaxParserFactory.createXMLInputFactory(); } }
SafetyFactory { @Deprecated public static XMLInputFactory createXMLInputFactory() { return SafeStaxParserFactory.createXMLInputFactory(); } private SafetyFactory(); }
SafetyFactory { @Deprecated public static XMLInputFactory createXMLInputFactory() { return SafeStaxParserFactory.createXMLInputFactory(); } private SafetyFactory(); @Deprecated static XMLInputFactory createXMLInputFactory(); @Deprecated static DocumentBuilder createDocumentBuilder(boolean namespaceAware); }
SafetyFactory { @Deprecated public static XMLInputFactory createXMLInputFactory() { return SafeStaxParserFactory.createXMLInputFactory(); } private SafetyFactory(); @Deprecated static XMLInputFactory createXMLInputFactory(); @Deprecated static DocumentBuilder createDocumentBuilder(boolean namespaceAware); }
@Test public void load_rule_with_deprecated_key_without_repo() throws Exception { @Rule(key = "S123") @DeprecatedRuleKey(ruleKey = "oldKey") class TestRule { } ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); newRepository.done(); RulesDefinition.Repository reposito...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void load_rule_list() throws Exception { @Rule(key = "S100") class RuleA { } @Rule(key = "S110") class RuleB { } ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Arrays.asList(RuleA.class, RuleB.class)); newRepository.done(); RulesDefinition.Repository repository = context.repository(RULE_REPOSIT...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void no_profile() throws Exception { @Rule(key = "S100") class TestRule { } ruleMetadataLoader = new RuleMetadataLoader(RESOURCE_FOLDER); ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); newRepository.done(); RulesDefinition.Rule rule = context.reposito...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void rule_not_in_default_profile() throws Exception { @Rule(key = "S123") class TestRule { } ruleMetadataLoader = new RuleMetadataLoader(RESOURCE_FOLDER, DEFAULT_PROFILE_PATH); ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); newRepository.done(); Rules...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void rule_in_default_profile() throws Exception { @Rule(key = "S100") class TestRule { } ruleMetadataLoader = new RuleMetadataLoader(RESOURCE_FOLDER, DEFAULT_PROFILE_PATH); ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); newRepository.done(); RulesDefi...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void getStringArray() throws Exception { Map<String, Object> map = Collections.singletonMap("key", Arrays.asList("x", "y")); assertThat(RuleMetadataLoader.getStringArray(map, "key")).containsExactly("x", "y"); }
static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArray(new String[0]); }
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
@Test(expected = IllegalStateException.class) public void getStringArray_with_invalid_type() throws Exception { Map<String, Object> map = Collections.singletonMap("key", "x"); RuleMetadataLoader.getStringArray(map, "key"); }
static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArray(new String[0]); }
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
@Test(expected = IllegalStateException.class) public void getStringArray_without_property() throws Exception { RuleMetadataLoader.getStringArray(Collections.emptyMap(), "key"); }
static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArray(new String[0]); }
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
RuleMetadataLoader { static String[] getStringArray(Map<String, Object> map, String propertyName) { Object propertyValue = map.get(propertyName); if (!(propertyValue instanceof List)) { throw new IllegalStateException(String.format(INVALID_PROPERTY_MESSAGE, propertyName)); } return ((List<String>) propertyValue).toArra...
@Test public void test_security_hotspot() { @Rule(key = "S2092") class TestRule { } ruleMetadataLoader = new RuleMetadataLoader(RESOURCE_FOLDER, DEFAULT_PROFILE_PATH); ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); newRepository.done(); RulesDefinition.Rule rule =...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void test_security_standards() { @Rule(key = "S112") class TestRule { } ruleMetadataLoader = new RuleMetadataLoader(RESOURCE_FOLDER, DEFAULT_PROFILE_PATH); ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); newRepository.done(); RulesDefinition.Rule rule ...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void test_createDocumentBuilder() { assertThat(SafetyFactory.createDocumentBuilder(true)).isNotNull(); assertThat(SafetyFactory.createDocumentBuilder(false)).isNotNull(); }
@Deprecated public static DocumentBuilder createDocumentBuilder(boolean namespaceAware) { return SafeDomParserFactory.createDocumentBuilder(namespaceAware); }
SafetyFactory { @Deprecated public static DocumentBuilder createDocumentBuilder(boolean namespaceAware) { return SafeDomParserFactory.createDocumentBuilder(namespaceAware); } }
SafetyFactory { @Deprecated public static DocumentBuilder createDocumentBuilder(boolean namespaceAware) { return SafeDomParserFactory.createDocumentBuilder(namespaceAware); } private SafetyFactory(); }
SafetyFactory { @Deprecated public static DocumentBuilder createDocumentBuilder(boolean namespaceAware) { return SafeDomParserFactory.createDocumentBuilder(namespaceAware); } private SafetyFactory(); @Deprecated static XMLInputFactory createXMLInputFactory(); @Deprecated static DocumentBuilder createDocumentBuilder(bo...
SafetyFactory { @Deprecated public static DocumentBuilder createDocumentBuilder(boolean namespaceAware) { return SafeDomParserFactory.createDocumentBuilder(namespaceAware); } private SafetyFactory(); @Deprecated static XMLInputFactory createXMLInputFactory(); @Deprecated static DocumentBuilder createDocumentBuilder(bo...
@Test public void test_invalid_json_string() { @Rule(key = "rule_missing_title") class TestRule { } ruleMetadataLoader = new RuleMetadataLoader(RESOURCE_FOLDER); try { ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); fail("Should have failed"); } catch (Exception e)...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void test_invalid_json_string_array() { @Rule(key = "rule_wrong_tag") class TestRule { } ruleMetadataLoader = new RuleMetadataLoader(RESOURCE_FOLDER); try { ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule.class)); fail("Should have failed"); } catch (Exception ...
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void test_invalid_json_int_array() { @Rule(key = "rule_wrong_cwe") class TestRule { } ruleMetadataLoader = new RuleMetadataLoader(RESOURCE_FOLDER, "org/sonarsource/analyzer/commons/profile_wrong_cwe.json"); try { ruleMetadataLoader.addRulesByAnnotatedClass(newRepository, Collections.singletonList(TestRule....
public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } }
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
RuleMetadataLoader { public void addRulesByAnnotatedClass(NewRepository repository, List<Class<?>> ruleClasses) { for (Class<?> ruleClass : ruleClasses) { addRuleByAnnotatedClass(repository, ruleClass); } } RuleMetadataLoader(String resourceFolder); RuleMetadataLoader(String resourceFolder, String defaultProfilePath);...
@Test public void read_resource() throws Exception { assertThat(Resources.toString("org/sonarsource/analyzer/commons/ResourcesTest.txt", UTF_8)).isEqualTo("hello\n"); }
static String toString(String path, Charset charset) throws IOException { try (InputStream input = Resources.class.getClassLoader().getResourceAsStream(path)) { if (input == null) { throw new IOException("Resource not found in the classpath: " + path); } ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] b...
Resources { static String toString(String path, Charset charset) throws IOException { try (InputStream input = Resources.class.getClassLoader().getResourceAsStream(path)) { if (input == null) { throw new IOException("Resource not found in the classpath: " + path); } ByteArrayOutputStream out = new ByteArrayOutputStream...
Resources { static String toString(String path, Charset charset) throws IOException { try (InputStream input = Resources.class.getClassLoader().getResourceAsStream(path)) { if (input == null) { throw new IOException("Resource not found in the classpath: " + path); } ByteArrayOutputStream out = new ByteArrayOutputStream...
Resources { static String toString(String path, Charset charset) throws IOException { try (InputStream input = Resources.class.getClassLoader().getResourceAsStream(path)) { if (input == null) { throw new IOException("Resource not found in the classpath: " + path); } ByteArrayOutputStream out = new ByteArrayOutputStream...
Resources { static String toString(String path, Charset charset) throws IOException { try (InputStream input = Resources.class.getClassLoader().getResourceAsStream(path)) { if (input == null) { throw new IOException("Resource not found in the classpath: " + path); } ByteArrayOutputStream out = new ByteArrayOutputStream...
@Test(expected = IOException.class) public void read_invalid_resource() throws Exception { Resources.toString("invalid/path.txt", UTF_8); }
static String toString(String path, Charset charset) throws IOException { try (InputStream input = Resources.class.getClassLoader().getResourceAsStream(path)) { if (input == null) { throw new IOException("Resource not found in the classpath: " + path); } ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] b...
Resources { static String toString(String path, Charset charset) throws IOException { try (InputStream input = Resources.class.getClassLoader().getResourceAsStream(path)) { if (input == null) { throw new IOException("Resource not found in the classpath: " + path); } ByteArrayOutputStream out = new ByteArrayOutputStream...
Resources { static String toString(String path, Charset charset) throws IOException { try (InputStream input = Resources.class.getClassLoader().getResourceAsStream(path)) { if (input == null) { throw new IOException("Resource not found in the classpath: " + path); } ByteArrayOutputStream out = new ByteArrayOutputStream...
Resources { static String toString(String path, Charset charset) throws IOException { try (InputStream input = Resources.class.getClassLoader().getResourceAsStream(path)) { if (input == null) { throw new IOException("Resource not found in the classpath: " + path); } ByteArrayOutputStream out = new ByteArrayOutputStream...
Resources { static String toString(String path, Charset charset) throws IOException { try (InputStream input = Resources.class.getClassLoader().getResourceAsStream(path)) { if (input == null) { throw new IOException("Resource not found in the classpath: " + path); } ByteArrayOutputStream out = new ByteArrayOutputStream...