From 6c9a10735673363f560cfecce04ae8470955be4e Mon Sep 17 00:00:00 2001 From: cheddar Date: Mon, 9 Sep 2013 17:02:57 -0500 Subject: [PATCH] 1) remove duplicate package initialization.initialization --- .../common/config/IndexerZkConfig.java | 2 +- .../coordinator/RemoteTaskRunner.java | 2 +- .../coordinator/RemoteTaskRunnerFactory.java | 2 +- .../indexing/coordinator/TaskMaster.java | 2 +- .../config/IndexerCoordinatorConfig.java | 2 +- .../worker/WorkerCuratorCoordinator.java | 2 +- .../coordinator/RemoteTaskRunnerTest.java | 2 +- .../client/BatchServerInventoryView.java | 2 +- .../BatchServerInventoryViewProvider.java | 2 +- .../client/SingleServerInventoryProvider.java | 2 +- .../client/SingleServerInventoryView.java | 2 +- .../curator/discovery/DiscoveryModule.java | 2 +- .../java/io/druid/guice/AnnouncerModule.java | 2 +- .../guice/{Binders.java => DruidBinders.java} | 2 +- .../druid/guice/QueryRunnerFactoryModule.java | 2 +- .../io/druid/guice/QueryToolChestModule.java | 2 +- .../java/io/druid/guice/ServerModule.java | 2 +- .../AbstractDataSegmentAnnouncer.java | 2 +- .../BatchDataSegmentAnnouncer.java | 4 +- .../SingleDataSegmentAnnouncer.java | 2 +- .../server/coordination/ZkCoordinator.java | 2 +- .../BatchDataSegmentAnnouncerConfig.java | 2 +- .../{initialization => }/ConfigModule.java | 2 +- .../CuratorDiscoveryConfig.java | 2 +- .../{initialization => }/EmitterModule.java | 2 +- .../initialization/ExtensionsConfig.java | 61 ++++++++++ .../HttpEmitterConfig.java | 2 +- .../HttpEmitterModule.java | 2 +- .../{initialization => }/Initialization.java | 113 ++++++++++++------ .../JettyServerInitializer.java | 2 +- .../JettyServerModule.java | 28 +---- .../LogEmitterModule.java | 2 +- .../PropertiesModule.java | 2 +- .../{initialization => }/ServerConfig.java | 2 +- .../{initialization => }/ZkPathsConfig.java | 2 +- .../io/druid/server/master/DruidMaster.java | 2 +- .../client/BatchServerInventoryViewTest.java | 4 +- .../coordination/ZkCoordinatorTest.java | 2 +- .../BatchDataSegmentAnnouncerTest.java | 4 +- .../druid/server/master/DruidMasterTest.java | 2 +- .../src/main/java/io/druid/cli/CliBroker.java | 6 +- .../java/io/druid/cli/CliCoordinator.java | 8 +- .../main/java/io/druid/cli/CliHistorical.java | 6 +- .../java/io/druid/cli/CliMiddleManager.java | 8 +- .../main/java/io/druid/cli/CliOverlord.java | 8 +- .../src/main/java/io/druid/cli/CliPeon.java | 6 +- .../main/java/io/druid/cli/CliRealtime.java | 6 +- .../java/io/druid/cli/CliRealtimeExample.java | 6 +- .../cli/QueryJettyServerInitializer.java | 2 +- 49 files changed, 209 insertions(+), 129 deletions(-) rename server/src/main/java/io/druid/guice/{Binders.java => DruidBinders.java} (98%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/BatchDataSegmentAnnouncerConfig.java (95%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/ConfigModule.java (96%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/CuratorDiscoveryConfig.java (95%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/EmitterModule.java (98%) create mode 100644 server/src/main/java/io/druid/server/initialization/ExtensionsConfig.java rename server/src/main/java/io/druid/server/initialization/{initialization => }/HttpEmitterConfig.java (95%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/HttpEmitterModule.java (97%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/Initialization.java (61%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/JettyServerInitializer.java (94%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/JettyServerModule.java (84%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/LogEmitterModule.java (96%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/PropertiesModule.java (97%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/ServerConfig.java (95%) rename server/src/main/java/io/druid/server/initialization/{initialization => }/ZkPathsConfig.java (97%) diff --git a/indexing-service/src/main/java/io/druid/indexing/common/config/IndexerZkConfig.java b/indexing-service/src/main/java/io/druid/indexing/common/config/IndexerZkConfig.java index 214d3ed6330..67a750ab535 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/config/IndexerZkConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/config/IndexerZkConfig.java @@ -19,7 +19,7 @@ package io.druid.indexing.common.config; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import org.skife.config.Config; import org.skife.config.Default; diff --git a/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunner.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunner.java index 93452a77daa..679faaf3191 100644 --- a/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunner.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunner.java @@ -50,7 +50,7 @@ import io.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; import io.druid.indexing.coordinator.setup.WorkerSetupData; import io.druid.indexing.worker.TaskAnnouncement; import io.druid.indexing.worker.Worker; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.cache.ChildData; import org.apache.curator.framework.recipes.cache.PathChildrenCache; diff --git a/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerFactory.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerFactory.java index ea274bb2bfb..947d0d22f1d 100644 --- a/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerFactory.java @@ -27,7 +27,7 @@ import io.druid.curator.cache.SimplePathChildrenCacheFactory; import io.druid.guice.annotations.Global; import io.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; import io.druid.indexing.coordinator.setup.WorkerSetupData; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import org.apache.curator.framework.CuratorFramework; /** diff --git a/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskMaster.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskMaster.java index 012e5a2e711..ab8d410574f 100644 --- a/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskMaster.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskMaster.java @@ -36,7 +36,7 @@ import io.druid.indexing.coordinator.exec.TaskConsumer; import io.druid.indexing.coordinator.scaling.ResourceManagementScheduler; import io.druid.indexing.coordinator.scaling.ResourceManagementSchedulerFactory; import io.druid.server.DruidNode; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.leader.LeaderSelector; import org.apache.curator.framework.recipes.leader.LeaderSelectorListener; diff --git a/indexing-service/src/main/java/io/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java index 16498286127..0671aabe135 100644 --- a/indexing-service/src/main/java/io/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java @@ -21,7 +21,7 @@ package io.druid.indexing.coordinator.config; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableSet; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import org.skife.config.Config; import org.skife.config.Default; diff --git a/indexing-service/src/main/java/io/druid/indexing/worker/WorkerCuratorCoordinator.java b/indexing-service/src/main/java/io/druid/indexing/worker/WorkerCuratorCoordinator.java index 17d3d73b024..f4fe25d8c3b 100644 --- a/indexing-service/src/main/java/io/druid/indexing/worker/WorkerCuratorCoordinator.java +++ b/indexing-service/src/main/java/io/druid/indexing/worker/WorkerCuratorCoordinator.java @@ -31,7 +31,7 @@ import com.metamx.common.lifecycle.LifecycleStop; import com.metamx.common.logger.Logger; import io.druid.curator.announcement.Announcer; import io.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import org.apache.curator.framework.CuratorFramework; import org.apache.zookeeper.CreateMode; import org.joda.time.DateTime; diff --git a/indexing-service/src/test/java/io/druid/indexing/coordinator/RemoteTaskRunnerTest.java b/indexing-service/src/test/java/io/druid/indexing/coordinator/RemoteTaskRunnerTest.java index 24b41aad7a4..47bfce6157b 100644 --- a/indexing-service/src/test/java/io/druid/indexing/coordinator/RemoteTaskRunnerTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/coordinator/RemoteTaskRunnerTest.java @@ -49,7 +49,7 @@ import io.druid.indexing.worker.WorkerTaskMonitor; import io.druid.indexing.worker.config.WorkerConfig; import io.druid.jackson.DefaultObjectMapper; import io.druid.query.aggregation.AggregatorFactory; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.timeline.DataSegment; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; diff --git a/server/src/main/java/io/druid/client/BatchServerInventoryView.java b/server/src/main/java/io/druid/client/BatchServerInventoryView.java index 4de3354e8fd..3a1bf636aa2 100644 --- a/server/src/main/java/io/druid/client/BatchServerInventoryView.java +++ b/server/src/main/java/io/druid/client/BatchServerInventoryView.java @@ -27,7 +27,7 @@ import com.google.inject.Inject; import com.metamx.common.ISE; import com.metamx.emitter.EmittingLogger; import io.druid.guice.ManageLifecycle; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.timeline.DataSegment; import org.apache.curator.framework.CuratorFramework; diff --git a/server/src/main/java/io/druid/client/BatchServerInventoryViewProvider.java b/server/src/main/java/io/druid/client/BatchServerInventoryViewProvider.java index 1bd0163dca8..609a47754aa 100644 --- a/server/src/main/java/io/druid/client/BatchServerInventoryViewProvider.java +++ b/server/src/main/java/io/druid/client/BatchServerInventoryViewProvider.java @@ -21,7 +21,7 @@ package io.druid.client; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.databind.ObjectMapper; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import org.apache.curator.framework.CuratorFramework; import javax.validation.constraints.NotNull; diff --git a/server/src/main/java/io/druid/client/SingleServerInventoryProvider.java b/server/src/main/java/io/druid/client/SingleServerInventoryProvider.java index 74ec48c9bd6..7ebce938791 100644 --- a/server/src/main/java/io/druid/client/SingleServerInventoryProvider.java +++ b/server/src/main/java/io/druid/client/SingleServerInventoryProvider.java @@ -21,7 +21,7 @@ package io.druid.client; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.databind.ObjectMapper; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import org.apache.curator.framework.CuratorFramework; import javax.validation.constraints.NotNull; diff --git a/server/src/main/java/io/druid/client/SingleServerInventoryView.java b/server/src/main/java/io/druid/client/SingleServerInventoryView.java index 38c01bc0598..801b78c5d2a 100644 --- a/server/src/main/java/io/druid/client/SingleServerInventoryView.java +++ b/server/src/main/java/io/druid/client/SingleServerInventoryView.java @@ -24,7 +24,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; import com.metamx.emitter.EmittingLogger; import io.druid.guice.ManageLifecycle; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.timeline.DataSegment; import org.apache.curator.framework.CuratorFramework; 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 63116b1f92a..20d52e8e77f 100644 --- a/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java +++ b/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java @@ -36,7 +36,7 @@ import com.metamx.common.lifecycle.Lifecycle; import io.druid.guice.JsonConfigProvider; import io.druid.guice.LazySingleton; import io.druid.server.DruidNode; -import io.druid.server.initialization.initialization.CuratorDiscoveryConfig; +import io.druid.server.initialization.CuratorDiscoveryConfig; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.x.discovery.ServiceDiscovery; import org.apache.curator.x.discovery.ServiceDiscoveryBuilder; diff --git a/server/src/main/java/io/druid/guice/AnnouncerModule.java b/server/src/main/java/io/druid/guice/AnnouncerModule.java index c7cc0c78ef0..379cc29392e 100644 --- a/server/src/main/java/io/druid/guice/AnnouncerModule.java +++ b/server/src/main/java/io/druid/guice/AnnouncerModule.java @@ -28,7 +28,7 @@ import io.druid.server.coordination.BatchDataSegmentAnnouncer; import io.druid.server.coordination.DataSegmentAnnouncer; import io.druid.server.coordination.DataSegmentAnnouncerProvider; import io.druid.server.coordination.SingleDataSegmentAnnouncer; -import io.druid.server.initialization.initialization.BatchDataSegmentAnnouncerConfig; +import io.druid.server.initialization.BatchDataSegmentAnnouncerConfig; import org.apache.curator.framework.CuratorFramework; /** diff --git a/server/src/main/java/io/druid/guice/Binders.java b/server/src/main/java/io/druid/guice/DruidBinders.java similarity index 98% rename from server/src/main/java/io/druid/guice/Binders.java rename to server/src/main/java/io/druid/guice/DruidBinders.java index 427512bb9a8..4a3b6729380 100644 --- a/server/src/main/java/io/druid/guice/Binders.java +++ b/server/src/main/java/io/druid/guice/DruidBinders.java @@ -28,7 +28,7 @@ import io.druid.query.QueryToolChest; /** */ -public class Binders +public class DruidBinders { public static MapBinder, QueryRunnerFactory> queryRunnerFactoryBinder(Binder binder) { diff --git a/server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java b/server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java index 773dd6e1cb9..0f9970a6f30 100644 --- a/server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java +++ b/server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java @@ -56,7 +56,7 @@ public class QueryRunnerFactoryModule extends QueryToolChestModule { super.configure(binder); - final MapBinder, QueryRunnerFactory> queryFactoryBinder = Binders.queryRunnerFactoryBinder( + final MapBinder, QueryRunnerFactory> queryFactoryBinder = DruidBinders.queryRunnerFactoryBinder( binder ); diff --git a/server/src/main/java/io/druid/guice/QueryToolChestModule.java b/server/src/main/java/io/druid/guice/QueryToolChestModule.java index e644848147f..4da4eb2537f 100644 --- a/server/src/main/java/io/druid/guice/QueryToolChestModule.java +++ b/server/src/main/java/io/druid/guice/QueryToolChestModule.java @@ -56,7 +56,7 @@ public class QueryToolChestModule implements Module @Override public void configure(Binder binder) { - MapBinder, QueryToolChest> toolChests = Binders.queryToolChestBinder(binder); + MapBinder, QueryToolChest> toolChests = DruidBinders.queryToolChestBinder(binder); for (Map.Entry, Class> entry : mappings.entrySet()) { toolChests.addBinding(entry.getKey()).to(entry.getValue()); diff --git a/server/src/main/java/io/druid/guice/ServerModule.java b/server/src/main/java/io/druid/guice/ServerModule.java index 06bd69c0800..3417ef3d82e 100644 --- a/server/src/main/java/io/druid/guice/ServerModule.java +++ b/server/src/main/java/io/druid/guice/ServerModule.java @@ -29,7 +29,7 @@ import com.metamx.common.lifecycle.Lifecycle; import io.druid.guice.annotations.Self; import io.druid.initialization.DruidModule; import io.druid.server.DruidNode; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.timeline.partition.LinearShardSpec; import io.druid.timeline.partition.NumberedShardSpec; import io.druid.timeline.partition.SingleDimensionShardSpec; diff --git a/server/src/main/java/io/druid/server/coordination/AbstractDataSegmentAnnouncer.java b/server/src/main/java/io/druid/server/coordination/AbstractDataSegmentAnnouncer.java index f4bd5016430..ba73b74e994 100644 --- a/server/src/main/java/io/druid/server/coordination/AbstractDataSegmentAnnouncer.java +++ b/server/src/main/java/io/druid/server/coordination/AbstractDataSegmentAnnouncer.java @@ -26,7 +26,7 @@ import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; import com.metamx.common.logger.Logger; import io.druid.curator.announcement.Announcer; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import org.apache.curator.utils.ZKPaths; /** diff --git a/server/src/main/java/io/druid/server/coordination/BatchDataSegmentAnnouncer.java b/server/src/main/java/io/druid/server/coordination/BatchDataSegmentAnnouncer.java index 59ac2f8e579..d0b24ea5653 100644 --- a/server/src/main/java/io/druid/server/coordination/BatchDataSegmentAnnouncer.java +++ b/server/src/main/java/io/druid/server/coordination/BatchDataSegmentAnnouncer.java @@ -28,8 +28,8 @@ import com.google.inject.Inject; import com.metamx.common.ISE; import com.metamx.common.logger.Logger; import io.druid.curator.announcement.Announcer; -import io.druid.server.initialization.initialization.BatchDataSegmentAnnouncerConfig; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.BatchDataSegmentAnnouncerConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.timeline.DataSegment; import org.apache.curator.utils.ZKPaths; import org.joda.time.DateTime; diff --git a/server/src/main/java/io/druid/server/coordination/SingleDataSegmentAnnouncer.java b/server/src/main/java/io/druid/server/coordination/SingleDataSegmentAnnouncer.java index d812ab6e995..37107e0dfdb 100644 --- a/server/src/main/java/io/druid/server/coordination/SingleDataSegmentAnnouncer.java +++ b/server/src/main/java/io/druid/server/coordination/SingleDataSegmentAnnouncer.java @@ -23,7 +23,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; import com.metamx.common.logger.Logger; import io.druid.curator.announcement.Announcer; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.timeline.DataSegment; import org.apache.curator.utils.ZKPaths; diff --git a/server/src/main/java/io/druid/server/coordination/ZkCoordinator.java b/server/src/main/java/io/druid/server/coordination/ZkCoordinator.java index a30b178cefd..1987f2212af 100644 --- a/server/src/main/java/io/druid/server/coordination/ZkCoordinator.java +++ b/server/src/main/java/io/druid/server/coordination/ZkCoordinator.java @@ -29,7 +29,7 @@ import com.metamx.common.lifecycle.LifecycleStop; import com.metamx.emitter.EmittingLogger; import io.druid.segment.loading.SegmentLoaderConfig; import io.druid.segment.loading.SegmentLoadingException; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.timeline.DataSegment; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.cache.ChildData; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/BatchDataSegmentAnnouncerConfig.java b/server/src/main/java/io/druid/server/initialization/BatchDataSegmentAnnouncerConfig.java similarity index 95% rename from server/src/main/java/io/druid/server/initialization/initialization/BatchDataSegmentAnnouncerConfig.java rename to server/src/main/java/io/druid/server/initialization/BatchDataSegmentAnnouncerConfig.java index 079cb92e5bc..5df79357c77 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/BatchDataSegmentAnnouncerConfig.java +++ b/server/src/main/java/io/druid/server/initialization/BatchDataSegmentAnnouncerConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/ConfigModule.java b/server/src/main/java/io/druid/server/initialization/ConfigModule.java similarity index 96% rename from server/src/main/java/io/druid/server/initialization/initialization/ConfigModule.java rename to server/src/main/java/io/druid/server/initialization/ConfigModule.java index 4ff54fbf82b..62644146a05 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/ConfigModule.java +++ b/server/src/main/java/io/druid/server/initialization/ConfigModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.google.inject.Binder; import com.google.inject.Module; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/CuratorDiscoveryConfig.java b/server/src/main/java/io/druid/server/initialization/CuratorDiscoveryConfig.java similarity index 95% rename from server/src/main/java/io/druid/server/initialization/initialization/CuratorDiscoveryConfig.java rename to server/src/main/java/io/druid/server/initialization/CuratorDiscoveryConfig.java index 55ead420ff7..e029112b183 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/CuratorDiscoveryConfig.java +++ b/server/src/main/java/io/druid/server/initialization/CuratorDiscoveryConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/EmitterModule.java b/server/src/main/java/io/druid/server/initialization/EmitterModule.java similarity index 98% rename from server/src/main/java/io/druid/server/initialization/initialization/EmitterModule.java rename to server/src/main/java/io/druid/server/initialization/EmitterModule.java index a719502c51a..c7b29d3af53 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/EmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/EmitterModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.google.common.base.Supplier; import com.google.common.collect.Lists; diff --git a/server/src/main/java/io/druid/server/initialization/ExtensionsConfig.java b/server/src/main/java/io/druid/server/initialization/ExtensionsConfig.java new file mode 100644 index 00000000000..0973a249434 --- /dev/null +++ b/server/src/main/java/io/druid/server/initialization/ExtensionsConfig.java @@ -0,0 +1,61 @@ +/* + * Druid - a distributed column store. + * Copyright (C) 2012, 2013 Metamarkets Group Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package io.druid.server.initialization; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.collect.ImmutableList; + +import javax.validation.constraints.NotNull; +import java.util.List; + +/** + */ +public class ExtensionsConfig +{ + @JsonProperty + @NotNull + private List coordinates = ImmutableList.of(); + + @JsonProperty + @NotNull + private String localRepository = String.format("%s/%s", System.getProperty("user.home"), ".m2/repository"); + + @JsonProperty + @NotNull + private List remoteRepositories = ImmutableList.of( + "http://repo1.maven.org/maven2/", + "https://metamx.artifactoryonline.com/metamx/pub-libs-releases-local" + ); + + public List getCoordinates() + { + return coordinates; + } + + public String getLocalRepository() + { + return localRepository; + } + + public List getRemoteRepositories() + { + return remoteRepositories; + } +} diff --git a/server/src/main/java/io/druid/server/initialization/initialization/HttpEmitterConfig.java b/server/src/main/java/io/druid/server/initialization/HttpEmitterConfig.java similarity index 95% rename from server/src/main/java/io/druid/server/initialization/initialization/HttpEmitterConfig.java rename to server/src/main/java/io/druid/server/initialization/HttpEmitterConfig.java index 97c36874afd..9141f7316b1 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/HttpEmitterConfig.java +++ b/server/src/main/java/io/druid/server/initialization/HttpEmitterConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.fasterxml.jackson.annotation.JsonProperty; import org.joda.time.Period; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/HttpEmitterModule.java b/server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java similarity index 97% rename from server/src/main/java/io/druid/server/initialization/initialization/HttpEmitterModule.java rename to server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java index 7e408dc9b38..fb460b7f3d0 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/HttpEmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/HttpEmitterModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.google.common.base.Supplier; import com.google.inject.Binder; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/Initialization.java b/server/src/main/java/io/druid/server/initialization/Initialization.java similarity index 61% rename from server/src/main/java/io/druid/server/initialization/initialization/Initialization.java rename to server/src/main/java/io/druid/server/initialization/Initialization.java index 2e9f6254c1e..6de6612ae51 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/Initialization.java +++ b/server/src/main/java/io/druid/server/initialization/Initialization.java @@ -17,11 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Throwables; import com.google.common.collect.Lists; +import com.google.common.io.ByteStreams; import com.google.inject.Binder; import com.google.inject.Guice; import com.google.inject.Injector; @@ -31,18 +32,22 @@ import com.metamx.common.ISE; import com.metamx.common.logger.Logger; import io.druid.guice.DruidGuiceExtensions; import io.druid.guice.DruidSecondaryModule; +import io.druid.guice.JsonConfigProvider; import io.druid.guice.annotations.Json; import io.druid.guice.annotations.Smile; import io.druid.initialization.DruidModule; import io.druid.jackson.JacksonModule; +import io.tesla.aether.TeslaAether; import io.tesla.aether.internal.DefaultTeslaAether; import org.eclipse.aether.artifact.Artifact; +import java.io.PrintStream; import java.net.URL; import java.net.URLClassLoader; import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.ServiceLoader; /** */ @@ -58,36 +63,6 @@ public class Initialization public static Injector makeInjector(final Object... modules) { - final List> externalModules = Lists.newArrayList(); - final DefaultTeslaAether aether = new DefaultTeslaAether(); - try { - final List artifacts = aether.resolveArtifacts( - "com.metamx.druid-extensions-mmx:druid-extensions:0.4.18-SNAPSHOT" - ); - List urls = Lists.newArrayListWithExpectedSize(artifacts.size()); - for (Artifact artifact : artifacts) { - if (!exclusions.contains(artifact.getGroupId())) { - urls.add(artifact.getFile().toURI().toURL()); - } - else { - log.error("Skipped Artifact[%s]", artifact); - } - } - - for (URL url : urls) { - log.error("Added URL[%s]", url); - } - - ClassLoader loader = new URLClassLoader( - urls.toArray(new URL[urls.size()]), Initialization.class.getClassLoader() - ); - - externalModules.add(loader.loadClass("com.metamx.druid.extensions.query.topn.TopNQueryDruidModule")); - } - catch (Exception e) { - throw Throwables.propagate(e); - } - final Injector baseInjector = Guice.createInjector( new DruidGuiceExtensions(), new JacksonModule(), @@ -99,34 +74,94 @@ public class Initialization public void configure(Binder binder) { binder.bind(DruidSecondaryModule.class); + JsonConfigProvider.bind(binder, "druid.extensions", ExtensionsConfig.class); for (Object module : modules) { if (module instanceof Class) { binder.bind((Class) module); } } - - for (Class externalModule : externalModules) { - binder.bind(externalModule); - } } } ); - ModuleList actualModules = new ModuleList(baseInjector); actualModules.addModule(DruidSecondaryModule.class); for (Object module : modules) { actualModules.addModule(module); } - for (Class externalModule : externalModules) { - actualModules.addModule(externalModule); - } + addExtensionModules(baseInjector.getInstance(ExtensionsConfig.class), actualModules); return Guice.createInjector(actualModules.getModules()); } + private static void addExtensionModules(ExtensionsConfig config, ModuleList actualModules) + { + final TeslaAether aether = getAetherClient(config); + + for (String coordinate : config.getCoordinates()) { + log.info("Loading extension[%s]", coordinate); + try { + final List artifacts = aether.resolveArtifacts(coordinate); + List urls = Lists.newArrayListWithExpectedSize(artifacts.size()); + for (Artifact artifact : artifacts) { + if (!exclusions.contains(artifact.getGroupId())) { + urls.add(artifact.getFile().toURI().toURL()); + } + else { + log.debug("Skipped Artifact[%s]", artifact); + } + } + + for (URL url : urls) { + log.debug("Added URL[%s]", url); + } + + ClassLoader loader = new URLClassLoader( + urls.toArray(new URL[urls.size()]), Initialization.class.getClassLoader() + ); + + final ServiceLoader serviceLoader = ServiceLoader.load(DruidModule.class, loader); + + for (DruidModule module : serviceLoader) { + log.info("Adding extension module[%s]", module.getClass()); + actualModules.addModule(module); + } + } + catch (Exception e) { + throw Throwables.propagate(e); + } + } + } + + private static DefaultTeslaAether getAetherClient(ExtensionsConfig config) + { + /* + DefaultTeslaAether logs a bunch of stuff to System.out, which is annoying. We choose to disable that + unless debug logging is turned on. "Disabling" it, however, is kinda bass-ackwards. We copy out a reference + to the current System.out, and set System.out to a noop output stream. Then after DefaultTeslaAether has pulled + The reference we swap things back. + + This has implications for other things that are running in parallel to this. Namely, if anything else also grabs + a reference to System.out or tries to log to it while we have things adjusted like this, then they will also log + to nothingness. Fortunately, the code that calls this is single-threaded and shouldn't hopefully be running + alongside anything else that's grabbing System.out. But who knows. + */ + if (log.isTraceEnabled() || log.isDebugEnabled()) { + return new DefaultTeslaAether(config.getLocalRepository(), config.getRemoteRepositories()); + } + + PrintStream oldOut = System.out; + try { + System.setOut(new PrintStream(ByteStreams.nullOutputStream())); + return new DefaultTeslaAether(config.getLocalRepository(), config.getRemoteRepositories()); + } + finally { + System.setOut(oldOut); + } + } + private static class ModuleList { private final Injector baseInjector; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/JettyServerInitializer.java b/server/src/main/java/io/druid/server/initialization/JettyServerInitializer.java similarity index 94% rename from server/src/main/java/io/druid/server/initialization/initialization/JettyServerInitializer.java rename to server/src/main/java/io/druid/server/initialization/JettyServerInitializer.java index b16e73001e8..44229e99dc7 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/JettyServerInitializer.java +++ b/server/src/main/java/io/druid/server/initialization/JettyServerInitializer.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.google.inject.Injector; import org.eclipse.jetty.server.Server; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/JettyServerModule.java b/server/src/main/java/io/druid/server/initialization/JettyServerModule.java similarity index 84% rename from server/src/main/java/io/druid/server/initialization/initialization/JettyServerModule.java rename to server/src/main/java/io/druid/server/initialization/JettyServerModule.java index 2c5d81ab0a7..80c6fb7cc4b 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/JettyServerModule.java +++ b/server/src/main/java/io/druid/server/initialization/JettyServerModule.java @@ -17,10 +17,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; -import com.google.common.base.Throwables; -import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.primitives.Ints; @@ -32,8 +30,6 @@ import com.google.inject.Key; import com.google.inject.Provides; import com.google.inject.ProvisionException; import com.google.inject.Scopes; -import com.google.inject.TypeLiteral; -import com.google.inject.name.Named; import com.google.inject.name.Names; import com.metamx.common.lifecycle.Lifecycle; import com.metamx.common.logger.Logger; @@ -42,8 +38,10 @@ import com.sun.jersey.api.core.ResourceConfig; import com.sun.jersey.guice.JerseyServletModule; import com.sun.jersey.guice.spi.container.servlet.GuiceContainer; import com.sun.jersey.spi.container.servlet.WebConfig; +import io.druid.guice.Jerseys; import io.druid.guice.JsonConfigProvider; import io.druid.guice.LazySingleton; +import io.druid.guice.annotations.JSR311Resource; import io.druid.guice.annotations.Self; import io.druid.server.DruidNode; import org.eclipse.jetty.server.Connector; @@ -85,26 +83,12 @@ public class JettyServerModule extends JerseyServletModule JsonConfigProvider.bind(binder, "druid.server.http", ServerConfig.class); - // The Guice servlet extension doesn't actually like requiring explicit bindings, so we do its job for it here. - try { - final Class classToBind = Class.forName( - "com.google.inject.servlet.InternalServletModule$BackwardsCompatibleServletContextProvider" - ); - binder.bind(classToBind); - } - catch (ClassNotFoundException e) { - throw Throwables.propagate(e); - } - binder.bind(GuiceContainer.class).to(DruidGuiceContainer.class); binder.bind(DruidGuiceContainer.class).in(Scopes.SINGLETON); serve("/*").with(DruidGuiceContainer.class); - final ImmutableSet> theResources = ImmutableSet.copyOf(resources); - binder.bind(new TypeLiteral>>(){}) - .annotatedWith(Names.named("resourceClasses")) - .toInstance(theResources); - for (Class resource : theResources) { + for (Class resource : resources) { + Jerseys.addResource(binder, resource); binder.bind(resource).in(LazySingleton.class); } @@ -118,7 +102,7 @@ public class JettyServerModule extends JerseyServletModule @Inject public DruidGuiceContainer( Injector injector, - @Named("resourceClasses") Set> resources + @JSR311Resource Set> resources ) { super(injector); diff --git a/server/src/main/java/io/druid/server/initialization/initialization/LogEmitterModule.java b/server/src/main/java/io/druid/server/initialization/LogEmitterModule.java similarity index 96% rename from server/src/main/java/io/druid/server/initialization/initialization/LogEmitterModule.java rename to server/src/main/java/io/druid/server/initialization/LogEmitterModule.java index 1d84b3fb352..4759cf57758 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/LogEmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/LogEmitterModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Supplier; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/PropertiesModule.java b/server/src/main/java/io/druid/server/initialization/PropertiesModule.java similarity index 97% rename from server/src/main/java/io/druid/server/initialization/initialization/PropertiesModule.java rename to server/src/main/java/io/druid/server/initialization/PropertiesModule.java index a82708ee0b9..2efe1e3eac7 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/PropertiesModule.java +++ b/server/src/main/java/io/druid/server/initialization/PropertiesModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.google.common.base.Throwables; import com.google.common.io.Closeables; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/ServerConfig.java b/server/src/main/java/io/druid/server/initialization/ServerConfig.java similarity index 95% rename from server/src/main/java/io/druid/server/initialization/initialization/ServerConfig.java rename to server/src/main/java/io/druid/server/initialization/ServerConfig.java index 8894161fc33..6188e9681f5 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/ServerConfig.java +++ b/server/src/main/java/io/druid/server/initialization/ServerConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import com.fasterxml.jackson.annotation.JsonProperty; import org.joda.time.Period; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/ZkPathsConfig.java b/server/src/main/java/io/druid/server/initialization/ZkPathsConfig.java similarity index 97% rename from server/src/main/java/io/druid/server/initialization/initialization/ZkPathsConfig.java rename to server/src/main/java/io/druid/server/initialization/ZkPathsConfig.java index 4f0c7aeea9e..2169177b16c 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/ZkPathsConfig.java +++ b/server/src/main/java/io/druid/server/initialization/ZkPathsConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.server.initialization.initialization; +package io.druid.server.initialization; import org.apache.curator.utils.ZKPaths; import org.skife.config.Config; diff --git a/server/src/main/java/io/druid/server/master/DruidMaster.java b/server/src/main/java/io/druid/server/master/DruidMaster.java index 3bc359d6dbb..1f4886febaf 100644 --- a/server/src/main/java/io/druid/server/master/DruidMaster.java +++ b/server/src/main/java/io/druid/server/master/DruidMaster.java @@ -50,7 +50,7 @@ import io.druid.db.DatabaseRuleManager; import io.druid.db.DatabaseSegmentManager; import io.druid.guice.ManageLifecycle; import io.druid.segment.IndexIO; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.timeline.DataSegment; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.leader.LeaderLatch; diff --git a/server/src/test/java/io/druid/client/client/BatchServerInventoryViewTest.java b/server/src/test/java/io/druid/client/client/BatchServerInventoryViewTest.java index 1a858027ae3..38864822eb8 100644 --- a/server/src/test/java/io/druid/client/client/BatchServerInventoryViewTest.java +++ b/server/src/test/java/io/druid/client/client/BatchServerInventoryViewTest.java @@ -33,8 +33,8 @@ import io.druid.curator.announcement.Announcer; import io.druid.jackson.DefaultObjectMapper; import io.druid.server.coordination.BatchDataSegmentAnnouncer; import io.druid.server.coordination.DruidServerMetadata; -import io.druid.server.initialization.initialization.BatchDataSegmentAnnouncerConfig; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.BatchDataSegmentAnnouncerConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.timeline.DataSegment; import junit.framework.Assert; import org.apache.curator.framework.CuratorFramework; diff --git a/server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java b/server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java index 2053e90f3b4..e1d78741b7c 100644 --- a/server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java +++ b/server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java @@ -32,7 +32,7 @@ import io.druid.query.NoopQueryRunnerFactoryConglomerate; import io.druid.segment.IndexIO; import io.druid.segment.loading.CacheTestSegmentLoader; import io.druid.segment.loading.SegmentLoaderConfig; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.server.metrics.NoopServiceEmitter; import io.druid.timeline.DataSegment; import io.druid.timeline.partition.NoneShardSpec; diff --git a/server/src/test/java/io/druid/server/coordination/coordination/BatchDataSegmentAnnouncerTest.java b/server/src/test/java/io/druid/server/coordination/coordination/BatchDataSegmentAnnouncerTest.java index 66e7acbb78c..245a3573c5f 100644 --- a/server/src/test/java/io/druid/server/coordination/coordination/BatchDataSegmentAnnouncerTest.java +++ b/server/src/test/java/io/druid/server/coordination/coordination/BatchDataSegmentAnnouncerTest.java @@ -30,8 +30,8 @@ import io.druid.curator.announcement.Announcer; import io.druid.jackson.DefaultObjectMapper; import io.druid.server.coordination.BatchDataSegmentAnnouncer; import io.druid.server.coordination.DruidServerMetadata; -import io.druid.server.initialization.initialization.BatchDataSegmentAnnouncerConfig; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.BatchDataSegmentAnnouncerConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.timeline.DataSegment; import junit.framework.Assert; import org.apache.curator.framework.CuratorFramework; diff --git a/server/src/test/java/io/druid/server/master/DruidMasterTest.java b/server/src/test/java/io/druid/server/master/DruidMasterTest.java index 1c876b53519..a1334718e94 100644 --- a/server/src/test/java/io/druid/server/master/DruidMasterTest.java +++ b/server/src/test/java/io/druid/server/master/DruidMasterTest.java @@ -25,7 +25,7 @@ import io.druid.client.DruidServer; import io.druid.client.SingleServerInventoryView; import io.druid.curator.inventory.InventoryManagerConfig; import io.druid.db.DatabaseSegmentManager; -import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.initialization.ZkPathsConfig; import io.druid.server.metrics.NoopServiceEmitter; import io.druid.timeline.DataSegment; import org.apache.curator.framework.CuratorFramework; diff --git a/services/src/main/java/io/druid/cli/CliBroker.java b/services/src/main/java/io/druid/cli/CliBroker.java index fdcb897334f..c843cbefc01 100644 --- a/services/src/main/java/io/druid/cli/CliBroker.java +++ b/services/src/main/java/io/druid/cli/CliBroker.java @@ -34,9 +34,9 @@ import io.druid.guice.ServerViewModule; import io.druid.guice.annotations.Client; import io.druid.server.ClientQuerySegmentWalker; import io.druid.server.StatusResource; -import io.druid.server.initialization.initialization.EmitterModule; -import io.druid.server.initialization.initialization.Initialization; -import io.druid.server.initialization.initialization.JettyServerModule; +import io.druid.server.initialization.EmitterModule; +import io.druid.server.initialization.Initialization; +import io.druid.server.initialization.JettyServerModule; import io.druid.server.metrics.MetricsModule; /** diff --git a/services/src/main/java/io/druid/cli/CliCoordinator.java b/services/src/main/java/io/druid/cli/CliCoordinator.java index a2e77204117..af435b77545 100644 --- a/services/src/main/java/io/druid/cli/CliCoordinator.java +++ b/services/src/main/java/io/druid/cli/CliCoordinator.java @@ -38,10 +38,10 @@ import io.druid.server.StatusResource; import io.druid.server.http.InfoResource; import io.druid.server.http.MasterResource; import io.druid.server.http.RedirectFilter; -import io.druid.server.initialization.initialization.EmitterModule; -import io.druid.server.initialization.initialization.Initialization; -import io.druid.server.initialization.initialization.JettyServerInitializer; -import io.druid.server.initialization.initialization.JettyServerModule; +import io.druid.server.initialization.EmitterModule; +import io.druid.server.initialization.Initialization; +import io.druid.server.initialization.JettyServerInitializer; +import io.druid.server.initialization.JettyServerModule; import io.druid.server.master.DruidMaster; import io.druid.server.metrics.MetricsModule; import org.eclipse.jetty.server.Handler; diff --git a/services/src/main/java/io/druid/cli/CliHistorical.java b/services/src/main/java/io/druid/cli/CliHistorical.java index 588402dfb48..2035990d9c1 100644 --- a/services/src/main/java/io/druid/cli/CliHistorical.java +++ b/services/src/main/java/io/druid/cli/CliHistorical.java @@ -37,9 +37,9 @@ import io.druid.guice.StorageNodeModule; import io.druid.server.StatusResource; import io.druid.server.coordination.ServerManager; import io.druid.server.coordination.ZkCoordinator; -import io.druid.server.initialization.initialization.EmitterModule; -import io.druid.server.initialization.initialization.Initialization; -import io.druid.server.initialization.initialization.JettyServerModule; +import io.druid.server.initialization.EmitterModule; +import io.druid.server.initialization.Initialization; +import io.druid.server.initialization.JettyServerModule; import io.druid.server.metrics.MetricsModule; import io.druid.server.metrics.ServerMonitor; diff --git a/services/src/main/java/io/druid/cli/CliMiddleManager.java b/services/src/main/java/io/druid/cli/CliMiddleManager.java index a75de7d97c4..16aec9d2460 100644 --- a/services/src/main/java/io/druid/cli/CliMiddleManager.java +++ b/services/src/main/java/io/druid/cli/CliMiddleManager.java @@ -33,10 +33,10 @@ import io.druid.guice.TaskLogsModule; import io.druid.indexing.worker.WorkerTaskMonitor; import io.druid.indexing.worker.http.WorkerResource; import io.druid.server.StatusResource; -import io.druid.server.initialization.initialization.EmitterModule; -import io.druid.server.initialization.initialization.Initialization; -import io.druid.server.initialization.initialization.JettyServerInitializer; -import io.druid.server.initialization.initialization.JettyServerModule; +import io.druid.server.initialization.EmitterModule; +import io.druid.server.initialization.Initialization; +import io.druid.server.initialization.JettyServerInitializer; +import io.druid.server.initialization.JettyServerModule; import io.druid.server.metrics.MetricsModule; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; diff --git a/services/src/main/java/io/druid/cli/CliOverlord.java b/services/src/main/java/io/druid/cli/CliOverlord.java index eccd7a65300..5c91c645488 100644 --- a/services/src/main/java/io/druid/cli/CliOverlord.java +++ b/services/src/main/java/io/druid/cli/CliOverlord.java @@ -37,10 +37,10 @@ import io.druid.indexing.coordinator.TaskMaster; import io.druid.indexing.coordinator.http.IndexerCoordinatorResource; import io.druid.server.StatusResource; import io.druid.server.http.RedirectFilter; -import io.druid.server.initialization.initialization.EmitterModule; -import io.druid.server.initialization.initialization.Initialization; -import io.druid.server.initialization.initialization.JettyServerInitializer; -import io.druid.server.initialization.initialization.JettyServerModule; +import io.druid.server.initialization.EmitterModule; +import io.druid.server.initialization.Initialization; +import io.druid.server.initialization.JettyServerInitializer; +import io.druid.server.initialization.JettyServerModule; import io.druid.server.metrics.MetricsModule; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; diff --git a/services/src/main/java/io/druid/cli/CliPeon.java b/services/src/main/java/io/druid/cli/CliPeon.java index f0f477edb5d..95ac2c42d4c 100644 --- a/services/src/main/java/io/druid/cli/CliPeon.java +++ b/services/src/main/java/io/druid/cli/CliPeon.java @@ -47,9 +47,9 @@ import io.druid.indexing.worker.executor.ExecutorLifecycle; import io.druid.indexing.worker.executor.ExecutorLifecycleConfig; import io.druid.initialization.LogLevelAdjuster; import io.druid.server.StatusResource; -import io.druid.server.initialization.initialization.EmitterModule; -import io.druid.server.initialization.initialization.Initialization; -import io.druid.server.initialization.initialization.JettyServerModule; +import io.druid.server.initialization.EmitterModule; +import io.druid.server.initialization.Initialization; +import io.druid.server.initialization.JettyServerModule; import io.druid.server.metrics.MetricsModule; import java.io.File; diff --git a/services/src/main/java/io/druid/cli/CliRealtime.java b/services/src/main/java/io/druid/cli/CliRealtime.java index 760b05c7b59..fa07364339c 100644 --- a/services/src/main/java/io/druid/cli/CliRealtime.java +++ b/services/src/main/java/io/druid/cli/CliRealtime.java @@ -38,9 +38,9 @@ import io.druid.guice.ServerViewModule; import io.druid.guice.StorageNodeModule; import io.druid.segment.realtime.RealtimeManager; import io.druid.server.StatusResource; -import io.druid.server.initialization.initialization.EmitterModule; -import io.druid.server.initialization.initialization.Initialization; -import io.druid.server.initialization.initialization.JettyServerModule; +import io.druid.server.initialization.EmitterModule; +import io.druid.server.initialization.Initialization; +import io.druid.server.initialization.JettyServerModule; import io.druid.server.metrics.MetricsModule; /** diff --git a/services/src/main/java/io/druid/cli/CliRealtimeExample.java b/services/src/main/java/io/druid/cli/CliRealtimeExample.java index 882b8ae1b8b..52b258898c3 100644 --- a/services/src/main/java/io/druid/cli/CliRealtimeExample.java +++ b/services/src/main/java/io/druid/cli/CliRealtimeExample.java @@ -31,9 +31,9 @@ import io.druid.guice.ServerModule; import io.druid.guice.StorageNodeModule; import io.druid.segment.realtime.RealtimeManager; import io.druid.server.StatusResource; -import io.druid.server.initialization.initialization.EmitterModule; -import io.druid.server.initialization.initialization.Initialization; -import io.druid.server.initialization.initialization.JettyServerModule; +import io.druid.server.initialization.EmitterModule; +import io.druid.server.initialization.Initialization; +import io.druid.server.initialization.JettyServerModule; /** */ diff --git a/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java b/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java index 0e7fc170a1f..f23536ff665 100644 --- a/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java +++ b/services/src/main/java/io/druid/cli/QueryJettyServerInitializer.java @@ -22,7 +22,7 @@ package io.druid.cli; import com.google.inject.Injector; import com.google.inject.servlet.GuiceFilter; import io.druid.server.QueryServlet; -import io.druid.server.initialization.initialization.JettyServerInitializer; +import io.druid.server.initialization.JettyServerInitializer; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.DefaultHandler;