From db19d2d547a370a6b688d1695aa9954eb962b5ae Mon Sep 17 00:00:00 2001 From: Charles Allen Date: Fri, 14 Aug 2015 09:26:07 -0700 Subject: [PATCH] Revert "Update to guice 4.0" --- .../io/druid/guice/DruidSecondaryModule.java | 4 +- .../guice/JacksonConfigManagerModule.java | 2 +- .../azure/AzureStorageDruidModule.java | 4 +- .../KafkaExtractionNamespaceModule.java | 12 +----- .../namespace/TestKafkaExtractionCluster.java | 42 ++++++++----------- .../namespace/NamespacedExtractionModule.java | 6 +-- .../storage/s3/S3StorageDruidModule.java | 4 +- .../druid/testing/guice/DruidTestModule.java | 2 +- pom.xml | 9 ++-- .../java/io/druid/guice/ConfigModule.java | 2 +- .../java/io/druid/jackson/JacksonModule.java | 4 +- .../MetadataStorageTablesConfigTest.java | 2 +- .../java/io/druid/curator/CuratorModule.java | 2 +- .../curator/discovery/DiscoveryModule.java | 6 +-- .../main/java/io/druid/guice/AWSModule.java | 4 +- .../java/io/druid/guice/AnnouncerModule.java | 2 +- .../io/druid/guice/DruidProcessingModule.java | 6 +-- .../guice/IndexingServiceDiscoveryModule.java | 2 +- .../java/io/druid/guice/ServerModule.java | 2 +- .../io/druid/guice/StorageNodeModule.java | 2 +- .../server/initialization/EmitterModule.java | 2 +- .../initialization/HttpEmitterModule.java | 2 +- .../initialization/LogEmitterModule.java | 2 +- .../initialization/NoopEmitterModule.java | 2 +- .../jetty/JettyServerModule.java | 4 +- .../druid/server/metrics/MetricsModule.java | 2 +- .../src/main/java/io/druid/cli/CliBridge.java | 8 ++-- .../java/io/druid/cli/CliCoordinator.java | 2 +- .../java/io/druid/cli/CliMiddleManager.java | 2 +- .../src/main/java/io/druid/cli/CliRouter.java | 2 +- 30 files changed, 66 insertions(+), 81 deletions(-) diff --git a/common/src/main/java/io/druid/guice/DruidSecondaryModule.java b/common/src/main/java/io/druid/guice/DruidSecondaryModule.java index 9eff9992567..d1e4c6e4aea 100644 --- a/common/src/main/java/io/druid/guice/DruidSecondaryModule.java +++ b/common/src/main/java/io/druid/guice/DruidSecondaryModule.java @@ -72,14 +72,14 @@ public class DruidSecondaryModule implements Module } @Provides @LazySingleton @Json - public final ObjectMapper getJsonMapper(final Injector injector) + public ObjectMapper getJsonMapper(final Injector injector) { setupJackson(injector, jsonMapper); return jsonMapper; } @Provides @LazySingleton @Smile - public final ObjectMapper getSmileMapper(Injector injector) + public ObjectMapper getSmileMapper(Injector injector) { setupJackson(injector, smileMapper); return smileMapper; diff --git a/common/src/main/java/io/druid/guice/JacksonConfigManagerModule.java b/common/src/main/java/io/druid/guice/JacksonConfigManagerModule.java index 6e5ac6e2d7b..ac6ebc337a7 100644 --- a/common/src/main/java/io/druid/guice/JacksonConfigManagerModule.java +++ b/common/src/main/java/io/druid/guice/JacksonConfigManagerModule.java @@ -40,7 +40,7 @@ public class JacksonConfigManagerModule implements Module } @Provides @ManageLifecycle - public final ConfigManager getConfigManager( + public ConfigManager getConfigManager( final MetadataStorageConnector dbConnector, final Supplier dbTables, final Supplier config, diff --git a/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureStorageDruidModule.java b/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureStorageDruidModule.java index c0eb3b23f8c..88f59d7bf72 100644 --- a/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureStorageDruidModule.java +++ b/extensions/azure-extensions/src/main/java/io/druid/storage/azure/AzureStorageDruidModule.java @@ -98,7 +98,7 @@ public class AzureStorageDruidModule implements DruidModule @Provides @LazySingleton - public final CloudBlobClient getCloudBlobClient(final AzureAccountConfig config) + public CloudBlobClient getCloudBlobClient(final AzureAccountConfig config) throws URISyntaxException, InvalidKeyException { CloudStorageAccount account = CloudStorageAccount.parse( @@ -115,7 +115,7 @@ public class AzureStorageDruidModule implements DruidModule @Provides @LazySingleton - public final AzureStorage getAzureStorageContainer( + public AzureStorage getAzureStorageContainer( final CloudBlobClient cloudBlobClient ) { diff --git a/extensions/kafka-extraction-namespace/src/main/java/io/druid/server/namespace/KafkaExtractionNamespaceModule.java b/extensions/kafka-extraction-namespace/src/main/java/io/druid/server/namespace/KafkaExtractionNamespaceModule.java index d16706cebd3..d66f4016461 100644 --- a/extensions/kafka-extraction-namespace/src/main/java/io/druid/server/namespace/KafkaExtractionNamespaceModule.java +++ b/extensions/kafka-extraction-namespace/src/main/java/io/druid/server/namespace/KafkaExtractionNamespaceModule.java @@ -71,15 +71,7 @@ public class KafkaExtractionNamespaceModule implements DruidModule @Provides @Named("renameKafkaProperties") @LazySingleton - public final Properties getProperties( - @Json ObjectMapper mapper, - Properties systemProperties - ){ - return getPropertiesInner(mapper, systemProperties); - } - - // Protected for use in unit tests - protected Properties getPropertiesInner( + public Properties getProperties( @Json ObjectMapper mapper, Properties systemProperties ) @@ -106,7 +98,7 @@ public class KafkaExtractionNamespaceModule implements DruidModule @Provides @LazySingleton - public final KafkaExtractionNamespaceFactory factoryFactory( + public KafkaExtractionNamespaceFactory factoryFactory( KafkaExtractionManager kafkaManager ) { diff --git a/extensions/kafka-extraction-namespace/src/test/java/io/druid/query/extraction/namespace/TestKafkaExtractionCluster.java b/extensions/kafka-extraction-namespace/src/test/java/io/druid/query/extraction/namespace/TestKafkaExtractionCluster.java index 1b8c305f6f4..fb252768503 100644 --- a/extensions/kafka-extraction-namespace/src/test/java/io/druid/query/extraction/namespace/TestKafkaExtractionCluster.java +++ b/extensions/kafka-extraction-namespace/src/test/java/io/druid/query/extraction/namespace/TestKafkaExtractionCluster.java @@ -31,6 +31,9 @@ import com.google.inject.Key; import com.google.inject.Module; import com.google.inject.Provider; import com.google.inject.TypeLiteral; +import com.google.inject.multibindings.MapBinder; +import com.google.inject.multibindings.Multibinder; +import com.google.inject.name.Named; import com.google.inject.name.Names; import com.metamx.common.ISE; import com.metamx.common.StringUtils; @@ -55,6 +58,10 @@ import kafka.utils.ZKStringSerializer$; import org.I0Itec.zkclient.ZkClient; import org.apache.commons.io.FileUtils; import org.apache.curator.test.TestingServer; +import org.apache.log4j.BasicConfigurator; +import org.apache.log4j.ConsoleAppender; +import org.apache.log4j.Level; +import org.apache.log4j.PatternLayout; import org.apache.zookeeper.CreateMode; import org.joda.time.DateTime; import org.junit.AfterClass; @@ -90,18 +97,16 @@ public class TestKafkaExtractionCluster private static Injector injector; + public static class KafkaFactoryProvider implements Provider> { private final KafkaExtractionManager kafkaExtractionManager; - @Inject public KafkaFactoryProvider( KafkaExtractionManager kafkaExtractionManager - ) - { + ){ this.kafkaExtractionManager = kafkaExtractionManager; } - @Override public ExtractionNamespaceFunctionFactory get() { @@ -217,10 +222,6 @@ public class TestKafkaExtractionCluster } System.setProperty("druid.extensions.searchCurrentClassloader", "false"); - final Properties consumerProperties = new Properties(kafkaProperties); - consumerProperties.put("zookeeper.connect", zkTestServer.getConnectString() + "/kafka"); - consumerProperties.put("zookeeper.session.timeout.ms", "10000"); - consumerProperties.put("zookeeper.sync.time.ms", "200"); injector = Initialization.makeInjectorWithModules( GuiceInjectors.makeStartupInjectorWithModules( @@ -238,11 +239,15 @@ public class TestKafkaExtractionCluster new KafkaExtractionNamespaceModule() { @Override - protected Properties getPropertiesInner( + public Properties getProperties( @Json ObjectMapper mapper, Properties systemProperties ) { + final Properties consumerProperties = new Properties(kafkaProperties); + consumerProperties.put("zookeeper.connect", zkTestServer.getConnectString() + "/kafka"); + consumerProperties.put("zookeeper.session.timeout.ms", "10000"); + consumerProperties.put("zookeeper.sync.time.ms", "200"); return consumerProperties; } } @@ -282,8 +287,7 @@ public class TestKafkaExtractionCluster if (zkClient.exists("/kafka")) { try { zkClient.deleteRecursive("/kafka"); - } - catch (org.I0Itec.zkclient.exception.ZkException ex) { + }catch(org.I0Itec.zkclient.exception.ZkException ex){ log.warn(ex, "error deleting /kafka zk node"); } } @@ -292,13 +296,12 @@ public class TestKafkaExtractionCluster if (null != zkTestServer) { zkTestServer.stop(); } - if (tmpDir.exists()) { + if(tmpDir.exists()){ FileUtils.deleteDirectory(tmpDir); } } - private static final Properties makeProducerProperties() - { + private static final Properties makeProducerProperties(){ final Properties kafkaProducerProperties = new Properties(); kafkaProducerProperties.putAll(kafkaProperties); kafkaProducerProperties.put( @@ -324,16 +327,7 @@ public class TestKafkaExtractionCluster final Producer producer = new Producer(new ProducerConfig(kafkaProducerProperties)); try { checkServer(); - final ConcurrentMap> fnFn = injector.getInstance( - Key.get( - new TypeLiteral>>() - { - }, - Names.named( - "namespaceExtractionFunctionCache" - ) - ) - ); + final ConcurrentMap> fnFn = injector.getInstance(Key.get(new TypeLiteral>>(){}, Names.named("namespaceExtractionFunctionCache"))); KafkaExtractionNamespace extractionNamespace = new KafkaExtractionNamespace(topicName, namespace); Assert.assertEquals(null, fnFn.get(extractionNamespace.getNamespace()).apply("foo")); diff --git a/extensions/namespace-lookup/src/main/java/io/druid/server/namespace/NamespacedExtractionModule.java b/extensions/namespace-lookup/src/main/java/io/druid/server/namespace/NamespacedExtractionModule.java index ef85e3d9747..0c667cb2bbd 100644 --- a/extensions/namespace-lookup/src/main/java/io/druid/server/namespace/NamespacedExtractionModule.java +++ b/extensions/namespace-lookup/src/main/java/io/druid/server/namespace/NamespacedExtractionModule.java @@ -164,14 +164,14 @@ public class NamespacedExtractionModule implements DruidModule @Provides @Named("namespaceVersionMap") @LazySingleton - public final ConcurrentMap getVersionMap() + public ConcurrentMap getVersionMap() { return new ConcurrentHashMap<>(); } @Provides @Named("namespaceExtractionFunctionCache") - public final ConcurrentMap> getFnCache() + public ConcurrentMap> getFnCache() { return fnCache; } @@ -179,7 +179,7 @@ public class NamespacedExtractionModule implements DruidModule @Provides @Named("dimExtractionNamespace") @LazySingleton - public final Function> getFunctionMaker( + public Function> getFunctionMaker( @Named("namespaceExtractionFunctionCache") final ConcurrentMap> fnCache ) diff --git a/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3StorageDruidModule.java b/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3StorageDruidModule.java index ee65893dd44..041b5ea3d80 100644 --- a/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3StorageDruidModule.java +++ b/extensions/s3-extensions/src/main/java/io/druid/storage/s3/S3StorageDruidModule.java @@ -95,14 +95,14 @@ public class S3StorageDruidModule implements DruidModule @Provides @LazySingleton - public final AWSCredentialsProvider getAWSCredentialsProvider(final AWSCredentialsConfig config) + public AWSCredentialsProvider getAWSCredentialsProvider(final AWSCredentialsConfig config) { return AWSCredentialsUtils.defaultAWSCredentialsProviderChain(config); } @Provides @LazySingleton - public final RestS3Service getRestS3Service(AWSCredentialsProvider provider) + public RestS3Service getRestS3Service(AWSCredentialsProvider provider) { if(provider.getCredentials() instanceof com.amazonaws.auth.AWSSessionCredentials) { return new RestS3Service(new AWSSessionCredentialsAdapter(provider)); diff --git a/integration-tests/src/main/java/io/druid/testing/guice/DruidTestModule.java b/integration-tests/src/main/java/io/druid/testing/guice/DruidTestModule.java index 5785188b00a..1524e1d7fb3 100644 --- a/integration-tests/src/main/java/io/druid/testing/guice/DruidTestModule.java +++ b/integration-tests/src/main/java/io/druid/testing/guice/DruidTestModule.java @@ -44,7 +44,7 @@ public class DruidTestModule implements Module @Provides @LazySingleton - public final ServiceEmitter getServiceEmitter(Supplier config, ObjectMapper jsonMapper) + public ServiceEmitter getServiceEmitter(Supplier config, ObjectMapper jsonMapper) { return new ServiceEmitter("", "", new LoggingEmitter(config.get(), jsonMapper)); } diff --git a/pom.xml b/pom.xml index f53c28db86a..635d94258a5 100644 --- a/pom.xml +++ b/pom.xml @@ -69,12 +69,11 @@ 2.8.0 9.2.5.v20141112 1.19 - 0.3.10 + 0.3.9 2.4.4 2.2 1.7.10 2.3.0 - 4.0 @@ -236,17 +235,17 @@ com.google.inject guice - ${guice.version} + 4.0-beta com.google.inject.extensions guice-servlet - ${guice.version} + 4.0-beta com.google.inject.extensions guice-multibindings - ${guice.version} + 4.0-beta com.ibm.icu diff --git a/processing/src/main/java/io/druid/guice/ConfigModule.java b/processing/src/main/java/io/druid/guice/ConfigModule.java index 3206f93b2f0..50dd35bba3d 100644 --- a/processing/src/main/java/io/druid/guice/ConfigModule.java +++ b/processing/src/main/java/io/druid/guice/ConfigModule.java @@ -39,7 +39,7 @@ public class ConfigModule implements Module } @Provides @LazySingleton - public final ConfigurationObjectFactory makeFactory(Properties props) + public ConfigurationObjectFactory makeFactory(Properties props) { return Config.createFactory(props); } diff --git a/processing/src/main/java/io/druid/jackson/JacksonModule.java b/processing/src/main/java/io/druid/jackson/JacksonModule.java index b35dc8f1e38..88ff0857fe7 100644 --- a/processing/src/main/java/io/druid/jackson/JacksonModule.java +++ b/processing/src/main/java/io/druid/jackson/JacksonModule.java @@ -39,13 +39,13 @@ public class JacksonModule implements Module } @Provides @LazySingleton @Json - public final ObjectMapper jsonMapper() + public ObjectMapper jsonMapper() { return new DefaultObjectMapper(); } @Provides @LazySingleton @Smile - public final ObjectMapper smileMapper() + public ObjectMapper smileMapper() { final SmileFactory smileFactory = new SmileFactory(); smileFactory.configure(SmileGenerator.Feature.ENCODE_BINARY_AS_7BIT, false); diff --git a/processing/src/test/java/io/druid/guice/MetadataStorageTablesConfigTest.java b/processing/src/test/java/io/druid/guice/MetadataStorageTablesConfigTest.java index c6f0e00224c..4710bd88665 100644 --- a/processing/src/test/java/io/druid/guice/MetadataStorageTablesConfigTest.java +++ b/processing/src/test/java/io/druid/guice/MetadataStorageTablesConfigTest.java @@ -52,7 +52,7 @@ public class MetadataStorageTablesConfigTest @Provides @LazySingleton - public final ObjectMapper jsonMapper() + public ObjectMapper jsonMapper() { return new DefaultObjectMapper(); } diff --git a/server/src/main/java/io/druid/curator/CuratorModule.java b/server/src/main/java/io/druid/curator/CuratorModule.java index 5c4b3de0321..bcbf3a780d1 100644 --- a/server/src/main/java/io/druid/curator/CuratorModule.java +++ b/server/src/main/java/io/druid/curator/CuratorModule.java @@ -45,7 +45,7 @@ public class CuratorModule implements Module } @Provides @LazySingleton - public final CuratorFramework makeCurator(CuratorConfig config, Lifecycle lifecycle) throws IOException + public CuratorFramework makeCurator(CuratorConfig config, Lifecycle lifecycle) throws IOException { final CuratorFramework framework = CuratorFrameworkFactory.builder() diff --git a/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java b/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java index 66e5437b025..328d649140c 100644 --- a/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java +++ b/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java @@ -145,7 +145,7 @@ public class DiscoveryModule implements Module @Provides @LazySingleton @Named(NAME) - public final CuratorServiceAnnouncer getServiceAnnouncer( + public CuratorServiceAnnouncer getServiceAnnouncer( final CuratorServiceAnnouncer announcer, final Injector injector, final Set> nodesToAnnounce, @@ -190,7 +190,7 @@ public class DiscoveryModule implements Module @Provides @LazySingleton - public final ServiceDiscovery getServiceDiscovery( + public ServiceDiscovery getServiceDiscovery( CuratorFramework curator, CuratorDiscoveryConfig config, Lifecycle lifecycle @@ -233,7 +233,7 @@ public class DiscoveryModule implements Module @Provides @LazySingleton - public final ServerDiscoveryFactory getServerDiscoveryFactory( + public ServerDiscoveryFactory getServerDiscoveryFactory( ServiceDiscovery serviceDiscovery ) { diff --git a/server/src/main/java/io/druid/guice/AWSModule.java b/server/src/main/java/io/druid/guice/AWSModule.java index 341a2ad73eb..35304757785 100644 --- a/server/src/main/java/io/druid/guice/AWSModule.java +++ b/server/src/main/java/io/druid/guice/AWSModule.java @@ -38,14 +38,14 @@ public class AWSModule implements Module @Provides @LazySingleton - public final AWSCredentialsProvider getAWSCredentialsProvider(final AWSCredentialsConfig config) + public AWSCredentialsProvider getAWSCredentialsProvider(final AWSCredentialsConfig config) { return AWSCredentialsUtils.defaultAWSCredentialsProviderChain(config); } @Provides @LazySingleton - public final AmazonEC2 getEc2Client(AWSCredentialsProvider credentials) + public AmazonEC2 getEc2Client(AWSCredentialsProvider credentials) { return new AmazonEC2Client(credentials); } diff --git a/server/src/main/java/io/druid/guice/AnnouncerModule.java b/server/src/main/java/io/druid/guice/AnnouncerModule.java index 9381f189810..39d21e68cd0 100644 --- a/server/src/main/java/io/druid/guice/AnnouncerModule.java +++ b/server/src/main/java/io/druid/guice/AnnouncerModule.java @@ -45,7 +45,7 @@ public class AnnouncerModule implements Module @Provides @ManageLifecycle - public final Announcer getAnnouncer(CuratorFramework curator) + public Announcer getAnnouncer(CuratorFramework curator) { return new Announcer(curator, Execs.singleThreaded("Announcer-%s")); } diff --git a/server/src/main/java/io/druid/guice/DruidProcessingModule.java b/server/src/main/java/io/druid/guice/DruidProcessingModule.java index 19d9174e9d9..28bb3753eb9 100644 --- a/server/src/main/java/io/druid/guice/DruidProcessingModule.java +++ b/server/src/main/java/io/druid/guice/DruidProcessingModule.java @@ -60,7 +60,7 @@ public class DruidProcessingModule implements Module @Provides @BackgroundCaching @LazySingleton - public final ExecutorService getBackgroundExecutorService( + public ExecutorService getBackgroundExecutorService( CacheConfig cacheConfig ) { @@ -81,7 +81,7 @@ public class DruidProcessingModule implements Module @Provides @Processing @ManageLifecycle - public final ExecutorService getProcessingExecutorService( + public ExecutorService getProcessingExecutorService( ExecutorServiceConfig config, ServiceEmitter emitter, Lifecycle lifecycle @@ -100,7 +100,7 @@ public class DruidProcessingModule implements Module @Provides @LazySingleton @Global - public final StupidPool getIntermediateResultsPool(DruidProcessingConfig config) + public StupidPool getIntermediateResultsPool(DruidProcessingConfig config) { try { long maxDirectMemory = VMUtils.getMaxDirectMemory(); diff --git a/server/src/main/java/io/druid/guice/IndexingServiceDiscoveryModule.java b/server/src/main/java/io/druid/guice/IndexingServiceDiscoveryModule.java index 4f1a8bfef81..287242c0cd9 100644 --- a/server/src/main/java/io/druid/guice/IndexingServiceDiscoveryModule.java +++ b/server/src/main/java/io/druid/guice/IndexingServiceDiscoveryModule.java @@ -38,7 +38,7 @@ public class IndexingServiceDiscoveryModule implements Module @Provides @IndexingService @ManageLifecycle - public final ServerDiscoverySelector getServiceProvider( + public ServerDiscoverySelector getServiceProvider( IndexingServiceSelectorConfig config, ServerDiscoveryFactory serverDiscoveryFactory ) diff --git a/server/src/main/java/io/druid/guice/ServerModule.java b/server/src/main/java/io/druid/guice/ServerModule.java index 566be3d962c..d3ade81528b 100644 --- a/server/src/main/java/io/druid/guice/ServerModule.java +++ b/server/src/main/java/io/druid/guice/ServerModule.java @@ -48,7 +48,7 @@ public class ServerModule implements DruidModule } @Provides @LazySingleton - public final ScheduledExecutorFactory getScheduledExecutorFactory(Lifecycle lifecycle) + public ScheduledExecutorFactory getScheduledExecutorFactory(Lifecycle lifecycle) { return ScheduledExecutors.createFactory(lifecycle); } diff --git a/server/src/main/java/io/druid/guice/StorageNodeModule.java b/server/src/main/java/io/druid/guice/StorageNodeModule.java index 90df14f0305..e0ae60f4c9a 100644 --- a/server/src/main/java/io/druid/guice/StorageNodeModule.java +++ b/server/src/main/java/io/druid/guice/StorageNodeModule.java @@ -57,7 +57,7 @@ public class StorageNodeModule implements Module @Provides @LazySingleton - public final DruidServerMetadata getMetadata(@Self DruidNode node, @Nullable NodeTypeConfig nodeType, DruidServerConfig config) + public DruidServerMetadata getMetadata(@Self DruidNode node, @Nullable NodeTypeConfig nodeType, DruidServerConfig config) { if (nodeType == null) { throw new ProvisionException("Must override the binding for NodeTypeConfig if you want a DruidServerMetadata."); diff --git a/server/src/main/java/io/druid/server/initialization/EmitterModule.java b/server/src/main/java/io/druid/server/initialization/EmitterModule.java index 285c69ac2af..d464c5659e0 100644 --- a/server/src/main/java/io/druid/server/initialization/EmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/EmitterModule.java @@ -74,7 +74,7 @@ public class EmitterModule implements Module @Provides @ManageLifecycle - public final ServiceEmitter getServiceEmitter(@Self Supplier configSupplier, Emitter emitter) + public ServiceEmitter getServiceEmitter(@Self Supplier configSupplier, Emitter emitter) { final DruidNode config = configSupplier.get(); final ServiceEmitter retVal = new ServiceEmitter(config.getServiceName(), config.getHostAndPort(), emitter); diff --git a/server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java b/server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java index f66b72445ce..97ff643eee6 100644 --- a/server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java @@ -60,7 +60,7 @@ public class HttpEmitterModule implements Module @Provides @ManageLifecycle @Named("http") - public final Emitter getEmitter( + public Emitter getEmitter( Supplier config, @Nullable SSLContext sslContext, Lifecycle lifecycle, diff --git a/server/src/main/java/io/druid/server/initialization/LogEmitterModule.java b/server/src/main/java/io/druid/server/initialization/LogEmitterModule.java index ad4a87e318b..3ec21334b99 100644 --- a/server/src/main/java/io/druid/server/initialization/LogEmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/LogEmitterModule.java @@ -42,7 +42,7 @@ public class LogEmitterModule implements Module } @Provides @ManageLifecycle @Named(EMITTER_TYPE) - public final Emitter makeEmitter(Supplier config, ObjectMapper jsonMapper) + public Emitter makeEmitter(Supplier config, ObjectMapper jsonMapper) { return new LoggingEmitter(config.get(), jsonMapper); } diff --git a/server/src/main/java/io/druid/server/initialization/NoopEmitterModule.java b/server/src/main/java/io/druid/server/initialization/NoopEmitterModule.java index 987e297d89d..80a5c570c46 100644 --- a/server/src/main/java/io/druid/server/initialization/NoopEmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/NoopEmitterModule.java @@ -39,7 +39,7 @@ public class NoopEmitterModule implements Module @Provides @ManageLifecycle @Named(EMITTER_TYPE) - public final Emitter makeEmitter() + public Emitter makeEmitter() { return new NoopEmitter(); } diff --git a/server/src/main/java/io/druid/server/initialization/jetty/JettyServerModule.java b/server/src/main/java/io/druid/server/initialization/jetty/JettyServerModule.java index cd447fe6ba6..08d1e01e03d 100644 --- a/server/src/main/java/io/druid/server/initialization/jetty/JettyServerModule.java +++ b/server/src/main/java/io/druid/server/initialization/jetty/JettyServerModule.java @@ -106,7 +106,7 @@ public class JettyServerModule extends JerseyServletModule @Provides @LazySingleton - public final Server getServer(Injector injector, Lifecycle lifecycle, @Self DruidNode node, ServerConfig config) + public Server getServer(Injector injector, Lifecycle lifecycle, @Self DruidNode node, ServerConfig config) { JettyServerInitializer initializer = injector.getInstance(JettyServerInitializer.class); @@ -145,7 +145,7 @@ public class JettyServerModule extends JerseyServletModule @Provides @Singleton - public final JacksonJsonProvider getJacksonJsonProvider(@Json ObjectMapper objectMapper) + public JacksonJsonProvider getJacksonJsonProvider(@Json ObjectMapper objectMapper) { final JacksonJsonProvider provider = new JacksonJsonProvider(); provider.setMapper(objectMapper); diff --git a/server/src/main/java/io/druid/server/metrics/MetricsModule.java b/server/src/main/java/io/druid/server/metrics/MetricsModule.java index 9344fb80f9e..a395b8b317e 100644 --- a/server/src/main/java/io/druid/server/metrics/MetricsModule.java +++ b/server/src/main/java/io/druid/server/metrics/MetricsModule.java @@ -67,7 +67,7 @@ public class MetricsModule implements Module @Provides @ManageLifecycle - public final MonitorScheduler getMonitorScheduler( + public MonitorScheduler getMonitorScheduler( Supplier config, MonitorsConfig monitorsConfig, Set> monitorSet, diff --git a/services/src/main/java/io/druid/cli/CliBridge.java b/services/src/main/java/io/druid/cli/CliBridge.java index 958c076d924..4ea4c8ebf0a 100644 --- a/services/src/main/java/io/druid/cli/CliBridge.java +++ b/services/src/main/java/io/druid/cli/CliBridge.java @@ -118,7 +118,7 @@ public class CliBridge extends ServerRunnable @Provides @LazySingleton @Bridge - public final CuratorFramework getBridgeCurator(final BridgeCuratorConfig bridgeCuratorConfig, Lifecycle lifecycle) + public CuratorFramework getBridgeCurator(final BridgeCuratorConfig bridgeCuratorConfig, Lifecycle lifecycle) { final CuratorFramework framework = CuratorFrameworkFactory.builder() @@ -156,7 +156,7 @@ public class CliBridge extends ServerRunnable @Provides @ManageLifecycle - public final ServerDiscoverySelector getServerDiscoverySelector( + public ServerDiscoverySelector getServerDiscoverySelector( DruidClusterBridgeConfig config, ServerDiscoveryFactory factory @@ -168,7 +168,7 @@ public class CliBridge extends ServerRunnable @Provides @ManageLifecycle @Bridge - public final Announcer getBridgeAnnouncer( + public Announcer getBridgeAnnouncer( @Bridge CuratorFramework curator ) { @@ -178,7 +178,7 @@ public class CliBridge extends ServerRunnable @Provides @ManageLifecycleLast @Bridge - public final AbstractDataSegmentAnnouncer getBridgeDataSegmentAnnouncer( + public AbstractDataSegmentAnnouncer getBridgeDataSegmentAnnouncer( DruidServerMetadata metadata, BatchDataSegmentAnnouncerConfig config, ZkPathsConfig zkPathsConfig, diff --git a/services/src/main/java/io/druid/cli/CliCoordinator.java b/services/src/main/java/io/druid/cli/CliCoordinator.java index ae9314d62db..06c6a730d2a 100644 --- a/services/src/main/java/io/druid/cli/CliCoordinator.java +++ b/services/src/main/java/io/druid/cli/CliCoordinator.java @@ -138,7 +138,7 @@ public class CliCoordinator extends ServerRunnable @Provides @LazySingleton - public final LoadQueueTaskMaster getLoadQueueTaskMaster( + public LoadQueueTaskMaster getLoadQueueTaskMaster( CuratorFramework curator, ObjectMapper jsonMapper, ScheduledExecutorFactory factory, diff --git a/services/src/main/java/io/druid/cli/CliMiddleManager.java b/services/src/main/java/io/druid/cli/CliMiddleManager.java index 0ff710ab947..443aaf00daf 100644 --- a/services/src/main/java/io/druid/cli/CliMiddleManager.java +++ b/services/src/main/java/io/druid/cli/CliMiddleManager.java @@ -99,7 +99,7 @@ public class CliMiddleManager extends ServerRunnable @Provides @LazySingleton - public final Worker getWorker(@Self DruidNode node, WorkerConfig config) + public Worker getWorker(@Self DruidNode node, WorkerConfig config) { return new Worker( node.getHostAndPort(), diff --git a/services/src/main/java/io/druid/cli/CliRouter.java b/services/src/main/java/io/druid/cli/CliRouter.java index 96412e9f339..59645fd4b44 100644 --- a/services/src/main/java/io/druid/cli/CliRouter.java +++ b/services/src/main/java/io/druid/cli/CliRouter.java @@ -93,7 +93,7 @@ public class CliRouter extends ServerRunnable @Provides @ManageLifecycle - public final ServerDiscoverySelector getCoordinatorServerDiscoverySelector( + public ServerDiscoverySelector getCoordinatorServerDiscoverySelector( TieredBrokerConfig config, ServerDiscoveryFactory factory