From 5ab671050e85fa4cc1cc350ed0f2f3e6ffe55c2f Mon Sep 17 00:00:00 2001 From: cheddar Date: Fri, 30 Aug 2013 19:41:53 -0500 Subject: [PATCH] No more com.metamx.druid, it is now all io.druid! --- .../guice/{guice => }/ConfigProvider.java | 2 +- .../guice/{guice => }/DbConnectorModule.java | 2 +- .../{guice => }/DruidGuiceExtensions.java | 2 +- .../druid/guice/{guice => }/DruidScopes.java | 2 +- .../{guice => }/DruidSecondaryModule.java | 6 +- .../JacksonConfigManagerModule.java | 2 +- .../{guice => }/JacksonConfigProvider.java | 2 +- .../guice/{guice => }/JsonConfigProvider.java | 2 +- .../guice/{guice => }/JsonConfigurator.java | 2 +- .../guice/{guice => }/LazySingleton.java | 2 +- .../guice/{guice => }/LifecycleModule.java | 2 +- .../guice/{guice => }/LifecycleScope.java | 2 +- .../druid/guice/{guice => }/ListProvider.java | 2 +- .../guice/{guice => }/ManageLifecycle.java | 4 +- .../{guice => }/ManageLifecycleLast.java | 4 +- .../io/druid/guice/{guice => }/PolyBind.java | 2 +- .../guice/{guice => }/SupplierProvider.java | 2 +- .../guice/{guice => }/annotations/Global.java | 2 +- .../guice/{guice => }/annotations/Json.java | 2 +- .../guice/{guice => }/annotations/Self.java | 2 +- .../guice/{guice => }/annotations/Smile.java | 2 +- .../guice/{guice => }/LifecycleScopeTest.java | 2 +- .../druid/guice/{guice => }/PolyBindTest.java | 2 +- .../flights/FlightsFirehoseFactory.java | 4 +- .../examples/guice/RealtimeExampleModule.java | 18 +- .../examples/rand/RandomFirehoseFactory.java | 4 +- .../TwitterSpritzerFirehoseFactory.java | 4 +- .../examples/web/WebFirehoseFactory.java | 4 +- .../examples/web/WebFirehoseFactoryTest.java | 2 +- .../metamx => io}/druid/indexer/Bucket.java | 4 +- .../druid/indexer/DbUpdaterJob.java | 2 +- .../druid/indexer/DeterminePartitionsJob.java | 2 +- .../druid/indexer/HadoopDruidIndexer.java | 4 +- .../indexer/HadoopDruidIndexerConfig.java | 14 +- .../druid/indexer/HadoopDruidIndexerJob.java | 2 +- .../druid/indexer/HadoopDruidIndexerMain.java | 4 +- .../indexer/HadoopDruidIndexerMapper.java | 2 +- .../druid/indexer/HadoopDruidIndexerNode.java | 26 +- .../druid/indexer/HadoopIOPeon.java | 2 +- .../druid/indexer/HadoopyShardSpec.java | 2 +- .../druid/indexer/IndexGeneratorJob.java | 4 +- .../metamx => io}/druid/indexer/Jobby.java | 4 +- .../druid/indexer/SortableBytes.java | 4 +- .../druid/indexer/StringIntervalFunction.java | 4 +- .../metamx => io}/druid/indexer/Utils.java | 2 +- .../granularity/ArbitraryGranularitySpec.java | 5 +- .../indexer/granularity/GranularitySpec.java | 5 +- .../granularity/UniformGranularitySpec.java | 5 +- .../indexer/hadoop/FSSpideringIterator.java | 4 +- .../indexer/partitions/PartitionsSpec.java | 21 +- .../path/GranularUnprocessedPathSpec.java | 11 +- .../indexer/path/GranularityPathSpec.java | 9 +- .../druid/indexer/path/PathSpec.java | 6 +- .../druid/indexer/path/StaticPathSpec.java | 6 +- .../druid/indexer/rollup/DataRollupSpec.java | 4 +- .../indexer/updater/DbUpdaterJobSpec.java | 2 +- .../indexer/HadoopDruidIndexerConfigTest.java | 8 +- .../druid/indexer/SortableBytesTest.java | 4 +- .../granularity/ArbitraryGranularityTest.java | 2 +- .../granularity/UniformGranularityTest.java | 2 +- .../hadoop/FSSpideringIteratorTest.java | 4 +- .../common/actions/LockListAction.java | 33 -- .../common/actions/TaskActionClient.java | 8 - .../indexing/common/config/TaskLogConfig.java | 20 - .../indexing/common/index/EventReceiver.java | 9 - .../common/tasklogs/NoopTaskLogs.java | 26 -- .../common/tasklogs/TaskLogPusher.java | 12 - .../common/tasklogs/TaskLogStreamer.java | 23 -- .../indexing/common/tasklogs/TaskLogs.java | 5 - .../coordinator/TaskExistsException.java | 22 -- .../config/ChatHandlerProviderConfig.java | 18 - .../worker/executor/ChatHandlerResource.java | 36 -- .../executor/ExecutorLifecycleFactory.java | 25 -- .../IndexingServiceModuleHelper.java | 6 +- .../{guice => }/MiddleManagerModule.java | 16 +- .../guice/{guice => }/OverlordModule.java | 60 +-- .../druid/guice/{guice => }/PeonModule.java | 32 +- .../guice/{guice => }/TaskLogsModule.java | 12 +- .../druid/indexing/common/RetryPolicy.java | 4 +- .../indexing/common/RetryPolicyConfig.java | 4 +- .../indexing/common/RetryPolicyFactory.java | 4 +- .../druid/indexing/common/TaskLock.java | 6 +- .../druid/indexing/common/TaskStatus.java | 4 +- .../druid/indexing/common/TaskToolbox.java | 26 +- .../indexing/common/TaskToolboxFactory.java | 14 +- .../common/actions/LocalTaskActionClient.java | 25 +- .../actions/LocalTaskActionClientFactory.java | 8 +- .../common/actions/LockAcquireAction.java | 25 +- .../common/actions/LockListAction.java | 52 +++ .../common/actions/LockReleaseAction.java | 23 +- .../actions/RemoteTaskActionClient.java | 10 +- .../RemoteTaskActionClientFactory.java | 10 +- .../common/actions/SegmentInsertAction.java | 4 +- .../actions/SegmentListUnusedAction.java | 4 +- .../common/actions/SegmentListUsedAction.java | 4 +- .../common/actions/SegmentNukeAction.java | 4 +- .../common/actions/SpawnTasksAction.java | 23 +- .../indexing/common/actions/TaskAction.java | 23 +- .../common/actions/TaskActionClient.java | 27 ++ .../actions/TaskActionClientFactory.java | 6 +- .../common/actions/TaskActionHolder.java | 6 +- .../common/actions/TaskActionToolbox.java | 12 +- .../common/config/IndexerZkConfig.java | 2 +- .../indexing/common/config/TaskConfig.java | 4 +- .../indexing/common/config/TaskLogConfig.java | 39 ++ .../indexing/common/index/ChatHandler.java | 4 +- .../common/index/ChatHandlerProvider.java | 4 +- .../indexing/common/index/EventReceiver.java | 28 ++ .../index/EventReceiverFirehoseFactory.java | 6 +- .../EventReceivingChatHandlerProvider.java | 4 +- .../common/index/NoopChatHandlerProvider.java | 4 +- .../common/index/StaticS3FirehoseFactory.java | 6 +- .../common/index/YeOldePlumberSchool.java | 16 +- .../indexing/common/task/AbstractTask.java | 10 +- .../indexing/common/task/AppendTask.java | 2 +- .../indexing/common/task/DeleteTask.java | 12 +- .../indexing/common/task/HadoopIndexTask.java | 18 +- .../task/IndexDeterminePartitionsTask.java | 16 +- .../common/task/IndexGeneratorTask.java | 28 +- .../druid/indexing/common/task/IndexTask.java | 16 +- .../druid/indexing/common/task/KillTask.java | 14 +- .../druid/indexing/common/task/MergeTask.java | 2 +- .../indexing/common/task/MergeTaskBase.java | 14 +- .../druid/indexing/common/task/NoopTask.java | 6 +- .../common/task/RealtimeIndexTask.java | 42 +- .../druid/indexing/common/task/Task.java | 16 +- .../indexing/common/task/TaskResource.java | 21 +- .../druid/indexing/common/task/TaskUtils.java | 2 +- .../common/task/VersionConverterTask.java | 16 +- .../common/tasklogs/NoopTaskLogs.java | 45 +++ .../indexing/common/tasklogs/S3TaskLogs.java | 2 +- .../common/tasklogs/S3TaskLogsConfig.java | 2 +- .../tasklogs/SwitchingTaskLogStreamer.java | 21 +- .../common/tasklogs/TaskLogPusher.java | 31 ++ .../common/tasklogs/TaskLogStreamer.java | 42 ++ .../indexing/common/tasklogs/TaskLogs.java | 24 ++ .../tasklogs/TaskRunnerTaskLogStreamer.java | 6 +- .../indexing/coordinator/DbTaskStorage.java | 10 +- .../coordinator/ForkingTaskRunner.java | 14 +- .../coordinator/ForkingTaskRunnerFactory.java | 8 +- .../coordinator/HeapMemoryTaskStorage.java | 12 +- .../coordinator/IndexerDBCoordinator.java | 2 +- .../coordinator/RemoteTaskRunner.java | 18 +- .../coordinator/RemoteTaskRunnerFactory.java | 8 +- .../coordinator/RemoteTaskRunnerWorkItem.java | 10 +- .../RemoteTaskRunnerWorkQueue.java | 4 +- .../coordinator/TaskExistsException.java | 31 +- .../indexing/coordinator/TaskLockbox.java | 8 +- .../indexing/coordinator/TaskMaster.java | 16 +- .../druid/indexing/coordinator/TaskQueue.java | 14 +- .../indexing/coordinator/TaskRunner.java | 10 +- .../coordinator/TaskRunnerFactory.java | 4 +- .../coordinator/TaskRunnerWorkItem.java | 8 +- .../indexing/coordinator/TaskStorage.java | 12 +- .../coordinator/TaskStorageQueryAdapter.java | 12 +- .../coordinator/ThreadPoolTaskRunner.java | 10 +- .../druid/indexing/coordinator/ZkWorker.java | 10 +- .../config/EC2AutoScalingStrategyConfig.java | 4 +- .../config/ForkingTaskRunnerConfig.java | 21 +- .../config/IndexerCoordinatorConfig.java | 2 +- .../config/IndexerDbConnectorConfig.java | 2 +- .../config/RemoteTaskRunnerConfig.java | 4 +- .../coordinator/exec/TaskConsumer.java | 14 +- .../http/IndexerCoordinatorResource.java | 47 +-- .../http/OldIndexerCoordinatorResource.java | 8 +- .../http/OverlordRedirectInfo.java | 4 +- .../coordinator/scaling/AutoScalingData.java | 4 +- .../scaling/AutoScalingStrategy.java | 4 +- .../scaling/EC2AutoScalingStrategy.java | 10 +- .../scaling/NoopAutoScalingStrategy.java | 4 +- .../NoopResourceManagementScheduler.java | 4 +- .../scaling/ResourceManagementScheduler.java | 8 +- .../ResourceManagementSchedulerConfig.java | 4 +- .../ResourceManagementSchedulerFactory.java | 6 +- ...esourceManagementSchedulerFactoryImpl.java | 4 +- .../scaling/ResourceManagementStrategy.java | 8 +- .../coordinator/scaling/ScalingStats.java | 4 +- .../SimpleResourceManagementConfig.java | 2 +- .../SimpleResourceManagementStrategy.java | 12 +- .../coordinator/setup/EC2NodeData.java | 4 +- .../coordinator/setup/GalaxyUserData.java | 4 +- .../coordinator/setup/WorkerSetupData.java | 4 +- .../indexing/worker/TaskAnnouncement.java | 10 +- .../druid/indexing/worker/Worker.java | 4 +- .../worker/WorkerCuratorCoordinator.java | 4 +- .../indexing/worker/WorkerTaskMonitor.java | 10 +- .../config/ChatHandlerProviderConfig.java | 37 ++ .../indexing/worker/config/WorkerConfig.java | 4 +- .../worker/executor/ChatHandlerResource.java | 55 +++ .../worker/executor/ExecutorLifecycle.java | 8 +- .../executor/ExecutorLifecycleConfig.java | 2 +- .../executor/ExecutorLifecycleFactory.java | 44 +++ .../indexing/worker/http/WorkerResource.java | 6 +- .../druid/indexing/TestTask.java | 8 +- .../indexing/common/RetryPolicyTest.java | 21 +- .../common/task/MergeTaskBaseTest.java | 2 +- .../indexing/common/task/TaskSerdeTest.java | 12 +- .../common/task/VersionConverterTaskTest.java | 2 +- .../indexing/coordinator/RealtimeishTask.java | 20 +- .../coordinator/RemoteTaskRunnerTest.java | 26 +- .../coordinator/TaskLifecycleTest.java | 46 +-- .../indexing/coordinator/TaskQueueTest.java | 22 +- .../coordinator/TestRealtimeTask.java | 12 +- .../scaling/EC2AutoScalingStrategyTest.java | 8 +- .../SimpleResourceManagementStrategyTest.java | 18 +- .../scaling/TestAutoScalingStrategy.java | 4 +- .../indexing/worker/TaskAnnouncementTest.java | 12 +- install/druid_setup.sh | 25 -- .../io/druid/guice/QueryToolChestModule.java | 2 - .../java/io/druid/jackson/JacksonModule.java | 6 +- ...DefaultQueryRunnerFactoryConglomerate.java | 6 +- .../query/QueryRunnerFactoryConglomerate.java | 7 +- .../io}/druid/query/QueryRunnerHelper.java | 3 +- .../ReferenceCountingSegmentQueryRunner.java | 5 +- .../query/groupby}/GroupByQueryEngine.java | 6 +- .../groupby}/GroupByQueryEngineConfig.java | 4 +- .../groupby}/GroupByQueryRunnerFactory.java | 5 +- .../druid/query/metadata/SegmentAnalyzer.java | 2 +- .../SegmentMetadataQueryRunnerFactory.java | 3 +- .../druid/query/search/SearchQueryRunner.java | 3 +- .../search/SearchQueryRunnerFactory.java | 4 +- .../TimeBoundaryQueryRunnerFactory.java | 5 +- .../timeseries/TimeseriesQueryEngine.java | 9 +- .../TimeseriesQueryRunnerFactory.java | 5 +- .../timeseries}/TimeseriesResultBuilder.java | 3 +- .../NoopQueryRunnerFactoryConglomerate.java | 7 +- .../druid/query/QueryRunnerTestHelper.java | 8 +- .../groupby}/GroupByQueryRunnerTest.java | 9 +- .../GroupByTimeseriesQueryRunnerTest.java | 9 +- .../query/metadata/SegmentAnalyzerTest.java | 6 +- .../query/search/SearchQueryRunnerTest.java | 6 +- .../TimeBoundaryQueryRunnerTest.java | 6 +- .../TimeseriesQueryRunnerBonusTest.java | 4 +- .../timeseries/TimeseriesQueryRunnerTest.java | 8 +- .../io/druid/segment}/ConciseOffsetTest.java | 3 +- .../io/druid/segment}/EmptyIndexTest.java | 6 +- .../io/druid/segment}/IndexMergerTest.java | 5 +- .../ReferenceCountingSegmentTest.java | 6 +- .../java/io/druid/segment}/TestHelper.java | 2 +- .../java/io/druid/segment}/TestIndex.java | 5 +- .../segment/data}/IntersectingOffsetTest.java | 5 +- .../segment/data}/UnioningOffsetTest.java | 5 +- .../filter}/SpatialFilterBonusTest.java | 6 +- .../segment/filter}/SpatialFilterTest.java | 6 +- processing/src/test/resources/ProtoTest.proto | 2 +- .../plumber/RejectionPolicyFactory.java | 16 - .../DbSegmentPublisherProvider.java | 6 +- .../{guice => }/FireDepartmentsProvider.java | 4 +- .../NoopSegmentPublisherProvider.java | 6 +- .../{guice => }/RealtimeManagerConfig.java | 2 +- .../guice/{guice => }/RealtimeModule.java | 8 +- .../{guice => }/SegmentPublisherProvider.java | 4 +- .../segment}/realtime/DbSegmentPublisher.java | 2 +- .../realtime/DbSegmentPublisherConfig.java | 4 +- .../segment}/realtime/FireDepartment.java | 13 +- .../realtime/FireDepartmentConfig.java | 5 +- .../realtime/FireDepartmentMetrics.java | 4 +- .../druid/segment}/realtime/FireHydrant.java | 2 +- .../druid/segment}/realtime/Indexer.java | 2 +- .../realtime/NoopSegmentPublisher.java | 2 +- ...timeCuratorDataSegmentAnnouncerConfig.java | 4 +- .../segment}/realtime/RealtimeManager.java | 10 +- .../realtime/RealtimeMetricsMonitor.java | 4 +- .../segment}/realtime/S3SegmentPusher.java | 12 +- .../druid/segment}/realtime/Schema.java | 2 +- .../segment}/realtime/SegmentPublisher.java | 2 +- .../firehose/ClippedFirehoseFactory.java | 2 +- .../segment}/realtime/firehose/Firehose.java | 2 +- .../realtime/firehose/FirehoseFactory.java | 4 +- .../realtime/firehose/IrcDecoder.java | 2 +- .../realtime/firehose/IrcFirehoseFactory.java | 2 +- .../JacksonifiedConnectionFactory.java | 21 +- .../firehose/KafkaFirehoseFactory.java | 2 +- .../realtime/firehose/PredicateFirehose.java | 2 +- .../firehose/RabbitMQFirehoseConfig.java | 21 +- .../firehose/RabbitMQFirehoseFactory.java | 2 +- .../firehose/TimedShutoffFirehoseFactory.java | 2 +- .../firehose/WikipediaIrcDecoder.java | 2 +- .../IntervalStartVersioningPolicy.java | 4 +- .../MessageTimeRejectionPolicyFactory.java | 4 +- .../plumber/NoopRejectionPolicyFactory.java | 4 +- .../segment}/realtime/plumber/Plumber.java | 4 +- .../realtime/plumber/PlumberSchool.java | 8 +- .../plumber/RealtimePlumberSchool.java | 14 +- .../realtime/plumber/RejectionPolicy.java | 4 +- .../plumber/RejectionPolicyFactory.java | 35 ++ .../ServerTimeRejectionPolicyFactory.java | 4 +- .../druid/segment}/realtime/plumber/Sink.java | 6 +- .../realtime/plumber/VersioningPolicy.java | 4 +- .../realtime/RealtimeManagerTest.java | 12 +- .../IntervalStartVersioningPolicyTest.java | 4 +- ...MessageTimeRejectionPolicyFactoryTest.java | 4 +- .../plumber/RealtimePlumberSchoolTest.java | 12 +- .../ServerTimeRejectionPolicyFactoryTest.java | 4 +- .../segment}/realtime/plumber/SinkTest.java | 6 +- .../druid/sql/antlr4/DruidSQL.g4 | 0 .../src/main/java/com/metamx/TsvToJson.java | 199 ---------- .../druid/loading/AWSCredentialsConfig.java | 24 -- .../druid/master/BalancerStrategyFactory.java | 26 -- .../master/CostBalancerStrategyFactory.java | 31 -- .../master/RandomBalancerStrategyFactory.java | 30 -- .../metrics/DruidMonitorSchedulerConfig.java | 26 -- .../main/java/com/metamx/druid/utils/CLI.java | 95 ----- .../com/metamx/druid/utils/DruidSetup.java | 363 ------------------ .../client/BatchServerInventoryView.java | 2 +- .../io/druid/client/BrokerServerView.java | 2 +- .../client/SingleServerInventoryView.java | 2 +- .../indexing/IndexingServiceClient.java | 2 +- .../indexing/IndexingServiceSelector.java | 3 +- .../IndexingServiceSelectorConfig.java | 2 +- .../java/io/druid/curator/CuratorModule.java | 4 +- .../curator/discovery/DiscoveryModule.java | 4 +- .../druid/db/DatabaseRuleManager.java | 11 +- .../druid/db/DatabaseRuleManagerConfig.java | 4 +- .../druid/db/DatabaseRuleManagerProvider.java | 4 +- .../druid/db/DatabaseSegmentManager.java | 5 +- .../db/DatabaseSegmentManagerConfig.java | 4 +- .../db/DatabaseSegmentManagerProvider.java | 4 +- .../io/druid/guice/{guice => }/AWSModule.java | 4 +- .../guice/{guice => }/AnnouncerModule.java | 2 +- .../druid/guice/{guice => }/BrokerModule.java | 2 +- .../CassandraDataSegmentPusherProvider.java | 8 +- .../guice/{guice => }/CoordinatorModule.java | 20 +- .../{guice => }/DataSegmentPullerModule.java | 18 +- .../{guice => }/DataSegmentPusherModule.java | 10 +- .../DataSegmentPusherProvider.java | 4 +- .../{guice => }/DruidProcessingModule.java | 8 +- .../HdfsDataSegmentPusherProvider.java | 8 +- .../guice/{guice => }/HistoricalModule.java | 6 +- .../guice/{guice => }/HttpClientModule.java | 4 +- .../IndexingServiceDiscoveryModule.java | 6 +- .../LocalDataSegmentPusherProvider.java | 8 +- .../{guice => }/QueryRunnerFactoryModule.java | 15 +- .../guice/{guice => }/QueryableModule.java | 2 +- .../S3DataSegmentPusherProvider.java | 8 +- .../druid/guice/{guice => }/ServerModule.java | 4 +- .../guice/{guice => }/ServerViewModule.java | 2 +- .../guice/{guice => }/StorageNodeModule.java | 14 +- .../guice/{guice => }/annotations/Client.java | 2 +- .../{guice => }/annotations/Processing.java | 2 +- .../segment/loading/AWSCredentialsConfig.java | 43 +++ .../segment}/loading/DataSegmentKiller.java | 2 +- .../segment}/loading/DataSegmentPuller.java | 2 +- .../segment}/loading/DataSegmentPusher.java | 2 +- .../loading/DataSegmentPusherUtil.java | 2 +- .../loading/DelegatingSegmentLoader.java | 2 +- .../loading/HdfsDataSegmentPuller.java | 2 +- .../loading/HdfsDataSegmentPusher.java | 2 +- .../loading/HdfsDataSegmentPusherConfig.java | 4 +- .../loading/LocalDataSegmentPuller.java | 2 +- .../loading/LocalDataSegmentPusher.java | 2 +- .../loading/LocalDataSegmentPusherConfig.java | 5 +- .../loading/MMappedQueryableIndexFactory.java | 2 +- .../segment}/loading/OmniSegmentLoader.java | 2 +- .../loading/QueryableIndexFactory.java | 4 +- .../segment}/loading/S3DataSegmentKiller.java | 2 +- .../segment}/loading/S3DataSegmentPuller.java | 2 +- .../segment}/loading/S3DataSegmentPusher.java | 2 +- .../loading/S3DataSegmentPusherConfig.java | 6 +- .../druid/segment}/loading/SegmentLoader.java | 2 +- .../segment}/loading/SegmentLoaderConfig.java | 4 +- .../loading/SegmentLoadingException.java | 4 +- .../segment}/loading/SingleSegmentLoader.java | 2 +- .../cassandra/CassandraDataSegmentConfig.java | 4 +- .../cassandra/CassandraDataSegmentPuller.java | 6 +- .../cassandra/CassandraDataSegmentPusher.java | 6 +- .../loading/cassandra/CassandraStorage.java | 4 +- .../druid/server}/DruidProcessingConfig.java | 4 +- .../java/io/druid/server/QueryServlet.java | 4 +- .../DataSegmentChangeHandler.java | 2 +- .../DataSegmentChangeRequest.java | 2 +- .../SegmentChangeRequestDrop.java | 2 +- .../SegmentChangeRequestLoad.java | 2 +- .../SegmentChangeRequestNoop.java | 4 +- .../server}/coordination/ServerManager.java | 12 +- .../server}/coordination/ZkCoordinator.java | 8 +- .../coordination/ZkCoordinatorConfig.java | 4 +- .../io/druid/server/http/InfoResource.java | 8 +- .../druid/server/http/MasterRedirectInfo.java | 2 +- .../io/druid/server/http/MasterResource.java | 4 +- .../http/MasterSegmentSettingsResource.java | 2 +- .../initialization/ConfigModule.java | 4 +- .../initialization/EmitterModule.java | 6 +- .../initialization/HttpEmitterModule.java | 6 +- .../initialization/Initialization.java | 8 +- .../initialization/JettyServerModule.java | 6 +- .../initialization/LogEmitterModule.java | 4 +- .../server/log/FileRequestLoggerProvider.java | 2 +- .../server}/master/BalancerSegmentHolder.java | 2 +- .../server}/master/BalancerStrategy.java | 2 +- .../master/BalancerStrategyFactory.java | 26 ++ .../server}/master/CostBalancerStrategy.java | 2 +- .../master/CostBalancerStrategyFactory.java} | 30 +- .../druid/server}/master/DruidCluster.java | 2 +- .../druid/server}/master/DruidMaster.java | 8 +- .../server}/master/DruidMasterBalancer.java | 2 +- .../server}/master/DruidMasterCleanup.java | 2 +- .../server}/master/DruidMasterConfig.java | 4 +- .../server}/master/DruidMasterHelper.java | 4 +- .../server}/master/DruidMasterLogger.java | 2 +- .../server}/master/DruidMasterRuleRunner.java | 6 +- .../master/DruidMasterRuntimeParams.java | 4 +- .../master/DruidMasterSegmentInfoLoader.java | 2 +- .../master/DruidMasterSegmentMerger.java | 2 +- .../server}/master/LoadPeonCallback.java | 4 +- .../druid/server}/master/LoadQueuePeon.java | 10 +- .../server}/master/LoadQueueTaskMaster.java | 4 +- .../server}/master/MasterSegmentSettings.java | 36 +- .../druid/server}/master/MasterStats.java | 2 +- .../druid/server}/master/MergerWhitelist.java | 4 +- .../master/RandomBalancerStrategy.java | 2 +- .../master/RandomBalancerStrategyFactory.java | 30 ++ .../server}/master/ReplicationThrottler.java | 4 +- .../master/ReservoirSegmentSampler.java | 2 +- .../master/SegmentReplicantLookup.java | 2 +- .../druid/server}/master/ServerHolder.java | 2 +- .../druid/server}/master/rules/DropRule.java | 8 +- .../master/rules/IntervalDropRule.java | 2 +- .../master/rules/IntervalLoadRule.java | 2 +- .../druid/server}/master/rules/LoadRule.java | 16 +- .../server}/master/rules/PeriodDropRule.java | 2 +- .../server}/master/rules/PeriodLoadRule.java | 2 +- .../druid/server}/master/rules/Rule.java | 8 +- .../druid/server}/master/rules/RuleMap.java | 4 +- .../server}/master/rules/SizeDropRule.java | 2 +- .../server}/master/rules/SizeLoadRule.java | 2 +- .../metrics/DruidMonitorSchedulerConfig.java | 45 +++ .../druid/server}/metrics/MetricsModule.java | 10 +- .../druid/server}/metrics/MonitorsConfig.java | 4 +- .../druid/server}/metrics/ServerMonitor.java | 4 +- .../java/io/druid/server/sql/SQLRunner.java | 4 +- .../metamx/druid/client/RangeIterable.java | 80 ---- .../druid/db/DatabaseSegmentManagerTest.java | 3 +- .../loading/CacheTestSegmentLoader.java | 2 +- .../loading/DataSegmentPusherUtilTest.java | 2 +- .../loading/SingleSegmentLoaderTest.java | 2 +- .../SegmentChangeRequestDropTest.java | 2 +- .../SegmentChangeRequestLoadTest.java | 2 +- .../coordination/ServerManagerTest.java | 10 +- .../coordination/ZkCoordinatorTest.java | 13 +- .../master}/DruidMasterBalancerProfiler.java | 20 +- .../master/DruidMasterBalancerTest.java | 2 +- .../master/DruidMasterBalancerTester.java | 2 +- .../master/DruidMasterRuleRunnerTest.java | 10 +- .../master/DruidMasterSegmentMergerTest.java | 2 +- .../druid/server}/master/DruidMasterTest.java | 6 +- .../server}/master/LoadQueuePeonTester.java | 2 +- .../master/ReservoirSegmentSamplerTest.java | 3 +- .../master/rules/PeriodDropRuleTest.java | 2 +- .../master/rules/PeriodLoadRuleTest.java | 2 +- .../server}/metrics/NoopServiceEmitter.java | 4 +- .../src/main/java/io/druid/cli/CliBroker.java | 16 +- .../java/io/druid/cli/CliCoordinator.java | 22 +- .../main/java/io/druid/cli/CliHistorical.java | 30 +- .../java/io/druid/cli/CliMiddleManager.java | 18 +- .../main/java/io/druid/cli/CliOverlord.java | 22 +- .../src/main/java/io/druid/cli/CliPeon.java | 36 +- .../main/java/io/druid/cli/CliRealtime.java | 30 +- .../java/io/druid/cli/CliRealtimeExample.java | 14 +- 459 files changed, 2120 insertions(+), 2602 deletions(-) rename common/src/main/java/io/druid/guice/{guice => }/ConfigProvider.java (98%) rename common/src/main/java/io/druid/guice/{guice => }/DbConnectorModule.java (98%) rename common/src/main/java/io/druid/guice/{guice => }/DruidGuiceExtensions.java (97%) rename common/src/main/java/io/druid/guice/{guice => }/DruidScopes.java (98%) rename common/src/main/java/io/druid/guice/{guice => }/DruidSecondaryModule.java (96%) rename common/src/main/java/io/druid/guice/{guice => }/JacksonConfigManagerModule.java (98%) rename common/src/main/java/io/druid/guice/{guice => }/JacksonConfigProvider.java (98%) rename common/src/main/java/io/druid/guice/{guice => }/JsonConfigProvider.java (99%) rename common/src/main/java/io/druid/guice/{guice => }/JsonConfigurator.java (99%) rename common/src/main/java/io/druid/guice/{guice => }/LazySingleton.java (97%) rename common/src/main/java/io/druid/guice/{guice => }/LifecycleModule.java (99%) rename common/src/main/java/io/druid/guice/{guice => }/LifecycleScope.java (98%) rename common/src/main/java/io/druid/guice/{guice => }/ListProvider.java (98%) rename common/src/main/java/io/druid/guice/{guice => }/ManageLifecycle.java (92%) rename common/src/main/java/io/druid/guice/{guice => }/ManageLifecycleLast.java (92%) rename common/src/main/java/io/druid/guice/{guice => }/PolyBind.java (99%) rename common/src/main/java/io/druid/guice/{guice => }/SupplierProvider.java (98%) rename common/src/main/java/io/druid/guice/{guice => }/annotations/Global.java (96%) rename common/src/main/java/io/druid/guice/{guice => }/annotations/Json.java (96%) rename common/src/main/java/io/druid/guice/{guice => }/annotations/Self.java (96%) rename common/src/main/java/io/druid/guice/{guice => }/annotations/Smile.java (96%) rename common/src/test/java/io/druid/guice/{guice => }/LifecycleScopeTest.java (99%) rename common/src/test/java/io/druid/guice/{guice => }/PolyBindTest.java (99%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/Bucket.java (97%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/DbUpdaterJob.java (99%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/DeterminePartitionsJob.java (99%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/HadoopDruidIndexer.java (98%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/HadoopDruidIndexerConfig.java (98%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/HadoopDruidIndexerJob.java (99%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/HadoopDruidIndexerMain.java (98%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/HadoopDruidIndexerMapper.java (98%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/HadoopDruidIndexerNode.java (97%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/HadoopIOPeon.java (98%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/HadoopyShardSpec.java (98%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/IndexGeneratorJob.java (99%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/Jobby.java (91%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/SortableBytes.java (98%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/StringIntervalFunction.java (92%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/Utils.java (99%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/granularity/ArbitraryGranularitySpec.java (96%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/granularity/GranularitySpec.java (95%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/granularity/UniformGranularitySpec.java (96%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/hadoop/FSSpideringIterator.java (96%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/partitions/PartitionsSpec.java (66%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/path/GranularUnprocessedPathSpec.java (93%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/path/GranularityPathSpec.java (95%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/path/PathSpec.java (90%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/path/StaticPathSpec.java (92%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/rollup/DataRollupSpec.java (95%) rename indexing-hadoop/src/main/java/{com/metamx => io}/druid/indexer/updater/DbUpdaterJobSpec.java (97%) rename indexing-hadoop/src/test/java/{com/metamx => io}/druid/indexer/HadoopDruidIndexerConfigTest.java (98%) rename indexing-hadoop/src/test/java/{com/metamx => io}/druid/indexer/SortableBytesTest.java (98%) rename indexing-hadoop/src/test/java/{com/metamx => io}/druid/indexer/granularity/ArbitraryGranularityTest.java (99%) rename indexing-hadoop/src/test/java/{com/metamx => io}/druid/indexer/granularity/UniformGranularityTest.java (98%) rename indexing-hadoop/src/test/java/{com/metamx => io}/druid/indexer/hadoop/FSSpideringIteratorTest.java (97%) delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LockListAction.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionClient.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/common/config/TaskLogConfig.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/common/index/EventReceiver.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/NoopTaskLogs.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogPusher.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogStreamer.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogs.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskExistsException.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/worker/config/ChatHandlerProviderConfig.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ChatHandlerResource.java delete mode 100644 indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ExecutorLifecycleFactory.java rename indexing-service/src/main/java/io/druid/guice/{guice => }/IndexingServiceModuleHelper.java (86%) rename indexing-service/src/main/java/io/druid/guice/{guice => }/MiddleManagerModule.java (80%) rename indexing-service/src/main/java/io/druid/guice/{guice => }/OverlordModule.java (70%) rename indexing-service/src/main/java/io/druid/guice/{guice => }/PeonModule.java (71%) rename indexing-service/src/main/java/io/druid/guice/{guice => }/TaskLogsModule.java (83%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/RetryPolicy.java (95%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/RetryPolicyConfig.java (94%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/RetryPolicyFactory.java (92%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/TaskLock.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/TaskStatus.java (97%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/TaskToolbox.java (86%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/TaskToolboxFactory.java (89%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/LocalTaskActionClient.java (54%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/LocalTaskActionClientFactory.java (86%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/LockAcquireAction.java (55%) create mode 100644 indexing-service/src/main/java/io/druid/indexing/common/actions/LockListAction.java rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/LockReleaseAction.java (53%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/RemoteTaskActionClient.java (94%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/RemoteTaskActionClientFactory.java (86%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/SegmentInsertAction.java (97%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/SegmentListUnusedAction.java (95%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/SegmentListUsedAction.java (95%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/SegmentNukeAction.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/SpawnTasksAction.java (55%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/TaskAction.java (55%) create mode 100644 indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionClient.java rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/TaskActionClientFactory.java (85%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/TaskActionHolder.java (90%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/actions/TaskActionToolbox.java (90%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/config/IndexerZkConfig.java (95%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/config/TaskConfig.java (95%) create mode 100644 indexing-service/src/main/java/io/druid/indexing/common/config/TaskLogConfig.java rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/index/ChatHandler.java (92%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/index/ChatHandlerProvider.java (91%) create mode 100644 indexing-service/src/main/java/io/druid/indexing/common/index/EventReceiver.java rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/index/EventReceiverFirehoseFactory.java (97%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/index/EventReceivingChatHandlerProvider.java (97%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/index/NoopChatHandlerProvider.java (92%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/index/StaticS3FirehoseFactory.java (97%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/index/YeOldePlumberSchool.java (94%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/AbstractTask.java (93%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/AppendTask.java (98%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/DeleteTask.java (91%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/HadoopIndexTask.java (91%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/IndexDeterminePartitionsTask.java (95%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/IndexGeneratorTask.java (90%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/IndexTask.java (92%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/KillTask.java (89%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/MergeTask.java (98%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/MergeTaskBase.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/NoopTask.java (92%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/RealtimeIndexTask.java (91%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/Task.java (90%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/TaskResource.java (58%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/TaskUtils.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/task/VersionConverterTask.java (94%) create mode 100644 indexing-service/src/main/java/io/druid/indexing/common/tasklogs/NoopTaskLogs.java rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/tasklogs/S3TaskLogs.java (98%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/tasklogs/S3TaskLogsConfig.java (95%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/tasklogs/SwitchingTaskLogStreamer.java (52%) create mode 100644 indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogPusher.java create mode 100644 indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogStreamer.java create mode 100644 indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogs.java rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/common/tasklogs/TaskRunnerTaskLogStreamer.java (90%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/DbTaskStorage.java (98%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/ForkingTaskRunner.java (97%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/ForkingTaskRunnerFactory.java (88%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/HeapMemoryTaskStorage.java (95%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/IndexerDBCoordinator.java (99%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/RemoteTaskRunner.java (97%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/RemoteTaskRunnerFactory.java (91%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/RemoteTaskRunnerWorkItem.java (89%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/RemoteTaskRunnerWorkQueue.java (92%) rename server/src/main/java/com/metamx/druid/utils/RequiredOption.java => indexing-service/src/main/java/io/druid/indexing/coordinator/TaskExistsException.java (54%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/TaskLockbox.java (98%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/TaskMaster.java (94%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/TaskQueue.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/TaskRunner.java (86%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/TaskRunnerFactory.java (90%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/TaskRunnerWorkItem.java (93%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/TaskStorage.java (89%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/TaskStorageQueryAdapter.java (94%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/ThreadPoolTaskRunner.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/ZkWorker.java (95%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/config/EC2AutoScalingStrategyConfig.java (91%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/config/ForkingTaskRunnerConfig.java (64%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java (97%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/config/IndexerDbConnectorConfig.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/config/RemoteTaskRunnerConfig.java (93%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/exec/TaskConsumer.java (94%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/http/IndexerCoordinatorResource.java (88%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/http/OldIndexerCoordinatorResource.java (85%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/http/OverlordRedirectInfo.java (93%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/AutoScalingData.java (93%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/AutoScalingStrategy.java (93%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/EC2AutoScalingStrategy.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/NoopAutoScalingStrategy.java (94%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/NoopResourceManagementScheduler.java (92%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/ResourceManagementScheduler.java (94%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/ResourceManagementSchedulerConfig.java (93%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactory.java (84%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactoryImpl.java (93%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/ResourceManagementStrategy.java (85%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/ScalingStats.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/SimpleResourceManagementConfig.java (98%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategy.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/setup/EC2NodeData.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/setup/GalaxyUserData.java (94%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/coordinator/setup/WorkerSetupData.java (96%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/worker/TaskAnnouncement.java (91%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/worker/Worker.java (95%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/worker/WorkerCuratorCoordinator.java (98%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/worker/WorkerTaskMonitor.java (96%) create mode 100644 indexing-service/src/main/java/io/druid/indexing/worker/config/ChatHandlerProviderConfig.java rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/worker/config/WorkerConfig.java (94%) create mode 100644 indexing-service/src/main/java/io/druid/indexing/worker/executor/ChatHandlerResource.java rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/worker/executor/ExecutorLifecycle.java (95%) rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/worker/executor/ExecutorLifecycleConfig.java (97%) create mode 100644 indexing-service/src/main/java/io/druid/indexing/worker/executor/ExecutorLifecycleFactory.java rename indexing-service/src/main/java/{com/metamx => io}/druid/indexing/worker/http/WorkerResource.java (94%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/TestTask.java (90%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/common/RetryPolicyTest.java (56%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/common/task/MergeTaskBaseTest.java (98%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/common/task/TaskSerdeTest.java (97%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/common/task/VersionConverterTaskTest.java (97%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/coordinator/RealtimeishTask.java (87%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/coordinator/RemoteTaskRunnerTest.java (94%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/coordinator/TaskLifecycleTest.java (92%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/coordinator/TaskQueueTest.java (95%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/coordinator/TestRealtimeTask.java (86%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/coordinator/scaling/EC2AutoScalingStrategyTest.java (95%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategyTest.java (95%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/coordinator/scaling/TestAutoScalingStrategy.java (92%) rename indexing-service/src/test/java/{com/metamx => io}/druid/indexing/worker/TaskAnnouncementTest.java (90%) delete mode 100755 install/druid_setup.sh rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/DefaultQueryRunnerFactoryConglomerate.java (90%) rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/QueryRunnerFactoryConglomerate.java (86%) rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/QueryRunnerHelper.java (97%) rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/ReferenceCountingSegmentQueryRunner.java (92%) rename {server/src/main/java/com/metamx/druid/query/group => processing/src/main/java/io/druid/query/groupby}/GroupByQueryEngine.java (98%) rename {server/src/main/java/com/metamx/druid/query/group => processing/src/main/java/io/druid/query/groupby}/GroupByQueryEngineConfig.java (92%) rename {server/src/main/java/com/metamx/druid/query/group => processing/src/main/java/io/druid/query/groupby}/GroupByQueryRunnerFactory.java (96%) rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/metadata/SegmentAnalyzer.java (99%) rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/metadata/SegmentMetadataQueryRunnerFactory.java (98%) rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/search/SearchQueryRunner.java (98%) rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/search/SearchQueryRunnerFactory.java (93%) rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/timeboundary/TimeBoundaryQueryRunnerFactory.java (93%) rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/timeseries/TimeseriesQueryEngine.java (92%) rename {server/src/main/java/com/metamx => processing/src/main/java/io}/druid/query/timeseries/TimeseriesQueryRunnerFactory.java (92%) rename {server/src/main/java/com/metamx/druid => processing/src/main/java/io/druid/query/timeseries}/TimeseriesResultBuilder.java (95%) rename {server/src/test/java/com/metamx => processing/src/test/java/io}/druid/query/NoopQueryRunnerFactoryConglomerate.java (87%) rename {server/src/test/java/com/metamx => processing/src/test/java/io}/druid/query/QueryRunnerTestHelper.java (96%) rename {server/src/test/java/com/metamx/druid/query/group => processing/src/test/java/io/druid/query/groupby}/GroupByQueryRunnerTest.java (99%) rename {server/src/test/java/com/metamx/druid/query/group => processing/src/test/java/io/druid/query/groupby}/GroupByTimeseriesQueryRunnerTest.java (94%) rename {server/src/test/java/com/metamx => processing/src/test/java/io}/druid/query/metadata/SegmentAnalyzerTest.java (96%) rename {server/src/test/java/com/metamx => processing/src/test/java/io}/druid/query/search/SearchQueryRunnerTest.java (98%) rename {server/src/test/java/com/metamx => processing/src/test/java/io}/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java (91%) rename {server/src/test/java/com/metamx => processing/src/test/java/io}/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java (96%) rename {server/src/test/java/com/metamx => processing/src/test/java/io}/druid/query/timeseries/TimeseriesQueryRunnerTest.java (99%) rename {server/src/test/java/com/metamx/druid/index/v1 => processing/src/test/java/io/druid/segment}/ConciseOffsetTest.java (96%) rename {server/src/test/java/com/metamx/druid/index/v1 => processing/src/test/java/io/druid/segment}/EmptyIndexTest.java (92%) rename {server/src/test/java/com/metamx/druid/index/v1 => processing/src/test/java/io/druid/segment}/IndexMergerTest.java (97%) rename {server/src/test/java/com/metamx/druid/index => processing/src/test/java/io/druid/segment}/ReferenceCountingSegmentTest.java (94%) rename {server/src/test/java/com/metamx/druid => processing/src/test/java/io/druid/segment}/TestHelper.java (99%) rename {server/src/test/java/com/metamx/druid/index/v1 => processing/src/test/java/io/druid/segment}/TestIndex.java (97%) rename {server/src/test/java/com/metamx/druid/index/v1/processing => processing/src/test/java/io/druid/segment/data}/IntersectingOffsetTest.java (94%) rename {server/src/test/java/com/metamx/druid/index/v1/processing => processing/src/test/java/io/druid/segment/data}/UnioningOffsetTest.java (95%) rename {server/src/test/java/com/metamx/druid/index/brita => processing/src/test/java/io/druid/segment/filter}/SpatialFilterBonusTest.java (99%) rename {server/src/test/java/com/metamx/druid/index/brita => processing/src/test/java/io/druid/segment/filter}/SpatialFilterTest.java (99%) delete mode 100644 realtime/src/main/java/com/metamx/druid/realtime/plumber/RejectionPolicyFactory.java rename realtime/src/main/java/io/druid/guice/{guice => }/DbSegmentPublisherProvider.java (91%) rename realtime/src/main/java/io/druid/guice/{guice => }/FireDepartmentsProvider.java (95%) rename realtime/src/main/java/io/druid/guice/{guice => }/NoopSegmentPublisherProvider.java (88%) rename realtime/src/main/java/io/druid/guice/{guice => }/RealtimeManagerConfig.java (97%) rename realtime/src/main/java/io/druid/guice/{guice => }/RealtimeModule.java (90%) rename realtime/src/main/java/io/druid/guice/{guice => }/SegmentPublisherProvider.java (94%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/DbSegmentPublisher.java (99%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/DbSegmentPublisherConfig.java (91%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/FireDepartment.java (88%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/FireDepartmentConfig.java (95%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/FireDepartmentMetrics.java (96%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/FireHydrant.java (98%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/Indexer.java (96%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/NoopSegmentPublisher.java (96%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/RealtimeCuratorDataSegmentAnnouncerConfig.java (90%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/RealtimeManager.java (97%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/RealtimeMetricsMonitor.java (96%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/S3SegmentPusher.java (78%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/Schema.java (98%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/SegmentPublisher.java (96%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/ClippedFirehoseFactory.java (97%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/Firehose.java (98%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/FirehoseFactory.java (95%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/IrcDecoder.java (96%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/IrcFirehoseFactory.java (99%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/JacksonifiedConnectionFactory.java (76%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/KafkaFirehoseFactory.java (98%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/PredicateFirehose.java (97%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/RabbitMQFirehoseConfig.java (60%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/RabbitMQFirehoseFactory.java (99%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/TimedShutoffFirehoseFactory.java (98%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/firehose/WikipediaIrcDecoder.java (99%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/IntervalStartVersioningPolicy.java (91%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/MessageTimeRejectionPolicyFactory.java (94%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/NoopRejectionPolicyFactory.java (92%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/Plumber.java (94%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/PlumberSchool.java (86%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/RealtimePlumberSchool.java (98%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/RejectionPolicy.java (90%) create mode 100644 realtime/src/main/java/io/druid/segment/realtime/plumber/RejectionPolicyFactory.java rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/ServerTimeRejectionPolicyFactory.java (94%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/Sink.java (97%) rename realtime/src/main/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/VersioningPolicy.java (92%) rename realtime/src/test/java/{com/metamx/druid => io/druid/segment}/realtime/RealtimeManagerTest.java (95%) rename realtime/src/test/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/IntervalStartVersioningPolicyTest.java (92%) rename realtime/src/test/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/MessageTimeRejectionPolicyFactoryTest.java (94%) rename realtime/src/test/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/RealtimePlumberSchoolTest.java (94%) rename realtime/src/test/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java (93%) rename realtime/src/test/java/{com/metamx/druid => io/druid/segment}/realtime/plumber/SinkTest.java (96%) rename server/src/main/antlr4/{com/metamx => io}/druid/sql/antlr4/DruidSQL.g4 (100%) delete mode 100644 server/src/main/java/com/metamx/TsvToJson.java delete mode 100644 server/src/main/java/com/metamx/druid/loading/AWSCredentialsConfig.java delete mode 100644 server/src/main/java/com/metamx/druid/master/BalancerStrategyFactory.java delete mode 100644 server/src/main/java/com/metamx/druid/master/CostBalancerStrategyFactory.java delete mode 100644 server/src/main/java/com/metamx/druid/master/RandomBalancerStrategyFactory.java delete mode 100644 server/src/main/java/com/metamx/druid/metrics/DruidMonitorSchedulerConfig.java delete mode 100644 server/src/main/java/com/metamx/druid/utils/CLI.java delete mode 100644 server/src/main/java/com/metamx/druid/utils/DruidSetup.java rename server/src/main/java/{com/metamx => io}/druid/client/indexing/IndexingServiceSelector.java (96%) rename server/src/main/java/{com/metamx => io}/druid/client/indexing/IndexingServiceSelectorConfig.java (96%) rename server/src/main/java/{com/metamx => io}/druid/db/DatabaseRuleManager.java (97%) rename server/src/main/java/{com/metamx => io}/druid/db/DatabaseRuleManagerConfig.java (93%) rename server/src/main/java/{com/metamx => io}/druid/db/DatabaseRuleManagerProvider.java (96%) rename server/src/main/java/{com/metamx => io}/druid/db/DatabaseSegmentManager.java (99%) rename server/src/main/java/{com/metamx => io}/druid/db/DatabaseSegmentManagerConfig.java (93%) rename server/src/main/java/{com/metamx => io}/druid/db/DatabaseSegmentManagerProvider.java (95%) rename server/src/main/java/io/druid/guice/{guice => }/AWSModule.java (96%) rename server/src/main/java/io/druid/guice/{guice => }/AnnouncerModule.java (98%) rename server/src/main/java/io/druid/guice/{guice => }/BrokerModule.java (98%) rename server/src/main/java/io/druid/guice/{guice => }/CassandraDataSegmentPusherProvider.java (86%) rename server/src/main/java/io/druid/guice/{guice => }/CoordinatorModule.java (84%) rename server/src/main/java/io/druid/guice/{guice => }/DataSegmentPullerModule.java (85%) rename server/src/main/java/io/druid/guice/{guice => }/DataSegmentPusherModule.java (85%) rename server/src/main/java/io/druid/guice/{guice => }/DataSegmentPusherProvider.java (94%) rename server/src/main/java/io/druid/guice/{guice => }/DruidProcessingModule.java (96%) rename server/src/main/java/io/druid/guice/{guice => }/HdfsDataSegmentPusherProvider.java (88%) rename server/src/main/java/io/druid/guice/{guice => }/HistoricalModule.java (90%) rename server/src/main/java/io/druid/guice/{guice => }/HttpClientModule.java (98%) rename server/src/main/java/io/druid/guice/{guice => }/IndexingServiceDiscoveryModule.java (93%) rename server/src/main/java/io/druid/guice/{guice => }/LocalDataSegmentPusherProvider.java (86%) rename server/src/main/java/io/druid/guice/{guice => }/QueryRunnerFactoryModule.java (84%) rename server/src/main/java/io/druid/guice/{guice => }/QueryableModule.java (98%) rename server/src/main/java/io/druid/guice/{guice => }/S3DataSegmentPusherProvider.java (88%) rename server/src/main/java/io/druid/guice/{guice => }/ServerModule.java (95%) rename server/src/main/java/io/druid/guice/{guice => }/ServerViewModule.java (98%) rename server/src/main/java/io/druid/guice/{guice => }/StorageNodeModule.java (84%) rename server/src/main/java/io/druid/guice/{guice => }/annotations/Client.java (96%) rename server/src/main/java/io/druid/guice/{guice => }/annotations/Processing.java (96%) create mode 100644 server/src/main/java/io/druid/segment/loading/AWSCredentialsConfig.java rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/DataSegmentKiller.java (96%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/DataSegmentPuller.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/DataSegmentPusher.java (96%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/DataSegmentPusherUtil.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/DelegatingSegmentLoader.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/HdfsDataSegmentPuller.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/HdfsDataSegmentPusher.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/HdfsDataSegmentPusherConfig.java (92%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/LocalDataSegmentPuller.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/LocalDataSegmentPusher.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/LocalDataSegmentPusherConfig.java (90%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/MMappedQueryableIndexFactory.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/OmniSegmentLoader.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/QueryableIndexFactory.java (91%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/S3DataSegmentKiller.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/S3DataSegmentPuller.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/S3DataSegmentPusher.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/S3DataSegmentPusherConfig.java (89%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/SegmentLoader.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/SegmentLoaderConfig.java (93%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/SegmentLoadingException.java (93%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/SingleSegmentLoader.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/cassandra/CassandraDataSegmentConfig.java (92%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/cassandra/CassandraDataSegmentPuller.java (96%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/cassandra/CassandraDataSegmentPusher.java (95%) rename server/src/main/java/{com/metamx/druid => io/druid/segment}/loading/cassandra/CassandraStorage.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/DruidProcessingConfig.java (93%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/coordination/DataSegmentChangeHandler.java (96%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/coordination/DataSegmentChangeRequest.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/coordination/SegmentChangeRequestDrop.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/coordination/SegmentChangeRequestLoad.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/coordination/SegmentChangeRequestNoop.java (91%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/coordination/ServerManager.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/coordination/ZkCoordinator.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/coordination/ZkCoordinatorConfig.java (92%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/BalancerSegmentHolder.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/BalancerStrategy.java (97%) create mode 100644 server/src/main/java/io/druid/server/master/BalancerStrategyFactory.java rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/CostBalancerStrategy.java (99%) rename server/src/main/java/{com/metamx/druid/SearchResultBuilder.java => io/druid/server/master/CostBalancerStrategyFactory.java} (57%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidCluster.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidMaster.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidMasterBalancer.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidMasterCleanup.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidMasterConfig.java (95%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidMasterHelper.java (91%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidMasterLogger.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidMasterRuleRunner.java (96%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidMasterRuntimeParams.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidMasterSegmentInfoLoader.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/DruidMasterSegmentMerger.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/LoadPeonCallback.java (91%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/LoadQueuePeon.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/LoadQueueTaskMaster.java (95%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/MasterSegmentSettings.java (80%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/MasterStats.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/MergerWhitelist.java (94%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/RandomBalancerStrategy.java (98%) create mode 100644 server/src/main/java/io/druid/server/master/RandomBalancerStrategyFactory.java rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/ReplicationThrottler.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/ReservoirSegmentSampler.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/SegmentReplicantLookup.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/ServerHolder.java (99%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/rules/DropRule.java (87%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/rules/IntervalDropRule.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/rules/IntervalLoadRule.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/rules/LoadRule.java (94%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/rules/PeriodDropRule.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/rules/PeriodLoadRule.java (98%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/rules/Rule.java (90%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/rules/RuleMap.java (93%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/rules/SizeDropRule.java (97%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/master/rules/SizeLoadRule.java (98%) create mode 100644 server/src/main/java/io/druid/server/metrics/DruidMonitorSchedulerConfig.java rename server/src/main/java/{com/metamx/druid => io/druid/server}/metrics/MetricsModule.java (94%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/metrics/MonitorsConfig.java (94%) rename server/src/main/java/{com/metamx/druid => io/druid/server}/metrics/ServerMonitor.java (96%) delete mode 100644 server/src/test/java/com/metamx/druid/client/RangeIterable.java rename server/src/test/java/{com/metamx => io}/druid/db/DatabaseSegmentManagerTest.java (98%) rename server/src/test/java/{com/metamx/druid => io/druid/segment}/loading/CacheTestSegmentLoader.java (98%) rename server/src/test/java/{com/metamx/druid => io/druid/segment}/loading/DataSegmentPusherUtilTest.java (98%) rename server/src/test/java/{com/metamx/druid => io/druid/segment}/loading/SingleSegmentLoaderTest.java (98%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/coordination/SegmentChangeRequestDropTest.java (98%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/coordination/SegmentChangeRequestLoadTest.java (98%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/coordination/ServerManagerTest.java (98%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/coordination/ZkCoordinatorTest.java (93%) rename server/src/test/java/{com/metamx/druid/utils => io/druid/server/master}/DruidMasterBalancerProfiler.java (93%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/master/DruidMasterBalancerTest.java (99%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/master/DruidMasterBalancerTester.java (98%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/master/DruidMasterRuleRunnerTest.java (99%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/master/DruidMasterSegmentMergerTest.java (99%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/master/DruidMasterTest.java (97%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/master/LoadQueuePeonTester.java (97%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/master/ReservoirSegmentSamplerTest.java (99%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/master/rules/PeriodDropRuleTest.java (98%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/master/rules/PeriodLoadRuleTest.java (98%) rename server/src/test/java/{com/metamx/druid => io/druid/server}/metrics/NoopServiceEmitter.java (92%) diff --git a/common/src/main/java/io/druid/guice/guice/ConfigProvider.java b/common/src/main/java/io/druid/guice/ConfigProvider.java similarity index 98% rename from common/src/main/java/io/druid/guice/guice/ConfigProvider.java rename to common/src/main/java/io/druid/guice/ConfigProvider.java index 6822b48f334..47335ac1c24 100644 --- a/common/src/main/java/io/druid/guice/guice/ConfigProvider.java +++ b/common/src/main/java/io/druid/guice/ConfigProvider.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.common.base.Preconditions; import com.google.inject.Binder; diff --git a/common/src/main/java/io/druid/guice/guice/DbConnectorModule.java b/common/src/main/java/io/druid/guice/DbConnectorModule.java similarity index 98% rename from common/src/main/java/io/druid/guice/guice/DbConnectorModule.java rename to common/src/main/java/io/druid/guice/DbConnectorModule.java index 4c9f43f92de..a7dd6e4bcce 100644 --- a/common/src/main/java/io/druid/guice/guice/DbConnectorModule.java +++ b/common/src/main/java/io/druid/guice/DbConnectorModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; diff --git a/common/src/main/java/io/druid/guice/guice/DruidGuiceExtensions.java b/common/src/main/java/io/druid/guice/DruidGuiceExtensions.java similarity index 97% rename from common/src/main/java/io/druid/guice/guice/DruidGuiceExtensions.java rename to common/src/main/java/io/druid/guice/DruidGuiceExtensions.java index 0588495701a..c33144d70d0 100644 --- a/common/src/main/java/io/druid/guice/guice/DruidGuiceExtensions.java +++ b/common/src/main/java/io/druid/guice/DruidGuiceExtensions.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; diff --git a/common/src/main/java/io/druid/guice/guice/DruidScopes.java b/common/src/main/java/io/druid/guice/DruidScopes.java similarity index 98% rename from common/src/main/java/io/druid/guice/guice/DruidScopes.java rename to common/src/main/java/io/druid/guice/DruidScopes.java index 117f01f8cb7..6d68deea7bf 100644 --- a/common/src/main/java/io/druid/guice/guice/DruidScopes.java +++ b/common/src/main/java/io/druid/guice/DruidScopes.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Inject; import com.google.inject.Key; diff --git a/common/src/main/java/io/druid/guice/guice/DruidSecondaryModule.java b/common/src/main/java/io/druid/guice/DruidSecondaryModule.java similarity index 96% rename from common/src/main/java/io/druid/guice/guice/DruidSecondaryModule.java rename to common/src/main/java/io/druid/guice/DruidSecondaryModule.java index 943e9d09ed1..fbafb29d42b 100644 --- a/common/src/main/java/io/druid/guice/guice/DruidSecondaryModule.java +++ b/common/src/main/java/io/druid/guice/DruidSecondaryModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair; @@ -29,8 +29,8 @@ import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.Module; import com.google.inject.Provides; -import io.druid.guice.guice.annotations.Json; -import io.druid.guice.guice.annotations.Smile; +import io.druid.guice.annotations.Json; +import io.druid.guice.annotations.Smile; import org.skife.config.ConfigurationObjectFactory; import javax.validation.Validator; diff --git a/common/src/main/java/io/druid/guice/guice/JacksonConfigManagerModule.java b/common/src/main/java/io/druid/guice/JacksonConfigManagerModule.java similarity index 98% rename from common/src/main/java/io/druid/guice/guice/JacksonConfigManagerModule.java rename to common/src/main/java/io/druid/guice/JacksonConfigManagerModule.java index c82dd998742..7430e3a1db4 100644 --- a/common/src/main/java/io/druid/guice/guice/JacksonConfigManagerModule.java +++ b/common/src/main/java/io/druid/guice/JacksonConfigManagerModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.common.base.Supplier; import com.google.inject.Binder; diff --git a/common/src/main/java/io/druid/guice/guice/JacksonConfigProvider.java b/common/src/main/java/io/druid/guice/JacksonConfigProvider.java similarity index 98% rename from common/src/main/java/io/druid/guice/guice/JacksonConfigProvider.java rename to common/src/main/java/io/druid/guice/JacksonConfigProvider.java index 51ab93057dc..2f3087b1ee6 100644 --- a/common/src/main/java/io/druid/guice/guice/JacksonConfigProvider.java +++ b/common/src/main/java/io/druid/guice/JacksonConfigProvider.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.base.Supplier; diff --git a/common/src/main/java/io/druid/guice/guice/JsonConfigProvider.java b/common/src/main/java/io/druid/guice/JsonConfigProvider.java similarity index 99% rename from common/src/main/java/io/druid/guice/guice/JsonConfigProvider.java rename to common/src/main/java/io/druid/guice/JsonConfigProvider.java index 2315279bdc9..695cac052a1 100644 --- a/common/src/main/java/io/druid/guice/guice/JsonConfigProvider.java +++ b/common/src/main/java/io/druid/guice/JsonConfigProvider.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.common.base.Supplier; import com.google.common.base.Suppliers; diff --git a/common/src/main/java/io/druid/guice/guice/JsonConfigurator.java b/common/src/main/java/io/druid/guice/JsonConfigurator.java similarity index 99% rename from common/src/main/java/io/druid/guice/guice/JsonConfigurator.java rename to common/src/main/java/io/druid/guice/JsonConfigurator.java index 573f6d2d0d6..6e1449fce1d 100644 --- a/common/src/main/java/io/druid/guice/guice/JsonConfigurator.java +++ b/common/src/main/java/io/druid/guice/JsonConfigurator.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/common/src/main/java/io/druid/guice/guice/LazySingleton.java b/common/src/main/java/io/druid/guice/LazySingleton.java similarity index 97% rename from common/src/main/java/io/druid/guice/guice/LazySingleton.java rename to common/src/main/java/io/druid/guice/LazySingleton.java index 2dfa5802125..31228aba948 100644 --- a/common/src/main/java/io/druid/guice/guice/LazySingleton.java +++ b/common/src/main/java/io/druid/guice/LazySingleton.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.ScopeAnnotation; diff --git a/common/src/main/java/io/druid/guice/guice/LifecycleModule.java b/common/src/main/java/io/druid/guice/LifecycleModule.java similarity index 99% rename from common/src/main/java/io/druid/guice/guice/LifecycleModule.java rename to common/src/main/java/io/druid/guice/LifecycleModule.java index b1a13dc973c..7e8ebe59282 100644 --- a/common/src/main/java/io/druid/guice/guice/LifecycleModule.java +++ b/common/src/main/java/io/druid/guice/LifecycleModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.common.base.Preconditions; import com.google.inject.Binder; diff --git a/common/src/main/java/io/druid/guice/guice/LifecycleScope.java b/common/src/main/java/io/druid/guice/LifecycleScope.java similarity index 98% rename from common/src/main/java/io/druid/guice/guice/LifecycleScope.java rename to common/src/main/java/io/druid/guice/LifecycleScope.java index 320803c1dad..32332794934 100644 --- a/common/src/main/java/io/druid/guice/guice/LifecycleScope.java +++ b/common/src/main/java/io/druid/guice/LifecycleScope.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.common.collect.Lists; import com.google.inject.Key; diff --git a/common/src/main/java/io/druid/guice/guice/ListProvider.java b/common/src/main/java/io/druid/guice/ListProvider.java similarity index 98% rename from common/src/main/java/io/druid/guice/guice/ListProvider.java rename to common/src/main/java/io/druid/guice/ListProvider.java index b3f5c5f01d5..89aedbb7b3a 100644 --- a/common/src/main/java/io/druid/guice/guice/ListProvider.java +++ b/common/src/main/java/io/druid/guice/ListProvider.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.common.collect.Lists; import com.google.inject.Inject; diff --git a/common/src/main/java/io/druid/guice/guice/ManageLifecycle.java b/common/src/main/java/io/druid/guice/ManageLifecycle.java similarity index 92% rename from common/src/main/java/io/druid/guice/guice/ManageLifecycle.java rename to common/src/main/java/io/druid/guice/ManageLifecycle.java index 106ff9f1afb..b9ff7d27027 100644 --- a/common/src/main/java/io/druid/guice/guice/ManageLifecycle.java +++ b/common/src/main/java/io/druid/guice/ManageLifecycle.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.ScopeAnnotation; @@ -30,7 +30,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Marks the object to be managed by {@link com.metamx.common.lifecycle.Lifecycle} * - * This Scope gets defined by {@link io.druid.guice.guice.LifecycleModule} + * This Scope gets defined by {@link io.druid.guice.LifecycleModule} */ @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RUNTIME) diff --git a/common/src/main/java/io/druid/guice/guice/ManageLifecycleLast.java b/common/src/main/java/io/druid/guice/ManageLifecycleLast.java similarity index 92% rename from common/src/main/java/io/druid/guice/guice/ManageLifecycleLast.java rename to common/src/main/java/io/druid/guice/ManageLifecycleLast.java index d420ccb8717..042cb850d76 100644 --- a/common/src/main/java/io/druid/guice/guice/ManageLifecycleLast.java +++ b/common/src/main/java/io/druid/guice/ManageLifecycleLast.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.ScopeAnnotation; @@ -30,7 +30,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Marks the object to be managed by {@link com.metamx.common.lifecycle.Lifecycle} and set to be on Stage.LAST * - * This Scope gets defined by {@link io.druid.guice.guice.LifecycleModule} + * This Scope gets defined by {@link io.druid.guice.LifecycleModule} */ @Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RUNTIME) diff --git a/common/src/main/java/io/druid/guice/guice/PolyBind.java b/common/src/main/java/io/druid/guice/PolyBind.java similarity index 99% rename from common/src/main/java/io/druid/guice/guice/PolyBind.java rename to common/src/main/java/io/druid/guice/PolyBind.java index ba7df6e49d0..62b56efd9a9 100644 --- a/common/src/main/java/io/druid/guice/guice/PolyBind.java +++ b/common/src/main/java/io/druid/guice/PolyBind.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Inject; diff --git a/common/src/main/java/io/druid/guice/guice/SupplierProvider.java b/common/src/main/java/io/druid/guice/SupplierProvider.java similarity index 98% rename from common/src/main/java/io/druid/guice/guice/SupplierProvider.java rename to common/src/main/java/io/druid/guice/SupplierProvider.java index b9a0e236511..786f0038b42 100644 --- a/common/src/main/java/io/druid/guice/guice/SupplierProvider.java +++ b/common/src/main/java/io/druid/guice/SupplierProvider.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.common.base.Supplier; import com.google.inject.Inject; diff --git a/common/src/main/java/io/druid/guice/guice/annotations/Global.java b/common/src/main/java/io/druid/guice/annotations/Global.java similarity index 96% rename from common/src/main/java/io/druid/guice/guice/annotations/Global.java rename to common/src/main/java/io/druid/guice/annotations/Global.java index cca8afefc3c..904b3d7346b 100644 --- a/common/src/main/java/io/druid/guice/guice/annotations/Global.java +++ b/common/src/main/java/io/druid/guice/annotations/Global.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice.annotations; +package io.druid.guice.annotations; import com.google.inject.BindingAnnotation; diff --git a/common/src/main/java/io/druid/guice/guice/annotations/Json.java b/common/src/main/java/io/druid/guice/annotations/Json.java similarity index 96% rename from common/src/main/java/io/druid/guice/guice/annotations/Json.java rename to common/src/main/java/io/druid/guice/annotations/Json.java index a52008fa5eb..a21d06e7b35 100644 --- a/common/src/main/java/io/druid/guice/guice/annotations/Json.java +++ b/common/src/main/java/io/druid/guice/annotations/Json.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice.annotations; +package io.druid.guice.annotations; import com.google.inject.BindingAnnotation; diff --git a/common/src/main/java/io/druid/guice/guice/annotations/Self.java b/common/src/main/java/io/druid/guice/annotations/Self.java similarity index 96% rename from common/src/main/java/io/druid/guice/guice/annotations/Self.java rename to common/src/main/java/io/druid/guice/annotations/Self.java index fe5e2df0dce..242b261d97a 100644 --- a/common/src/main/java/io/druid/guice/guice/annotations/Self.java +++ b/common/src/main/java/io/druid/guice/annotations/Self.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice.annotations; +package io.druid.guice.annotations; import com.google.inject.BindingAnnotation; diff --git a/common/src/main/java/io/druid/guice/guice/annotations/Smile.java b/common/src/main/java/io/druid/guice/annotations/Smile.java similarity index 96% rename from common/src/main/java/io/druid/guice/guice/annotations/Smile.java rename to common/src/main/java/io/druid/guice/annotations/Smile.java index 0e5537ef04a..da899148fc2 100644 --- a/common/src/main/java/io/druid/guice/guice/annotations/Smile.java +++ b/common/src/main/java/io/druid/guice/annotations/Smile.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice.annotations; +package io.druid.guice.annotations; import com.google.inject.BindingAnnotation; diff --git a/common/src/test/java/io/druid/guice/guice/LifecycleScopeTest.java b/common/src/test/java/io/druid/guice/LifecycleScopeTest.java similarity index 99% rename from common/src/test/java/io/druid/guice/guice/LifecycleScopeTest.java rename to common/src/test/java/io/druid/guice/LifecycleScopeTest.java index 999d9c1ef8b..d3c02485f01 100644 --- a/common/src/test/java/io/druid/guice/guice/LifecycleScopeTest.java +++ b/common/src/test/java/io/druid/guice/LifecycleScopeTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Guice; diff --git a/common/src/test/java/io/druid/guice/guice/PolyBindTest.java b/common/src/test/java/io/druid/guice/PolyBindTest.java similarity index 99% rename from common/src/test/java/io/druid/guice/guice/PolyBindTest.java rename to common/src/test/java/io/druid/guice/PolyBindTest.java index 002ef99fedf..0c90878e169 100644 --- a/common/src/test/java/io/druid/guice/guice/PolyBindTest.java +++ b/common/src/test/java/io/druid/guice/PolyBindTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.common.collect.Iterables; import com.google.inject.Binder; diff --git a/examples/src/main/java/druid/examples/flights/FlightsFirehoseFactory.java b/examples/src/main/java/druid/examples/flights/FlightsFirehoseFactory.java index 68ffbfbdb9a..da7c55e07f0 100644 --- a/examples/src/main/java/druid/examples/flights/FlightsFirehoseFactory.java +++ b/examples/src/main/java/druid/examples/flights/FlightsFirehoseFactory.java @@ -25,10 +25,10 @@ import com.google.common.base.Charsets; import com.google.common.base.Throwables; import com.google.common.collect.Iterators; import com.google.common.io.Closeables; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; import io.druid.data.input.InputRow; import io.druid.data.input.StringInputRowParser; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; import java.io.BufferedReader; import java.io.File; diff --git a/examples/src/main/java/druid/examples/guice/RealtimeExampleModule.java b/examples/src/main/java/druid/examples/guice/RealtimeExampleModule.java index 046589fde04..c9eef006e4c 100644 --- a/examples/src/main/java/druid/examples/guice/RealtimeExampleModule.java +++ b/examples/src/main/java/druid/examples/guice/RealtimeExampleModule.java @@ -25,10 +25,6 @@ import com.google.common.collect.ImmutableList; import com.google.inject.Binder; import com.google.inject.TypeLiteral; import com.metamx.common.logger.Logger; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.realtime.FireDepartment; -import com.metamx.druid.realtime.RealtimeManager; -import com.metamx.druid.realtime.SegmentPublisher; import druid.examples.flights.FlightsFirehoseFactory; import druid.examples.rand.RandomFirehoseFactory; import druid.examples.twitter.TwitterSpritzerFirehoseFactory; @@ -37,12 +33,16 @@ import io.druid.client.DataSegment; import io.druid.client.DruidServer; import io.druid.client.InventoryView; import io.druid.client.ServerView; -import io.druid.guice.guice.FireDepartmentsProvider; -import io.druid.guice.guice.JsonConfigProvider; -import io.druid.guice.guice.ManageLifecycle; -import io.druid.guice.guice.NoopSegmentPublisherProvider; -import io.druid.guice.guice.RealtimeManagerConfig; +import io.druid.guice.FireDepartmentsProvider; +import io.druid.guice.JsonConfigProvider; +import io.druid.guice.ManageLifecycle; +import io.druid.guice.NoopSegmentPublisherProvider; +import io.druid.guice.RealtimeManagerConfig; import io.druid.initialization.DruidModule; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.realtime.FireDepartment; +import io.druid.segment.realtime.RealtimeManager; +import io.druid.segment.realtime.SegmentPublisher; import io.druid.server.coordination.DataSegmentAnnouncer; import java.io.File; diff --git a/examples/src/main/java/druid/examples/rand/RandomFirehoseFactory.java b/examples/src/main/java/druid/examples/rand/RandomFirehoseFactory.java index 8f930042622..ed23fa5e221 100644 --- a/examples/src/main/java/druid/examples/rand/RandomFirehoseFactory.java +++ b/examples/src/main/java/druid/examples/rand/RandomFirehoseFactory.java @@ -24,10 +24,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import com.google.common.collect.Maps; import com.metamx.common.logger.Logger; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; import io.druid.data.input.InputRow; import io.druid.data.input.MapBasedInputRow; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; import java.io.IOException; import java.util.LinkedList; diff --git a/examples/src/main/java/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java b/examples/src/main/java/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java index 05d37969a47..791a8ca32c4 100644 --- a/examples/src/main/java/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java +++ b/examples/src/main/java/druid/examples/twitter/TwitterSpritzerFirehoseFactory.java @@ -24,10 +24,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import com.google.common.collect.Lists; import com.metamx.common.logger.Logger; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; import io.druid.data.input.InputRow; import io.druid.data.input.MapBasedInputRow; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; import twitter4j.ConnectionLifeCycleListener; import twitter4j.HashtagEntity; import twitter4j.StallWarning; diff --git a/examples/src/main/java/druid/examples/web/WebFirehoseFactory.java b/examples/src/main/java/druid/examples/web/WebFirehoseFactory.java index 1c2735bac45..da949d47e36 100644 --- a/examples/src/main/java/druid/examples/web/WebFirehoseFactory.java +++ b/examples/src/main/java/druid/examples/web/WebFirehoseFactory.java @@ -24,12 +24,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import com.google.common.base.Throwables; import com.metamx.common.parsers.TimestampParser; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; import com.metamx.emitter.EmittingLogger; import io.druid.common.guava.Runnables; import io.druid.data.input.InputRow; import io.druid.data.input.MapBasedInputRow; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; import org.joda.time.DateTime; import java.io.IOException; diff --git a/examples/src/test/java/druid/examples/web/WebFirehoseFactoryTest.java b/examples/src/test/java/druid/examples/web/WebFirehoseFactoryTest.java index 64df05d731e..4c13c3268f9 100644 --- a/examples/src/test/java/druid/examples/web/WebFirehoseFactoryTest.java +++ b/examples/src/test/java/druid/examples/web/WebFirehoseFactoryTest.java @@ -21,8 +21,8 @@ package druid.examples.web; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; -import com.metamx.druid.realtime.firehose.Firehose; import io.druid.data.input.InputRow; +import io.druid.segment.realtime.firehose.Firehose; import org.joda.time.DateTime; import org.junit.Assert; import org.junit.Before; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/Bucket.java b/indexing-hadoop/src/main/java/io/druid/indexer/Bucket.java similarity index 97% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/Bucket.java rename to indexing-hadoop/src/main/java/io/druid/indexer/Bucket.java index 6904522a463..ed164a676a9 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/Bucket.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/Bucket.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.metamx.common.Pair; import org.joda.time.DateTime; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/DbUpdaterJob.java b/indexing-hadoop/src/main/java/io/druid/indexer/DbUpdaterJob.java similarity index 99% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/DbUpdaterJob.java rename to indexing-hadoop/src/main/java/io/druid/indexer/DbUpdaterJob.java index 924285e86c1..4d273637aee 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/DbUpdaterJob.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/DbUpdaterJob.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableMap; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/DeterminePartitionsJob.java b/indexing-hadoop/src/main/java/io/druid/indexer/DeterminePartitionsJob.java similarity index 99% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/DeterminePartitionsJob.java rename to indexing-hadoop/src/main/java/io/druid/indexer/DeterminePartitionsJob.java index e28132f9e44..0d561a9b5c5 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/DeterminePartitionsJob.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/DeterminePartitionsJob.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.base.Function; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexer.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexer.java similarity index 98% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexer.java rename to indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexer.java index 92f0560f1f7..820c301a2ef 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexer.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexer.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.google.common.collect.ImmutableList; import com.metamx.common.Pair; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerConfig.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerConfig.java similarity index 98% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerConfig.java rename to indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerConfig.java index aa7553cfa5a..986fed3fc27 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerConfig.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; @@ -38,12 +38,6 @@ import com.metamx.common.ISE; import com.metamx.common.MapUtils; import com.metamx.common.guava.FunctionalIterable; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexer.granularity.GranularitySpec; -import com.metamx.druid.indexer.granularity.UniformGranularitySpec; -import com.metamx.druid.indexer.partitions.PartitionsSpec; -import com.metamx.druid.indexer.path.PathSpec; -import com.metamx.druid.indexer.rollup.DataRollupSpec; -import com.metamx.druid.indexer.updater.DbUpdaterJobSpec; import io.druid.client.DataSegment; import io.druid.common.utils.JodaUtils; import io.druid.data.input.DataSpec; @@ -51,6 +45,12 @@ import io.druid.data.input.InputRow; import io.druid.data.input.StringInputRowParser; import io.druid.data.input.TimestampSpec; import io.druid.data.input.ToLowercaseDataSpec; +import io.druid.indexer.granularity.GranularitySpec; +import io.druid.indexer.granularity.UniformGranularitySpec; +import io.druid.indexer.partitions.PartitionsSpec; +import io.druid.indexer.path.PathSpec; +import io.druid.indexer.rollup.DataRollupSpec; +import io.druid.indexer.updater.DbUpdaterJobSpec; import io.druid.jackson.DefaultObjectMapper; import io.druid.query.aggregation.AggregatorFactory; import io.druid.segment.serde.Registererer; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerJob.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerJob.java similarity index 99% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerJob.java rename to indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerJob.java index 04f290b57f6..d2444119e3f 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerJob.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerJob.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.google.common.base.Throwables; import com.google.common.collect.Lists; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerMain.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerMain.java similarity index 98% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerMain.java rename to indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerMain.java index 51c6840ff97..163a17923cf 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerMain.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerMain.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.google.common.collect.ImmutableList; import com.metamx.common.Pair; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerMapper.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerMapper.java similarity index 98% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerMapper.java rename to indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerMapper.java index df747a2568c..cbd579731a9 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerMapper.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerMapper.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.metamx.common.RE; import io.druid.data.input.InputRow; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerNode.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerNode.java similarity index 97% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerNode.java rename to indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerNode.java index 045be518f01..2fb441c6518 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopDruidIndexerNode.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopDruidIndexerNode.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,19 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; - -import java.io.Closeable; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.Arrays; -import java.util.List; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.Path; -import org.joda.time.Interval; +package io.druid.indexer; import com.fasterxml.jackson.databind.jsontype.NamedType; import com.google.common.base.Preconditions; @@ -38,6 +26,16 @@ import com.google.common.io.CharStreams; import com.google.common.io.InputSupplier; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.joda.time.Interval; + +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.Arrays; +import java.util.List; /** */ diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopIOPeon.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopIOPeon.java similarity index 98% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopIOPeon.java rename to indexing-hadoop/src/main/java/io/druid/indexer/HadoopIOPeon.java index 575bb8849ec..e6a7c9d3bea 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopIOPeon.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopIOPeon.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import io.druid.segment.data.IOPeon; import org.apache.hadoop.fs.Path; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopyShardSpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopyShardSpec.java similarity index 98% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopyShardSpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/HadoopyShardSpec.java index aa7e6252abe..9dc86863c1d 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/HadoopyShardSpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/HadoopyShardSpec.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/IndexGeneratorJob.java b/indexing-hadoop/src/main/java/io/druid/indexer/IndexGeneratorJob.java similarity index 99% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/IndexGeneratorJob.java rename to indexing-hadoop/src/main/java/io/druid/indexer/IndexGeneratorJob.java index f249801571f..b6752b17973 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/IndexGeneratorJob.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/IndexGeneratorJob.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Optional; @@ -32,10 +32,10 @@ import com.google.common.primitives.Longs; import com.metamx.common.IAE; import com.metamx.common.ISE; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexer.rollup.DataRollupSpec; import io.druid.client.DataSegment; import io.druid.data.input.InputRow; import io.druid.data.input.StringInputRowParser; +import io.druid.indexer.rollup.DataRollupSpec; import io.druid.query.aggregation.AggregatorFactory; import io.druid.segment.IndexIO; import io.druid.segment.IndexMerger; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/Jobby.java b/indexing-hadoop/src/main/java/io/druid/indexer/Jobby.java similarity index 91% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/Jobby.java rename to indexing-hadoop/src/main/java/io/druid/indexer/Jobby.java index 14a4410ee7f..98b31d2bdf0 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/Jobby.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/Jobby.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; /** */ diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/SortableBytes.java b/indexing-hadoop/src/main/java/io/druid/indexer/SortableBytes.java similarity index 98% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/SortableBytes.java rename to indexing-hadoop/src/main/java/io/druid/indexer/SortableBytes.java index 94f3f07b7d2..ad9ee08728f 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/SortableBytes.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/SortableBytes.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.google.common.base.Charsets; import org.apache.hadoop.io.BytesWritable; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/StringIntervalFunction.java b/indexing-hadoop/src/main/java/io/druid/indexer/StringIntervalFunction.java similarity index 92% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/StringIntervalFunction.java rename to indexing-hadoop/src/main/java/io/druid/indexer/StringIntervalFunction.java index f47075863ae..ff5a19be5e4 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/StringIntervalFunction.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/StringIntervalFunction.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.google.common.base.Function; import org.joda.time.Interval; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/Utils.java b/indexing-hadoop/src/main/java/io/druid/indexer/Utils.java similarity index 99% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/Utils.java rename to indexing-hadoop/src/main/java/io/druid/indexer/Utils.java index 13726f6d8cd..162225c31ee 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/Utils.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/Utils.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/granularity/ArbitraryGranularitySpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/granularity/ArbitraryGranularitySpec.java similarity index 96% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/granularity/ArbitraryGranularitySpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/granularity/ArbitraryGranularitySpec.java index 8484e898c60..379353e97bb 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/granularity/ArbitraryGranularitySpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/granularity/ArbitraryGranularitySpec.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.granularity; +package io.druid.indexer.granularity; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; @@ -26,7 +26,6 @@ import com.google.common.collect.Iterators; import com.google.common.collect.PeekingIterator; import com.google.common.collect.Sets; import com.metamx.common.guava.Comparators; - import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/granularity/GranularitySpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/granularity/GranularitySpec.java similarity index 95% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/granularity/GranularitySpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/granularity/GranularitySpec.java index 8566a158000..d43cb1bf2b8 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/granularity/GranularitySpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/granularity/GranularitySpec.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,12 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.granularity; +package io.druid.indexer.granularity; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.google.common.base.Optional; - import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/granularity/UniformGranularitySpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/granularity/UniformGranularitySpec.java similarity index 96% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/granularity/UniformGranularitySpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/granularity/UniformGranularitySpec.java index aee68644154..bbe1f681394 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/granularity/UniformGranularitySpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/granularity/UniformGranularitySpec.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.granularity; +package io.druid.indexer.granularity; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; @@ -26,7 +26,6 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.metamx.common.Granularity; - import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/hadoop/FSSpideringIterator.java b/indexing-hadoop/src/main/java/io/druid/indexer/hadoop/FSSpideringIterator.java similarity index 96% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/hadoop/FSSpideringIterator.java rename to indexing-hadoop/src/main/java/io/druid/indexer/hadoop/FSSpideringIterator.java index a67e03c749c..0318376b0fc 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/hadoop/FSSpideringIterator.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/hadoop/FSSpideringIterator.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.hadoop; +package io.druid.indexer.hadoop; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/partitions/PartitionsSpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/partitions/PartitionsSpec.java similarity index 66% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/partitions/PartitionsSpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/partitions/PartitionsSpec.java index 5571422585c..bf38042cf0d 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/partitions/PartitionsSpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/partitions/PartitionsSpec.java @@ -1,4 +1,23 @@ -package com.metamx.druid.indexer.partitions; +/* + * 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.indexer.partitions; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/GranularUnprocessedPathSpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/path/GranularUnprocessedPathSpec.java similarity index 93% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/GranularUnprocessedPathSpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/path/GranularUnprocessedPathSpec.java index 1c044432da3..b9a3340b0dc 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/GranularUnprocessedPathSpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/path/GranularUnprocessedPathSpec.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.path; +package io.druid.indexer.path; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Preconditions; @@ -25,14 +25,13 @@ import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.metamx.common.Granularity; import com.metamx.common.guava.Comparators; -import com.metamx.druid.indexer.HadoopDruidIndexerConfig; -import com.metamx.druid.indexer.granularity.UniformGranularitySpec; -import com.metamx.druid.indexer.hadoop.FSSpideringIterator; +import io.druid.indexer.HadoopDruidIndexerConfig; +import io.druid.indexer.granularity.UniformGranularitySpec; +import io.druid.indexer.hadoop.FSSpideringIterator; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.Job; - import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/GranularityPathSpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/path/GranularityPathSpec.java similarity index 95% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/GranularityPathSpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/path/GranularityPathSpec.java index fb5b9e47ffe..adc00c77c49 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/GranularityPathSpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/path/GranularityPathSpec.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,21 +17,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.path; +package io.druid.indexer.path; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Sets; import com.metamx.common.Granularity; import com.metamx.common.guava.Comparators; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexer.HadoopDruidIndexerConfig; -import com.metamx.druid.indexer.hadoop.FSSpideringIterator; +import io.druid.indexer.HadoopDruidIndexerConfig; +import io.druid.indexer.hadoop.FSSpideringIterator; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; - import org.joda.time.DateTime; import org.joda.time.Interval; import org.joda.time.format.DateTimeFormat; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/PathSpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/path/PathSpec.java similarity index 90% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/PathSpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/path/PathSpec.java index 52e497265ec..b496c612ee8 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/PathSpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/path/PathSpec.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.path; +package io.druid.indexer.path; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.metamx.druid.indexer.HadoopDruidIndexerConfig; +import io.druid.indexer.HadoopDruidIndexerConfig; import org.apache.hadoop.mapreduce.Job; import java.io.IOException; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/StaticPathSpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/path/StaticPathSpec.java similarity index 92% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/StaticPathSpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/path/StaticPathSpec.java index 4a096d96b7f..0f02cb34039 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/path/StaticPathSpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/path/StaticPathSpec.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.path; +package io.druid.indexer.path; import com.fasterxml.jackson.annotation.JsonProperty; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexer.HadoopDruidIndexerConfig; +import io.druid.indexer.HadoopDruidIndexerConfig; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/rollup/DataRollupSpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/rollup/DataRollupSpec.java similarity index 95% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/rollup/DataRollupSpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/rollup/DataRollupSpec.java index 6823f47b094..8e9836f5251 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/rollup/DataRollupSpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/rollup/DataRollupSpec.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.rollup; +package io.druid.indexer.rollup; import com.fasterxml.jackson.annotation.JsonProperty; import io.druid.granularity.QueryGranularity; diff --git a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/updater/DbUpdaterJobSpec.java b/indexing-hadoop/src/main/java/io/druid/indexer/updater/DbUpdaterJobSpec.java similarity index 97% rename from indexing-hadoop/src/main/java/com/metamx/druid/indexer/updater/DbUpdaterJobSpec.java rename to indexing-hadoop/src/main/java/io/druid/indexer/updater/DbUpdaterJobSpec.java index bebc983e558..7e70754d3d1 100644 --- a/indexing-hadoop/src/main/java/com/metamx/druid/indexer/updater/DbUpdaterJobSpec.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/updater/DbUpdaterJobSpec.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.updater; +package io.druid.indexer.updater; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Supplier; diff --git a/indexing-hadoop/src/test/java/com/metamx/druid/indexer/HadoopDruidIndexerConfigTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/HadoopDruidIndexerConfigTest.java similarity index 98% rename from indexing-hadoop/src/test/java/com/metamx/druid/indexer/HadoopDruidIndexerConfigTest.java rename to indexing-hadoop/src/test/java/io/druid/indexer/HadoopDruidIndexerConfigTest.java index af95fb07fe7..70885356f0e 100644 --- a/indexing-hadoop/src/test/java/com/metamx/druid/indexer/HadoopDruidIndexerConfigTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/HadoopDruidIndexerConfigTest.java @@ -17,15 +17,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Throwables; import com.google.common.collect.Lists; -import com.metamx.druid.indexer.granularity.UniformGranularitySpec; -import com.metamx.druid.indexer.partitions.PartitionsSpec; -import com.metamx.druid.indexer.updater.DbUpdaterJobSpec; import io.druid.db.DbConnectorConfig; +import io.druid.indexer.granularity.UniformGranularitySpec; +import io.druid.indexer.partitions.PartitionsSpec; +import io.druid.indexer.updater.DbUpdaterJobSpec; import io.druid.jackson.DefaultObjectMapper; import org.apache.hadoop.fs.LocalFileSystem; import org.apache.hadoop.fs.Path; diff --git a/indexing-hadoop/src/test/java/com/metamx/druid/indexer/SortableBytesTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/SortableBytesTest.java similarity index 98% rename from indexing-hadoop/src/test/java/com/metamx/druid/indexer/SortableBytesTest.java rename to indexing-hadoop/src/test/java/io/druid/indexer/SortableBytesTest.java index 9cbcda585bf..1c02cb3ed86 100644 --- a/indexing-hadoop/src/test/java/com/metamx/druid/indexer/SortableBytesTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/SortableBytesTest.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer; +package io.druid.indexer; import com.google.common.base.Charsets; import org.apache.hadoop.io.WritableComparator; diff --git a/indexing-hadoop/src/test/java/com/metamx/druid/indexer/granularity/ArbitraryGranularityTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/granularity/ArbitraryGranularityTest.java similarity index 99% rename from indexing-hadoop/src/test/java/com/metamx/druid/indexer/granularity/ArbitraryGranularityTest.java rename to indexing-hadoop/src/test/java/io/druid/indexer/granularity/ArbitraryGranularityTest.java index dce1da59602..18e8f27a824 100644 --- a/indexing-hadoop/src/test/java/com/metamx/druid/indexer/granularity/ArbitraryGranularityTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/granularity/ArbitraryGranularityTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.granularity; +package io.druid.indexer.granularity; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Optional; diff --git a/indexing-hadoop/src/test/java/com/metamx/druid/indexer/granularity/UniformGranularityTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/granularity/UniformGranularityTest.java similarity index 98% rename from indexing-hadoop/src/test/java/com/metamx/druid/indexer/granularity/UniformGranularityTest.java rename to indexing-hadoop/src/test/java/io/druid/indexer/granularity/UniformGranularityTest.java index 713a49e013d..72ce24f7d47 100644 --- a/indexing-hadoop/src/test/java/com/metamx/druid/indexer/granularity/UniformGranularityTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/granularity/UniformGranularityTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.granularity; +package io.druid.indexer.granularity; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Optional; diff --git a/indexing-hadoop/src/test/java/com/metamx/druid/indexer/hadoop/FSSpideringIteratorTest.java b/indexing-hadoop/src/test/java/io/druid/indexer/hadoop/FSSpideringIteratorTest.java similarity index 97% rename from indexing-hadoop/src/test/java/com/metamx/druid/indexer/hadoop/FSSpideringIteratorTest.java rename to indexing-hadoop/src/test/java/io/druid/indexer/hadoop/FSSpideringIteratorTest.java index ae8586b89e4..c8cf83dd085 100644 --- a/indexing-hadoop/src/test/java/com/metamx/druid/indexer/hadoop/FSSpideringIteratorTest.java +++ b/indexing-hadoop/src/test/java/io/druid/indexer/hadoop/FSSpideringIteratorTest.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexer.hadoop; +package io.druid.indexer.hadoop; import com.google.common.base.Function; import com.google.common.base.Throwables; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LockListAction.java b/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LockListAction.java deleted file mode 100644 index 08ce106e1b4..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LockListAction.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.metamx.druid.indexing.common.actions; - -import com.fasterxml.jackson.core.type.TypeReference; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.task.Task; - -import java.util.List; - -public class LockListAction implements TaskAction> -{ - public TypeReference> getReturnTypeReference() - { - return new TypeReference>() {}; - } - - @Override - public List perform(Task task, TaskActionToolbox toolbox) - { - return toolbox.getTaskLockbox().findLocksForTask(task); - } - - @Override - public boolean isAudited() - { - return false; - } - - @Override - public String toString() - { - return "LockListAction{}"; - } -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionClient.java b/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionClient.java deleted file mode 100644 index 4c080b25374..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionClient.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.metamx.druid.indexing.common.actions; - -import java.io.IOException; - -public interface TaskActionClient -{ - public RetType submit(TaskAction taskAction) throws IOException; -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/config/TaskLogConfig.java b/indexing-service/src/main/java/com/metamx/druid/indexing/common/config/TaskLogConfig.java deleted file mode 100644 index 59030c99807..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/config/TaskLogConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.metamx.druid.indexing.common.config; - -import org.skife.config.Config; -import org.skife.config.Default; -import org.skife.config.DefaultNull; - -public abstract class TaskLogConfig -{ - @Config("druid.indexer.logs.type") - @Default("noop") - public abstract String getLogType(); - - @Config("druid.indexer.logs.s3bucket") - @DefaultNull - public abstract String getLogStorageBucket(); - - @Config("druid.indexer.logs.s3prefix") - @DefaultNull - public abstract String getLogStoragePrefix(); -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/EventReceiver.java b/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/EventReceiver.java deleted file mode 100644 index 66333beaeaa..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/EventReceiver.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.metamx.druid.indexing.common.index; - -import java.util.Collection; -import java.util.Map; - -public interface EventReceiver -{ - public void addAll(Collection> events); -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/NoopTaskLogs.java b/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/NoopTaskLogs.java deleted file mode 100644 index feb3f9f4a4f..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/NoopTaskLogs.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.metamx.druid.indexing.common.tasklogs; - -import com.google.common.base.Optional; -import com.google.common.io.InputSupplier; -import com.metamx.common.logger.Logger; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; - -public class NoopTaskLogs implements TaskLogs -{ - private final Logger log = new Logger(TaskLogs.class); - - @Override - public Optional> streamTaskLog(String taskid, long offset) throws IOException - { - return Optional.absent(); - } - - @Override - public void pushTaskLog(String taskid, File logFile) throws IOException - { - log.info("Not pushing logs for task: %s", taskid); - } -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogPusher.java b/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogPusher.java deleted file mode 100644 index a6354c6fd06..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogPusher.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.metamx.druid.indexing.common.tasklogs; - -import java.io.File; -import java.io.IOException; - -/** - * Something that knows how to persist local task logs to some form of long-term storage. - */ -public interface TaskLogPusher -{ - public void pushTaskLog(String taskid, File logFile) throws IOException; -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogStreamer.java b/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogStreamer.java deleted file mode 100644 index 89bc46aa22f..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogStreamer.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.metamx.druid.indexing.common.tasklogs; - -import com.google.common.base.Optional; -import com.google.common.io.InputSupplier; - -import java.io.IOException; -import java.io.InputStream; - -/** - * Something that knows how to stream logs for tasks. - */ -public interface TaskLogStreamer -{ - /** - * Stream log for a task. - * - * @param offset If zero, stream the entire log. If positive, attempt to read from this position onwards. If - * negative, attempt to read this many bytes from the end of the file (like tail -n). - * - * @return input supplier for this log, if available from this provider - */ - public Optional> streamTaskLog(String taskid, long offset) throws IOException; -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogs.java b/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogs.java deleted file mode 100644 index b42aa29fa4b..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskLogs.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.metamx.druid.indexing.common.tasklogs; - -public interface TaskLogs extends TaskLogStreamer, TaskLogPusher -{ -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskExistsException.java b/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskExistsException.java deleted file mode 100644 index c4fe2dffd8e..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskExistsException.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.metamx.druid.indexing.coordinator; - -public class TaskExistsException extends RuntimeException -{ - private final String taskId; - - public TaskExistsException(String taskId, Throwable t) - { - super(String.format("Task exists: %s", taskId), t); - this.taskId = taskId; - } - - public TaskExistsException(String taskId) - { - this(taskId, null); - } - - public String getTaskId() - { - return taskId; - } -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/config/ChatHandlerProviderConfig.java b/indexing-service/src/main/java/com/metamx/druid/indexing/worker/config/ChatHandlerProviderConfig.java deleted file mode 100644 index 76a1cd2a070..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/config/ChatHandlerProviderConfig.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.metamx.druid.indexing.worker.config; - -import org.skife.config.Config; - -public abstract class ChatHandlerProviderConfig -{ - @Config("druid.indexer.chathandler.publishDiscovery") - public boolean isPublishDiscovery() - { - return false; - } - - @Config("druid.host") - public abstract String getHost(); - - @Config("druid.port") - public abstract int getPort(); -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ChatHandlerResource.java b/indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ChatHandlerResource.java deleted file mode 100644 index cf5a89ce219..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ChatHandlerResource.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.metamx.druid.indexing.worker.executor; - -import com.google.common.base.Optional; -import com.google.inject.Inject; -import com.metamx.druid.indexing.common.index.ChatHandler; -import com.metamx.druid.indexing.common.index.ChatHandlerProvider; - -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.core.Response; - -@Path("/druid/worker/v1") -public class ChatHandlerResource -{ - private final ChatHandlerProvider handlers; - - @Inject - public ChatHandlerResource(ChatHandlerProvider handlers) - { - this.handlers = handlers; - } - - @Path("/chat/{id}") - public Object doTaskChat( - @PathParam("id") String handlerId - ) - { - final Optional handler = handlers.get(handlerId); - - if (handler.isPresent()) { - return handler.get(); - } else { - return Response.status(Response.Status.NOT_FOUND).build(); - } - } -} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ExecutorLifecycleFactory.java b/indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ExecutorLifecycleFactory.java deleted file mode 100644 index 079e9909bc8..00000000000 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ExecutorLifecycleFactory.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.metamx.druid.indexing.worker.executor; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.metamx.druid.indexing.coordinator.TaskRunner; - -import java.io.File; - -public class ExecutorLifecycleFactory -{ - private final File taskFile; - private final File statusFile; - - public ExecutorLifecycleFactory(File taskFile, File statusFile) - { - this.taskFile = taskFile; - this.statusFile = statusFile; - } - - public ExecutorLifecycle build(TaskRunner taskRunner, ObjectMapper jsonMapper) - { - return new ExecutorLifecycle( - new ExecutorLifecycleConfig().setTaskFile(taskFile).setStatusFile(statusFile), taskRunner, jsonMapper - ); - } -} diff --git a/indexing-service/src/main/java/io/druid/guice/guice/IndexingServiceModuleHelper.java b/indexing-service/src/main/java/io/druid/guice/IndexingServiceModuleHelper.java similarity index 86% rename from indexing-service/src/main/java/io/druid/guice/guice/IndexingServiceModuleHelper.java rename to indexing-service/src/main/java/io/druid/guice/IndexingServiceModuleHelper.java index 460f9b861b3..5303638f5aa 100644 --- a/indexing-service/src/main/java/io/druid/guice/guice/IndexingServiceModuleHelper.java +++ b/indexing-service/src/main/java/io/druid/guice/IndexingServiceModuleHelper.java @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; -import com.metamx.druid.indexing.coordinator.config.ForkingTaskRunnerConfig; -import com.metamx.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; +import io.druid.indexing.coordinator.config.ForkingTaskRunnerConfig; +import io.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; /** */ diff --git a/indexing-service/src/main/java/io/druid/guice/guice/MiddleManagerModule.java b/indexing-service/src/main/java/io/druid/guice/MiddleManagerModule.java similarity index 80% rename from indexing-service/src/main/java/io/druid/guice/guice/MiddleManagerModule.java rename to indexing-service/src/main/java/io/druid/guice/MiddleManagerModule.java index b7b0a59cbcc..ed8adb394a2 100644 --- a/indexing-service/src/main/java/io/druid/guice/guice/MiddleManagerModule.java +++ b/indexing-service/src/main/java/io/druid/guice/MiddleManagerModule.java @@ -17,18 +17,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Provides; -import com.metamx.druid.indexing.coordinator.ForkingTaskRunner; -import com.metamx.druid.indexing.coordinator.TaskRunner; -import com.metamx.druid.indexing.worker.Worker; -import com.metamx.druid.indexing.worker.WorkerCuratorCoordinator; -import com.metamx.druid.indexing.worker.WorkerTaskMonitor; -import com.metamx.druid.indexing.worker.config.WorkerConfig; -import io.druid.guice.guice.annotations.Self; +import io.druid.guice.annotations.Self; +import io.druid.indexing.coordinator.ForkingTaskRunner; +import io.druid.indexing.coordinator.TaskRunner; +import io.druid.indexing.worker.Worker; +import io.druid.indexing.worker.WorkerCuratorCoordinator; +import io.druid.indexing.worker.WorkerTaskMonitor; +import io.druid.indexing.worker.config.WorkerConfig; import io.druid.server.DruidNode; /** diff --git a/indexing-service/src/main/java/io/druid/guice/guice/OverlordModule.java b/indexing-service/src/main/java/io/druid/guice/OverlordModule.java similarity index 70% rename from indexing-service/src/main/java/io/druid/guice/guice/OverlordModule.java rename to indexing-service/src/main/java/io/druid/guice/OverlordModule.java index 8a0da84df09..09d5d48c313 100644 --- a/indexing-service/src/main/java/io/druid/guice/guice/OverlordModule.java +++ b/indexing-service/src/main/java/io/druid/guice/OverlordModule.java @@ -17,42 +17,42 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Key; import com.google.inject.Module; import com.google.inject.TypeLiteral; import com.google.inject.multibindings.MapBinder; -import com.metamx.druid.indexing.common.actions.LocalTaskActionClientFactory; -import com.metamx.druid.indexing.common.actions.TaskActionClientFactory; -import com.metamx.druid.indexing.common.actions.TaskActionToolbox; -import com.metamx.druid.indexing.common.tasklogs.SwitchingTaskLogStreamer; -import com.metamx.druid.indexing.common.tasklogs.TaskLogStreamer; -import com.metamx.druid.indexing.common.tasklogs.TaskLogs; -import com.metamx.druid.indexing.common.tasklogs.TaskRunnerTaskLogStreamer; -import com.metamx.druid.indexing.coordinator.DbTaskStorage; -import com.metamx.druid.indexing.coordinator.ForkingTaskRunnerFactory; -import com.metamx.druid.indexing.coordinator.HeapMemoryTaskStorage; -import com.metamx.druid.indexing.coordinator.IndexerDBCoordinator; -import com.metamx.druid.indexing.coordinator.RemoteTaskRunnerFactory; -import com.metamx.druid.indexing.coordinator.TaskLockbox; -import com.metamx.druid.indexing.coordinator.TaskMaster; -import com.metamx.druid.indexing.coordinator.TaskQueue; -import com.metamx.druid.indexing.coordinator.TaskRunnerFactory; -import com.metamx.druid.indexing.coordinator.TaskStorage; -import com.metamx.druid.indexing.coordinator.TaskStorageQueryAdapter; -import com.metamx.druid.indexing.coordinator.http.OverlordRedirectInfo; -import com.metamx.druid.indexing.coordinator.scaling.AutoScalingStrategy; -import com.metamx.druid.indexing.coordinator.scaling.EC2AutoScalingStrategy; -import com.metamx.druid.indexing.coordinator.scaling.NoopAutoScalingStrategy; -import com.metamx.druid.indexing.coordinator.scaling.ResourceManagementSchedulerConfig; -import com.metamx.druid.indexing.coordinator.scaling.ResourceManagementSchedulerFactory; -import com.metamx.druid.indexing.coordinator.scaling.ResourceManagementSchedulerFactoryImpl; -import com.metamx.druid.indexing.coordinator.scaling.ResourceManagementStrategy; -import com.metamx.druid.indexing.coordinator.scaling.SimpleResourceManagementConfig; -import com.metamx.druid.indexing.coordinator.scaling.SimpleResourceManagementStrategy; -import com.metamx.druid.indexing.coordinator.setup.WorkerSetupData; +import io.druid.indexing.common.actions.LocalTaskActionClientFactory; +import io.druid.indexing.common.actions.TaskActionClientFactory; +import io.druid.indexing.common.actions.TaskActionToolbox; +import io.druid.indexing.common.tasklogs.SwitchingTaskLogStreamer; +import io.druid.indexing.common.tasklogs.TaskLogStreamer; +import io.druid.indexing.common.tasklogs.TaskLogs; +import io.druid.indexing.common.tasklogs.TaskRunnerTaskLogStreamer; +import io.druid.indexing.coordinator.DbTaskStorage; +import io.druid.indexing.coordinator.ForkingTaskRunnerFactory; +import io.druid.indexing.coordinator.HeapMemoryTaskStorage; +import io.druid.indexing.coordinator.IndexerDBCoordinator; +import io.druid.indexing.coordinator.RemoteTaskRunnerFactory; +import io.druid.indexing.coordinator.TaskLockbox; +import io.druid.indexing.coordinator.TaskMaster; +import io.druid.indexing.coordinator.TaskQueue; +import io.druid.indexing.coordinator.TaskRunnerFactory; +import io.druid.indexing.coordinator.TaskStorage; +import io.druid.indexing.coordinator.TaskStorageQueryAdapter; +import io.druid.indexing.coordinator.http.OverlordRedirectInfo; +import io.druid.indexing.coordinator.scaling.AutoScalingStrategy; +import io.druid.indexing.coordinator.scaling.EC2AutoScalingStrategy; +import io.druid.indexing.coordinator.scaling.NoopAutoScalingStrategy; +import io.druid.indexing.coordinator.scaling.ResourceManagementSchedulerConfig; +import io.druid.indexing.coordinator.scaling.ResourceManagementSchedulerFactory; +import io.druid.indexing.coordinator.scaling.ResourceManagementSchedulerFactoryImpl; +import io.druid.indexing.coordinator.scaling.ResourceManagementStrategy; +import io.druid.indexing.coordinator.scaling.SimpleResourceManagementConfig; +import io.druid.indexing.coordinator.scaling.SimpleResourceManagementStrategy; +import io.druid.indexing.coordinator.setup.WorkerSetupData; import io.druid.server.http.RedirectFilter; import io.druid.server.http.RedirectInfo; diff --git a/indexing-service/src/main/java/io/druid/guice/guice/PeonModule.java b/indexing-service/src/main/java/io/druid/guice/PeonModule.java similarity index 71% rename from indexing-service/src/main/java/io/druid/guice/guice/PeonModule.java rename to indexing-service/src/main/java/io/druid/guice/PeonModule.java index 710bbe919f0..fafb7d7094a 100644 --- a/indexing-service/src/main/java/io/druid/guice/guice/PeonModule.java +++ b/indexing-service/src/main/java/io/druid/guice/PeonModule.java @@ -17,27 +17,27 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Key; import com.google.inject.Module; import com.google.inject.multibindings.MapBinder; -import com.metamx.druid.indexing.common.RetryPolicyConfig; -import com.metamx.druid.indexing.common.RetryPolicyFactory; -import com.metamx.druid.indexing.common.TaskToolboxFactory; -import com.metamx.druid.indexing.common.actions.RemoteTaskActionClientFactory; -import com.metamx.druid.indexing.common.actions.TaskActionClientFactory; -import com.metamx.druid.indexing.common.config.TaskConfig; -import com.metamx.druid.indexing.common.index.ChatHandlerProvider; -import com.metamx.druid.indexing.common.index.EventReceivingChatHandlerProvider; -import com.metamx.druid.indexing.common.index.NoopChatHandlerProvider; -import com.metamx.druid.indexing.coordinator.TaskRunner; -import com.metamx.druid.indexing.coordinator.ThreadPoolTaskRunner; -import com.metamx.druid.indexing.worker.executor.ExecutorLifecycle; -import com.metamx.druid.indexing.worker.executor.ExecutorLifecycleConfig; -import com.metamx.druid.loading.DataSegmentKiller; -import com.metamx.druid.loading.S3DataSegmentKiller; +import io.druid.indexing.common.RetryPolicyConfig; +import io.druid.indexing.common.RetryPolicyFactory; +import io.druid.indexing.common.TaskToolboxFactory; +import io.druid.indexing.common.actions.RemoteTaskActionClientFactory; +import io.druid.indexing.common.actions.TaskActionClientFactory; +import io.druid.indexing.common.config.TaskConfig; +import io.druid.indexing.common.index.ChatHandlerProvider; +import io.druid.indexing.common.index.EventReceivingChatHandlerProvider; +import io.druid.indexing.common.index.NoopChatHandlerProvider; +import io.druid.indexing.coordinator.TaskRunner; +import io.druid.indexing.coordinator.ThreadPoolTaskRunner; +import io.druid.indexing.worker.executor.ExecutorLifecycle; +import io.druid.indexing.worker.executor.ExecutorLifecycleConfig; +import io.druid.segment.loading.DataSegmentKiller; +import io.druid.segment.loading.S3DataSegmentKiller; /** */ diff --git a/indexing-service/src/main/java/io/druid/guice/guice/TaskLogsModule.java b/indexing-service/src/main/java/io/druid/guice/TaskLogsModule.java similarity index 83% rename from indexing-service/src/main/java/io/druid/guice/guice/TaskLogsModule.java rename to indexing-service/src/main/java/io/druid/guice/TaskLogsModule.java index c7c1fc9f3a1..b7e69830dcd 100644 --- a/indexing-service/src/main/java/io/druid/guice/guice/TaskLogsModule.java +++ b/indexing-service/src/main/java/io/druid/guice/TaskLogsModule.java @@ -17,17 +17,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Key; import com.google.inject.Module; import com.google.inject.multibindings.MapBinder; -import com.metamx.druid.indexing.common.tasklogs.NoopTaskLogs; -import com.metamx.druid.indexing.common.tasklogs.S3TaskLogs; -import com.metamx.druid.indexing.common.tasklogs.S3TaskLogsConfig; -import com.metamx.druid.indexing.common.tasklogs.TaskLogPusher; -import com.metamx.druid.indexing.common.tasklogs.TaskLogs; +import io.druid.indexing.common.tasklogs.NoopTaskLogs; +import io.druid.indexing.common.tasklogs.S3TaskLogs; +import io.druid.indexing.common.tasklogs.S3TaskLogsConfig; +import io.druid.indexing.common.tasklogs.TaskLogPusher; +import io.druid.indexing.common.tasklogs.TaskLogs; /** */ diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/RetryPolicy.java b/indexing-service/src/main/java/io/druid/indexing/common/RetryPolicy.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/RetryPolicy.java rename to indexing-service/src/main/java/io/druid/indexing/common/RetryPolicy.java index 278af1c108a..da0fcb9bc31 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/RetryPolicy.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/RetryPolicy.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common; +package io.druid.indexing.common; import com.metamx.emitter.EmittingLogger; import org.joda.time.Duration; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/RetryPolicyConfig.java b/indexing-service/src/main/java/io/druid/indexing/common/RetryPolicyConfig.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/RetryPolicyConfig.java rename to indexing-service/src/main/java/io/druid/indexing/common/RetryPolicyConfig.java index de643db2353..819fa28649a 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/RetryPolicyConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/RetryPolicyConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common; +package io.druid.indexing.common; import com.fasterxml.jackson.annotation.JsonProperty; import org.joda.time.Period; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/RetryPolicyFactory.java b/indexing-service/src/main/java/io/druid/indexing/common/RetryPolicyFactory.java similarity index 92% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/RetryPolicyFactory.java rename to indexing-service/src/main/java/io/druid/indexing/common/RetryPolicyFactory.java index 74731e21ff6..5ecf0af3a7d 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/RetryPolicyFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/RetryPolicyFactory.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common; +package io.druid.indexing.common; import com.google.inject.Inject; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskLock.java b/indexing-service/src/main/java/io/druid/indexing/common/TaskLock.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskLock.java rename to indexing-service/src/main/java/io/druid/indexing/common/TaskLock.java index 29941921ebc..c0ebfe0c898 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskLock.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/TaskLock.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common; +package io.druid.indexing.common; -import com.google.common.base.Objects; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import com.google.common.base.Objects; import org.joda.time.Interval; /** diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskStatus.java b/indexing-service/src/main/java/io/druid/indexing/common/TaskStatus.java similarity index 97% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskStatus.java rename to indexing-service/src/main/java/io/druid/indexing/common/TaskStatus.java index 68952a9bc1f..e45b37472ad 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskStatus.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/TaskStatus.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common; +package io.druid.indexing.common; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskToolbox.java b/indexing-service/src/main/java/io/druid/indexing/common/TaskToolbox.java similarity index 86% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskToolbox.java rename to indexing-service/src/main/java/io/druid/indexing/common/TaskToolbox.java index 3781d0033f6..2b6eaf6e608 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskToolbox.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/TaskToolbox.java @@ -17,26 +17,26 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common; +package io.druid.indexing.common; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Maps; -import com.metamx.druid.indexing.common.actions.TaskActionClient; -import com.metamx.druid.indexing.common.actions.TaskActionClientFactory; -import com.metamx.druid.indexing.common.config.TaskConfig; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.loading.DataSegmentKiller; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.loading.MMappedQueryableIndexFactory; -import com.metamx.druid.loading.S3DataSegmentPuller; -import com.metamx.druid.loading.SegmentLoaderConfig; -import com.metamx.druid.loading.SegmentLoadingException; -import com.metamx.druid.loading.SingleSegmentLoader; -import com.metamx.druid.query.QueryRunnerFactoryConglomerate; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.metrics.MonitorScheduler; import io.druid.client.DataSegment; import io.druid.client.ServerView; +import io.druid.indexing.common.actions.TaskActionClient; +import io.druid.indexing.common.actions.TaskActionClientFactory; +import io.druid.indexing.common.config.TaskConfig; +import io.druid.indexing.common.task.Task; +import io.druid.query.QueryRunnerFactoryConglomerate; +import io.druid.segment.loading.DataSegmentKiller; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.loading.MMappedQueryableIndexFactory; +import io.druid.segment.loading.S3DataSegmentPuller; +import io.druid.segment.loading.SegmentLoaderConfig; +import io.druid.segment.loading.SegmentLoadingException; +import io.druid.segment.loading.SingleSegmentLoader; import io.druid.server.coordination.DataSegmentAnnouncer; import org.jets3t.service.impl.rest.httpclient.RestS3Service; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskToolboxFactory.java b/indexing-service/src/main/java/io/druid/indexing/common/TaskToolboxFactory.java similarity index 89% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskToolboxFactory.java rename to indexing-service/src/main/java/io/druid/indexing/common/TaskToolboxFactory.java index c7a0c5c890e..5eb3d327e5a 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/TaskToolboxFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/TaskToolboxFactory.java @@ -17,19 +17,19 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common; +package io.druid.indexing.common; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; -import com.metamx.druid.indexing.common.actions.TaskActionClientFactory; -import com.metamx.druid.indexing.common.config.TaskConfig; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.loading.DataSegmentKiller; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.query.QueryRunnerFactoryConglomerate; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.metrics.MonitorScheduler; import io.druid.client.ServerView; +import io.druid.indexing.common.actions.TaskActionClientFactory; +import io.druid.indexing.common.config.TaskConfig; +import io.druid.indexing.common.task.Task; +import io.druid.query.QueryRunnerFactoryConglomerate; +import io.druid.segment.loading.DataSegmentKiller; +import io.druid.segment.loading.DataSegmentPusher; import io.druid.server.coordination.DataSegmentAnnouncer; import org.jets3t.service.impl.rest.httpclient.RestS3Service; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LocalTaskActionClient.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/LocalTaskActionClient.java similarity index 54% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LocalTaskActionClient.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/LocalTaskActionClient.java index ac4c41492d2..7ecad840a54 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LocalTaskActionClient.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/LocalTaskActionClient.java @@ -1,8 +1,27 @@ -package com.metamx.druid.indexing.common.actions; +/* + * 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.indexing.common.actions; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.coordinator.TaskStorage; import com.metamx.emitter.EmittingLogger; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.coordinator.TaskStorage; import java.io.IOException; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LocalTaskActionClientFactory.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/LocalTaskActionClientFactory.java similarity index 86% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LocalTaskActionClientFactory.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/LocalTaskActionClientFactory.java index e3f44f506d2..0dfc94b2e08 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LocalTaskActionClientFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/LocalTaskActionClientFactory.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.actions; +package io.druid.indexing.common.actions; import com.google.inject.Inject; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.coordinator.TaskStorage; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.coordinator.TaskStorage; /** */ diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LockAcquireAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockAcquireAction.java similarity index 55% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LockAcquireAction.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/LockAcquireAction.java index 87a0dc8cb11..5730e3be082 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LockAcquireAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockAcquireAction.java @@ -1,12 +1,31 @@ -package com.metamx.druid.indexing.common.actions; +/* + * 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.indexing.common.actions; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.base.Throwables; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.task.Task; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.task.Task; import org.joda.time.Interval; public class LockAcquireAction implements TaskAction diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/LockListAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockListAction.java new file mode 100644 index 00000000000..8f281254981 --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockListAction.java @@ -0,0 +1,52 @@ +/* + * 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.indexing.common.actions; + +import com.fasterxml.jackson.core.type.TypeReference; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.task.Task; + +import java.util.List; + +public class LockListAction implements TaskAction> +{ + public TypeReference> getReturnTypeReference() + { + return new TypeReference>() {}; + } + + @Override + public List perform(Task task, TaskActionToolbox toolbox) + { + return toolbox.getTaskLockbox().findLocksForTask(task); + } + + @Override + public boolean isAudited() + { + return false; + } + + @Override + public String toString() + { + return "LockListAction{}"; + } +} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LockReleaseAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockReleaseAction.java similarity index 53% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LockReleaseAction.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/LockReleaseAction.java index 67efd712c71..97397666d2b 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/LockReleaseAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/LockReleaseAction.java @@ -1,10 +1,29 @@ -package com.metamx.druid.indexing.common.actions; +/* + * 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.indexing.common.actions; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; -import com.metamx.druid.indexing.common.task.Task; +import io.druid.indexing.common.task.Task; import org.joda.time.Interval; public class LockReleaseAction implements TaskAction diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/RemoteTaskActionClient.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/RemoteTaskActionClient.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/RemoteTaskActionClient.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/RemoteTaskActionClient.java index 397d1570c6c..b2613e13064 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/RemoteTaskActionClient.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/RemoteTaskActionClient.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.actions; +package io.druid.indexing.common.actions; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -25,13 +25,13 @@ import com.google.common.base.Charsets; import com.google.common.base.Throwables; import com.metamx.common.ISE; import com.metamx.common.logger.Logger; -import com.metamx.druid.client.indexing.IndexingServiceSelector; -import com.metamx.druid.indexing.common.RetryPolicy; -import com.metamx.druid.indexing.common.RetryPolicyFactory; -import com.metamx.druid.indexing.common.task.Task; import com.metamx.http.client.HttpClient; import com.metamx.http.client.response.ToStringResponseHandler; +import io.druid.client.indexing.IndexingServiceSelector; import io.druid.client.selector.Server; +import io.druid.indexing.common.RetryPolicy; +import io.druid.indexing.common.RetryPolicyFactory; +import io.druid.indexing.common.task.Task; import org.joda.time.Duration; import java.io.IOException; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/RemoteTaskActionClientFactory.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/RemoteTaskActionClientFactory.java similarity index 86% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/RemoteTaskActionClientFactory.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/RemoteTaskActionClientFactory.java index 6eec1344113..4ae53a595b9 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/RemoteTaskActionClientFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/RemoteTaskActionClientFactory.java @@ -17,15 +17,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.actions; +package io.druid.indexing.common.actions; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; -import com.metamx.druid.client.indexing.IndexingServiceSelector; -import com.metamx.druid.indexing.common.RetryPolicyFactory; -import com.metamx.druid.indexing.common.task.Task; import com.metamx.http.client.HttpClient; -import io.druid.guice.guice.annotations.Global; +import io.druid.client.indexing.IndexingServiceSelector; +import io.druid.guice.annotations.Global; +import io.druid.indexing.common.RetryPolicyFactory; +import io.druid.indexing.common.task.Task; /** */ diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentInsertAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentInsertAction.java similarity index 97% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentInsertAction.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentInsertAction.java index d6bb9b860d8..5ca4854689d 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentInsertAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentInsertAction.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.actions; +package io.druid.indexing.common.actions; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -25,9 +25,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.collect.ImmutableSet; import com.metamx.common.ISE; -import com.metamx.druid.indexing.common.task.Task; import com.metamx.emitter.service.ServiceMetricEvent; import io.druid.client.DataSegment; +import io.druid.indexing.common.task.Task; import java.io.IOException; import java.util.Set; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentListUnusedAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUnusedAction.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentListUnusedAction.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUnusedAction.java index 586ab694d28..8b45ffece4d 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentListUnusedAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUnusedAction.java @@ -17,14 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.actions; +package io.druid.indexing.common.actions; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; -import com.metamx.druid.indexing.common.task.Task; import io.druid.client.DataSegment; +import io.druid.indexing.common.task.Task; import org.joda.time.Interval; import java.io.IOException; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentListUsedAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUsedAction.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentListUsedAction.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUsedAction.java index 794ac5cac71..d4ac56dfa16 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentListUsedAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentListUsedAction.java @@ -17,14 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.actions; +package io.druid.indexing.common.actions; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; -import com.metamx.druid.indexing.common.task.Task; import io.druid.client.DataSegment; +import io.druid.indexing.common.task.Task; import org.joda.time.Interval; import java.io.IOException; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentNukeAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentNukeAction.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentNukeAction.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentNukeAction.java index b37c07bae56..8886ea7ebb4 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SegmentNukeAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SegmentNukeAction.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.actions; +package io.druid.indexing.common.actions; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -25,9 +25,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.collect.ImmutableSet; import com.metamx.common.ISE; -import com.metamx.druid.indexing.common.task.Task; import com.metamx.emitter.service.ServiceMetricEvent; import io.druid.client.DataSegment; +import io.druid.indexing.common.task.Task; import java.io.IOException; import java.util.Set; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SpawnTasksAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/SpawnTasksAction.java similarity index 55% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SpawnTasksAction.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/SpawnTasksAction.java index 1a60e0b6658..85b1a53c275 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/SpawnTasksAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/SpawnTasksAction.java @@ -1,11 +1,30 @@ -package com.metamx.druid.indexing.common.actions; +/* + * 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.indexing.common.actions; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.collect.ImmutableList; -import com.metamx.druid.indexing.common.task.Task; +import io.druid.indexing.common.task.Task; import java.util.List; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskAction.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskAction.java similarity index 55% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskAction.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/TaskAction.java index c7f4797d1b8..37d4346247e 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskAction.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskAction.java @@ -1,9 +1,28 @@ -package com.metamx.druid.indexing.common.actions; +/* + * 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.indexing.common.actions; -import com.metamx.druid.indexing.common.task.Task; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.core.type.TypeReference; +import io.druid.indexing.common.task.Task; import java.io.IOException; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionClient.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionClient.java new file mode 100644 index 00000000000..e99779c4cc1 --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionClient.java @@ -0,0 +1,27 @@ +/* + * 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.indexing.common.actions; + +import java.io.IOException; + +public interface TaskActionClient +{ + public RetType submit(TaskAction taskAction) throws IOException; +} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionClientFactory.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionClientFactory.java similarity index 85% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionClientFactory.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionClientFactory.java index a04ecc0aeb1..2a09798c0d1 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionClientFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionClientFactory.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,9 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.actions; +package io.druid.indexing.common.actions; -import com.metamx.druid.indexing.common.task.Task; +import io.druid.indexing.common.task.Task; /** */ diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionHolder.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionHolder.java similarity index 90% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionHolder.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionHolder.java index 80b2c71060c..bff0137b663 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionHolder.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionHolder.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.actions; +package io.druid.indexing.common.actions; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.metamx.druid.indexing.common.task.Task; +import io.druid.indexing.common.task.Task; /** */ diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionToolbox.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionToolbox.java similarity index 90% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionToolbox.java rename to indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionToolbox.java index ccea7b06202..0a52d57eb82 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/actions/TaskActionToolbox.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/TaskActionToolbox.java @@ -17,18 +17,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.actions; +package io.druid.indexing.common.actions; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; import com.google.inject.Inject; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.coordinator.IndexerDBCoordinator; -import com.metamx.druid.indexing.coordinator.TaskLockbox; -import com.metamx.druid.indexing.coordinator.TaskQueue; import com.metamx.emitter.service.ServiceEmitter; import io.druid.client.DataSegment; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.coordinator.IndexerDBCoordinator; +import io.druid.indexing.coordinator.TaskLockbox; +import io.druid.indexing.coordinator.TaskQueue; import java.util.List; import java.util.Set; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/config/IndexerZkConfig.java b/indexing-service/src/main/java/io/druid/indexing/common/config/IndexerZkConfig.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/config/IndexerZkConfig.java rename to indexing-service/src/main/java/io/druid/indexing/common/config/IndexerZkConfig.java index df831641a06..214d3ed6330 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/config/IndexerZkConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/config/IndexerZkConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.config; +package io.druid.indexing.common.config; import io.druid.server.initialization.initialization.ZkPathsConfig; import org.skife.config.Config; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/config/TaskConfig.java b/indexing-service/src/main/java/io/druid/indexing/common/config/TaskConfig.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/config/TaskConfig.java rename to indexing-service/src/main/java/io/druid/indexing/common/config/TaskConfig.java index 79f43450677..8651a65e70d 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/config/TaskConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/config/TaskConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.config; +package io.druid.indexing.common.config; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/config/TaskLogConfig.java b/indexing-service/src/main/java/io/druid/indexing/common/config/TaskLogConfig.java new file mode 100644 index 00000000000..787878e8eb8 --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/common/config/TaskLogConfig.java @@ -0,0 +1,39 @@ +/* + * 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.indexing.common.config; + +import org.skife.config.Config; +import org.skife.config.Default; +import org.skife.config.DefaultNull; + +public abstract class TaskLogConfig +{ + @Config("druid.indexer.logs.type") + @Default("noop") + public abstract String getLogType(); + + @Config("druid.indexer.logs.s3bucket") + @DefaultNull + public abstract String getLogStorageBucket(); + + @Config("druid.indexer.logs.s3prefix") + @DefaultNull + public abstract String getLogStoragePrefix(); +} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/ChatHandler.java b/indexing-service/src/main/java/io/druid/indexing/common/index/ChatHandler.java similarity index 92% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/index/ChatHandler.java rename to indexing-service/src/main/java/io/druid/indexing/common/index/ChatHandler.java index 95c66028e52..d52ea38b567 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/ChatHandler.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/index/ChatHandler.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.index; +package io.druid.indexing.common.index; /** * Objects that can be registered with a {@link EventReceivingChatHandlerProvider} and provide http endpoints for indexing-related diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/ChatHandlerProvider.java b/indexing-service/src/main/java/io/druid/indexing/common/index/ChatHandlerProvider.java similarity index 91% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/index/ChatHandlerProvider.java rename to indexing-service/src/main/java/io/druid/indexing/common/index/ChatHandlerProvider.java index 1662abc7d9b..01af5c3cc62 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/ChatHandlerProvider.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/index/ChatHandlerProvider.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.index; +package io.druid.indexing.common.index; import com.google.common.base.Optional; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/index/EventReceiver.java b/indexing-service/src/main/java/io/druid/indexing/common/index/EventReceiver.java new file mode 100644 index 00000000000..9454fa7c2f4 --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/common/index/EventReceiver.java @@ -0,0 +1,28 @@ +/* + * 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.indexing.common.index; + +import java.util.Collection; +import java.util.Map; + +public interface EventReceiver +{ + public void addAll(Collection> events); +} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/EventReceiverFirehoseFactory.java b/indexing-service/src/main/java/io/druid/indexing/common/index/EventReceiverFirehoseFactory.java similarity index 97% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/index/EventReceiverFirehoseFactory.java rename to indexing-service/src/main/java/io/druid/indexing/common/index/EventReceiverFirehoseFactory.java index d05db9b3ba4..26b3cf96050 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/EventReceiverFirehoseFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/index/EventReceiverFirehoseFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.index; +package io.druid.indexing.common.index; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.annotation.JsonCreator; @@ -28,11 +28,11 @@ import com.google.common.base.Preconditions; import com.google.common.base.Throwables; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; import com.metamx.emitter.EmittingLogger; import io.druid.data.input.InputRow; import io.druid.data.input.MapInputRowParser; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; import javax.ws.rs.POST; import javax.ws.rs.Path; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/EventReceivingChatHandlerProvider.java b/indexing-service/src/main/java/io/druid/indexing/common/index/EventReceivingChatHandlerProvider.java similarity index 97% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/index/EventReceivingChatHandlerProvider.java rename to indexing-service/src/main/java/io/druid/indexing/common/index/EventReceivingChatHandlerProvider.java index c6567b1d42e..8fce0a3935a 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/EventReceivingChatHandlerProvider.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/index/EventReceivingChatHandlerProvider.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.index; +package io.druid.indexing.common.index; import com.google.common.base.Optional; import com.google.common.collect.Maps; @@ -25,7 +25,7 @@ import com.google.inject.Inject; import com.metamx.common.ISE; import com.metamx.common.logger.Logger; import io.druid.curator.discovery.ServiceAnnouncer; -import io.druid.guice.guice.annotations.Self; +import io.druid.guice.annotations.Self; import io.druid.server.DruidNode; import java.util.concurrent.ConcurrentMap; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/NoopChatHandlerProvider.java b/indexing-service/src/main/java/io/druid/indexing/common/index/NoopChatHandlerProvider.java similarity index 92% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/index/NoopChatHandlerProvider.java rename to indexing-service/src/main/java/io/druid/indexing/common/index/NoopChatHandlerProvider.java index bf9a36afdb5..e75cce88e28 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/NoopChatHandlerProvider.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/index/NoopChatHandlerProvider.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.index; +package io.druid.indexing.common.index; import com.google.common.base.Optional; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/StaticS3FirehoseFactory.java b/indexing-service/src/main/java/io/druid/indexing/common/index/StaticS3FirehoseFactory.java similarity index 97% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/index/StaticS3FirehoseFactory.java rename to indexing-service/src/main/java/io/druid/indexing/common/index/StaticS3FirehoseFactory.java index 18cfcf3a0eb..66506bed326 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/StaticS3FirehoseFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/index/StaticS3FirehoseFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.index; +package io.druid.indexing.common.index; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.annotation.JsonCreator; @@ -29,10 +29,10 @@ import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.metamx.common.logger.Logger; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; import io.druid.data.input.InputRow; import io.druid.data.input.StringInputRowParser; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; import org.apache.commons.io.IOUtils; import org.apache.commons.io.LineIterator; import org.jets3t.service.S3Service; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/YeOldePlumberSchool.java b/indexing-service/src/main/java/io/druid/indexing/common/index/YeOldePlumberSchool.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/index/YeOldePlumberSchool.java rename to indexing-service/src/main/java/io/druid/indexing/common/index/YeOldePlumberSchool.java index 384b5dfccba..9a7532634be 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/index/YeOldePlumberSchool.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/index/YeOldePlumberSchool.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.index; +package io.druid.indexing.common.index; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.annotation.JsonCreator; @@ -30,19 +30,19 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.metamx.common.logger.Logger; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.realtime.FireDepartmentMetrics; -import com.metamx.druid.realtime.FireHydrant; -import com.metamx.druid.realtime.Schema; -import com.metamx.druid.realtime.plumber.Plumber; -import com.metamx.druid.realtime.plumber.PlumberSchool; -import com.metamx.druid.realtime.plumber.Sink; import io.druid.client.DataSegment; import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.segment.IndexIO; import io.druid.segment.IndexMerger; import io.druid.segment.QueryableIndex; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.realtime.FireDepartmentMetrics; +import io.druid.segment.realtime.FireHydrant; +import io.druid.segment.realtime.Schema; +import io.druid.segment.realtime.plumber.Plumber; +import io.druid.segment.realtime.plumber.PlumberSchool; +import io.druid.segment.realtime.plumber.Sink; import org.apache.commons.io.FileUtils; import org.joda.time.Interval; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/AbstractTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/AbstractTask.java similarity index 93% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/AbstractTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/AbstractTask.java index db1972b0f73..ac5b7c2c18a 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/AbstractTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/AbstractTask.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -25,9 +25,9 @@ import com.google.common.base.Joiner; import com.google.common.base.Objects; import com.google.common.base.Optional; import com.google.common.base.Preconditions; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.actions.SegmentListUsedAction; -import com.metamx.druid.indexing.common.actions.TaskActionClient; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.actions.SegmentListUsedAction; +import io.druid.indexing.common.actions.TaskActionClient; import io.druid.query.Query; import io.druid.query.QueryRunner; import org.joda.time.Interval; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/AppendTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/AppendTask.java similarity index 98% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/AppendTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/AppendTask.java index a6d1a54f7ba..2c7678a05d2 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/AppendTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/AppendTask.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/DeleteTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/DeleteTask.java similarity index 91% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/DeleteTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/DeleteTask.java index 38d3fb62874..2874ce0cc04 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/DeleteTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/DeleteTask.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; @@ -26,13 +26,13 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.LockListAction; -import com.metamx.druid.indexing.common.actions.SegmentInsertAction; import io.druid.client.DataSegment; import io.druid.granularity.QueryGranularity; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.LockListAction; +import io.druid.indexing.common.actions.SegmentInsertAction; import io.druid.query.aggregation.AggregatorFactory; import io.druid.segment.IndexMerger; import io.druid.segment.IndexableAdapter; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/HadoopIndexTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java similarity index 91% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/HadoopIndexTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java index b7bca9b7fb5..bffded7ab6c 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/HadoopIndexTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/HadoopIndexTask.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -26,16 +26,16 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexer.HadoopDruidIndexerConfig; -import com.metamx.druid.indexer.HadoopDruidIndexerJob; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.LockListAction; -import com.metamx.druid.indexing.common.actions.SegmentInsertAction; -import com.metamx.druid.loading.S3DataSegmentPusher; import io.druid.client.DataSegment; import io.druid.common.utils.JodaUtils; +import io.druid.indexer.HadoopDruidIndexerConfig; +import io.druid.indexer.HadoopDruidIndexerJob; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.LockListAction; +import io.druid.indexing.common.actions.SegmentInsertAction; +import io.druid.segment.loading.S3DataSegmentPusher; import org.joda.time.DateTime; import java.util.List; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/IndexDeterminePartitionsTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/IndexDeterminePartitionsTask.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/IndexDeterminePartitionsTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/IndexDeterminePartitionsTask.java index 101e0f6ff32..aa86b129cb9 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/IndexDeterminePartitionsTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/IndexDeterminePartitionsTask.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -31,13 +31,13 @@ import com.google.common.collect.Sets; import com.google.common.collect.TreeMultiset; import com.google.common.primitives.Ints; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.SpawnTasksAction; -import com.metamx.druid.realtime.Schema; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; import io.druid.data.input.InputRow; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.SpawnTasksAction; +import io.druid.segment.realtime.Schema; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; import io.druid.server.shard.shard.NoneShardSpec; import io.druid.server.shard.shard.ShardSpec; import io.druid.server.shard.shard.SingleDimensionShardSpec; @@ -109,7 +109,7 @@ public class IndexDeterminePartitionsTask extends AbstractTask { log.info("Running with targetPartitionSize[%d]", targetPartitionSize); - // TODO: Replace/merge/whatever with hadoop determine-partitions code + // The implementation of this determine partitions stuff is less than optimal. Should be done better. // We know this exists final Interval interval = getImplicitLockInterval().get(); diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/IndexGeneratorTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/IndexGeneratorTask.java similarity index 90% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/IndexGeneratorTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/IndexGeneratorTask.java index b2bb5fac53f..4a05962ecc5 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/IndexGeneratorTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/IndexGeneratorTask.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -27,21 +27,21 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.google.common.collect.Maps; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.LockListAction; -import com.metamx.druid.indexing.common.actions.SegmentInsertAction; -import com.metamx.druid.indexing.common.index.YeOldePlumberSchool; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.realtime.FireDepartmentMetrics; -import com.metamx.druid.realtime.Schema; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; -import com.metamx.druid.realtime.plumber.Plumber; -import com.metamx.druid.realtime.plumber.Sink; import io.druid.client.DataSegment; import io.druid.data.input.InputRow; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.LockListAction; +import io.druid.indexing.common.actions.SegmentInsertAction; +import io.druid.indexing.common.index.YeOldePlumberSchool; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.realtime.FireDepartmentMetrics; +import io.druid.segment.realtime.Schema; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; +import io.druid.segment.realtime.plumber.Plumber; +import io.druid.segment.realtime.plumber.Sink; import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/IndexTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/IndexTask.java similarity index 92% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/IndexTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/IndexTask.java index c9786ab7bfa..3cf46ee7992 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/IndexTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/IndexTask.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -25,16 +25,16 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexer.granularity.GranularitySpec; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.SpawnTasksAction; -import com.metamx.druid.indexing.common.actions.TaskActionClient; -import com.metamx.druid.realtime.Schema; -import com.metamx.druid.realtime.firehose.FirehoseFactory; import io.druid.granularity.QueryGranularity; +import io.druid.indexer.granularity.GranularitySpec; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.SpawnTasksAction; +import io.druid.indexing.common.actions.TaskActionClient; import io.druid.query.aggregation.AggregatorFactory; import io.druid.segment.incremental.SpatialDimensionSchema; +import io.druid.segment.realtime.Schema; +import io.druid.segment.realtime.firehose.FirehoseFactory; import io.druid.server.shard.shard.NoneShardSpec; import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/KillTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/KillTask.java similarity index 89% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/KillTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/KillTask.java index 3f581db9ab5..2658997a578 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/KillTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/KillTask.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; @@ -25,13 +25,13 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import com.metamx.common.ISE; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.LockListAction; -import com.metamx.druid.indexing.common.actions.SegmentListUnusedAction; -import com.metamx.druid.indexing.common.actions.SegmentNukeAction; import io.druid.client.DataSegment; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.LockListAction; +import io.druid.indexing.common.actions.SegmentListUnusedAction; +import io.druid.indexing.common.actions.SegmentNukeAction; import org.joda.time.Interval; import java.util.List; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/MergeTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/MergeTask.java similarity index 98% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/MergeTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/MergeTask.java index cadc7db6c9e..b51ff9671c8 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/MergeTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/MergeTask.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/MergeTaskBase.java b/indexing-service/src/main/java/io/druid/indexing/common/task/MergeTaskBase.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/MergeTaskBase.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/MergeTaskBase.java index adf2c23f92f..9e8e47078da 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/MergeTaskBase.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/MergeTaskBase.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -35,16 +35,16 @@ import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import com.google.common.hash.Hashing; import com.metamx.common.ISE; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.LockListAction; -import com.metamx.druid.indexing.common.actions.SegmentInsertAction; -import com.metamx.druid.indexing.common.actions.TaskActionClient; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceMetricEvent; import io.druid.client.DataSegment; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.LockListAction; +import io.druid.indexing.common.actions.SegmentInsertAction; +import io.druid.indexing.common.actions.TaskActionClient; import io.druid.segment.IndexIO; import io.druid.server.shard.shard.NoneShardSpec; import org.joda.time.DateTime; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/NoopTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java similarity index 92% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/NoopTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java index 8ff42b792d2..d6c2fc81bc3 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/NoopTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/NoopTask.java @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; import org.joda.time.DateTime; import org.joda.time.Interval; import org.joda.time.Period; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/RealtimeIndexTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/RealtimeIndexTask.java similarity index 91% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/RealtimeIndexTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/RealtimeIndexTask.java index 111c58bf71a..e230dc5483e 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/RealtimeIndexTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/RealtimeIndexTask.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -27,35 +27,35 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.io.Closeables; import com.metamx.common.exception.FormattedException; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.LockAcquireAction; -import com.metamx.druid.indexing.common.actions.LockListAction; -import com.metamx.druid.indexing.common.actions.LockReleaseAction; -import com.metamx.druid.indexing.common.actions.SegmentInsertAction; -import com.metamx.druid.query.QueryRunnerFactoryConglomerate; -import com.metamx.druid.realtime.FireDepartment; -import com.metamx.druid.realtime.FireDepartmentConfig; -import com.metamx.druid.realtime.RealtimeMetricsMonitor; -import com.metamx.druid.realtime.Schema; -import com.metamx.druid.realtime.SegmentPublisher; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; -import com.metamx.druid.realtime.plumber.Plumber; -import com.metamx.druid.realtime.plumber.RealtimePlumberSchool; -import com.metamx.druid.realtime.plumber.RejectionPolicyFactory; -import com.metamx.druid.realtime.plumber.Sink; -import com.metamx.druid.realtime.plumber.VersioningPolicy; import com.metamx.emitter.EmittingLogger; import io.druid.client.DataSegment; import io.druid.data.input.InputRow; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.LockAcquireAction; +import io.druid.indexing.common.actions.LockListAction; +import io.druid.indexing.common.actions.LockReleaseAction; +import io.druid.indexing.common.actions.SegmentInsertAction; import io.druid.query.FinalizeResultsQueryRunner; import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; +import io.druid.query.QueryRunnerFactoryConglomerate; import io.druid.query.QueryToolChest; import io.druid.segment.IndexGranularity; +import io.druid.segment.realtime.FireDepartment; +import io.druid.segment.realtime.FireDepartmentConfig; +import io.druid.segment.realtime.RealtimeMetricsMonitor; +import io.druid.segment.realtime.Schema; +import io.druid.segment.realtime.SegmentPublisher; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; +import io.druid.segment.realtime.plumber.Plumber; +import io.druid.segment.realtime.plumber.RealtimePlumberSchool; +import io.druid.segment.realtime.plumber.RejectionPolicyFactory; +import io.druid.segment.realtime.plumber.Sink; +import io.druid.segment.realtime.plumber.VersioningPolicy; import io.druid.server.coordination.DataSegmentAnnouncer; import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/Task.java b/indexing-service/src/main/java/io/druid/indexing/common/task/Task.java similarity index 90% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/Task.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/Task.java index af7b22f4890..a3e42232865 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/Task.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/Task.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,14 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.google.common.base.Optional; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.TaskActionClient; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.TaskActionClient; import io.druid.query.Query; import io.druid.query.QueryRunner; import org.joda.time.Interval; @@ -38,8 +38,8 @@ import org.joda.time.Interval; *
  • Tasks are each part of a "task group", which is a set of tasks that can share interval locks. These are * useful for producing sharded segments.
  • *
  • Tasks can optionally have an "implicit lock interval". Tasks with this property are guaranteed to have - * a lock on that interval during their {@link #preflight(com.metamx.druid.indexing.common.actions.TaskActionClient)} - * and {@link #run(com.metamx.druid.indexing.common.TaskToolbox)} methods.
  • + * a lock on that interval during their {@link #preflight(io.druid.indexing.common.actions.TaskActionClient)} + * and {@link #run(io.druid.indexing.common.TaskToolbox)} methods. *
  • Tasks do not need to explicitly release locks; they are released upon task completion. Tasks may choose * to release locks early if they desire.
  • * @@ -73,7 +73,7 @@ public interface Task public String getGroupId(); /** - * Returns a {@link com.metamx.druid.indexing.common.task.TaskResource} for this task. Task resources define specific + * Returns a {@link io.druid.indexing.common.task.TaskResource} for this task. Task resources define specific * worker requirements a task may require. */ public TaskResource getTaskResource(); diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/TaskResource.java b/indexing-service/src/main/java/io/druid/indexing/common/task/TaskResource.java similarity index 58% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/TaskResource.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/TaskResource.java index 81d23a942b9..d5a57b40484 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/TaskResource.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/TaskResource.java @@ -1,4 +1,23 @@ -package com.metamx.druid.indexing.common.task; +/* + * 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.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/TaskUtils.java b/indexing-service/src/main/java/io/druid/indexing/common/task/TaskUtils.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/TaskUtils.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/TaskUtils.java index 6a17ef9099a..cbc90c2cc51 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/TaskUtils.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/TaskUtils.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/VersionConverterTask.java b/indexing-service/src/main/java/io/druid/indexing/common/task/VersionConverterTask.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/task/VersionConverterTask.java rename to indexing-service/src/main/java/io/druid/indexing/common/task/VersionConverterTask.java index 1efc8d99eb6..86b20d4a806 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/task/VersionConverterTask.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/task/VersionConverterTask.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -28,15 +28,15 @@ import com.google.common.collect.Sets; import com.metamx.common.ISE; import com.metamx.common.guava.FunctionalIterable; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.SegmentInsertAction; -import com.metamx.druid.indexing.common.actions.SegmentListUsedAction; -import com.metamx.druid.indexing.common.actions.SpawnTasksAction; -import com.metamx.druid.indexing.common.actions.TaskActionClient; -import com.metamx.druid.loading.SegmentLoadingException; import io.druid.client.DataSegment; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.SegmentInsertAction; +import io.druid.indexing.common.actions.SegmentListUsedAction; +import io.druid.indexing.common.actions.SpawnTasksAction; +import io.druid.indexing.common.actions.TaskActionClient; import io.druid.segment.IndexIO; +import io.druid.segment.loading.SegmentLoadingException; import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/NoopTaskLogs.java b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/NoopTaskLogs.java new file mode 100644 index 00000000000..7adddf18f64 --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/NoopTaskLogs.java @@ -0,0 +1,45 @@ +/* + * 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.indexing.common.tasklogs; + +import com.google.common.base.Optional; +import com.google.common.io.InputSupplier; +import com.metamx.common.logger.Logger; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; + +public class NoopTaskLogs implements TaskLogs +{ + private final Logger log = new Logger(TaskLogs.class); + + @Override + public Optional> streamTaskLog(String taskid, long offset) throws IOException + { + return Optional.absent(); + } + + @Override + public void pushTaskLog(String taskid, File logFile) throws IOException + { + log.info("Not pushing logs for task: %s", taskid); + } +} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/S3TaskLogs.java b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/S3TaskLogs.java similarity index 98% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/S3TaskLogs.java rename to indexing-service/src/main/java/io/druid/indexing/common/tasklogs/S3TaskLogs.java index 6518ac8754b..b6bf910d485 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/S3TaskLogs.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/S3TaskLogs.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.tasklogs; +package io.druid.indexing.common.tasklogs; import com.google.common.base.Optional; import com.google.common.base.Throwables; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/S3TaskLogsConfig.java b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/S3TaskLogsConfig.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/S3TaskLogsConfig.java rename to indexing-service/src/main/java/io/druid/indexing/common/tasklogs/S3TaskLogsConfig.java index 5642d1e3b05..6d4cb1fdf60 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/S3TaskLogsConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/S3TaskLogsConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.tasklogs; +package io.druid.indexing.common.tasklogs; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/SwitchingTaskLogStreamer.java b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/SwitchingTaskLogStreamer.java similarity index 52% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/SwitchingTaskLogStreamer.java rename to indexing-service/src/main/java/io/druid/indexing/common/tasklogs/SwitchingTaskLogStreamer.java index a573d8fc17e..606c370ba9a 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/SwitchingTaskLogStreamer.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/SwitchingTaskLogStreamer.java @@ -1,4 +1,23 @@ -package com.metamx.druid.indexing.common.tasklogs; +/* + * 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.indexing.common.tasklogs; import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; diff --git a/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogPusher.java b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogPusher.java new file mode 100644 index 00000000000..c40f7497fff --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogPusher.java @@ -0,0 +1,31 @@ +/* + * 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.indexing.common.tasklogs; + +import java.io.File; +import java.io.IOException; + +/** + * Something that knows how to persist local task logs to some form of long-term storage. + */ +public interface TaskLogPusher +{ + public void pushTaskLog(String taskid, File logFile) throws IOException; +} diff --git a/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogStreamer.java b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogStreamer.java new file mode 100644 index 00000000000..e260ffc29b0 --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogStreamer.java @@ -0,0 +1,42 @@ +/* + * 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.indexing.common.tasklogs; + +import com.google.common.base.Optional; +import com.google.common.io.InputSupplier; + +import java.io.IOException; +import java.io.InputStream; + +/** + * Something that knows how to stream logs for tasks. + */ +public interface TaskLogStreamer +{ + /** + * Stream log for a task. + * + * @param offset If zero, stream the entire log. If positive, attempt to read from this position onwards. If + * negative, attempt to read this many bytes from the end of the file (like tail -n). + * + * @return input supplier for this log, if available from this provider + */ + public Optional> streamTaskLog(String taskid, long offset) throws IOException; +} diff --git a/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogs.java b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogs.java new file mode 100644 index 00000000000..ba89db1bd38 --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskLogs.java @@ -0,0 +1,24 @@ +/* + * 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.indexing.common.tasklogs; + +public interface TaskLogs extends TaskLogStreamer, TaskLogPusher +{ +} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskRunnerTaskLogStreamer.java b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskRunnerTaskLogStreamer.java similarity index 90% rename from indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskRunnerTaskLogStreamer.java rename to indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskRunnerTaskLogStreamer.java index b6fb47aca3d..cd14e3e84b7 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/common/tasklogs/TaskRunnerTaskLogStreamer.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/tasklogs/TaskRunnerTaskLogStreamer.java @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.tasklogs; +package io.druid.indexing.common.tasklogs; import com.google.common.base.Optional; import com.google.common.io.InputSupplier; import com.google.inject.Inject; -import com.metamx.druid.indexing.coordinator.TaskMaster; -import com.metamx.druid.indexing.coordinator.TaskRunner; +import io.druid.indexing.coordinator.TaskMaster; +import io.druid.indexing.coordinator.TaskRunner; import java.io.IOException; import java.io.InputStream; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/DbTaskStorage.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/DbTaskStorage.java similarity index 98% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/DbTaskStorage.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/DbTaskStorage.java index 511302fd2f9..5589533fe49 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/DbTaskStorage.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/DbTaskStorage.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Function; @@ -29,12 +29,12 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.inject.Inject; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.actions.TaskAction; -import com.metamx.druid.indexing.common.task.Task; import com.metamx.emitter.EmittingLogger; import io.druid.db.DbTablesConfig; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.actions.TaskAction; +import io.druid.indexing.common.task.Task; import org.joda.time.DateTime; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.IDBI; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ForkingTaskRunner.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/ForkingTaskRunner.java similarity index 97% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ForkingTaskRunner.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/ForkingTaskRunner.java index 1093d4dd0a3..382aaed6ece 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ForkingTaskRunner.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/ForkingTaskRunner.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.CharMatcher; @@ -39,13 +39,13 @@ import com.google.common.util.concurrent.MoreExecutors; import com.google.inject.Inject; import com.metamx.common.ISE; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.common.tasklogs.TaskLogPusher; -import com.metamx.druid.indexing.common.tasklogs.TaskLogStreamer; -import com.metamx.druid.indexing.coordinator.config.ForkingTaskRunnerConfig; import com.metamx.emitter.EmittingLogger; -import io.druid.guice.guice.annotations.Self; +import io.druid.guice.annotations.Self; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.common.tasklogs.TaskLogPusher; +import io.druid.indexing.common.tasklogs.TaskLogStreamer; +import io.druid.indexing.coordinator.config.ForkingTaskRunnerConfig; import io.druid.server.DruidNode; import org.apache.commons.io.FileUtils; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ForkingTaskRunnerFactory.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/ForkingTaskRunnerFactory.java similarity index 88% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ForkingTaskRunnerFactory.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/ForkingTaskRunnerFactory.java index 31a85560f47..513910e6734 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ForkingTaskRunnerFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/ForkingTaskRunnerFactory.java @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; -import com.metamx.druid.indexing.common.tasklogs.TaskLogPusher; -import com.metamx.druid.indexing.coordinator.config.ForkingTaskRunnerConfig; -import io.druid.guice.guice.annotations.Self; +import io.druid.guice.annotations.Self; +import io.druid.indexing.common.tasklogs.TaskLogPusher; +import io.druid.indexing.coordinator.config.ForkingTaskRunnerConfig; import io.druid.server.DruidNode; import java.util.Properties; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/HeapMemoryTaskStorage.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/HeapMemoryTaskStorage.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/HeapMemoryTaskStorage.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/HeapMemoryTaskStorage.java index 75fa7919d72..1178028ce48 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/HeapMemoryTaskStorage.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/HeapMemoryTaskStorage.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.base.Optional; import com.google.common.base.Preconditions; @@ -27,10 +27,10 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; import com.google.common.collect.Multimap; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.actions.TaskAction; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.task.Task; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.actions.TaskAction; +import io.druid.indexing.common.task.Task; import java.util.List; import java.util.Map; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/IndexerDBCoordinator.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/IndexerDBCoordinator.java similarity index 99% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/IndexerDBCoordinator.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/IndexerDBCoordinator.java index 792e8f241b3..692977a9775 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/IndexerDBCoordinator.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/IndexerDBCoordinator.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Function; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunner.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunner.java similarity index 97% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunner.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunner.java index d32ca535975..93452a77daa 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunner.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunner.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Charsets; @@ -37,19 +37,19 @@ import com.google.common.util.concurrent.SettableFuture; import com.metamx.common.ISE; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.common.tasklogs.TaskLogStreamer; -import com.metamx.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; -import com.metamx.druid.indexing.coordinator.setup.WorkerSetupData; -import com.metamx.druid.indexing.worker.TaskAnnouncement; -import com.metamx.druid.indexing.worker.Worker; import com.metamx.emitter.EmittingLogger; import com.metamx.http.client.HttpClient; import com.metamx.http.client.response.InputStreamResponseHandler; import com.metamx.http.client.response.StatusResponseHandler; import com.metamx.http.client.response.StatusResponseHolder; import io.druid.curator.cache.PathChildrenCacheFactory; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.common.tasklogs.TaskLogStreamer; +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 org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.cache.ChildData; @@ -86,7 +86,7 @@ import java.util.concurrent.TimeUnit; *

    * The RemoteTaskRunner will assign tasks to a node until the node hits capacity. At that point, task assignment will * fail. The RemoteTaskRunner depends on another component to create additional worker resources. - * For example, {@link com.metamx.druid.indexing.coordinator.scaling.ResourceManagementScheduler} can take care of these duties. + * For example, {@link io.druid.indexing.coordinator.scaling.ResourceManagementScheduler} can take care of these duties. *

    * If a worker node becomes inexplicably disconnected from Zk, the RemoteTaskRunner will fail any tasks associated with the worker. *

    diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerFactory.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerFactory.java similarity index 91% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerFactory.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerFactory.java index 50e1225e02c..ea274bb2bfb 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerFactory.java @@ -17,16 +17,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Supplier; import com.google.inject.Inject; -import com.metamx.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; -import com.metamx.druid.indexing.coordinator.setup.WorkerSetupData; import com.metamx.http.client.HttpClient; import io.druid.curator.cache.SimplePathChildrenCacheFactory; -import io.druid.guice.guice.annotations.Global; +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 org.apache.curator.framework.CuratorFramework; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerWorkItem.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerWorkItem.java similarity index 89% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerWorkItem.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerWorkItem.java index e7d9d82e676..692ba50ae6b 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerWorkItem.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerWorkItem.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,12 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.util.concurrent.SettableFuture; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.worker.Worker; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.worker.Worker; import org.joda.time.DateTime; /** diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerWorkQueue.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerWorkQueue.java similarity index 92% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerWorkQueue.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerWorkQueue.java index 338233c5dca..ebdffd05526 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerWorkQueue.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/RemoteTaskRunnerWorkQueue.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import org.joda.time.DateTime; diff --git a/server/src/main/java/com/metamx/druid/utils/RequiredOption.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskExistsException.java similarity index 54% rename from server/src/main/java/com/metamx/druid/utils/RequiredOption.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/TaskExistsException.java index 5ec23aac081..a670f8640f9 100644 --- a/server/src/main/java/com/metamx/druid/utils/RequiredOption.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskExistsException.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,32 +17,25 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.utils; +package io.druid.indexing.coordinator; -import org.apache.commons.cli.Option; - -/** - */ -public class RequiredOption extends Option +public class TaskExistsException extends RuntimeException { - public RequiredOption(String opt, String description) - throws IllegalArgumentException + private final String taskId; + + public TaskExistsException(String taskId, Throwable t) { - super(opt, description); - setRequired(true); + super(String.format("Task exists: %s", taskId), t); + this.taskId = taskId; } - public RequiredOption(String opt, boolean hasArg, String description) - throws IllegalArgumentException + public TaskExistsException(String taskId) { - super(opt, hasArg, description); - setRequired(true); + this(taskId, null); } - public RequiredOption(String opt, String longOpt, boolean hasArg, String description) - throws IllegalArgumentException + public String getTaskId() { - super(opt, longOpt, hasArg, description); - setRequired(true); + return taskId; } } diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskLockbox.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskLockbox.java similarity index 98% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskLockbox.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/TaskLockbox.java index 5787238ab79..33a8a2a013f 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskLockbox.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskLockbox.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.base.Function; import com.google.common.base.Objects; @@ -32,9 +32,9 @@ import com.google.inject.Inject; import com.metamx.common.IAE; import com.metamx.common.guava.Comparators; import com.metamx.common.guava.FunctionalIterable; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.task.Task; import com.metamx.emitter.EmittingLogger; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.task.Task; import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskMaster.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskMaster.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskMaster.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/TaskMaster.java index d523bd6c43d..012e5a2e711 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskMaster.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskMaster.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.base.Optional; import com.google.common.base.Throwables; @@ -25,16 +25,16 @@ import com.google.inject.Inject; import com.metamx.common.lifecycle.Lifecycle; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.indexing.common.actions.TaskActionClient; -import com.metamx.druid.indexing.common.actions.TaskActionClientFactory; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.coordinator.exec.TaskConsumer; -import com.metamx.druid.indexing.coordinator.scaling.ResourceManagementScheduler; -import com.metamx.druid.indexing.coordinator.scaling.ResourceManagementSchedulerFactory; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import io.druid.curator.discovery.ServiceAnnouncer; -import io.druid.guice.guice.annotations.Self; +import io.druid.guice.annotations.Self; +import io.druid.indexing.common.actions.TaskActionClient; +import io.druid.indexing.common.actions.TaskActionClientFactory; +import io.druid.indexing.common.task.Task; +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 org.apache.curator.framework.CuratorFramework; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskQueue.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskQueue.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskQueue.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/TaskQueue.java index 6c3f169c580..d58d636e78a 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskQueue.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskQueue.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.base.Optional; import com.google.common.base.Preconditions; @@ -30,10 +30,10 @@ import com.google.common.collect.Ordering; import com.google.inject.Inject; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.Task; import com.metamx.emitter.EmittingLogger; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.Task; import java.util.List; import java.util.Map; @@ -47,7 +47,7 @@ import java.util.concurrent.locks.ReentrantLock; * {@link #take} or {@link #poll}. Ordering is mostly-FIFO, with deviations when the natural next task would conflict * with a currently-running task. In that case, tasks are skipped until a runnable one is found. *

    - * To manage locking, the queue keeps track of currently-running tasks as {@link com.metamx.druid.indexing.common.TaskLock} objects. The idea is that + * To manage locking, the queue keeps track of currently-running tasks as {@link io.druid.indexing.common.TaskLock} objects. The idea is that * only one TaskLock can be running on a particular dataSource + interval, and that TaskLock has a single version * string that all tasks in the group must use to publish segments. Tasks in the same TaskLock may run concurrently. *

    @@ -375,8 +375,6 @@ public class TaskQueue taskLockbox.unlock(task); workMayBeAvailable.signalAll(); } else { - // TODO: This could be a task-status-submission retry queue instead of retrying the entire task, - // TODO: which is heavy and probably not necessary. log.warn("Status could not be persisted! Reinserting task: %s", task.getId()); queue.add(task); } diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskRunner.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskRunner.java similarity index 86% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskRunner.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/TaskRunner.java index 38e4874afb8..e7174d9d680 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskRunner.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskRunner.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,17 +17,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.util.concurrent.ListenableFuture; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.Task; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.Task; import java.util.Collection; import java.util.List; /** - * Interface for handing off tasks. Used by a {@link com.metamx.druid.indexing.coordinator.exec.TaskConsumer} to + * Interface for handing off tasks. Used by a {@link io.druid.indexing.coordinator.exec.TaskConsumer} to * run tasks that have been locked. */ public interface TaskRunner diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskRunnerFactory.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskRunnerFactory.java similarity index 90% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskRunnerFactory.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/TaskRunnerFactory.java index 9bac2678235..73bd9c90ffe 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskRunnerFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskRunnerFactory.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; public interface TaskRunnerFactory { diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskRunnerWorkItem.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskRunnerWorkItem.java similarity index 93% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskRunnerWorkItem.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/TaskRunnerWorkItem.java index e8f341284e1..4c474bce5ba 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskRunnerWorkItem.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskRunnerWorkItem.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ComparisonChain; import com.google.common.util.concurrent.ListenableFuture; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.Task; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.Task; import org.joda.time.DateTime; import org.joda.time.DateTimeComparator; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskStorage.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskStorage.java similarity index 89% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskStorage.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/TaskStorage.java index 00a9ad8103b..c2f81d588a1 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskStorage.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskStorage.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.base.Optional; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.actions.TaskAction; -import com.metamx.druid.indexing.common.task.Task; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.actions.TaskAction; +import io.druid.indexing.common.task.Task; import java.util.List; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskStorageQueryAdapter.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskStorageQueryAdapter.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskStorageQueryAdapter.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/TaskStorageQueryAdapter.java index 7a1d1091ab0..4e3f327d78a 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/TaskStorageQueryAdapter.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/TaskStorageQueryAdapter.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.base.Function; import com.google.common.base.Optional; @@ -27,12 +27,12 @@ import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.google.inject.Inject; import com.metamx.common.guava.FunctionalIterable; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.actions.SegmentInsertAction; -import com.metamx.druid.indexing.common.actions.SpawnTasksAction; -import com.metamx.druid.indexing.common.actions.TaskAction; -import com.metamx.druid.indexing.common.task.Task; import io.druid.client.DataSegment; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.actions.SegmentInsertAction; +import io.druid.indexing.common.actions.SpawnTasksAction; +import io.druid.indexing.common.actions.TaskAction; +import io.druid.indexing.common.task.Task; import java.util.List; import java.util.Map; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ThreadPoolTaskRunner.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/ThreadPoolTaskRunner.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ThreadPoolTaskRunner.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/ThreadPoolTaskRunner.java index 96f52ceaa23..d0ab2611e45 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ThreadPoolTaskRunner.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/ThreadPoolTaskRunner.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.base.Function; import com.google.common.base.Throwables; @@ -30,12 +30,12 @@ import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; import com.google.inject.Inject; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.TaskToolboxFactory; -import com.metamx.druid.indexing.common.task.Task; import com.metamx.emitter.EmittingLogger; import io.druid.concurrent.Execs; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.TaskToolboxFactory; +import io.druid.indexing.common.task.Task; import io.druid.query.NoopQueryRunner; import io.druid.query.Query; import io.druid.query.QueryRunner; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ZkWorker.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/ZkWorker.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ZkWorker.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/ZkWorker.java index 3ee77c5f820..8580bf16674 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/ZkWorker.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/ZkWorker.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.ObjectMapper; @@ -26,9 +26,9 @@ import com.google.common.base.Throwables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.worker.TaskAnnouncement; -import com.metamx.druid.indexing.worker.Worker; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.worker.TaskAnnouncement; +import io.druid.indexing.worker.Worker; import org.apache.curator.framework.recipes.cache.ChildData; import org.apache.curator.framework.recipes.cache.PathChildrenCache; import org.apache.curator.framework.recipes.cache.PathChildrenCacheListener; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/EC2AutoScalingStrategyConfig.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/EC2AutoScalingStrategyConfig.java similarity index 91% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/EC2AutoScalingStrategyConfig.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/config/EC2AutoScalingStrategyConfig.java index da67e88c64e..1c553dfc1ed 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/EC2AutoScalingStrategyConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/EC2AutoScalingStrategyConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.config; +package io.druid.indexing.coordinator.config; import org.skife.config.Config; import org.skife.config.Default; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/ForkingTaskRunnerConfig.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/ForkingTaskRunnerConfig.java similarity index 64% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/ForkingTaskRunnerConfig.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/config/ForkingTaskRunnerConfig.java index d6f99d94e25..930c6167f16 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/ForkingTaskRunnerConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/ForkingTaskRunnerConfig.java @@ -1,4 +1,23 @@ -package com.metamx.druid.indexing.coordinator.config; +/* + * 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.indexing.coordinator.config; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Lists; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java similarity index 97% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java index 94f93a70435..16498286127 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/IndexerCoordinatorConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.config; +package io.druid.indexing.coordinator.config; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableSet; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/IndexerDbConnectorConfig.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/IndexerDbConnectorConfig.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/IndexerDbConnectorConfig.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/config/IndexerDbConnectorConfig.java index 777f2f3b301..aaaecb9c346 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/IndexerDbConnectorConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/IndexerDbConnectorConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.config; +package io.druid.indexing.coordinator.config; import com.fasterxml.jackson.annotation.JsonProperty; import io.druid.db.DbConnectorConfig; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/RemoteTaskRunnerConfig.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/RemoteTaskRunnerConfig.java similarity index 93% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/RemoteTaskRunnerConfig.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/config/RemoteTaskRunnerConfig.java index 0764fee3905..59f5159bac0 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/config/RemoteTaskRunnerConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/config/RemoteTaskRunnerConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.config; +package io.druid.indexing.coordinator.config; import com.fasterxml.jackson.annotation.JsonProperty; import org.joda.time.Period; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/exec/TaskConsumer.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/exec/TaskConsumer.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/exec/TaskConsumer.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/exec/TaskConsumer.java index df0902ce838..7c40fee27b1 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/exec/TaskConsumer.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/exec/TaskConsumer.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.exec; +package io.druid.indexing.coordinator.exec; import com.google.common.base.Throwables; import com.google.common.util.concurrent.FutureCallback; @@ -25,14 +25,14 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.actions.TaskActionClientFactory; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.coordinator.TaskQueue; -import com.metamx.druid.indexing.coordinator.TaskRunner; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceMetricEvent; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.actions.TaskActionClientFactory; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.coordinator.TaskQueue; +import io.druid.indexing.coordinator.TaskRunner; public class TaskConsumer implements Runnable { diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/http/IndexerCoordinatorResource.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/http/IndexerCoordinatorResource.java similarity index 88% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/http/IndexerCoordinatorResource.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/http/IndexerCoordinatorResource.java index 0def32177ea..c090da13a86 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/http/IndexerCoordinatorResource.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/http/IndexerCoordinatorResource.java @@ -17,9 +17,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.http; +package io.druid.indexing.coordinator.http; -import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Function; import com.google.common.base.Optional; @@ -29,20 +28,19 @@ import com.google.common.collect.Maps; import com.google.common.io.InputSupplier; import com.google.inject.Inject; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.actions.TaskActionClient; -import com.metamx.druid.indexing.common.actions.TaskActionHolder; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.common.tasklogs.TaskLogStreamer; -import com.metamx.druid.indexing.coordinator.TaskMaster; -import com.metamx.druid.indexing.coordinator.TaskQueue; -import com.metamx.druid.indexing.coordinator.TaskRunner; -import com.metamx.druid.indexing.coordinator.TaskRunnerWorkItem; -import com.metamx.druid.indexing.coordinator.TaskStorageQueryAdapter; -import com.metamx.druid.indexing.coordinator.scaling.ResourceManagementScheduler; -import com.metamx.druid.indexing.coordinator.setup.WorkerSetupData; import io.druid.client.DataSegment; import io.druid.common.config.JacksonConfigManager; +import io.druid.indexing.common.actions.TaskActionClient; +import io.druid.indexing.common.actions.TaskActionHolder; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.common.tasklogs.TaskLogStreamer; +import io.druid.indexing.coordinator.TaskMaster; +import io.druid.indexing.coordinator.TaskQueue; +import io.druid.indexing.coordinator.TaskRunner; +import io.druid.indexing.coordinator.TaskRunnerWorkItem; +import io.druid.indexing.coordinator.TaskStorageQueryAdapter; +import io.druid.indexing.coordinator.scaling.ResourceManagementScheduler; +import io.druid.indexing.coordinator.setup.WorkerSetupData; import javax.ws.rs.Consumes; import javax.ws.rs.DefaultValue; @@ -186,27 +184,6 @@ public class IndexerCoordinatorResource ); } - // Legacy endpoint - // TODO remove - @Deprecated - @GET - @Path("/status/{taskid}") - @Produces("application/json") - public Response getLegacyStatus(@PathParam("taskid") String taskid) - { - final Optional status = taskStorageQueryAdapter.getSameGroupMergedStatus(taskid); - final Set segments = taskStorageQueryAdapter.getSameGroupNewSegments(taskid); - - final Map ret = jsonMapper.convertValue( - status, new TypeReference>() - { - } - ); - ret.put("segments", segments); - - return Response.ok().entity(ret).build(); - } - @GET @Path("/worker/setup") @Produces("application/json") diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/http/OldIndexerCoordinatorResource.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/http/OldIndexerCoordinatorResource.java similarity index 85% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/http/OldIndexerCoordinatorResource.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/http/OldIndexerCoordinatorResource.java index e5ac8f0c42b..11df4499edf 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/http/OldIndexerCoordinatorResource.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/http/OldIndexerCoordinatorResource.java @@ -17,14 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.http; +package io.druid.indexing.coordinator.http; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; -import com.metamx.druid.indexing.common.tasklogs.TaskLogStreamer; -import com.metamx.druid.indexing.coordinator.TaskMaster; -import com.metamx.druid.indexing.coordinator.TaskStorageQueryAdapter; import io.druid.common.config.JacksonConfigManager; +import io.druid.indexing.common.tasklogs.TaskLogStreamer; +import io.druid.indexing.coordinator.TaskMaster; +import io.druid.indexing.coordinator.TaskStorageQueryAdapter; import javax.ws.rs.Path; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/http/OverlordRedirectInfo.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/http/OverlordRedirectInfo.java similarity index 93% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/http/OverlordRedirectInfo.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/http/OverlordRedirectInfo.java index 90472e591f2..e9b93aa73e5 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/http/OverlordRedirectInfo.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/http/OverlordRedirectInfo.java @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.http; +package io.druid.indexing.coordinator.http; import com.google.common.base.Throwables; import com.google.inject.Inject; -import com.metamx.druid.indexing.coordinator.TaskMaster; +import io.druid.indexing.coordinator.TaskMaster; import io.druid.server.http.RedirectInfo; import java.net.URL; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/AutoScalingData.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/AutoScalingData.java similarity index 93% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/AutoScalingData.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/AutoScalingData.java index 46b13fa9a74..7852e6a73f6 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/AutoScalingData.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/AutoScalingData.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/AutoScalingStrategy.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/AutoScalingStrategy.java similarity index 93% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/AutoScalingStrategy.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/AutoScalingStrategy.java index aab2175a50f..19c98c9247f 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/AutoScalingStrategy.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/AutoScalingStrategy.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import java.util.List; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/EC2AutoScalingStrategy.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/EC2AutoScalingStrategy.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/EC2AutoScalingStrategy.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/EC2AutoScalingStrategy.java index 9141905733c..cda0da63568 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/EC2AutoScalingStrategy.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/EC2AutoScalingStrategy.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.amazonaws.services.ec2.AmazonEC2; import com.amazonaws.services.ec2.model.DescribeInstancesRequest; @@ -33,10 +33,10 @@ import com.google.common.base.Function; import com.google.common.base.Supplier; import com.google.common.collect.Lists; import com.google.inject.Inject; -import com.metamx.druid.indexing.coordinator.setup.EC2NodeData; -import com.metamx.druid.indexing.coordinator.setup.GalaxyUserData; -import com.metamx.druid.indexing.coordinator.setup.WorkerSetupData; import com.metamx.emitter.EmittingLogger; +import io.druid.indexing.coordinator.setup.EC2NodeData; +import io.druid.indexing.coordinator.setup.GalaxyUserData; +import io.druid.indexing.coordinator.setup.WorkerSetupData; import org.apache.commons.codec.binary.Base64; import javax.annotation.Nullable; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/NoopAutoScalingStrategy.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/NoopAutoScalingStrategy.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/NoopAutoScalingStrategy.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/NoopAutoScalingStrategy.java index 3d036c8f09a..ef6b5291f61 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/NoopAutoScalingStrategy.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/NoopAutoScalingStrategy.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.metamx.emitter.EmittingLogger; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/NoopResourceManagementScheduler.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/NoopResourceManagementScheduler.java similarity index 92% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/NoopResourceManagementScheduler.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/NoopResourceManagementScheduler.java index a4f9c274eec..9d09dfab0bd 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/NoopResourceManagementScheduler.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/NoopResourceManagementScheduler.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.metamx.common.logger.Logger; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementScheduler.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementScheduler.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementScheduler.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementScheduler.java index cefcc702860..c8c63cee742 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementScheduler.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementScheduler.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,15 +17,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.metamx.common.concurrent.ScheduledExecutors; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.coordinator.RemoteTaskRunner; -import com.metamx.druid.indexing.coordinator.TaskRunner; import io.druid.granularity.PeriodGranularity; +import io.druid.indexing.coordinator.RemoteTaskRunner; +import io.druid.indexing.coordinator.TaskRunner; import org.joda.time.DateTime; import org.joda.time.Duration; import org.joda.time.Period; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementSchedulerConfig.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementSchedulerConfig.java similarity index 93% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementSchedulerConfig.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementSchedulerConfig.java index eb689b40f81..b4cae15a122 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementSchedulerConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementSchedulerConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.fasterxml.jackson.annotation.JsonProperty; import org.joda.time.DateTime; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactory.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactory.java similarity index 84% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactory.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactory.java index 16ae50ccc2b..10924daa02e 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactory.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactory.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,9 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; -import com.metamx.druid.indexing.coordinator.RemoteTaskRunner; +import io.druid.indexing.coordinator.RemoteTaskRunner; /** */ diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactoryImpl.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactoryImpl.java similarity index 93% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactoryImpl.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactoryImpl.java index c828051d150..a898394298e 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactoryImpl.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementSchedulerFactoryImpl.java @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.google.inject.Inject; import com.metamx.common.concurrent.ScheduledExecutorFactory; -import com.metamx.druid.indexing.coordinator.RemoteTaskRunner; +import io.druid.indexing.coordinator.RemoteTaskRunner; /** */ diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementStrategy.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementStrategy.java similarity index 85% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementStrategy.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementStrategy.java index 2c61dc79285..9838c40d383 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ResourceManagementStrategy.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ResourceManagementStrategy.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,10 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; -import com.metamx.druid.indexing.coordinator.RemoteTaskRunnerWorkItem; -import com.metamx.druid.indexing.coordinator.ZkWorker; +import io.druid.indexing.coordinator.RemoteTaskRunnerWorkItem; +import io.druid.indexing.coordinator.ZkWorker; import java.util.Collection; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ScalingStats.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ScalingStats.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ScalingStats.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ScalingStats.java index 6661b5d135d..7e5e1c23fe1 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/ScalingStats.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/ScalingStats.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/SimpleResourceManagementConfig.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/SimpleResourceManagementConfig.java similarity index 98% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/SimpleResourceManagementConfig.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/SimpleResourceManagementConfig.java index deb529e7a09..6e659b01148 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/SimpleResourceManagementConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/SimpleResourceManagementConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.fasterxml.jackson.annotation.JsonProperty; import org.joda.time.Period; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategy.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategy.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategy.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategy.java index a3800345fb1..f96ce562b11 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategy.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategy.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.google.common.base.Function; import com.google.common.base.Predicate; @@ -27,11 +27,11 @@ import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.google.inject.Inject; import com.metamx.common.guava.FunctionalIterable; -import com.metamx.druid.indexing.coordinator.RemoteTaskRunnerWorkItem; -import com.metamx.druid.indexing.coordinator.TaskRunnerWorkItem; -import com.metamx.druid.indexing.coordinator.ZkWorker; -import com.metamx.druid.indexing.coordinator.setup.WorkerSetupData; import com.metamx.emitter.EmittingLogger; +import io.druid.indexing.coordinator.RemoteTaskRunnerWorkItem; +import io.druid.indexing.coordinator.TaskRunnerWorkItem; +import io.druid.indexing.coordinator.ZkWorker; +import io.druid.indexing.coordinator.setup.WorkerSetupData; import org.joda.time.DateTime; import org.joda.time.Duration; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/setup/EC2NodeData.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/setup/EC2NodeData.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/setup/EC2NodeData.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/setup/EC2NodeData.java index 28f877a1f17..66c8026ebe5 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/setup/EC2NodeData.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/setup/EC2NodeData.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.setup; +package io.druid.indexing.coordinator.setup; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/setup/GalaxyUserData.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/setup/GalaxyUserData.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/setup/GalaxyUserData.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/setup/GalaxyUserData.java index 4a7490660cc..e7a57f6c386 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/setup/GalaxyUserData.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/setup/GalaxyUserData.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.setup; +package io.druid.indexing.coordinator.setup; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/setup/WorkerSetupData.java b/indexing-service/src/main/java/io/druid/indexing/coordinator/setup/WorkerSetupData.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/setup/WorkerSetupData.java rename to indexing-service/src/main/java/io/druid/indexing/coordinator/setup/WorkerSetupData.java index dcbf0f270ad..332edadcf39 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/coordinator/setup/WorkerSetupData.java +++ b/indexing-service/src/main/java/io/druid/indexing/coordinator/setup/WorkerSetupData.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.setup; +package io.druid.indexing.coordinator.setup; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/TaskAnnouncement.java b/indexing-service/src/main/java/io/druid/indexing/worker/TaskAnnouncement.java similarity index 91% rename from indexing-service/src/main/java/com/metamx/druid/indexing/worker/TaskAnnouncement.java rename to indexing-service/src/main/java/io/druid/indexing/worker/TaskAnnouncement.java index a02093dbae5..da739ac63d6 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/TaskAnnouncement.java +++ b/indexing-service/src/main/java/io/druid/indexing/worker/TaskAnnouncement.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,14 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.worker; +package io.druid.indexing.worker; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Preconditions; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.common.task.TaskResource; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.common.task.TaskResource; /** * Used by workers to announce the status of tasks they are currently running. This class is immutable. diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/Worker.java b/indexing-service/src/main/java/io/druid/indexing/worker/Worker.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/worker/Worker.java rename to indexing-service/src/main/java/io/druid/indexing/worker/Worker.java index 7d60f06fb2a..ac41aa7292a 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/Worker.java +++ b/indexing-service/src/main/java/io/druid/indexing/worker/Worker.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.worker; +package io.druid.indexing.worker; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/WorkerCuratorCoordinator.java b/indexing-service/src/main/java/io/druid/indexing/worker/WorkerCuratorCoordinator.java similarity index 98% rename from indexing-service/src/main/java/com/metamx/druid/indexing/worker/WorkerCuratorCoordinator.java rename to indexing-service/src/main/java/io/druid/indexing/worker/WorkerCuratorCoordinator.java index 0f5d3db7a17..17d3d73b024 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/WorkerCuratorCoordinator.java +++ b/indexing-service/src/main/java/io/druid/indexing/worker/WorkerCuratorCoordinator.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.worker; +package io.druid.indexing.worker; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Joiner; @@ -29,8 +29,8 @@ import com.metamx.common.ISE; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; import io.druid.curator.announcement.Announcer; +import io.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; import io.druid.server.initialization.initialization.ZkPathsConfig; import org.apache.curator.framework.CuratorFramework; import org.apache.zookeeper.CreateMode; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/WorkerTaskMonitor.java b/indexing-service/src/main/java/io/druid/indexing/worker/WorkerTaskMonitor.java similarity index 96% rename from indexing-service/src/main/java/com/metamx/druid/indexing/worker/WorkerTaskMonitor.java rename to indexing-service/src/main/java/io/druid/indexing/worker/WorkerTaskMonitor.java index d877d4db494..af28f2402a4 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/WorkerTaskMonitor.java +++ b/indexing-service/src/main/java/io/druid/indexing/worker/WorkerTaskMonitor.java @@ -17,18 +17,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.worker; +package io.druid.indexing.worker; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.coordinator.TaskRunner; -import com.metamx.druid.indexing.worker.config.WorkerConfig; import com.metamx.emitter.EmittingLogger; import io.druid.concurrent.Execs; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.coordinator.TaskRunner; +import io.druid.indexing.worker.config.WorkerConfig; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.cache.PathChildrenCache; import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent; diff --git a/indexing-service/src/main/java/io/druid/indexing/worker/config/ChatHandlerProviderConfig.java b/indexing-service/src/main/java/io/druid/indexing/worker/config/ChatHandlerProviderConfig.java new file mode 100644 index 00000000000..d7b5154208a --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/worker/config/ChatHandlerProviderConfig.java @@ -0,0 +1,37 @@ +/* + * 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.indexing.worker.config; + +import org.skife.config.Config; + +public abstract class ChatHandlerProviderConfig +{ + @Config("druid.indexer.chathandler.publishDiscovery") + public boolean isPublishDiscovery() + { + return false; + } + + @Config("druid.host") + public abstract String getHost(); + + @Config("druid.port") + public abstract int getPort(); +} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/config/WorkerConfig.java b/indexing-service/src/main/java/io/druid/indexing/worker/config/WorkerConfig.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/worker/config/WorkerConfig.java rename to indexing-service/src/main/java/io/druid/indexing/worker/config/WorkerConfig.java index 9c29cbb16a3..f1e1bf4d32f 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/config/WorkerConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/worker/config/WorkerConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.worker.config; +package io.druid.indexing.worker.config; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/indexing-service/src/main/java/io/druid/indexing/worker/executor/ChatHandlerResource.java b/indexing-service/src/main/java/io/druid/indexing/worker/executor/ChatHandlerResource.java new file mode 100644 index 00000000000..c52745c5d58 --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/worker/executor/ChatHandlerResource.java @@ -0,0 +1,55 @@ +/* + * 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.indexing.worker.executor; + +import com.google.common.base.Optional; +import com.google.inject.Inject; +import io.druid.indexing.common.index.ChatHandler; +import io.druid.indexing.common.index.ChatHandlerProvider; + +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.core.Response; + +@Path("/druid/worker/v1") +public class ChatHandlerResource +{ + private final ChatHandlerProvider handlers; + + @Inject + public ChatHandlerResource(ChatHandlerProvider handlers) + { + this.handlers = handlers; + } + + @Path("/chat/{id}") + public Object doTaskChat( + @PathParam("id") String handlerId + ) + { + final Optional handler = handlers.get(handlerId); + + if (handler.isPresent()) { + return handler.get(); + } else { + return Response.status(Response.Status.NOT_FOUND).build(); + } + } +} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ExecutorLifecycle.java b/indexing-service/src/main/java/io/druid/indexing/worker/executor/ExecutorLifecycle.java similarity index 95% rename from indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ExecutorLifecycle.java rename to indexing-service/src/main/java/io/druid/indexing/worker/executor/ExecutorLifecycle.java index e696f77f25e..8f0fac4bfb8 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ExecutorLifecycle.java +++ b/indexing-service/src/main/java/io/druid/indexing/worker/executor/ExecutorLifecycle.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.worker.executor; +package io.druid.indexing.worker.executor; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Function; @@ -27,11 +27,11 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.inject.Inject; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.coordinator.TaskRunner; import com.metamx.emitter.EmittingLogger; import io.druid.concurrent.Execs; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.coordinator.TaskRunner; import java.io.File; import java.io.IOException; diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ExecutorLifecycleConfig.java b/indexing-service/src/main/java/io/druid/indexing/worker/executor/ExecutorLifecycleConfig.java similarity index 97% rename from indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ExecutorLifecycleConfig.java rename to indexing-service/src/main/java/io/druid/indexing/worker/executor/ExecutorLifecycleConfig.java index 614a21fb2ac..c8565c15f5f 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/executor/ExecutorLifecycleConfig.java +++ b/indexing-service/src/main/java/io/druid/indexing/worker/executor/ExecutorLifecycleConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.worker.executor; +package io.druid.indexing.worker.executor; import com.fasterxml.jackson.annotation.JsonProperty; import com.metamx.common.ISE; diff --git a/indexing-service/src/main/java/io/druid/indexing/worker/executor/ExecutorLifecycleFactory.java b/indexing-service/src/main/java/io/druid/indexing/worker/executor/ExecutorLifecycleFactory.java new file mode 100644 index 00000000000..a434c352821 --- /dev/null +++ b/indexing-service/src/main/java/io/druid/indexing/worker/executor/ExecutorLifecycleFactory.java @@ -0,0 +1,44 @@ +/* + * 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.indexing.worker.executor; + +import com.fasterxml.jackson.databind.ObjectMapper; +import io.druid.indexing.coordinator.TaskRunner; + +import java.io.File; + +public class ExecutorLifecycleFactory +{ + private final File taskFile; + private final File statusFile; + + public ExecutorLifecycleFactory(File taskFile, File statusFile) + { + this.taskFile = taskFile; + this.statusFile = statusFile; + } + + public ExecutorLifecycle build(TaskRunner taskRunner, ObjectMapper jsonMapper) + { + return new ExecutorLifecycle( + new ExecutorLifecycleConfig().setTaskFile(taskFile).setStatusFile(statusFile), taskRunner, jsonMapper + ); + } +} diff --git a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/http/WorkerResource.java b/indexing-service/src/main/java/io/druid/indexing/worker/http/WorkerResource.java similarity index 94% rename from indexing-service/src/main/java/com/metamx/druid/indexing/worker/http/WorkerResource.java rename to indexing-service/src/main/java/io/druid/indexing/worker/http/WorkerResource.java index 57a023e3b33..9ab4396b2cc 100644 --- a/indexing-service/src/main/java/com/metamx/druid/indexing/worker/http/WorkerResource.java +++ b/indexing-service/src/main/java/io/druid/indexing/worker/http/WorkerResource.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,14 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.worker.http; +package io.druid.indexing.worker.http; import com.google.common.base.Optional; import com.google.common.collect.ImmutableMap; import com.google.common.io.InputSupplier; import com.google.inject.Inject; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.coordinator.ForkingTaskRunner; +import io.druid.indexing.coordinator.ForkingTaskRunner; import javax.ws.rs.DefaultValue; import javax.ws.rs.GET; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/TestTask.java b/indexing-service/src/test/java/io/druid/indexing/TestTask.java similarity index 90% rename from indexing-service/src/test/java/com/metamx/druid/indexing/TestTask.java rename to indexing-service/src/test/java/io/druid/indexing/TestTask.java index badcb5fbf65..30853378eaf 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/TestTask.java +++ b/indexing-service/src/test/java/io/druid/indexing/TestTask.java @@ -17,15 +17,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing; +package io.druid.indexing; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.task.MergeTask; import io.druid.client.DataSegment; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.task.MergeTask; import io.druid.query.aggregation.AggregatorFactory; import java.util.List; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/common/RetryPolicyTest.java b/indexing-service/src/test/java/io/druid/indexing/common/RetryPolicyTest.java similarity index 56% rename from indexing-service/src/test/java/com/metamx/druid/indexing/common/RetryPolicyTest.java rename to indexing-service/src/test/java/io/druid/indexing/common/RetryPolicyTest.java index 07aaa66e0bd..346744e9b53 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/common/RetryPolicyTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/common/RetryPolicyTest.java @@ -1,4 +1,23 @@ -package com.metamx.druid.indexing.common; +/* + * 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.indexing.common; import junit.framework.Assert; import org.joda.time.Duration; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/common/task/MergeTaskBaseTest.java b/indexing-service/src/test/java/io/druid/indexing/common/task/MergeTaskBaseTest.java similarity index 98% rename from indexing-service/src/test/java/com/metamx/druid/indexing/common/task/MergeTaskBaseTest.java rename to indexing-service/src/test/java/io/druid/indexing/common/task/MergeTaskBaseTest.java index 865c1fcdd81..359e4ec0ebe 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/common/task/MergeTaskBaseTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/common/task/MergeTaskBaseTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.google.common.base.Charsets; import com.google.common.collect.ImmutableList; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/common/task/TaskSerdeTest.java b/indexing-service/src/test/java/io/druid/indexing/common/task/TaskSerdeTest.java similarity index 97% rename from indexing-service/src/test/java/com/metamx/druid/indexing/common/task/TaskSerdeTest.java rename to indexing-service/src/test/java/io/druid/indexing/common/task/TaskSerdeTest.java index acd46f84aa9..d4a3f9c33be 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/common/task/TaskSerdeTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/common/task/TaskSerdeTest.java @@ -17,25 +17,25 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.metamx.common.Granularity; -import com.metamx.druid.indexer.HadoopDruidIndexerConfig; -import com.metamx.druid.indexer.granularity.UniformGranularitySpec; -import com.metamx.druid.indexer.path.StaticPathSpec; -import com.metamx.druid.indexer.rollup.DataRollupSpec; -import com.metamx.druid.realtime.Schema; import io.druid.client.DataSegment; import io.druid.data.input.JSONDataSpec; import io.druid.granularity.QueryGranularity; +import io.druid.indexer.HadoopDruidIndexerConfig; +import io.druid.indexer.granularity.UniformGranularitySpec; +import io.druid.indexer.path.StaticPathSpec; +import io.druid.indexer.rollup.DataRollupSpec; import io.druid.jackson.DefaultObjectMapper; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; import io.druid.query.aggregation.DoubleSumAggregatorFactory; import io.druid.segment.IndexGranularity; +import io.druid.segment.realtime.Schema; import io.druid.server.shard.shard.NoneShardSpec; import junit.framework.Assert; import org.joda.time.Interval; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/common/task/VersionConverterTaskTest.java b/indexing-service/src/test/java/io/druid/indexing/common/task/VersionConverterTaskTest.java similarity index 97% rename from indexing-service/src/test/java/com/metamx/druid/indexing/common/task/VersionConverterTaskTest.java rename to indexing-service/src/test/java/io/druid/indexing/common/task/VersionConverterTaskTest.java index a7551f0d657..d67902a5469 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/common/task/VersionConverterTaskTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/common/task/VersionConverterTaskTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.common.task; +package io.druid.indexing.common.task; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/RealtimeishTask.java b/indexing-service/src/test/java/io/druid/indexing/coordinator/RealtimeishTask.java similarity index 87% rename from indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/RealtimeishTask.java rename to indexing-service/src/test/java/io/druid/indexing/coordinator/RealtimeishTask.java index 6b619baa22e..159185804a0 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/RealtimeishTask.java +++ b/indexing-service/src/test/java/io/druid/indexing/coordinator/RealtimeishTask.java @@ -17,20 +17,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.actions.LockAcquireAction; -import com.metamx.druid.indexing.common.actions.LockListAction; -import com.metamx.druid.indexing.common.actions.LockReleaseAction; -import com.metamx.druid.indexing.common.actions.SegmentInsertAction; -import com.metamx.druid.indexing.common.task.AbstractTask; -import com.metamx.druid.indexing.common.task.TaskResource; import io.druid.client.DataSegment; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.actions.LockAcquireAction; +import io.druid.indexing.common.actions.LockListAction; +import io.druid.indexing.common.actions.LockReleaseAction; +import io.druid.indexing.common.actions.SegmentInsertAction; +import io.druid.indexing.common.task.AbstractTask; +import io.druid.indexing.common.task.TaskResource; import org.joda.time.Interval; import org.junit.Assert; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerTest.java b/indexing-service/src/test/java/io/druid/indexing/coordinator/RemoteTaskRunnerTest.java similarity index 94% rename from indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerTest.java rename to indexing-service/src/test/java/io/druid/indexing/coordinator/RemoteTaskRunnerTest.java index d4788346a1b..fa27b7bb000 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/RemoteTaskRunnerTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/coordinator/RemoteTaskRunnerTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.jsontype.NamedType; @@ -30,24 +30,24 @@ import com.google.common.collect.Sets; import com.google.common.io.Files; import com.google.common.util.concurrent.ListenableFuture; import com.metamx.common.ISE; -import com.metamx.druid.indexing.TestTask; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolboxFactory; -import com.metamx.druid.indexing.common.config.TaskConfig; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.common.task.TaskResource; -import com.metamx.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; -import com.metamx.druid.indexing.coordinator.setup.WorkerSetupData; -import com.metamx.druid.indexing.worker.Worker; -import com.metamx.druid.indexing.worker.WorkerCuratorCoordinator; -import com.metamx.druid.indexing.worker.WorkerTaskMonitor; -import com.metamx.druid.indexing.worker.config.WorkerConfig; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import io.druid.client.DataSegment; import io.druid.common.guava.DSuppliers; import io.druid.curator.PotentiallyGzippedCompressionProvider; import io.druid.curator.cache.SimplePathChildrenCacheFactory; +import io.druid.indexing.TestTask; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolboxFactory; +import io.druid.indexing.common.config.TaskConfig; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.common.task.TaskResource; +import io.druid.indexing.coordinator.config.RemoteTaskRunnerConfig; +import io.druid.indexing.coordinator.setup.WorkerSetupData; +import io.druid.indexing.worker.Worker; +import io.druid.indexing.worker.WorkerCuratorCoordinator; +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; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/TaskLifecycleTest.java b/indexing-service/src/test/java/io/druid/indexing/coordinator/TaskLifecycleTest.java similarity index 92% rename from indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/TaskLifecycleTest.java rename to indexing-service/src/test/java/io/druid/indexing/coordinator/TaskLifecycleTest.java index a13ab1280d9..f6b93093efe 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/TaskLifecycleTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/coordinator/TaskLifecycleTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.base.Optional; import com.google.common.base.Throwables; @@ -31,28 +31,6 @@ import com.google.common.io.Files; import com.metamx.common.Granularity; import com.metamx.common.ISE; import com.metamx.common.guava.Comparators; -import com.metamx.druid.indexer.granularity.UniformGranularitySpec; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.TaskToolboxFactory; -import com.metamx.druid.indexing.common.actions.LocalTaskActionClientFactory; -import com.metamx.druid.indexing.common.actions.LockListAction; -import com.metamx.druid.indexing.common.actions.SegmentInsertAction; -import com.metamx.druid.indexing.common.actions.TaskActionClientFactory; -import com.metamx.druid.indexing.common.actions.TaskActionToolbox; -import com.metamx.druid.indexing.common.config.TaskConfig; -import com.metamx.druid.indexing.common.task.AbstractTask; -import com.metamx.druid.indexing.common.task.IndexTask; -import com.metamx.druid.indexing.common.task.KillTask; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.common.task.TaskResource; -import com.metamx.druid.indexing.coordinator.exec.TaskConsumer; -import com.metamx.druid.loading.DataSegmentKiller; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.loading.SegmentLoadingException; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.core.Event; import com.metamx.emitter.service.ServiceEmitter; @@ -61,9 +39,31 @@ import io.druid.client.DataSegment; import io.druid.data.input.InputRow; import io.druid.data.input.MapBasedInputRow; import io.druid.granularity.QueryGranularity; +import io.druid.indexer.granularity.UniformGranularitySpec; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.TaskToolboxFactory; +import io.druid.indexing.common.actions.LocalTaskActionClientFactory; +import io.druid.indexing.common.actions.LockListAction; +import io.druid.indexing.common.actions.SegmentInsertAction; +import io.druid.indexing.common.actions.TaskActionClientFactory; +import io.druid.indexing.common.actions.TaskActionToolbox; +import io.druid.indexing.common.config.TaskConfig; +import io.druid.indexing.common.task.AbstractTask; +import io.druid.indexing.common.task.IndexTask; +import io.druid.indexing.common.task.KillTask; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.common.task.TaskResource; +import io.druid.indexing.coordinator.exec.TaskConsumer; import io.druid.jackson.DefaultObjectMapper; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.DoubleSumAggregatorFactory; +import io.druid.segment.loading.DataSegmentKiller; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.loading.SegmentLoadingException; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; import org.apache.commons.io.FileUtils; import org.easymock.EasyMock; import org.joda.time.DateTime; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/TaskQueueTest.java b/indexing-service/src/test/java/io/druid/indexing/coordinator/TaskQueueTest.java similarity index 95% rename from indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/TaskQueueTest.java rename to indexing-service/src/test/java/io/druid/indexing/coordinator/TaskQueueTest.java index f421bee7f3c..7cb5076d21d 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/TaskQueueTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/coordinator/TaskQueueTest.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,21 +17,21 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Sets; -import com.metamx.druid.indexing.common.TaskLock; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.TaskToolboxFactory; -import com.metamx.druid.indexing.common.actions.LocalTaskActionClientFactory; -import com.metamx.druid.indexing.common.actions.SpawnTasksAction; -import com.metamx.druid.indexing.common.actions.TaskActionToolbox; -import com.metamx.druid.indexing.common.task.AbstractTask; -import com.metamx.druid.indexing.common.task.Task; +import io.druid.indexing.common.TaskLock; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.TaskToolboxFactory; +import io.druid.indexing.common.actions.LocalTaskActionClientFactory; +import io.druid.indexing.common.actions.SpawnTasksAction; +import io.druid.indexing.common.actions.TaskActionToolbox; +import io.druid.indexing.common.task.AbstractTask; +import io.druid.indexing.common.task.Task; import org.joda.time.Interval; import org.junit.Assert; import org.junit.Test; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/TestRealtimeTask.java b/indexing-service/src/test/java/io/druid/indexing/coordinator/TestRealtimeTask.java similarity index 86% rename from indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/TestRealtimeTask.java rename to indexing-service/src/test/java/io/druid/indexing/coordinator/TestRealtimeTask.java index e324cb26ab3..12daa5eeaf3 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/TestRealtimeTask.java +++ b/indexing-service/src/test/java/io/druid/indexing/coordinator/TestRealtimeTask.java @@ -17,18 +17,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator; +package io.druid.indexing.coordinator; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.TaskToolbox; -import com.metamx.druid.indexing.common.task.RealtimeIndexTask; -import com.metamx.druid.indexing.common.task.TaskResource; -import com.metamx.druid.realtime.Schema; import io.druid.granularity.QueryGranularity; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.TaskToolbox; +import io.druid.indexing.common.task.RealtimeIndexTask; +import io.druid.indexing.common.task.TaskResource; import io.druid.query.aggregation.AggregatorFactory; +import io.druid.segment.realtime.Schema; import io.druid.server.shard.shard.NoneShardSpec; /** diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/scaling/EC2AutoScalingStrategyTest.java b/indexing-service/src/test/java/io/druid/indexing/coordinator/scaling/EC2AutoScalingStrategyTest.java similarity index 95% rename from indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/scaling/EC2AutoScalingStrategyTest.java rename to indexing-service/src/test/java/io/druid/indexing/coordinator/scaling/EC2AutoScalingStrategyTest.java index 4cdd4c586db..c07f04d6fd7 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/scaling/EC2AutoScalingStrategyTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/coordinator/scaling/EC2AutoScalingStrategyTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.amazonaws.services.ec2.AmazonEC2Client; import com.amazonaws.services.ec2.model.DescribeInstancesRequest; @@ -28,10 +28,10 @@ import com.amazonaws.services.ec2.model.RunInstancesRequest; import com.amazonaws.services.ec2.model.RunInstancesResult; import com.amazonaws.services.ec2.model.TerminateInstancesRequest; import com.google.common.collect.Lists; -import com.metamx.druid.indexing.coordinator.setup.EC2NodeData; -import com.metamx.druid.indexing.coordinator.setup.GalaxyUserData; -import com.metamx.druid.indexing.coordinator.setup.WorkerSetupData; import io.druid.common.guava.DSuppliers; +import io.druid.indexing.coordinator.setup.EC2NodeData; +import io.druid.indexing.coordinator.setup.GalaxyUserData; +import io.druid.indexing.coordinator.setup.WorkerSetupData; import io.druid.jackson.DefaultObjectMapper; import org.easymock.EasyMock; import org.junit.After; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategyTest.java b/indexing-service/src/test/java/io/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategyTest.java similarity index 95% rename from indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategyTest.java rename to indexing-service/src/test/java/io/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategyTest.java index db1ec37e2c4..d5985a0336f 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategyTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/coordinator/scaling/SimpleResourceManagementStrategyTest.java @@ -17,24 +17,24 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import com.metamx.druid.indexing.TestTask; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.coordinator.RemoteTaskRunnerWorkItem; -import com.metamx.druid.indexing.coordinator.ZkWorker; -import com.metamx.druid.indexing.coordinator.setup.WorkerSetupData; -import com.metamx.druid.indexing.worker.TaskAnnouncement; -import com.metamx.druid.indexing.worker.Worker; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceEventBuilder; import io.druid.client.DataSegment; import io.druid.common.guava.DSuppliers; +import io.druid.indexing.TestTask; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.coordinator.RemoteTaskRunnerWorkItem; +import io.druid.indexing.coordinator.ZkWorker; +import io.druid.indexing.coordinator.setup.WorkerSetupData; +import io.druid.indexing.worker.TaskAnnouncement; +import io.druid.indexing.worker.Worker; import io.druid.jackson.DefaultObjectMapper; import io.druid.query.aggregation.AggregatorFactory; import junit.framework.Assert; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/scaling/TestAutoScalingStrategy.java b/indexing-service/src/test/java/io/druid/indexing/coordinator/scaling/TestAutoScalingStrategy.java similarity index 92% rename from indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/scaling/TestAutoScalingStrategy.java rename to indexing-service/src/test/java/io/druid/indexing/coordinator/scaling/TestAutoScalingStrategy.java index b11a859e5fe..5b6cc4bf195 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/coordinator/scaling/TestAutoScalingStrategy.java +++ b/indexing-service/src/test/java/io/druid/indexing/coordinator/scaling/TestAutoScalingStrategy.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.coordinator.scaling; +package io.druid.indexing.coordinator.scaling; import java.util.List; diff --git a/indexing-service/src/test/java/com/metamx/druid/indexing/worker/TaskAnnouncementTest.java b/indexing-service/src/test/java/io/druid/indexing/worker/TaskAnnouncementTest.java similarity index 90% rename from indexing-service/src/test/java/com/metamx/druid/indexing/worker/TaskAnnouncementTest.java rename to indexing-service/src/test/java/io/druid/indexing/worker/TaskAnnouncementTest.java index ed439fc9486..4fdf3b45dee 100644 --- a/indexing-service/src/test/java/com/metamx/druid/indexing/worker/TaskAnnouncementTest.java +++ b/indexing-service/src/test/java/io/druid/indexing/worker/TaskAnnouncementTest.java @@ -17,18 +17,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.indexing.worker; +package io.druid.indexing.worker; import com.fasterxml.jackson.databind.ObjectMapper; -import com.metamx.druid.indexing.common.TaskStatus; -import com.metamx.druid.indexing.common.task.RealtimeIndexTask; -import com.metamx.druid.indexing.common.task.Task; -import com.metamx.druid.indexing.common.task.TaskResource; -import com.metamx.druid.realtime.Schema; import io.druid.granularity.QueryGranularity; +import io.druid.indexing.common.TaskStatus; +import io.druid.indexing.common.task.RealtimeIndexTask; +import io.druid.indexing.common.task.Task; +import io.druid.indexing.common.task.TaskResource; import io.druid.jackson.DefaultObjectMapper; import io.druid.query.aggregation.AggregatorFactory; import io.druid.segment.IndexGranularity; +import io.druid.segment.realtime.Schema; import io.druid.server.shard.shard.NoneShardSpec; import junit.framework.Assert; import org.joda.time.Period; diff --git a/install/druid_setup.sh b/install/druid_setup.sh deleted file mode 100755 index 22dc2ad1b77..00000000000 --- a/install/druid_setup.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash -# Script to run util DruidSetup which will initialize zookeeper locations, properties, and metadata store (MySQL or similar). -# The dump cmd of DruidSetup will dump properties stored at and zpaths of zookeeper. -# Run with no args to get usage. - -which java >/dev/null -WJ=$? -if [ "${JAVA_HOME}" ]; then - RUN_JAVA=$JAVA_HOME/bin/java -elif [ $WJ -eq 0 ]; then - RUN_JAVA=java -fi - -[ -z "${RUN_JAVA}" ] && echo "env var JAVA_HOME is not defined and java not in path" && exit 1 - -DRUID_DIR=$(cd $(dirname $0)/.. ; pwd) - -DRUID_JAR="$(ls -1 $(find $DRUID_DIR -name 'druid-services*selfcontained.jar') |head -1)" -[ -z "${DRUID_JAR}" ] && echo "unable to find druid server jar" && exit 2 -echo "using ${DRUID_JAR}" -echo - -$RUN_JAVA -cp "${DRUID_JAR}" -Dlog4j.configuration=file://${DRUID_DIR}/install/log4j.xml -Duser.timezone=UTC -Dfile.encoding=UTF-8 com.metamx.druid.utils.DruidSetup $* - -[ -e ${DRUID_DIR}/install/druid_setup.log ] && egrep "WARN|ERROR|FATAL" ${DRUID_DIR}/install/druid_setup.log diff --git a/processing/src/main/java/io/druid/guice/QueryToolChestModule.java b/processing/src/main/java/io/druid/guice/QueryToolChestModule.java index 8cbc9801367..accc85fc062 100644 --- a/processing/src/main/java/io/druid/guice/QueryToolChestModule.java +++ b/processing/src/main/java/io/druid/guice/QueryToolChestModule.java @@ -24,8 +24,6 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.TypeLiteral; import com.google.inject.multibindings.MapBinder; -import io.druid.guice.guice.JsonConfigProvider; -import io.druid.guice.guice.LazySingleton; import io.druid.query.Query; import io.druid.query.QueryToolChest; import io.druid.query.groupby.GroupByQuery; diff --git a/processing/src/main/java/io/druid/jackson/JacksonModule.java b/processing/src/main/java/io/druid/jackson/JacksonModule.java index e8808ad2ada..7f6162e7927 100644 --- a/processing/src/main/java/io/druid/jackson/JacksonModule.java +++ b/processing/src/main/java/io/druid/jackson/JacksonModule.java @@ -25,9 +25,9 @@ import com.google.inject.Binder; import com.google.inject.Key; import com.google.inject.Module; import com.google.inject.Provides; -import io.druid.guice.guice.LazySingleton; -import io.druid.guice.guice.annotations.Json; -import io.druid.guice.guice.annotations.Smile; +import io.druid.guice.LazySingleton; +import io.druid.guice.annotations.Json; +import io.druid.guice.annotations.Smile; /** */ diff --git a/server/src/main/java/com/metamx/druid/query/DefaultQueryRunnerFactoryConglomerate.java b/processing/src/main/java/io/druid/query/DefaultQueryRunnerFactoryConglomerate.java similarity index 90% rename from server/src/main/java/com/metamx/druid/query/DefaultQueryRunnerFactoryConglomerate.java rename to processing/src/main/java/io/druid/query/DefaultQueryRunnerFactoryConglomerate.java index b897f7933b0..63a092df0ea 100644 --- a/server/src/main/java/com/metamx/druid/query/DefaultQueryRunnerFactoryConglomerate.java +++ b/processing/src/main/java/io/druid/query/DefaultQueryRunnerFactoryConglomerate.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,11 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query; +package io.druid.query; import com.google.inject.Inject; -import io.druid.query.Query; -import io.druid.query.QueryRunnerFactory; import java.util.Map; diff --git a/server/src/main/java/com/metamx/druid/query/QueryRunnerFactoryConglomerate.java b/processing/src/main/java/io/druid/query/QueryRunnerFactoryConglomerate.java similarity index 86% rename from server/src/main/java/com/metamx/druid/query/QueryRunnerFactoryConglomerate.java rename to processing/src/main/java/io/druid/query/QueryRunnerFactoryConglomerate.java index 2195349ca26..1e8b61d812a 100644 --- a/server/src/main/java/com/metamx/druid/query/QueryRunnerFactoryConglomerate.java +++ b/processing/src/main/java/io/druid/query/QueryRunnerFactoryConglomerate.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,10 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query; - -import io.druid.query.Query; -import io.druid.query.QueryRunnerFactory; +package io.druid.query; /** */ diff --git a/server/src/main/java/com/metamx/druid/query/QueryRunnerHelper.java b/processing/src/main/java/io/druid/query/QueryRunnerHelper.java similarity index 97% rename from server/src/main/java/com/metamx/druid/query/QueryRunnerHelper.java rename to processing/src/main/java/io/druid/query/QueryRunnerHelper.java index 688e9339262..533ccca6039 100644 --- a/server/src/main/java/com/metamx/druid/query/QueryRunnerHelper.java +++ b/processing/src/main/java/io/druid/query/QueryRunnerHelper.java @@ -17,14 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query; +package io.druid.query; import com.google.common.base.Function; import com.google.common.base.Preconditions; import com.metamx.common.guava.FunctionalIterable; import com.metamx.common.logger.Logger; import io.druid.granularity.QueryGranularity; -import io.druid.query.Result; import io.druid.query.aggregation.Aggregator; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.filter.Filter; diff --git a/server/src/main/java/com/metamx/druid/query/ReferenceCountingSegmentQueryRunner.java b/processing/src/main/java/io/druid/query/ReferenceCountingSegmentQueryRunner.java similarity index 92% rename from server/src/main/java/com/metamx/druid/query/ReferenceCountingSegmentQueryRunner.java rename to processing/src/main/java/io/druid/query/ReferenceCountingSegmentQueryRunner.java index 438fbe5f1aa..c366c287ac5 100644 --- a/server/src/main/java/com/metamx/druid/query/ReferenceCountingSegmentQueryRunner.java +++ b/processing/src/main/java/io/druid/query/ReferenceCountingSegmentQueryRunner.java @@ -17,14 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query; +package io.druid.query; import com.google.common.io.Closeables; import com.metamx.common.guava.ResourceClosingSequence; import com.metamx.common.guava.Sequence; -import io.druid.query.Query; -import io.druid.query.QueryRunner; -import io.druid.query.QueryRunnerFactory; import io.druid.segment.ReferenceCountingSegment; import java.io.Closeable; diff --git a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryEngine.java b/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java similarity index 98% rename from server/src/main/java/com/metamx/druid/query/group/GroupByQueryEngine.java rename to processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java index 23434f09d09..4e51bc9e6c9 100644 --- a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryEngine.java +++ b/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngine.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.group; +package io.druid.query.groupby; import com.google.common.base.Function; import com.google.common.base.Supplier; @@ -39,13 +39,11 @@ import io.druid.collections.ResourceHolder; import io.druid.collections.StupidPool; import io.druid.data.input.MapBasedRow; import io.druid.data.input.Row; -import io.druid.guice.guice.annotations.Global; +import io.druid.guice.annotations.Global; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.BufferAggregator; import io.druid.query.aggregation.PostAggregator; import io.druid.query.dimension.DimensionSpec; -import io.druid.query.groupby.GroupByQuery; -import io.druid.query.groupby.GroupByQueryConfig; import io.druid.segment.Cursor; import io.druid.segment.DimensionSelector; import io.druid.segment.StorageAdapter; diff --git a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryEngineConfig.java b/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngineConfig.java similarity index 92% rename from server/src/main/java/com/metamx/druid/query/group/GroupByQueryEngineConfig.java rename to processing/src/main/java/io/druid/query/groupby/GroupByQueryEngineConfig.java index 2422849d96a..fdd0dd84d37 100644 --- a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryEngineConfig.java +++ b/processing/src/main/java/io/druid/query/groupby/GroupByQueryEngineConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.group; +package io.druid.query.groupby; import org.skife.config.Config; import org.skife.config.Default; diff --git a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryRunnerFactory.java b/processing/src/main/java/io/druid/query/groupby/GroupByQueryRunnerFactory.java similarity index 96% rename from server/src/main/java/com/metamx/druid/query/group/GroupByQueryRunnerFactory.java rename to processing/src/main/java/io/druid/query/groupby/GroupByQueryRunnerFactory.java index db30b5aaaac..0cee492a70b 100644 --- a/server/src/main/java/com/metamx/druid/query/group/GroupByQueryRunnerFactory.java +++ b/processing/src/main/java/io/druid/query/groupby/GroupByQueryRunnerFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.group; +package io.druid.query.groupby; import com.google.common.base.Function; import com.google.common.base.Supplier; @@ -36,9 +36,6 @@ import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; import io.druid.query.QueryToolChest; -import io.druid.query.groupby.GroupByQuery; -import io.druid.query.groupby.GroupByQueryConfig; -import io.druid.query.groupby.GroupByQueryQueryToolChest; import io.druid.segment.Segment; import io.druid.segment.StorageAdapter; diff --git a/server/src/main/java/com/metamx/druid/query/metadata/SegmentAnalyzer.java b/processing/src/main/java/io/druid/query/metadata/SegmentAnalyzer.java similarity index 99% rename from server/src/main/java/com/metamx/druid/query/metadata/SegmentAnalyzer.java rename to processing/src/main/java/io/druid/query/metadata/SegmentAnalyzer.java index e84eebf22c1..9f5c8d19527 100644 --- a/server/src/main/java/com/metamx/druid/query/metadata/SegmentAnalyzer.java +++ b/processing/src/main/java/io/druid/query/metadata/SegmentAnalyzer.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.metadata; +package io.druid.query.metadata; import com.google.common.base.Charsets; import com.google.common.base.Function; diff --git a/server/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQueryRunnerFactory.java b/processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryRunnerFactory.java similarity index 98% rename from server/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQueryRunnerFactory.java rename to processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryRunnerFactory.java index 5b87c9bf3ee..d600b2b4499 100644 --- a/server/src/main/java/com/metamx/druid/query/metadata/SegmentMetadataQueryRunnerFactory.java +++ b/processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryRunnerFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.metadata; +package io.druid.query.metadata; import com.google.common.base.Function; import com.google.common.base.Throwables; @@ -30,7 +30,6 @@ import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; import io.druid.query.QueryToolChest; -import io.druid.query.metadata.SegmentMetadataQueryQueryToolChest; import io.druid.query.metadata.metadata.ColumnAnalysis; import io.druid.query.metadata.metadata.ColumnIncluderator; import io.druid.query.metadata.metadata.SegmentAnalysis; diff --git a/server/src/main/java/com/metamx/druid/query/search/SearchQueryRunner.java b/processing/src/main/java/io/druid/query/search/SearchQueryRunner.java similarity index 98% rename from server/src/main/java/com/metamx/druid/query/search/SearchQueryRunner.java rename to processing/src/main/java/io/druid/query/search/SearchQueryRunner.java index ae0e17e7628..7217db24c40 100644 --- a/server/src/main/java/com/metamx/druid/query/search/SearchQueryRunner.java +++ b/processing/src/main/java/io/druid/query/search/SearchQueryRunner.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.search; +package io.druid.query.search; import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; @@ -34,7 +34,6 @@ import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.query.Result; import io.druid.query.filter.Filter; -import io.druid.query.search.SearchResultValue; import io.druid.query.search.search.SearchHit; import io.druid.query.search.search.SearchQuery; import io.druid.query.search.search.SearchQuerySpec; diff --git a/server/src/main/java/com/metamx/druid/query/search/SearchQueryRunnerFactory.java b/processing/src/main/java/io/druid/query/search/SearchQueryRunnerFactory.java similarity index 93% rename from server/src/main/java/com/metamx/druid/query/search/SearchQueryRunnerFactory.java rename to processing/src/main/java/io/druid/query/search/SearchQueryRunnerFactory.java index c9e43bbf7fd..0c0fdab980d 100644 --- a/server/src/main/java/com/metamx/druid/query/search/SearchQueryRunnerFactory.java +++ b/processing/src/main/java/io/druid/query/search/SearchQueryRunnerFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.search; +package io.druid.query.search; import com.google.inject.Inject; import io.druid.query.ChainedExecutionQueryRunner; @@ -25,8 +25,6 @@ import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; import io.druid.query.QueryToolChest; import io.druid.query.Result; -import io.druid.query.search.SearchQueryQueryToolChest; -import io.druid.query.search.SearchResultValue; import io.druid.query.search.search.SearchQuery; import io.druid.segment.Segment; diff --git a/server/src/main/java/com/metamx/druid/query/timeboundary/TimeBoundaryQueryRunnerFactory.java b/processing/src/main/java/io/druid/query/timeboundary/TimeBoundaryQueryRunnerFactory.java similarity index 93% rename from server/src/main/java/com/metamx/druid/query/timeboundary/TimeBoundaryQueryRunnerFactory.java rename to processing/src/main/java/io/druid/query/timeboundary/TimeBoundaryQueryRunnerFactory.java index a9a8df88ec1..cd732de18e4 100644 --- a/server/src/main/java/com/metamx/druid/query/timeboundary/TimeBoundaryQueryRunnerFactory.java +++ b/processing/src/main/java/io/druid/query/timeboundary/TimeBoundaryQueryRunnerFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.timeboundary; +package io.druid.query.timeboundary; import com.metamx.common.ISE; import com.metamx.common.guava.BaseSequence; @@ -28,9 +28,6 @@ import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; import io.druid.query.QueryToolChest; import io.druid.query.Result; -import io.druid.query.timeboundary.TimeBoundaryQuery; -import io.druid.query.timeboundary.TimeBoundaryQueryQueryToolChest; -import io.druid.query.timeboundary.TimeBoundaryResultValue; import io.druid.segment.Segment; import io.druid.segment.StorageAdapter; diff --git a/server/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryEngine.java b/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryEngine.java similarity index 92% rename from server/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryEngine.java rename to processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryEngine.java index e80a687a538..b57105aa654 100644 --- a/server/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryEngine.java +++ b/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryEngine.java @@ -17,19 +17,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.timeseries; +package io.druid.query.timeseries; import com.google.common.base.Function; import com.metamx.common.guava.BaseSequence; import com.metamx.common.guava.Sequence; -import com.metamx.druid.TimeseriesResultBuilder; -import com.metamx.druid.query.QueryRunnerHelper; +import io.druid.query.QueryRunnerHelper; import io.druid.query.Result; import io.druid.query.aggregation.Aggregator; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.PostAggregator; -import io.druid.query.timeseries.TimeseriesQuery; -import io.druid.query.timeseries.TimeseriesResultValue; import io.druid.segment.Cursor; import io.druid.segment.StorageAdapter; import io.druid.segment.filter.Filters; @@ -84,7 +81,7 @@ public class TimeseriesQueryEngine Result retVal = bob.build(); // cleanup - for(Aggregator agg : aggregators) { + for (Aggregator agg : aggregators) { agg.close(); } diff --git a/server/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryRunnerFactory.java b/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryRunnerFactory.java similarity index 92% rename from server/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryRunnerFactory.java rename to processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryRunnerFactory.java index 082dba2a2c3..8cd4f2aa1c0 100644 --- a/server/src/main/java/com/metamx/druid/query/timeseries/TimeseriesQueryRunnerFactory.java +++ b/processing/src/main/java/io/druid/query/timeseries/TimeseriesQueryRunnerFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.timeseries; +package io.druid.query.timeseries; import com.metamx.common.ISE; import com.metamx.common.guava.Sequence; @@ -27,9 +27,6 @@ import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; import io.druid.query.QueryToolChest; import io.druid.query.Result; -import io.druid.query.timeseries.TimeseriesQuery; -import io.druid.query.timeseries.TimeseriesQueryQueryToolChest; -import io.druid.query.timeseries.TimeseriesResultValue; import io.druid.segment.Segment; import io.druid.segment.StorageAdapter; diff --git a/server/src/main/java/com/metamx/druid/TimeseriesResultBuilder.java b/processing/src/main/java/io/druid/query/timeseries/TimeseriesResultBuilder.java similarity index 95% rename from server/src/main/java/com/metamx/druid/TimeseriesResultBuilder.java rename to processing/src/main/java/io/druid/query/timeseries/TimeseriesResultBuilder.java index f67c1d3973c..3df014deeec 100644 --- a/server/src/main/java/com/metamx/druid/TimeseriesResultBuilder.java +++ b/processing/src/main/java/io/druid/query/timeseries/TimeseriesResultBuilder.java @@ -17,12 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid; +package io.druid.query.timeseries; import io.druid.query.Result; import io.druid.query.aggregation.Aggregator; import io.druid.query.aggregation.PostAggregator; -import io.druid.query.timeseries.TimeseriesResultValue; import org.joda.time.DateTime; import java.util.HashMap; diff --git a/server/src/test/java/com/metamx/druid/query/NoopQueryRunnerFactoryConglomerate.java b/processing/src/test/java/io/druid/query/NoopQueryRunnerFactoryConglomerate.java similarity index 87% rename from server/src/test/java/com/metamx/druid/query/NoopQueryRunnerFactoryConglomerate.java rename to processing/src/test/java/io/druid/query/NoopQueryRunnerFactoryConglomerate.java index 00fd36c6498..e3854b8ca4f 100644 --- a/server/src/test/java/com/metamx/druid/query/NoopQueryRunnerFactoryConglomerate.java +++ b/processing/src/test/java/io/druid/query/NoopQueryRunnerFactoryConglomerate.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,10 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query; - -import io.druid.query.Query; -import io.druid.query.QueryRunnerFactory; +package io.druid.query; /** */ diff --git a/server/src/test/java/com/metamx/druid/query/QueryRunnerTestHelper.java b/processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java similarity index 96% rename from server/src/test/java/com/metamx/druid/query/QueryRunnerTestHelper.java rename to processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java index d70f875ff7e..58c1e97034c 100644 --- a/server/src/test/java/com/metamx/druid/query/QueryRunnerTestHelper.java +++ b/processing/src/test/java/io/druid/query/QueryRunnerTestHelper.java @@ -17,15 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query; +package io.druid.query; import com.google.common.collect.Lists; -import com.metamx.druid.index.v1.TestIndex; import io.druid.granularity.QueryGranularity; -import io.druid.query.FinalizeResultsQueryRunner; -import io.druid.query.Query; -import io.druid.query.QueryRunner; -import io.druid.query.QueryRunnerFactory; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; import io.druid.query.aggregation.DoubleSumAggregatorFactory; @@ -39,6 +34,7 @@ import io.druid.segment.IncrementalIndexSegment; import io.druid.segment.QueryableIndex; import io.druid.segment.QueryableIndexSegment; import io.druid.segment.Segment; +import io.druid.segment.TestIndex; import io.druid.segment.incremental.IncrementalIndex; import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/server/src/test/java/com/metamx/druid/query/group/GroupByQueryRunnerTest.java b/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java similarity index 99% rename from server/src/test/java/com/metamx/druid/query/group/GroupByQueryRunnerTest.java rename to processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java index 32058036db5..e1556e94da7 100644 --- a/server/src/test/java/com/metamx/druid/query/group/GroupByQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/groupby/GroupByQueryRunnerTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.group; +package io.druid.query.groupby; import com.google.common.base.Function; import com.google.common.base.Preconditions; @@ -30,8 +30,6 @@ import com.google.common.collect.Maps; import com.google.common.collect.Ordering; import com.metamx.common.guava.Sequence; import com.metamx.common.guava.Sequences; -import com.metamx.druid.TestHelper; -import com.metamx.druid.query.QueryRunnerTestHelper; import io.druid.collections.StupidPool; import io.druid.data.input.MapBasedRow; import io.druid.data.input.Row; @@ -39,15 +37,13 @@ import io.druid.granularity.PeriodGranularity; import io.druid.granularity.QueryGranularity; import io.druid.query.Query; import io.druid.query.QueryRunner; +import io.druid.query.QueryRunnerTestHelper; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.DoubleSumAggregatorFactory; import io.druid.query.aggregation.LongSumAggregatorFactory; import io.druid.query.dimension.DefaultDimensionSpec; import io.druid.query.dimension.DimensionSpec; import io.druid.query.filter.RegexDimFilter; -import io.druid.query.groupby.GroupByQuery; -import io.druid.query.groupby.GroupByQueryConfig; -import io.druid.query.groupby.GroupByQueryQueryToolChest; import io.druid.query.groupby.having.EqualToHavingSpec; import io.druid.query.groupby.having.GreaterThanHavingSpec; import io.druid.query.groupby.having.OrHavingSpec; @@ -55,6 +51,7 @@ import io.druid.query.groupby.orderby.DefaultLimitSpec; import io.druid.query.groupby.orderby.LimitSpec; import io.druid.query.groupby.orderby.OrderByColumnSpec; import io.druid.query.spec.MultipleIntervalSegmentSpec; +import io.druid.segment.TestHelper; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.Interval; diff --git a/server/src/test/java/com/metamx/druid/query/group/GroupByTimeseriesQueryRunnerTest.java b/processing/src/test/java/io/druid/query/groupby/GroupByTimeseriesQueryRunnerTest.java similarity index 94% rename from server/src/test/java/com/metamx/druid/query/group/GroupByTimeseriesQueryRunnerTest.java rename to processing/src/test/java/io/druid/query/groupby/GroupByTimeseriesQueryRunnerTest.java index da3a1438d7e..562527556a9 100644 --- a/server/src/test/java/com/metamx/druid/query/group/GroupByTimeseriesQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/groupby/GroupByTimeseriesQueryRunnerTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.group; +package io.druid.query.groupby; import com.google.common.base.Function; import com.google.common.base.Preconditions; @@ -25,18 +25,15 @@ import com.google.common.base.Supplier; import com.google.common.base.Suppliers; import com.metamx.common.guava.Sequence; import com.metamx.common.guava.Sequences; -import com.metamx.druid.query.QueryRunnerTestHelper; -import com.metamx.druid.query.timeseries.TimeseriesQueryRunnerTest; import io.druid.collections.StupidPool; import io.druid.data.input.MapBasedRow; import io.druid.data.input.Row; import io.druid.query.Query; import io.druid.query.QueryRunner; +import io.druid.query.QueryRunnerTestHelper; import io.druid.query.Result; -import io.druid.query.groupby.GroupByQuery; -import io.druid.query.groupby.GroupByQueryConfig; -import io.druid.query.groupby.GroupByQueryQueryToolChest; import io.druid.query.timeseries.TimeseriesQuery; +import io.druid.query.timeseries.TimeseriesQueryRunnerTest; import io.druid.query.timeseries.TimeseriesResultValue; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; diff --git a/server/src/test/java/com/metamx/druid/query/metadata/SegmentAnalyzerTest.java b/processing/src/test/java/io/druid/query/metadata/SegmentAnalyzerTest.java similarity index 96% rename from server/src/test/java/com/metamx/druid/query/metadata/SegmentAnalyzerTest.java rename to processing/src/test/java/io/druid/query/metadata/SegmentAnalyzerTest.java index 2125f9e5b8e..55ed5887480 100644 --- a/server/src/test/java/com/metamx/druid/query/metadata/SegmentAnalyzerTest.java +++ b/processing/src/test/java/io/druid/query/metadata/SegmentAnalyzerTest.java @@ -17,14 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.metadata; +package io.druid.query.metadata; import com.google.common.collect.Lists; import com.metamx.common.guava.Sequences; -import com.metamx.druid.index.v1.TestIndex; -import com.metamx.druid.query.QueryRunnerTestHelper; import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; +import io.druid.query.QueryRunnerTestHelper; import io.druid.query.metadata.metadata.ColumnAnalysis; import io.druid.query.metadata.metadata.SegmentAnalysis; import io.druid.query.metadata.metadata.SegmentMetadataQuery; @@ -32,6 +31,7 @@ import io.druid.query.spec.QuerySegmentSpecs; import io.druid.segment.IncrementalIndexSegment; import io.druid.segment.QueryableIndexSegment; import io.druid.segment.Segment; +import io.druid.segment.TestIndex; import io.druid.segment.column.ValueType; import junit.framework.Assert; import org.junit.Test; diff --git a/server/src/test/java/com/metamx/druid/query/search/SearchQueryRunnerTest.java b/processing/src/test/java/io/druid/query/search/SearchQueryRunnerTest.java similarity index 98% rename from server/src/test/java/com/metamx/druid/query/search/SearchQueryRunnerTest.java rename to processing/src/test/java/io/druid/query/search/SearchQueryRunnerTest.java index 11adc434cc1..2e5623b4365 100644 --- a/server/src/test/java/com/metamx/druid/query/search/SearchQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/search/SearchQueryRunnerTest.java @@ -17,20 +17,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.search; +package io.druid.query.search; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.metamx.common.guava.Sequences; -import com.metamx.druid.query.QueryRunnerTestHelper; import io.druid.query.Druids; import io.druid.query.QueryRunner; +import io.druid.query.QueryRunnerTestHelper; import io.druid.query.Result; import io.druid.query.filter.DimFilter; -import io.druid.query.search.SearchQueryQueryToolChest; -import io.druid.query.search.SearchResultValue; import io.druid.query.search.search.FragmentSearchQuerySpec; import io.druid.query.search.search.SearchHit; import io.druid.query.search.search.SearchQuery; diff --git a/server/src/test/java/com/metamx/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java b/processing/src/test/java/io/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java similarity index 91% rename from server/src/test/java/com/metamx/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java rename to processing/src/test/java/io/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java index 03813081630..9b92826ac34 100644 --- a/server/src/test/java/com/metamx/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/timeboundary/TimeBoundaryQueryRunnerTest.java @@ -17,16 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.timeboundary; +package io.druid.query.timeboundary; import com.google.common.collect.Lists; import com.metamx.common.guava.Sequences; -import com.metamx.druid.query.QueryRunnerTestHelper; import io.druid.query.Druids; import io.druid.query.QueryRunner; +import io.druid.query.QueryRunnerTestHelper; import io.druid.query.Result; -import io.druid.query.timeboundary.TimeBoundaryQuery; -import io.druid.query.timeboundary.TimeBoundaryResultValue; import org.joda.time.DateTime; import org.junit.Assert; import org.junit.Test; diff --git a/server/src/test/java/com/metamx/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java similarity index 96% rename from server/src/test/java/com/metamx/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java rename to processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java index 841f0a7c744..1be909b1c68 100644 --- a/server/src/test/java/com/metamx/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java +++ b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerBonusTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.timeseries; +package io.druid.query.timeseries; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -33,8 +33,6 @@ import io.druid.query.QueryRunnerFactory; import io.druid.query.Result; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; -import io.druid.query.timeseries.TimeseriesQuery; -import io.druid.query.timeseries.TimeseriesResultValue; import io.druid.segment.IncrementalIndexSegment; import io.druid.segment.Segment; import io.druid.segment.incremental.IncrementalIndex; diff --git a/server/src/test/java/com/metamx/druid/query/timeseries/TimeseriesQueryRunnerTest.java b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java similarity index 99% rename from server/src/test/java/com/metamx/druid/query/timeseries/TimeseriesQueryRunnerTest.java rename to processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java index 2781ac2fa58..e825c306b02 100644 --- a/server/src/test/java/com/metamx/druid/query/timeseries/TimeseriesQueryRunnerTest.java +++ b/processing/src/test/java/io/druid/query/timeseries/TimeseriesQueryRunnerTest.java @@ -17,17 +17,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.query.timeseries; +package io.druid.query.timeseries; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.metamx.common.guava.Sequences; -import com.metamx.druid.TestHelper; -import com.metamx.druid.query.QueryRunnerTestHelper; import io.druid.granularity.PeriodGranularity; import io.druid.granularity.QueryGranularity; import io.druid.query.Druids; import io.druid.query.QueryRunner; +import io.druid.query.QueryRunnerTestHelper; import io.druid.query.Result; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.LongSumAggregatorFactory; @@ -38,8 +37,7 @@ import io.druid.query.filter.AndDimFilter; import io.druid.query.filter.DimFilter; import io.druid.query.filter.RegexDimFilter; import io.druid.query.spec.MultipleIntervalSegmentSpec; -import io.druid.query.timeseries.TimeseriesQuery; -import io.druid.query.timeseries.TimeseriesResultValue; +import io.druid.segment.TestHelper; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.Interval; diff --git a/server/src/test/java/com/metamx/druid/index/v1/ConciseOffsetTest.java b/processing/src/test/java/io/druid/segment/ConciseOffsetTest.java similarity index 96% rename from server/src/test/java/com/metamx/druid/index/v1/ConciseOffsetTest.java rename to processing/src/test/java/io/druid/segment/ConciseOffsetTest.java index 0452bf3be91..4e2a2085c82 100644 --- a/server/src/test/java/com/metamx/druid/index/v1/ConciseOffsetTest.java +++ b/processing/src/test/java/io/druid/segment/ConciseOffsetTest.java @@ -17,9 +17,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.index.v1; +package io.druid.segment; -import io.druid.segment.ConciseOffset; import io.druid.segment.data.Offset; import it.uniroma3.mat.extendedset.intset.ConciseSet; import it.uniroma3.mat.extendedset.intset.ImmutableConciseSet; diff --git a/server/src/test/java/com/metamx/druid/index/v1/EmptyIndexTest.java b/processing/src/test/java/io/druid/segment/EmptyIndexTest.java similarity index 92% rename from server/src/test/java/com/metamx/druid/index/v1/EmptyIndexTest.java rename to processing/src/test/java/io/druid/segment/EmptyIndexTest.java index ea412309df6..d4e835566a9 100644 --- a/server/src/test/java/com/metamx/druid/index/v1/EmptyIndexTest.java +++ b/processing/src/test/java/io/druid/segment/EmptyIndexTest.java @@ -17,16 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.index.v1; +package io.druid.segment; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import io.druid.granularity.QueryGranularity; import io.druid.query.aggregation.AggregatorFactory; -import io.druid.segment.IndexIO; -import io.druid.segment.IndexMerger; -import io.druid.segment.IndexableAdapter; -import io.druid.segment.QueryableIndex; import io.druid.segment.incremental.IncrementalIndex; import io.druid.segment.incremental.IncrementalIndexAdapter; import org.joda.time.Interval; diff --git a/server/src/test/java/com/metamx/druid/index/v1/IndexMergerTest.java b/processing/src/test/java/io/druid/segment/IndexMergerTest.java similarity index 97% rename from server/src/test/java/com/metamx/druid/index/v1/IndexMergerTest.java rename to processing/src/test/java/io/druid/segment/IndexMergerTest.java index aebf048913b..a21eb92c718 100644 --- a/server/src/test/java/com/metamx/druid/index/v1/IndexMergerTest.java +++ b/processing/src/test/java/io/druid/segment/IndexMergerTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.index.v1; +package io.druid.segment; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -26,9 +26,6 @@ import com.google.common.io.Files; import io.druid.data.input.MapBasedInputRow; import io.druid.granularity.QueryGranularity; import io.druid.query.aggregation.AggregatorFactory; -import io.druid.segment.IndexIO; -import io.druid.segment.IndexMerger; -import io.druid.segment.QueryableIndex; import io.druid.segment.data.IncrementalIndexTest; import io.druid.segment.incremental.IncrementalIndex; import junit.framework.Assert; diff --git a/server/src/test/java/com/metamx/druid/index/ReferenceCountingSegmentTest.java b/processing/src/test/java/io/druid/segment/ReferenceCountingSegmentTest.java similarity index 94% rename from server/src/test/java/com/metamx/druid/index/ReferenceCountingSegmentTest.java rename to processing/src/test/java/io/druid/segment/ReferenceCountingSegmentTest.java index ff687a84348..a9e1b629829 100644 --- a/server/src/test/java/com/metamx/druid/index/ReferenceCountingSegmentTest.java +++ b/processing/src/test/java/io/druid/segment/ReferenceCountingSegmentTest.java @@ -17,13 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.index; +package io.druid.segment; import com.google.common.base.Throwables; -import io.druid.segment.QueryableIndex; -import io.druid.segment.ReferenceCountingSegment; -import io.druid.segment.Segment; -import io.druid.segment.StorageAdapter; import junit.framework.Assert; import org.joda.time.DateTime; import org.joda.time.Days; diff --git a/server/src/test/java/com/metamx/druid/TestHelper.java b/processing/src/test/java/io/druid/segment/TestHelper.java similarity index 99% rename from server/src/test/java/com/metamx/druid/TestHelper.java rename to processing/src/test/java/io/druid/segment/TestHelper.java index 7ad40f59ed7..a1fab7efecb 100644 --- a/server/src/test/java/com/metamx/druid/TestHelper.java +++ b/processing/src/test/java/io/druid/segment/TestHelper.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid; +package io.druid.segment; import com.google.common.collect.Lists; import com.metamx.common.guava.Sequence; diff --git a/server/src/test/java/com/metamx/druid/index/v1/TestIndex.java b/processing/src/test/java/io/druid/segment/TestIndex.java similarity index 97% rename from server/src/test/java/com/metamx/druid/index/v1/TestIndex.java rename to processing/src/test/java/io/druid/segment/TestIndex.java index f72c3f43835..8b13c6ce9e8 100644 --- a/server/src/test/java/com/metamx/druid/index/v1/TestIndex.java +++ b/processing/src/test/java/io/druid/segment/TestIndex.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.index.v1; +package io.druid.segment; import com.google.common.base.Charsets; import com.google.common.base.Throwables; @@ -31,9 +31,6 @@ import io.druid.data.input.TimestampSpec; import io.druid.granularity.QueryGranularity; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.DoubleSumAggregatorFactory; -import io.druid.segment.IndexIO; -import io.druid.segment.IndexMerger; -import io.druid.segment.QueryableIndex; import io.druid.segment.incremental.IncrementalIndex; import org.joda.time.DateTime; import org.joda.time.Interval; diff --git a/server/src/test/java/com/metamx/druid/index/v1/processing/IntersectingOffsetTest.java b/processing/src/test/java/io/druid/segment/data/IntersectingOffsetTest.java similarity index 94% rename from server/src/test/java/com/metamx/druid/index/v1/processing/IntersectingOffsetTest.java rename to processing/src/test/java/io/druid/segment/data/IntersectingOffsetTest.java index 0001c610ab3..53d8c3bbe79 100644 --- a/server/src/test/java/com/metamx/druid/index/v1/processing/IntersectingOffsetTest.java +++ b/processing/src/test/java/io/druid/segment/data/IntersectingOffsetTest.java @@ -17,12 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.index.v1.processing; +package io.druid.segment.data; import com.google.common.collect.Lists; -import io.druid.segment.data.ArrayBasedOffset; -import io.druid.segment.data.IntersectingOffset; -import io.druid.segment.data.Offset; import org.junit.Assert; import org.junit.Test; diff --git a/server/src/test/java/com/metamx/druid/index/v1/processing/UnioningOffsetTest.java b/processing/src/test/java/io/druid/segment/data/UnioningOffsetTest.java similarity index 95% rename from server/src/test/java/com/metamx/druid/index/v1/processing/UnioningOffsetTest.java rename to processing/src/test/java/io/druid/segment/data/UnioningOffsetTest.java index a3dc59aaab0..6581aceff9b 100644 --- a/server/src/test/java/com/metamx/druid/index/v1/processing/UnioningOffsetTest.java +++ b/processing/src/test/java/io/druid/segment/data/UnioningOffsetTest.java @@ -17,12 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.index.v1.processing; +package io.druid.segment.data; import com.google.common.collect.Lists; -import io.druid.segment.data.ArrayBasedOffset; -import io.druid.segment.data.Offset; -import io.druid.segment.data.UnioningOffset; import org.junit.Assert; import org.junit.Test; diff --git a/server/src/test/java/com/metamx/druid/index/brita/SpatialFilterBonusTest.java b/processing/src/test/java/io/druid/segment/filter/SpatialFilterBonusTest.java similarity index 99% rename from server/src/test/java/com/metamx/druid/index/brita/SpatialFilterBonusTest.java rename to processing/src/test/java/io/druid/segment/filter/SpatialFilterBonusTest.java index fecedf49b3d..1f8e4afe8e2 100644 --- a/server/src/test/java/com/metamx/druid/index/brita/SpatialFilterBonusTest.java +++ b/processing/src/test/java/io/druid/segment/filter/SpatialFilterBonusTest.java @@ -17,15 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.index.brita; +package io.druid.segment.filter; import com.google.common.base.Throwables; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.metamx.collections.spatial.search.RadiusBound; import com.metamx.collections.spatial.search.RectangularBound; -import com.metamx.druid.TestHelper; -import com.metamx.druid.query.timeseries.TimeseriesQueryRunnerFactory; import io.druid.data.input.MapBasedInputRow; import io.druid.granularity.QueryGranularity; import io.druid.query.Druids; @@ -37,6 +35,7 @@ import io.druid.query.aggregation.CountAggregatorFactory; import io.druid.query.aggregation.LongSumAggregatorFactory; import io.druid.query.filter.SpatialDimFilter; import io.druid.query.timeseries.TimeseriesQuery; +import io.druid.query.timeseries.TimeseriesQueryRunnerFactory; import io.druid.query.timeseries.TimeseriesResultValue; import io.druid.segment.IncrementalIndexSegment; import io.druid.segment.IndexIO; @@ -44,6 +43,7 @@ import io.druid.segment.IndexMerger; import io.druid.segment.QueryableIndex; import io.druid.segment.QueryableIndexSegment; import io.druid.segment.Segment; +import io.druid.segment.TestHelper; import io.druid.segment.incremental.IncrementalIndex; import io.druid.segment.incremental.IncrementalIndexSchema; import io.druid.segment.incremental.SpatialDimensionSchema; diff --git a/server/src/test/java/com/metamx/druid/index/brita/SpatialFilterTest.java b/processing/src/test/java/io/druid/segment/filter/SpatialFilterTest.java similarity index 99% rename from server/src/test/java/com/metamx/druid/index/brita/SpatialFilterTest.java rename to processing/src/test/java/io/druid/segment/filter/SpatialFilterTest.java index bed94e3e3c4..d319baad108 100644 --- a/server/src/test/java/com/metamx/druid/index/brita/SpatialFilterTest.java +++ b/processing/src/test/java/io/druid/segment/filter/SpatialFilterTest.java @@ -17,15 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.index.brita; +package io.druid.segment.filter; import com.google.common.base.Throwables; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.metamx.collections.spatial.search.RadiusBound; import com.metamx.collections.spatial.search.RectangularBound; -import com.metamx.druid.TestHelper; -import com.metamx.druid.query.timeseries.TimeseriesQueryRunnerFactory; import io.druid.data.input.MapBasedInputRow; import io.druid.granularity.QueryGranularity; import io.druid.query.Druids; @@ -37,6 +35,7 @@ import io.druid.query.aggregation.CountAggregatorFactory; import io.druid.query.aggregation.LongSumAggregatorFactory; import io.druid.query.filter.SpatialDimFilter; import io.druid.query.timeseries.TimeseriesQuery; +import io.druid.query.timeseries.TimeseriesQueryRunnerFactory; import io.druid.query.timeseries.TimeseriesResultValue; import io.druid.segment.IncrementalIndexSegment; import io.druid.segment.IndexIO; @@ -44,6 +43,7 @@ import io.druid.segment.IndexMerger; import io.druid.segment.QueryableIndex; import io.druid.segment.QueryableIndexSegment; import io.druid.segment.Segment; +import io.druid.segment.TestHelper; import io.druid.segment.incremental.IncrementalIndex; import io.druid.segment.incremental.IncrementalIndexSchema; import io.druid.segment.incremental.SpatialDimensionSchema; diff --git a/processing/src/test/resources/ProtoTest.proto b/processing/src/test/resources/ProtoTest.proto index c7822f9ff1b..956db5259ac 100644 --- a/processing/src/test/resources/ProtoTest.proto +++ b/processing/src/test/resources/ProtoTest.proto @@ -1,6 +1,6 @@ package prototest; -option java_package = "com.metamx.druid.indexer.data"; +option java_package = "io.druid.indexer.data"; option java_outer_classname = "ProtoTestEventWrapper"; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/RejectionPolicyFactory.java b/realtime/src/main/java/com/metamx/druid/realtime/plumber/RejectionPolicyFactory.java deleted file mode 100644 index b47b5c11eac..00000000000 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/RejectionPolicyFactory.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.metamx.druid.realtime.plumber; - -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import org.joda.time.Period; - -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") -@JsonSubTypes(value = { - @JsonSubTypes.Type(name = "serverTime", value = ServerTimeRejectionPolicyFactory.class), - @JsonSubTypes.Type(name = "messageTime", value = MessageTimeRejectionPolicyFactory.class), - @JsonSubTypes.Type(name = "none", value = NoopRejectionPolicyFactory.class) -}) -public interface RejectionPolicyFactory -{ - public RejectionPolicy create(Period windowPeriod); -} diff --git a/realtime/src/main/java/io/druid/guice/guice/DbSegmentPublisherProvider.java b/realtime/src/main/java/io/druid/guice/DbSegmentPublisherProvider.java similarity index 91% rename from realtime/src/main/java/io/druid/guice/guice/DbSegmentPublisherProvider.java rename to realtime/src/main/java/io/druid/guice/DbSegmentPublisherProvider.java index ca9c76b8db6..37a02fd0069 100644 --- a/realtime/src/main/java/io/druid/guice/guice/DbSegmentPublisherProvider.java +++ b/realtime/src/main/java/io/druid/guice/DbSegmentPublisherProvider.java @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.databind.ObjectMapper; -import com.metamx.druid.realtime.DbSegmentPublisher; -import com.metamx.druid.realtime.SegmentPublisher; import io.druid.db.DbTablesConfig; +import io.druid.segment.realtime.DbSegmentPublisher; +import io.druid.segment.realtime.SegmentPublisher; import org.skife.jdbi.v2.IDBI; import javax.validation.constraints.NotNull; diff --git a/realtime/src/main/java/io/druid/guice/guice/FireDepartmentsProvider.java b/realtime/src/main/java/io/druid/guice/FireDepartmentsProvider.java similarity index 95% rename from realtime/src/main/java/io/druid/guice/guice/FireDepartmentsProvider.java rename to realtime/src/main/java/io/druid/guice/FireDepartmentsProvider.java index 798681e01a8..bce26731c5e 100644 --- a/realtime/src/main/java/io/druid/guice/guice/FireDepartmentsProvider.java +++ b/realtime/src/main/java/io/druid/guice/FireDepartmentsProvider.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -25,7 +25,7 @@ import com.google.common.base.Throwables; import com.google.common.collect.Lists; import com.google.inject.Inject; import com.google.inject.Provider; -import com.metamx.druid.realtime.FireDepartment; +import io.druid.segment.realtime.FireDepartment; import java.util.List; diff --git a/realtime/src/main/java/io/druid/guice/guice/NoopSegmentPublisherProvider.java b/realtime/src/main/java/io/druid/guice/NoopSegmentPublisherProvider.java similarity index 88% rename from realtime/src/main/java/io/druid/guice/guice/NoopSegmentPublisherProvider.java rename to realtime/src/main/java/io/druid/guice/NoopSegmentPublisherProvider.java index 6e3e0f314e2..90700be5a4d 100644 --- a/realtime/src/main/java/io/druid/guice/guice/NoopSegmentPublisherProvider.java +++ b/realtime/src/main/java/io/druid/guice/NoopSegmentPublisherProvider.java @@ -17,10 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; -import com.metamx.druid.realtime.NoopSegmentPublisher; -import com.metamx.druid.realtime.SegmentPublisher; +import io.druid.segment.realtime.NoopSegmentPublisher; +import io.druid.segment.realtime.SegmentPublisher; /** */ diff --git a/realtime/src/main/java/io/druid/guice/guice/RealtimeManagerConfig.java b/realtime/src/main/java/io/druid/guice/RealtimeManagerConfig.java similarity index 97% rename from realtime/src/main/java/io/druid/guice/guice/RealtimeManagerConfig.java rename to realtime/src/main/java/io/druid/guice/RealtimeManagerConfig.java index 6ed7082cad4..98636e8ef75 100644 --- a/realtime/src/main/java/io/druid/guice/guice/RealtimeManagerConfig.java +++ b/realtime/src/main/java/io/druid/guice/RealtimeManagerConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/realtime/src/main/java/io/druid/guice/guice/RealtimeModule.java b/realtime/src/main/java/io/druid/guice/RealtimeModule.java similarity index 90% rename from realtime/src/main/java/io/druid/guice/guice/RealtimeModule.java rename to realtime/src/main/java/io/druid/guice/RealtimeModule.java index e050f233cbd..9bdac37a89f 100644 --- a/realtime/src/main/java/io/druid/guice/guice/RealtimeModule.java +++ b/realtime/src/main/java/io/druid/guice/RealtimeModule.java @@ -17,15 +17,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.TypeLiteral; import com.metamx.common.logger.Logger; -import com.metamx.druid.realtime.FireDepartment; -import com.metamx.druid.realtime.RealtimeManager; -import com.metamx.druid.realtime.SegmentPublisher; +import io.druid.segment.realtime.FireDepartment; +import io.druid.segment.realtime.RealtimeManager; +import io.druid.segment.realtime.SegmentPublisher; import java.util.List; diff --git a/realtime/src/main/java/io/druid/guice/guice/SegmentPublisherProvider.java b/realtime/src/main/java/io/druid/guice/SegmentPublisherProvider.java similarity index 94% rename from realtime/src/main/java/io/druid/guice/guice/SegmentPublisherProvider.java rename to realtime/src/main/java/io/druid/guice/SegmentPublisherProvider.java index df803609491..567f5bf19f4 100644 --- a/realtime/src/main/java/io/druid/guice/guice/SegmentPublisherProvider.java +++ b/realtime/src/main/java/io/druid/guice/SegmentPublisherProvider.java @@ -17,12 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.google.inject.Provider; -import com.metamx.druid.realtime.SegmentPublisher; +import io.druid.segment.realtime.SegmentPublisher; /** */ diff --git a/realtime/src/main/java/com/metamx/druid/realtime/DbSegmentPublisher.java b/realtime/src/main/java/io/druid/segment/realtime/DbSegmentPublisher.java similarity index 99% rename from realtime/src/main/java/com/metamx/druid/realtime/DbSegmentPublisher.java rename to realtime/src/main/java/io/druid/segment/realtime/DbSegmentPublisher.java index 20a0bfb53d0..d388ea97219 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/DbSegmentPublisher.java +++ b/realtime/src/main/java/io/druid/segment/realtime/DbSegmentPublisher.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import com.fasterxml.jackson.databind.ObjectMapper; import com.metamx.common.logger.Logger; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/DbSegmentPublisherConfig.java b/realtime/src/main/java/io/druid/segment/realtime/DbSegmentPublisherConfig.java similarity index 91% rename from realtime/src/main/java/com/metamx/druid/realtime/DbSegmentPublisherConfig.java rename to realtime/src/main/java/io/druid/segment/realtime/DbSegmentPublisherConfig.java index dcab06ef0fd..8df3fa416c8 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/DbSegmentPublisherConfig.java +++ b/realtime/src/main/java/io/druid/segment/realtime/DbSegmentPublisherConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import org.skife.config.Config; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/FireDepartment.java b/realtime/src/main/java/io/druid/segment/realtime/FireDepartment.java similarity index 88% rename from realtime/src/main/java/com/metamx/druid/realtime/FireDepartment.java rename to realtime/src/main/java/io/druid/segment/realtime/FireDepartment.java index cc2cf2c6553..15c25039931 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/FireDepartment.java +++ b/realtime/src/main/java/io/druid/segment/realtime/FireDepartment.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,15 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.inject.Inject; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; -import com.metamx.druid.realtime.plumber.Plumber; -import com.metamx.druid.realtime.plumber.PlumberSchool; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; +import io.druid.segment.realtime.plumber.Plumber; +import io.druid.segment.realtime.plumber.PlumberSchool; import java.io.IOException; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/FireDepartmentConfig.java b/realtime/src/main/java/io/druid/segment/realtime/FireDepartmentConfig.java similarity index 95% rename from realtime/src/main/java/com/metamx/druid/realtime/FireDepartmentConfig.java rename to realtime/src/main/java/io/druid/segment/realtime/FireDepartmentConfig.java index efc0c7a598f..512cbe00cb5 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/FireDepartmentConfig.java +++ b/realtime/src/main/java/io/druid/segment/realtime/FireDepartmentConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,12 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Preconditions; - import org.joda.time.Period; /** diff --git a/realtime/src/main/java/com/metamx/druid/realtime/FireDepartmentMetrics.java b/realtime/src/main/java/io/druid/segment/realtime/FireDepartmentMetrics.java similarity index 96% rename from realtime/src/main/java/com/metamx/druid/realtime/FireDepartmentMetrics.java rename to realtime/src/main/java/io/druid/segment/realtime/FireDepartmentMetrics.java index 717b8820046..e18034dd679 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/FireDepartmentMetrics.java +++ b/realtime/src/main/java/io/druid/segment/realtime/FireDepartmentMetrics.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import java.util.concurrent.atomic.AtomicLong; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/FireHydrant.java b/realtime/src/main/java/io/druid/segment/realtime/FireHydrant.java similarity index 98% rename from realtime/src/main/java/com/metamx/druid/realtime/FireHydrant.java rename to realtime/src/main/java/io/druid/segment/realtime/FireHydrant.java index e0dcc42bc6a..d7c82dbf95b 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/FireHydrant.java +++ b/realtime/src/main/java/io/druid/segment/realtime/FireHydrant.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import io.druid.segment.IncrementalIndexSegment; import io.druid.segment.Segment; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/Indexer.java b/realtime/src/main/java/io/druid/segment/realtime/Indexer.java similarity index 96% rename from realtime/src/main/java/com/metamx/druid/realtime/Indexer.java rename to realtime/src/main/java/io/druid/segment/realtime/Indexer.java index b5734b20851..bc4260f9031 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/Indexer.java +++ b/realtime/src/main/java/io/druid/segment/realtime/Indexer.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import io.druid.data.input.InputRow; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/NoopSegmentPublisher.java b/realtime/src/main/java/io/druid/segment/realtime/NoopSegmentPublisher.java similarity index 96% rename from realtime/src/main/java/com/metamx/druid/realtime/NoopSegmentPublisher.java rename to realtime/src/main/java/io/druid/segment/realtime/NoopSegmentPublisher.java index c69da3d89d5..c1092aaaa70 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/NoopSegmentPublisher.java +++ b/realtime/src/main/java/io/druid/segment/realtime/NoopSegmentPublisher.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import io.druid.client.DataSegment; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/RealtimeCuratorDataSegmentAnnouncerConfig.java b/realtime/src/main/java/io/druid/segment/realtime/RealtimeCuratorDataSegmentAnnouncerConfig.java similarity index 90% rename from realtime/src/main/java/com/metamx/druid/realtime/RealtimeCuratorDataSegmentAnnouncerConfig.java rename to realtime/src/main/java/io/druid/segment/realtime/RealtimeCuratorDataSegmentAnnouncerConfig.java index 36c15715556..5137f6021dc 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/RealtimeCuratorDataSegmentAnnouncerConfig.java +++ b/realtime/src/main/java/io/druid/segment/realtime/RealtimeCuratorDataSegmentAnnouncerConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; /** */ diff --git a/realtime/src/main/java/com/metamx/druid/realtime/RealtimeManager.java b/realtime/src/main/java/io/druid/segment/realtime/RealtimeManager.java similarity index 97% rename from realtime/src/main/java/com/metamx/druid/realtime/RealtimeManager.java rename to realtime/src/main/java/io/druid/segment/realtime/RealtimeManager.java index 575d8f93bb9..921cfca147b 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/RealtimeManager.java +++ b/realtime/src/main/java/io/druid/segment/realtime/RealtimeManager.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import com.google.common.base.Preconditions; import com.google.common.base.Throwables; @@ -27,10 +27,6 @@ import com.google.inject.Inject; import com.metamx.common.exception.FormattedException; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.query.QueryRunnerFactoryConglomerate; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.plumber.Plumber; -import com.metamx.druid.realtime.plumber.Sink; import com.metamx.emitter.EmittingLogger; import io.druid.data.input.InputRow; import io.druid.query.FinalizeResultsQueryRunner; @@ -38,9 +34,13 @@ import io.druid.query.NoopQueryRunner; import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; +import io.druid.query.QueryRunnerFactoryConglomerate; import io.druid.query.QuerySegmentWalker; import io.druid.query.QueryToolChest; import io.druid.query.SegmentDescriptor; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.plumber.Plumber; +import io.druid.segment.realtime.plumber.Sink; import org.joda.time.DateTime; import org.joda.time.Interval; import org.joda.time.Period; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/RealtimeMetricsMonitor.java b/realtime/src/main/java/io/druid/segment/realtime/RealtimeMetricsMonitor.java similarity index 96% rename from realtime/src/main/java/com/metamx/druid/realtime/RealtimeMetricsMonitor.java rename to realtime/src/main/java/io/druid/segment/realtime/RealtimeMetricsMonitor.java index 69d1e0169fa..246654ffd8f 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/RealtimeMetricsMonitor.java +++ b/realtime/src/main/java/io/druid/segment/realtime/RealtimeMetricsMonitor.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import com.google.common.collect.Maps; import com.metamx.emitter.service.ServiceEmitter; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/S3SegmentPusher.java b/realtime/src/main/java/io/druid/segment/realtime/S3SegmentPusher.java similarity index 78% rename from realtime/src/main/java/com/metamx/druid/realtime/S3SegmentPusher.java rename to realtime/src/main/java/io/druid/segment/realtime/S3SegmentPusher.java index 007ea188b82..ce11848c462 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/S3SegmentPusher.java +++ b/realtime/src/main/java/io/druid/segment/realtime/S3SegmentPusher.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,12 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import com.fasterxml.jackson.databind.ObjectMapper; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.loading.S3DataSegmentPusherConfig; - +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.loading.S3DataSegmentPusher; +import io.druid.segment.loading.S3DataSegmentPusherConfig; import org.jets3t.service.impl.rest.httpclient.RestS3Service; /** @@ -31,7 +31,7 @@ import org.jets3t.service.impl.rest.httpclient.RestS3Service; * Exists in 0.2, can be removed from 0.3 on */ @Deprecated -public class S3SegmentPusher extends com.metamx.druid.loading.S3DataSegmentPusher implements DataSegmentPusher +public class S3SegmentPusher extends S3DataSegmentPusher implements DataSegmentPusher { public S3SegmentPusher( RestS3Service s3Client, diff --git a/realtime/src/main/java/com/metamx/druid/realtime/Schema.java b/realtime/src/main/java/io/druid/segment/realtime/Schema.java similarity index 98% rename from realtime/src/main/java/com/metamx/druid/realtime/Schema.java rename to realtime/src/main/java/io/druid/segment/realtime/Schema.java index 553bd893755..e3f4ac8b43b 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/Schema.java +++ b/realtime/src/main/java/io/druid/segment/realtime/Schema.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/SegmentPublisher.java b/realtime/src/main/java/io/druid/segment/realtime/SegmentPublisher.java similarity index 96% rename from realtime/src/main/java/com/metamx/druid/realtime/SegmentPublisher.java rename to realtime/src/main/java/io/druid/segment/realtime/SegmentPublisher.java index add40dc4784..e01cfc37708 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/SegmentPublisher.java +++ b/realtime/src/main/java/io/druid/segment/realtime/SegmentPublisher.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import io.druid.client.DataSegment; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/ClippedFirehoseFactory.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/ClippedFirehoseFactory.java similarity index 97% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/ClippedFirehoseFactory.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/ClippedFirehoseFactory.java index fccdbd7b328..80f32903dbf 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/ClippedFirehoseFactory.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/ClippedFirehoseFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.firehose; +package io.druid.segment.realtime.firehose; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/Firehose.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/Firehose.java similarity index 98% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/Firehose.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/Firehose.java index 7bcaee8aa85..a141179520a 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/Firehose.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/Firehose.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.firehose; +package io.druid.segment.realtime.firehose; import io.druid.data.input.InputRow; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/FirehoseFactory.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/FirehoseFactory.java similarity index 95% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/FirehoseFactory.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/FirehoseFactory.java index 937947bfb34..0c07b205e29 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/FirehoseFactory.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/FirehoseFactory.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.firehose; +package io.druid.segment.realtime.firehose; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/IrcDecoder.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/IrcDecoder.java similarity index 96% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/IrcDecoder.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/IrcDecoder.java index f3423c22ab8..73872162199 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/IrcDecoder.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/IrcDecoder.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.firehose; +package io.druid.segment.realtime.firehose; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/IrcFirehoseFactory.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/IrcFirehoseFactory.java similarity index 99% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/IrcFirehoseFactory.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/IrcFirehoseFactory.java index b9595af5677..bbd25f00024 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/IrcFirehoseFactory.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/IrcFirehoseFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.firehose; +package io.druid.segment.realtime.firehose; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/JacksonifiedConnectionFactory.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/JacksonifiedConnectionFactory.java similarity index 76% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/JacksonifiedConnectionFactory.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/JacksonifiedConnectionFactory.java index b304191faf4..03f35cf48f7 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/JacksonifiedConnectionFactory.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/JacksonifiedConnectionFactory.java @@ -1,4 +1,23 @@ -package com.metamx.druid.realtime.firehose; +/* + * 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.segment.realtime.firehose; import com.fasterxml.jackson.annotation.JsonProperty; import com.rabbitmq.client.ConnectionFactory; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/KafkaFirehoseFactory.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/KafkaFirehoseFactory.java similarity index 98% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/KafkaFirehoseFactory.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/KafkaFirehoseFactory.java index 7afb84f22c6..e6d87845a2f 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/KafkaFirehoseFactory.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/KafkaFirehoseFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.firehose; +package io.druid.segment.realtime.firehose; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/PredicateFirehose.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/PredicateFirehose.java similarity index 97% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/PredicateFirehose.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/PredicateFirehose.java index b3b71551edd..4720e6167c0 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/PredicateFirehose.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/PredicateFirehose.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.firehose; +package io.druid.segment.realtime.firehose; import com.google.common.base.Predicate; import io.druid.data.input.InputRow; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/RabbitMQFirehoseConfig.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/RabbitMQFirehoseConfig.java similarity index 60% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/RabbitMQFirehoseConfig.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/RabbitMQFirehoseConfig.java index 85584edc41d..42e10dd601b 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/RabbitMQFirehoseConfig.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/RabbitMQFirehoseConfig.java @@ -1,4 +1,23 @@ -package com.metamx.druid.realtime.firehose; +/* + * 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.segment.realtime.firehose; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/RabbitMQFirehoseFactory.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/RabbitMQFirehoseFactory.java similarity index 99% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/RabbitMQFirehoseFactory.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/RabbitMQFirehoseFactory.java index d11fcfd8fd6..d7dad7d22ea 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/RabbitMQFirehoseFactory.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/RabbitMQFirehoseFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.firehose; +package io.druid.segment.realtime.firehose; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/TimedShutoffFirehoseFactory.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/TimedShutoffFirehoseFactory.java similarity index 98% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/TimedShutoffFirehoseFactory.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/TimedShutoffFirehoseFactory.java index 0ecf05ee2f5..2e79d3ed7bc 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/TimedShutoffFirehoseFactory.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/TimedShutoffFirehoseFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.firehose; +package io.druid.segment.realtime.firehose; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/firehose/WikipediaIrcDecoder.java b/realtime/src/main/java/io/druid/segment/realtime/firehose/WikipediaIrcDecoder.java similarity index 99% rename from realtime/src/main/java/com/metamx/druid/realtime/firehose/WikipediaIrcDecoder.java rename to realtime/src/main/java/io/druid/segment/realtime/firehose/WikipediaIrcDecoder.java index 862c99eeb60..5f2f5307dbe 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/firehose/WikipediaIrcDecoder.java +++ b/realtime/src/main/java/io/druid/segment/realtime/firehose/WikipediaIrcDecoder.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.firehose; +package io.druid.segment.realtime.firehose; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/IntervalStartVersioningPolicy.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/IntervalStartVersioningPolicy.java similarity index 91% rename from realtime/src/main/java/com/metamx/druid/realtime/plumber/IntervalStartVersioningPolicy.java rename to realtime/src/main/java/io/druid/segment/realtime/plumber/IntervalStartVersioningPolicy.java index c052deeec98..c1408babcc3 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/IntervalStartVersioningPolicy.java +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/IntervalStartVersioningPolicy.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import org.joda.time.Interval; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/MessageTimeRejectionPolicyFactory.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/MessageTimeRejectionPolicyFactory.java similarity index 94% rename from realtime/src/main/java/com/metamx/druid/realtime/plumber/MessageTimeRejectionPolicyFactory.java rename to realtime/src/main/java/io/druid/segment/realtime/plumber/MessageTimeRejectionPolicyFactory.java index 57ba07a76cc..7b6c5868017 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/MessageTimeRejectionPolicyFactory.java +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/MessageTimeRejectionPolicyFactory.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import org.joda.time.DateTime; import org.joda.time.Period; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/NoopRejectionPolicyFactory.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/NoopRejectionPolicyFactory.java similarity index 92% rename from realtime/src/main/java/com/metamx/druid/realtime/plumber/NoopRejectionPolicyFactory.java rename to realtime/src/main/java/io/druid/segment/realtime/plumber/NoopRejectionPolicyFactory.java index 27bef8b8020..6554b321dcd 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/NoopRejectionPolicyFactory.java +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/NoopRejectionPolicyFactory.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import org.joda.time.DateTime; import org.joda.time.Period; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/Plumber.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/Plumber.java similarity index 94% rename from realtime/src/main/java/com/metamx/druid/realtime/plumber/Plumber.java rename to realtime/src/main/java/io/druid/segment/realtime/plumber/Plumber.java index e1a01699fb6..bce5086de65 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/Plumber.java +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/Plumber.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import io.druid.query.Query; import io.druid.query.QueryRunner; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/PlumberSchool.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/PlumberSchool.java similarity index 86% rename from realtime/src/main/java/com/metamx/druid/realtime/plumber/PlumberSchool.java rename to realtime/src/main/java/io/druid/segment/realtime/plumber/PlumberSchool.java index da81dd619e9..f1e186011da 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/PlumberSchool.java +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/PlumberSchool.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,12 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.metamx.druid.realtime.FireDepartmentMetrics; -import com.metamx.druid.realtime.Schema; +import io.druid.segment.realtime.FireDepartmentMetrics; +import io.druid.segment.realtime.Schema; /** */ diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/RealtimePlumberSchool.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumberSchool.java similarity index 98% rename from realtime/src/main/java/com/metamx/druid/realtime/plumber/RealtimePlumberSchool.java rename to realtime/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumberSchool.java index 5ea85c16696..b6cb78c99d6 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/RealtimePlumberSchool.java +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumberSchool.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.annotation.JsonCreator; @@ -36,12 +36,6 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.metamx.common.Pair; import com.metamx.common.concurrent.ScheduledExecutors; import com.metamx.common.guava.FunctionalIterable; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.query.QueryRunnerFactoryConglomerate; -import com.metamx.druid.realtime.FireDepartmentMetrics; -import com.metamx.druid.realtime.FireHydrant; -import com.metamx.druid.realtime.Schema; -import com.metamx.druid.realtime.SegmentPublisher; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceMetricEvent; @@ -54,6 +48,7 @@ import io.druid.query.MetricsEmittingQueryRunner; import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; +import io.druid.query.QueryRunnerFactoryConglomerate; import io.druid.query.QueryToolChest; import io.druid.query.SegmentDescriptor; import io.druid.query.spec.SpecificSegmentQueryRunner; @@ -64,6 +59,11 @@ import io.druid.segment.IndexMerger; import io.druid.segment.QueryableIndex; import io.druid.segment.QueryableIndexSegment; import io.druid.segment.Segment; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.realtime.FireDepartmentMetrics; +import io.druid.segment.realtime.FireHydrant; +import io.druid.segment.realtime.Schema; +import io.druid.segment.realtime.SegmentPublisher; import io.druid.server.coordination.DataSegmentAnnouncer; import io.druid.timeline.TimelineObjectHolder; import io.druid.timeline.VersionedIntervalTimeline; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/RejectionPolicy.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/RejectionPolicy.java similarity index 90% rename from realtime/src/main/java/com/metamx/druid/realtime/plumber/RejectionPolicy.java rename to realtime/src/main/java/io/druid/segment/realtime/plumber/RejectionPolicy.java index 61f4308a15a..017a3ad6398 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/RejectionPolicy.java +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/RejectionPolicy.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import org.joda.time.DateTime; diff --git a/realtime/src/main/java/io/druid/segment/realtime/plumber/RejectionPolicyFactory.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/RejectionPolicyFactory.java new file mode 100644 index 00000000000..58649b80121 --- /dev/null +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/RejectionPolicyFactory.java @@ -0,0 +1,35 @@ +/* + * 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.segment.realtime.plumber; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.joda.time.Period; + +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") +@JsonSubTypes(value = { + @JsonSubTypes.Type(name = "serverTime", value = ServerTimeRejectionPolicyFactory.class), + @JsonSubTypes.Type(name = "messageTime", value = MessageTimeRejectionPolicyFactory.class), + @JsonSubTypes.Type(name = "none", value = NoopRejectionPolicyFactory.class) +}) +public interface RejectionPolicyFactory +{ + public RejectionPolicy create(Period windowPeriod); +} diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/ServerTimeRejectionPolicyFactory.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/ServerTimeRejectionPolicyFactory.java similarity index 94% rename from realtime/src/main/java/com/metamx/druid/realtime/plumber/ServerTimeRejectionPolicyFactory.java rename to realtime/src/main/java/io/druid/segment/realtime/plumber/ServerTimeRejectionPolicyFactory.java index b97700699d4..98eb2d20741 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/ServerTimeRejectionPolicyFactory.java +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/ServerTimeRejectionPolicyFactory.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import org.joda.time.DateTime; import org.joda.time.Period; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/Sink.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/Sink.java similarity index 97% rename from realtime/src/main/java/com/metamx/druid/realtime/plumber/Sink.java rename to realtime/src/main/java/io/druid/segment/realtime/plumber/Sink.java index e3d85cb9e26..796661b0df0 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/Sink.java +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/Sink.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import com.google.common.base.Function; import com.google.common.base.Predicate; @@ -27,13 +27,13 @@ import com.google.common.collect.Lists; import com.metamx.common.IAE; import com.metamx.common.ISE; import com.metamx.common.logger.Logger; -import com.metamx.druid.realtime.FireHydrant; -import com.metamx.druid.realtime.Schema; import io.druid.client.DataSegment; import io.druid.data.input.InputRow; import io.druid.query.aggregation.AggregatorFactory; import io.druid.segment.incremental.IncrementalIndex; import io.druid.segment.incremental.IncrementalIndexSchema; +import io.druid.segment.realtime.FireHydrant; +import io.druid.segment.realtime.Schema; import org.joda.time.Interval; import javax.annotation.Nullable; diff --git a/realtime/src/main/java/com/metamx/druid/realtime/plumber/VersioningPolicy.java b/realtime/src/main/java/io/druid/segment/realtime/plumber/VersioningPolicy.java similarity index 92% rename from realtime/src/main/java/com/metamx/druid/realtime/plumber/VersioningPolicy.java rename to realtime/src/main/java/io/druid/segment/realtime/plumber/VersioningPolicy.java index 36ab3830f6e..dbf42d98519 100644 --- a/realtime/src/main/java/com/metamx/druid/realtime/plumber/VersioningPolicy.java +++ b/realtime/src/main/java/io/druid/segment/realtime/plumber/VersioningPolicy.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; diff --git a/realtime/src/test/java/com/metamx/druid/realtime/RealtimeManagerTest.java b/realtime/src/test/java/io/druid/segment/realtime/RealtimeManagerTest.java similarity index 95% rename from realtime/src/test/java/com/metamx/druid/realtime/RealtimeManagerTest.java rename to realtime/src/test/java/io/druid/segment/realtime/RealtimeManagerTest.java index 8934a8ce1a1..d7a6f3e1850 100644 --- a/realtime/src/test/java/com/metamx/druid/realtime/RealtimeManagerTest.java +++ b/realtime/src/test/java/io/druid/segment/realtime/RealtimeManagerTest.java @@ -17,16 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime; +package io.druid.segment.realtime; import com.google.common.base.Stopwatch; import com.google.common.collect.Lists; import com.metamx.common.ISE; -import com.metamx.druid.realtime.firehose.Firehose; -import com.metamx.druid.realtime.firehose.FirehoseFactory; -import com.metamx.druid.realtime.plumber.Plumber; -import com.metamx.druid.realtime.plumber.PlumberSchool; -import com.metamx.druid.realtime.plumber.Sink; import io.druid.common.guava.Runnables; import io.druid.data.input.InputRow; import io.druid.granularity.QueryGranularity; @@ -35,6 +30,11 @@ import io.druid.query.QueryRunner; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; import io.druid.segment.incremental.SpatialDimensionSchema; +import io.druid.segment.realtime.firehose.Firehose; +import io.druid.segment.realtime.firehose.FirehoseFactory; +import io.druid.segment.realtime.plumber.Plumber; +import io.druid.segment.realtime.plumber.PlumberSchool; +import io.druid.segment.realtime.plumber.Sink; import io.druid.server.shard.shard.NoneShardSpec; import junit.framework.Assert; import org.joda.time.DateTime; diff --git a/realtime/src/test/java/com/metamx/druid/realtime/plumber/IntervalStartVersioningPolicyTest.java b/realtime/src/test/java/io/druid/segment/realtime/plumber/IntervalStartVersioningPolicyTest.java similarity index 92% rename from realtime/src/test/java/com/metamx/druid/realtime/plumber/IntervalStartVersioningPolicyTest.java rename to realtime/src/test/java/io/druid/segment/realtime/plumber/IntervalStartVersioningPolicyTest.java index dcf92019428..27013f0afdf 100644 --- a/realtime/src/test/java/com/metamx/druid/realtime/plumber/IntervalStartVersioningPolicyTest.java +++ b/realtime/src/test/java/io/druid/segment/realtime/plumber/IntervalStartVersioningPolicyTest.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import junit.framework.Assert; import org.joda.time.Interval; diff --git a/realtime/src/test/java/com/metamx/druid/realtime/plumber/MessageTimeRejectionPolicyFactoryTest.java b/realtime/src/test/java/io/druid/segment/realtime/plumber/MessageTimeRejectionPolicyFactoryTest.java similarity index 94% rename from realtime/src/test/java/com/metamx/druid/realtime/plumber/MessageTimeRejectionPolicyFactoryTest.java rename to realtime/src/test/java/io/druid/segment/realtime/plumber/MessageTimeRejectionPolicyFactoryTest.java index 87a6b9e9536..9cce2fce484 100644 --- a/realtime/src/test/java/com/metamx/druid/realtime/plumber/MessageTimeRejectionPolicyFactoryTest.java +++ b/realtime/src/test/java/io/druid/segment/realtime/plumber/MessageTimeRejectionPolicyFactoryTest.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import junit.framework.Assert; import org.joda.time.DateTime; diff --git a/realtime/src/test/java/com/metamx/druid/realtime/plumber/RealtimePlumberSchoolTest.java b/realtime/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java similarity index 94% rename from realtime/src/test/java/com/metamx/druid/realtime/plumber/RealtimePlumberSchoolTest.java rename to realtime/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java index 5720c387afc..ffe3686e0dd 100644 --- a/realtime/src/test/java/com/metamx/druid/realtime/plumber/RealtimePlumberSchoolTest.java +++ b/realtime/src/test/java/io/druid/segment/realtime/plumber/RealtimePlumberSchoolTest.java @@ -17,28 +17,28 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import com.google.common.base.Stopwatch; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.io.Files; import com.metamx.common.ISE; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.query.DefaultQueryRunnerFactoryConglomerate; -import com.metamx.druid.realtime.FireDepartmentMetrics; -import com.metamx.druid.realtime.Schema; -import com.metamx.druid.realtime.SegmentPublisher; import com.metamx.emitter.service.ServiceEmitter; import io.druid.client.DataSegment; import io.druid.client.ServerView; import io.druid.granularity.QueryGranularity; +import io.druid.query.DefaultQueryRunnerFactoryConglomerate; import io.druid.query.Query; import io.druid.query.QueryRunnerFactory; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; import io.druid.segment.IndexGranularity; import io.druid.segment.incremental.SpatialDimensionSchema; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.realtime.FireDepartmentMetrics; +import io.druid.segment.realtime.Schema; +import io.druid.segment.realtime.SegmentPublisher; import io.druid.server.coordination.DataSegmentAnnouncer; import io.druid.server.shard.shard.NoneShardSpec; import junit.framework.Assert; diff --git a/realtime/src/test/java/com/metamx/druid/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java b/realtime/src/test/java/io/druid/segment/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java similarity index 93% rename from realtime/src/test/java/com/metamx/druid/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java rename to realtime/src/test/java/io/druid/segment/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java index 97f99fd396a..061e3325159 100644 --- a/realtime/src/test/java/com/metamx/druid/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java +++ b/realtime/src/test/java/io/druid/segment/realtime/plumber/ServerTimeRejectionPolicyFactoryTest.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import junit.framework.Assert; import org.joda.time.DateTime; diff --git a/realtime/src/test/java/com/metamx/druid/realtime/plumber/SinkTest.java b/realtime/src/test/java/io/druid/segment/realtime/plumber/SinkTest.java similarity index 96% rename from realtime/src/test/java/com/metamx/druid/realtime/plumber/SinkTest.java rename to realtime/src/test/java/io/druid/segment/realtime/plumber/SinkTest.java index 1e790b645cd..c478c38c94a 100644 --- a/realtime/src/test/java/com/metamx/druid/realtime/plumber/SinkTest.java +++ b/realtime/src/test/java/io/druid/segment/realtime/plumber/SinkTest.java @@ -17,17 +17,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.realtime.plumber; +package io.druid.segment.realtime.plumber; import com.google.common.collect.Iterators; import com.google.common.collect.Lists; -import com.metamx.druid.realtime.FireHydrant; -import com.metamx.druid.realtime.Schema; import io.druid.data.input.InputRow; import io.druid.granularity.QueryGranularity; import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.aggregation.CountAggregatorFactory; import io.druid.segment.incremental.SpatialDimensionSchema; +import io.druid.segment.realtime.FireHydrant; +import io.druid.segment.realtime.Schema; import io.druid.server.shard.shard.NoneShardSpec; import junit.framework.Assert; import org.joda.time.DateTime; diff --git a/server/src/main/antlr4/com/metamx/druid/sql/antlr4/DruidSQL.g4 b/server/src/main/antlr4/io/druid/sql/antlr4/DruidSQL.g4 similarity index 100% rename from server/src/main/antlr4/com/metamx/druid/sql/antlr4/DruidSQL.g4 rename to server/src/main/antlr4/io/druid/sql/antlr4/DruidSQL.g4 diff --git a/server/src/main/java/com/metamx/TsvToJson.java b/server/src/main/java/com/metamx/TsvToJson.java deleted file mode 100644 index d0778bf1476..00000000000 --- a/server/src/main/java/com/metamx/TsvToJson.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Druid - a distributed column store. - * Copyright (C) 2012 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 com.metamx; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.base.Charsets; -import com.google.common.collect.Maps; -import com.metamx.common.IAE; - -import org.joda.time.DateTime; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.util.Map; - -/** - */ -public class TsvToJson -{ - public static void main(String[] args) throws IOException - { - ObjectMapper mapper = new ObjectMapper(); - - String[] fields = args[0].split(","); - File inFile = new File(args[1]); - File outFile = new File(args[2]); - - FieldHandler[] handlers = new FieldHandler[fields.length]; - for (int i = 0; i < fields.length; i++) { - String field = fields[i]; - String[] fieldParts = field.split(":"); - String fieldName = fieldParts[0]; - if (fieldParts.length < 2 || "string".equalsIgnoreCase(fieldParts[1])) { - handlers[i] = new StringField(fieldName); - } - else if ("number".equalsIgnoreCase(fieldParts[1])) { - handlers[i] = new NumberField(fieldName); - } - else if ("ISO8601".equals(fieldParts[1])) { - handlers[i] = new IsoToNumberField(fieldName); - } - else { - throw new IAE("Unknown type[%s]", fieldParts[1]); - } - } - - BufferedReader in = null; - BufferedWriter out = null; - try { - in = new BufferedReader(new InputStreamReader(new FileInputStream(inFile), Charsets.UTF_8)); - out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outFile), Charsets.UTF_8)); - String line = null; - int count = 0; - long currTime = System.currentTimeMillis(); - long startTime = currTime; - while ((line = in.readLine()) != null) { - if (count % 1000000 == 0) { - long nowTime = System.currentTimeMillis(); - System.out.printf("Processed [%,d] lines in %,d millis. Incremental time %,d millis.%n", count, nowTime - startTime, nowTime - currTime); - currTime = nowTime; - } - ++count; - String[] splits = line.split("\t"); - - if (splits.length == 30) { - continue; - } - - if (splits.length != handlers.length) { - throw new IAE("splits.length[%d] != handlers.length[%d]; line[%s]", splits.length, handlers.length, line); - } - - Map jsonMap = Maps.newLinkedHashMap(); - for (int i = 0; i < handlers.length; ++i) { - jsonMap.put(handlers[i].getFieldName(), handlers[i].process(splits[i])); - } - - final String str = mapper.writeValueAsString(jsonMap); - out.write(str); - out.write("\n"); - } - System.out.printf("Completed %,d lines in %,d millis.%n", count, System.currentTimeMillis() - startTime); - out.flush(); - } finally { - if (out != null) { - out.close(); - } - if (in != null) { - in.close(); - } - } - } - - public static interface FieldHandler - { - public String getFieldName(); - public Object process(String value); - } - - public static class StringField implements FieldHandler - { - private final String fieldName; - - public StringField( - String fieldName - ) - { - this.fieldName = fieldName; - } - - @Override - public String getFieldName() - { - return fieldName; - } - - @Override - public Object process(String value) - { - return value; - } - } - - public static class NumberField implements FieldHandler - { - private final String fieldName; - - public NumberField( - String fieldName - ) - { - this.fieldName = fieldName; - } - - @Override - public String getFieldName() - { - return fieldName; - } - - @Override - public Object process(String value) - { - try { - return Long.parseLong(value); - } catch (NumberFormatException e) { - return Double.parseDouble(value); - } - } - } - - public static class IsoToNumberField implements FieldHandler - { - - private final String fieldName; - - public IsoToNumberField( - String fieldName - ) - { - this.fieldName = fieldName; - } - - @Override - public String getFieldName() - { - return fieldName; - } - - @Override - public Object process(String value) - { - return new DateTime(value).getMillis(); - } - } -} diff --git a/server/src/main/java/com/metamx/druid/loading/AWSCredentialsConfig.java b/server/src/main/java/com/metamx/druid/loading/AWSCredentialsConfig.java deleted file mode 100644 index dd8decfab54..00000000000 --- a/server/src/main/java/com/metamx/druid/loading/AWSCredentialsConfig.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.metamx.druid.loading; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - */ -public class AWSCredentialsConfig -{ - @JsonProperty - private String accessKey = ""; - - @JsonProperty - private String secretKey = ""; - - public String getAccessKey() - { - return accessKey; - } - - public String getSecretKey() - { - return secretKey; - } -} diff --git a/server/src/main/java/com/metamx/druid/master/BalancerStrategyFactory.java b/server/src/main/java/com/metamx/druid/master/BalancerStrategyFactory.java deleted file mode 100644 index c215c1b39a9..00000000000 --- a/server/src/main/java/com/metamx/druid/master/BalancerStrategyFactory.java +++ /dev/null @@ -1,26 +0,0 @@ -/* -* Druid - a distributed column store. -* Copyright (C) 2012 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 com.metamx.druid.master; - -import org.joda.time.DateTime; - -public interface BalancerStrategyFactory -{ - public BalancerStrategy createBalancerStrategy(DateTime referenceTimestamp); -} diff --git a/server/src/main/java/com/metamx/druid/master/CostBalancerStrategyFactory.java b/server/src/main/java/com/metamx/druid/master/CostBalancerStrategyFactory.java deleted file mode 100644 index 76e315b1625..00000000000 --- a/server/src/main/java/com/metamx/druid/master/CostBalancerStrategyFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -/* -* Druid - a distributed column store. -* Copyright (C) 2012 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 com.metamx.druid.master; - -import org.joda.time.DateTime; - -public class CostBalancerStrategyFactory implements BalancerStrategyFactory -{ - - @Override - public BalancerStrategy createBalancerStrategy(DateTime referenceTimestamp) - { - return new CostBalancerStrategy(referenceTimestamp); - } -} diff --git a/server/src/main/java/com/metamx/druid/master/RandomBalancerStrategyFactory.java b/server/src/main/java/com/metamx/druid/master/RandomBalancerStrategyFactory.java deleted file mode 100644 index 1994c0a5fea..00000000000 --- a/server/src/main/java/com/metamx/druid/master/RandomBalancerStrategyFactory.java +++ /dev/null @@ -1,30 +0,0 @@ -/* -* Druid - a distributed column store. -* Copyright (C) 2012 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 com.metamx.druid.master; - -import org.joda.time.DateTime; - -public class RandomBalancerStrategyFactory implements BalancerStrategyFactory -{ - @Override - public BalancerStrategy createBalancerStrategy(DateTime referenceTimestamp) - { - return new RandomBalancerStrategy(); - } -} diff --git a/server/src/main/java/com/metamx/druid/metrics/DruidMonitorSchedulerConfig.java b/server/src/main/java/com/metamx/druid/metrics/DruidMonitorSchedulerConfig.java deleted file mode 100644 index 68d70738cca..00000000000 --- a/server/src/main/java/com/metamx/druid/metrics/DruidMonitorSchedulerConfig.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.metamx.druid.metrics; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.metamx.metrics.MonitorSchedulerConfig; -import org.joda.time.Duration; -import org.joda.time.Period; - -/** - */ -public class DruidMonitorSchedulerConfig extends MonitorSchedulerConfig -{ - @JsonProperty - private Period emissionPeriod = new Period("PT1M"); - - @JsonProperty - public Period getEmissionPeriod() - { - return emissionPeriod; - } - - @Override - public Duration getEmitterPeriod() - { - return emissionPeriod.toStandardDuration(); - } -} diff --git a/server/src/main/java/com/metamx/druid/utils/CLI.java b/server/src/main/java/com/metamx/druid/utils/CLI.java deleted file mode 100644 index 3c2b5ae1497..00000000000 --- a/server/src/main/java/com/metamx/druid/utils/CLI.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Druid - a distributed column store. - * Copyright (C) 2012 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 com.metamx.druid.utils; - -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.OptionGroup; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; -import org.apache.commons.cli.PosixParser; - -/** - */ -public class CLI -{ - private final Options opts; - - public CLI() - { - this.opts = new Options(); - } - - public CLI addOptionGroup(OptionGroup group) - { - opts.addOptionGroup(group); - return this; - } - - public CLI addOption(String opt, boolean hasArg, String description) - { - opts.addOption(opt, hasArg, description); - return this; - } - - public CLI addOption(String opt, String longOpt, boolean hasArg, String description) - { - opts.addOption(opt, longOpt, hasArg, description); - return this; - } - - public CLI addOption(Option opt) - { - opts.addOption(opt); - return this; - } - - public CLI addRequiredOption(String opt, String longOpt, boolean hasArg, String description) - { - opts.addOption(new RequiredOption(opt, longOpt, hasArg, description)); - return this; - } - - public CommandLine parse(String[] args) - { - if (args.length == 0) { - new HelpFormatter().printHelp("", opts); - return null; - } - - CommandLine cli = null; - try { - cli = new PosixParser().parse(opts, args, false); - } - catch (ParseException e) { - System.out.println(e.getMessage()); - new HelpFormatter().printHelp("", opts); - return null; - } - - if (cli.hasOption("help")) { - new HelpFormatter().printHelp("", opts); - return null; - } - - return cli; - } -} diff --git a/server/src/main/java/com/metamx/druid/utils/DruidSetup.java b/server/src/main/java/com/metamx/druid/utils/DruidSetup.java deleted file mode 100644 index 8d8360b9c67..00000000000 --- a/server/src/main/java/com/metamx/druid/utils/DruidSetup.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * 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 com.metamx.druid.utils; - -import com.google.common.base.Charsets; -import com.google.common.base.Throwables; -import com.google.common.collect.Sets; -import com.google.common.io.Closeables; -import com.metamx.common.config.Config; -import io.druid.server.initialization.initialization.ZkPathsConfig; -import org.apache.curator.framework.CuratorFramework; -import org.apache.curator.framework.CuratorFrameworkFactory; -import org.apache.curator.retry.RetryOneTime; -import org.skife.config.ConfigurationObjectFactory; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.PrintStream; -import java.util.Properties; -import java.util.Set; - -/** - * Set up the shared Druid ensemble space. - * This affects the Zookeeper which holds common properties, and znode paths for coordination, - * and also performs metadata table creation in the database (MySQL). - * By storing ensemble-wide properties in zookeeper, cluster administration is simplified. - * Each service instance can also have local property overrides in the file runtime.properties - * located in the classpath. - *

    - * The design rules are noted here with rationale - *

    - *

    - *

    - * Design Rule Notes:
    - * (a) Properties set on the commandline of services take precedence over  runtime.properties which
    - *       takes precedence over properties stored in zookeeper.
    - *
    - *       Rationale:  organizing principle.
    - *
    - * (a) Services load properties on startup only.
    - *
    - *       Rationale: stepwise changes are safer and easier to manage.
    - *
    - * (b) Only DruidSetup creates properties and znode paths (zpaths) on zookeeper and no other tool or service
    - *       will make ensemble-wide settings automatically.
    - *
    - *       Rationale: one place for this logic, under manual control, and avoid accidental
    - *       namespace/partition creation.
    - *
    - * (c) DruidSetup creates reasonable zpaths but supports overrides to enable tactical
    - *   version transitions (just in case).  If zpaths are overridden, then they must all be
    - *   overridden together since they are not independent.
    - *
    - *       Rationale:  convention beats configuration most of the time; sometimes configuration is needed
    - *       negotiate unusual cases.
    - *
    - * (d) Properties settings stored on zookeeper are not cumulative; previous properties are removed before
    - *   new ones are stored.
    - *       Rationale:  Keep the operations at the granularity of a file of properties, avoid
    - *       dependence on order of setup operations, enable dumping of current settings.
    - * 
    - * - * @author pbaclace - */ -public class DruidSetup -{ - private final static String MODIFIED_PROP = "__MODIFIED"; - private final static Set IGNORED_PROPS = Sets.newHashSet(MODIFIED_PROP); - - public static void main(final String[] args) - { - CuratorFramework curator = null; - - try { - if (args.length < 2 || args.length > 3) { - printUsage(); - System.exit(1); - } - String cmd = args[0]; - if ("dump".equals(cmd) && args.length == 3) { - final String zkConnect = args[1]; - curator = connectToZK(zkConnect); - curator.start(); - String zpathBase = args[2]; - dumpFromZk(curator, zkConnect, zpathBase, System.out); - } else if ("put".equals(cmd) && args.length == 3) { - final String zkConnect = args[1]; - curator = connectToZK(zkConnect); - curator.start(); - final String pfile = args[2]; - putToZk(curator, pfile); - } else { - printUsage(); - System.exit(1); - } - } - finally { - Closeables.closeQuietly(curator); - } - } - - /** - * Load properties from local file, validate and tweak. - *

    - * This can only be used for setup, not service run time because of some assembly here. - * - * @param pfile path to runtime.properties file to be read. - */ - private static Properties loadProperties(String pfile) - { - InputStream is = null; - try { - is = new FileInputStream(pfile); - } - catch (FileNotFoundException e) { - System.err.println("File not found: " + pfile); - System.err.println("No changes made."); - System.exit(4); - } - - try { - Properties props = new Properties(); - props.load(new InputStreamReader(is, Charsets.UTF_8)); - return props; - } - catch (IOException e) { - throw reportErrorAndExit(pfile, e); - } - finally { - Closeables.closeQuietly(is); - } - } - - /** - * @param curator zookeeper client. - * @param zPathBase znode base path. - * @param zkConnect ZK coordinates in the form host1:port1[,host2:port2[, ...]] - * @param out - */ - private static void dumpFromZk(CuratorFramework curator, String zkConnect, final String zPathBase, PrintStream out) - { - ZkPathsConfig config = new ZkPathsConfig() - { - @Override - public String getZkBasePath() - { - return zPathBase; - } - }; - - try { - if (curator.checkExists().forPath(config.getPropertiesPath()) != null) { - byte[] data = curator.getData().forPath(config.getPropertiesPath()); - Properties currProps = new Properties(); - currProps.load(new InputStreamReader(new ByteArrayInputStream(data), Charsets.UTF_8)); - - if (! currProps.isEmpty()) { - out.printf("# Begin Properties Listing for zpath[%s]%n", config.getPropertiesPath()); - try { - currProps.store(new OutputStreamWriter(out, Charsets.UTF_8), "Druid"); - } - catch (IOException ignored) { - } - out.printf("# End Properties for zkConnect[%s] zpath[%s]%n", zkConnect, config.getPropertiesPath()); - } - else { - out.printf("# Properties at zpath[%s] empty.%n", config.getPropertiesPath()); - } - } - } - catch (Exception e) { - throw Throwables.propagate(e); - } - } - - private static void putToZk(CuratorFramework curator, String pfile) - { - final Properties props = loadProperties(pfile); - ConfigurationObjectFactory configFactory = Config.createFactory(props); - final ZkPathsConfig zkPaths = configFactory.build(ZkPathsConfig.class); - - createZNodes(curator, zkPaths, System.out); - updatePropertiesZK(curator, zkPaths, props, System.out); - } - - /** - * @param curator zookeeper client. - * @param zkPaths znode base path. - * @param props the properties to store. - * @param out the PrintStream for human readable update summary (usually System.out). - */ - private static void updatePropertiesZK(CuratorFramework curator, ZkPathsConfig zkPaths, Properties props, PrintStream out) - { - Properties currProps = new Properties(); - try { - if (curator.checkExists().forPath(zkPaths.getPropertiesPath()) != null) { - final byte[] data = curator.getData().forPath(zkPaths.getPropertiesPath()); - currProps.load(new InputStreamReader(new ByteArrayInputStream(data), Charsets.UTF_8)); - } - boolean propsDiffer = false; - if (currProps.isEmpty()) { - out.println("No properties currently stored in zk"); - propsDiffer = true; - } else { // determine whether anything is different - int countNew = 0; - int countDiffer = 0; - int countRemoved = 0; - int countNoChange = 0; - StringBuilder changes = new StringBuilder(1024); - for (String pname : props.stringPropertyNames()) { - if (IGNORED_PROPS.contains(pname)) { - continue; // ignore meta props, if any - } - final String pvalue = props.getProperty(pname); - final String pvalueCurr = currProps.getProperty(pname); - if (pvalueCurr == null) { - countNew++; - } else { - if (pvalueCurr.equals(pvalue)) { - countNoChange++; - } else { - countDiffer++; - changes.append(String.format("CHANGED[%s]: PREV=%s --- NOW=%s%n", pname, pvalueCurr, pvalue)); - } - } - } - for (String pname : currProps.stringPropertyNames()) { - if (IGNORED_PROPS.contains(pname)) { - continue; // ignore meta props, if any - } - if (props.getProperty(pname) == null) { - countRemoved++; - changes.append(String.format("REMOVED: %s=%s%n", pname, currProps.getProperty(pname))); - } - } - if (countNew + countRemoved + countDiffer > 0) { - out.printf( - "Properties differ: %,d new, %,d changed, %,d removed, %,d unchanged, previously updated %s%n", - countNew, countDiffer, countRemoved, countNoChange, currProps.getProperty(MODIFIED_PROP) - ); - out.println(changes); - propsDiffer = true; - } else { - out.printf("Current properties identical to file given, %,d total properties set.%n", countNoChange); - } - } - if (propsDiffer) { - ByteArrayOutputStream propsBytes = new ByteArrayOutputStream(); - props.store(new OutputStreamWriter(propsBytes, Charsets.UTF_8), "Common Druid properties"); - - if (currProps.isEmpty()) { - curator.setData().forPath(zkPaths.getPropertiesPath(), propsBytes.toByteArray()); - } - else { - curator.create().forPath(zkPaths.getPropertiesPath(), propsBytes.toByteArray()); - } - out.printf("Properties updated, %,d total properties set.%n", props.size()); - } - } - catch (Exception e) { - throw Throwables.propagate(e); - } - } - - /** - * @param curator zookeeper client. - * @param zkPaths znode base path. - * @param out the PrintStream for human readable update summary. - */ - private static void createZNodes(CuratorFramework curator, ZkPathsConfig zkPaths, PrintStream out) - { - createPath(curator, zkPaths.getAnnouncementsPath(), out); - createPath(curator, zkPaths.getMasterPath(), out); - createPath(curator, zkPaths.getLoadQueuePath(), out); - createPath(curator, zkPaths.getServedSegmentsPath(), out); - createPath(curator, zkPaths.getLiveSegmentsPath(), out); - createPath(curator, zkPaths.getPropertiesPath(), out); - } - - private static void createPath(CuratorFramework curator, String thePath, PrintStream out) - { - try { - if (curator.checkExists().forPath(thePath) != null) { - out.printf("Path[%s] exists already%n", thePath); - } else { - out.printf("Creating ZK path[%s]%n", thePath); - curator.create().creatingParentsIfNeeded().forPath(thePath); - } - } - catch (Exception e) { - throw Throwables.propagate(e); - } - } - - private static RuntimeException reportErrorAndExit(String pfile, IOException ioe) - { - System.err.println("Could not read file: " + pfile); - System.err.println(" because of: " + ioe); - System.err.println("No changes made."); - System.exit(4); - - return new RuntimeException(); - } - - private static CuratorFramework connectToZK(String zkConnect) - { - return CuratorFrameworkFactory.builder() - .connectString(zkConnect) - .retryPolicy(new RetryOneTime(5000)) - .build(); - } - - /** - * Print usage to stdout. - */ - private static void printUsage() - { - System.out.println( - "Usage: CMD [args]\n" - + " Where CMD is a particular command:\n" - + " CMD choices:\n" - + " dump zkConnect baseZkPath # dump info from zk at given coordinates\n" - + " put zkConnect propfile # store paths and propfile into zk at given coordinates\n" - + " args:\n" - + " zkConnect: ZK coordinates in the form host1:port1[,host2:port2[, ...]]\n" - + " baseZkPath: like /druid or /mydruid etc. to uniquely identify a Druid ensemble\n" - + " and should be equal to property druid.zk.paths.base\n" - + " propfile: Java properties file with common properties for all services in ensemble\n" - + " Notes:\n" - + " dump command makes no modifications and shows zk properties at baseZkPath.\n" - + " put command can safely be invoked more than once, will not disturb existing queues,\n" - + " and properties are not cumulative.\n" - + " A zookeeper can service more than one Druid ensemble if baseZkPath is distinct.\n" - + " Druid services only load properties during process startup.\n" - + " Properties defined on a service command line take precedence over the runtime.properties\n" - + " file which takes precedence over properties stored in zookeeper.\n" - + "" - ); - } -} diff --git a/server/src/main/java/io/druid/client/BatchServerInventoryView.java b/server/src/main/java/io/druid/client/BatchServerInventoryView.java index 77253faebb6..e5f64d2b430 100644 --- a/server/src/main/java/io/druid/client/BatchServerInventoryView.java +++ b/server/src/main/java/io/druid/client/BatchServerInventoryView.java @@ -26,7 +26,7 @@ import com.google.common.collect.Sets; import com.google.inject.Inject; import com.metamx.common.ISE; import com.metamx.emitter.EmittingLogger; -import io.druid.guice.guice.ManageLifecycle; +import io.druid.guice.ManageLifecycle; import io.druid.server.initialization.initialization.ZkPathsConfig; import org.apache.curator.framework.CuratorFramework; diff --git a/server/src/main/java/io/druid/client/BrokerServerView.java b/server/src/main/java/io/druid/client/BrokerServerView.java index 1c5055ab818..b6dd27c54dc 100644 --- a/server/src/main/java/io/druid/client/BrokerServerView.java +++ b/server/src/main/java/io/druid/client/BrokerServerView.java @@ -28,7 +28,7 @@ import com.metamx.http.client.HttpClient; import io.druid.client.selector.QueryableDruidServer; import io.druid.client.selector.ServerSelector; import io.druid.concurrent.Execs; -import io.druid.guice.guice.annotations.Client; +import io.druid.guice.annotations.Client; import io.druid.query.QueryRunner; import io.druid.query.QueryToolChestWarehouse; import io.druid.timeline.VersionedIntervalTimeline; diff --git a/server/src/main/java/io/druid/client/SingleServerInventoryView.java b/server/src/main/java/io/druid/client/SingleServerInventoryView.java index 5f95c52f1c1..da7cef485bf 100644 --- a/server/src/main/java/io/druid/client/SingleServerInventoryView.java +++ b/server/src/main/java/io/druid/client/SingleServerInventoryView.java @@ -23,7 +23,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; import com.metamx.emitter.EmittingLogger; -import io.druid.guice.guice.ManageLifecycle; +import io.druid.guice.ManageLifecycle; import io.druid.server.initialization.initialization.ZkPathsConfig; import org.apache.curator.framework.CuratorFramework; diff --git a/server/src/main/java/io/druid/client/indexing/IndexingServiceClient.java b/server/src/main/java/io/druid/client/indexing/IndexingServiceClient.java index 2d3a622edae..4949835aa29 100644 --- a/server/src/main/java/io/druid/client/indexing/IndexingServiceClient.java +++ b/server/src/main/java/io/druid/client/indexing/IndexingServiceClient.java @@ -29,7 +29,7 @@ import com.metamx.http.client.response.InputStreamResponseHandler; import io.druid.client.DataSegment; import io.druid.client.selector.DiscoverySelector; import io.druid.client.selector.Server; -import io.druid.guice.guice.annotations.Global; +import io.druid.guice.annotations.Global; import org.joda.time.Interval; import java.io.InputStream; diff --git a/server/src/main/java/com/metamx/druid/client/indexing/IndexingServiceSelector.java b/server/src/main/java/io/druid/client/indexing/IndexingServiceSelector.java similarity index 96% rename from server/src/main/java/com/metamx/druid/client/indexing/IndexingServiceSelector.java rename to server/src/main/java/io/druid/client/indexing/IndexingServiceSelector.java index 15620c31db3..7c5eaaf8d72 100644 --- a/server/src/main/java/com/metamx/druid/client/indexing/IndexingServiceSelector.java +++ b/server/src/main/java/io/druid/client/indexing/IndexingServiceSelector.java @@ -17,13 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.client.indexing; +package io.druid.client.indexing; import com.google.inject.Inject; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; import com.metamx.common.logger.Logger; -import io.druid.client.indexing.IndexingService; import io.druid.client.selector.DiscoverySelector; import io.druid.client.selector.Server; import org.apache.curator.x.discovery.ServiceInstance; diff --git a/server/src/main/java/com/metamx/druid/client/indexing/IndexingServiceSelectorConfig.java b/server/src/main/java/io/druid/client/indexing/IndexingServiceSelectorConfig.java similarity index 96% rename from server/src/main/java/com/metamx/druid/client/indexing/IndexingServiceSelectorConfig.java rename to server/src/main/java/io/druid/client/indexing/IndexingServiceSelectorConfig.java index b34404eebc1..976225f6665 100644 --- a/server/src/main/java/com/metamx/druid/client/indexing/IndexingServiceSelectorConfig.java +++ b/server/src/main/java/io/druid/client/indexing/IndexingServiceSelectorConfig.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.client.indexing; +package io.druid.client.indexing; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/io/druid/curator/CuratorModule.java b/server/src/main/java/io/druid/curator/CuratorModule.java index 89fef96830d..94fba357dd2 100644 --- a/server/src/main/java/io/druid/curator/CuratorModule.java +++ b/server/src/main/java/io/druid/curator/CuratorModule.java @@ -24,8 +24,8 @@ import com.google.inject.Module; import com.google.inject.Provides; import com.metamx.common.lifecycle.Lifecycle; import com.metamx.common.logger.Logger; -import io.druid.guice.guice.ConfigProvider; -import io.druid.guice.guice.LazySingleton; +import io.druid.guice.ConfigProvider; +import io.druid.guice.LazySingleton; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.retry.BoundedExponentialBackoffRetry; 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 595ae977572..63116b1f92a 100644 --- a/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java +++ b/server/src/main/java/io/druid/curator/discovery/DiscoveryModule.java @@ -33,8 +33,8 @@ import com.google.inject.TypeLiteral; import com.google.inject.name.Named; import com.google.inject.name.Names; import com.metamx.common.lifecycle.Lifecycle; -import io.druid.guice.guice.JsonConfigProvider; -import io.druid.guice.guice.LazySingleton; +import io.druid.guice.JsonConfigProvider; +import io.druid.guice.LazySingleton; import io.druid.server.DruidNode; import io.druid.server.initialization.initialization.CuratorDiscoveryConfig; import org.apache.curator.framework.CuratorFramework; diff --git a/server/src/main/java/com/metamx/druid/db/DatabaseRuleManager.java b/server/src/main/java/io/druid/db/DatabaseRuleManager.java similarity index 97% rename from server/src/main/java/com/metamx/druid/db/DatabaseRuleManager.java rename to server/src/main/java/io/druid/db/DatabaseRuleManager.java index f7b85654a76..c6968362caa 100644 --- a/server/src/main/java/com/metamx/druid/db/DatabaseRuleManager.java +++ b/server/src/main/java/io/druid/db/DatabaseRuleManager.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.db; +package io.druid.db; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -31,12 +31,11 @@ import com.metamx.common.concurrent.ScheduledExecutors; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; import com.metamx.common.logger.Logger; -import com.metamx.druid.master.rules.PeriodLoadRule; -import com.metamx.druid.master.rules.Rule; import io.druid.concurrent.Execs; -import io.druid.db.DbTablesConfig; -import io.druid.guice.guice.ManageLifecycle; -import io.druid.guice.guice.annotations.Json; +import io.druid.guice.ManageLifecycle; +import io.druid.guice.annotations.Json; +import io.druid.server.master.rules.PeriodLoadRule; +import io.druid.server.master.rules.Rule; import org.joda.time.DateTime; import org.joda.time.Duration; import org.joda.time.Period; diff --git a/server/src/main/java/com/metamx/druid/db/DatabaseRuleManagerConfig.java b/server/src/main/java/io/druid/db/DatabaseRuleManagerConfig.java similarity index 93% rename from server/src/main/java/com/metamx/druid/db/DatabaseRuleManagerConfig.java rename to server/src/main/java/io/druid/db/DatabaseRuleManagerConfig.java index 8dfc0b83be1..8b770a57955 100644 --- a/server/src/main/java/com/metamx/druid/db/DatabaseRuleManagerConfig.java +++ b/server/src/main/java/io/druid/db/DatabaseRuleManagerConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.db; +package io.druid.db; import com.fasterxml.jackson.annotation.JsonProperty; import org.joda.time.Period; diff --git a/server/src/main/java/com/metamx/druid/db/DatabaseRuleManagerProvider.java b/server/src/main/java/io/druid/db/DatabaseRuleManagerProvider.java similarity index 96% rename from server/src/main/java/com/metamx/druid/db/DatabaseRuleManagerProvider.java rename to server/src/main/java/io/druid/db/DatabaseRuleManagerProvider.java index 2675316fc17..dfc25bea283 100644 --- a/server/src/main/java/com/metamx/druid/db/DatabaseRuleManagerProvider.java +++ b/server/src/main/java/io/druid/db/DatabaseRuleManagerProvider.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.db; +package io.druid.db; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Supplier; @@ -25,8 +25,6 @@ import com.google.common.base.Throwables; import com.google.inject.Inject; import com.google.inject.Provider; import com.metamx.common.lifecycle.Lifecycle; -import io.druid.db.DbConnector; -import io.druid.db.DbTablesConfig; /** */ diff --git a/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManager.java b/server/src/main/java/io/druid/db/DatabaseSegmentManager.java similarity index 99% rename from server/src/main/java/com/metamx/druid/db/DatabaseSegmentManager.java rename to server/src/main/java/io/druid/db/DatabaseSegmentManager.java index bc41f9e9a12..dd522bef54c 100644 --- a/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManager.java +++ b/server/src/main/java/io/druid/db/DatabaseSegmentManager.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.db; +package io.druid.db; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Supplier; @@ -33,8 +33,7 @@ import com.metamx.common.logger.Logger; import io.druid.client.DataSegment; import io.druid.client.DruidDataSource; import io.druid.concurrent.Execs; -import io.druid.db.DbTablesConfig; -import io.druid.guice.guice.ManageLifecycle; +import io.druid.guice.ManageLifecycle; import io.druid.timeline.TimelineObjectHolder; import io.druid.timeline.VersionedIntervalTimeline; import io.druid.timeline.partition.PartitionChunk; diff --git a/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManagerConfig.java b/server/src/main/java/io/druid/db/DatabaseSegmentManagerConfig.java similarity index 93% rename from server/src/main/java/com/metamx/druid/db/DatabaseSegmentManagerConfig.java rename to server/src/main/java/io/druid/db/DatabaseSegmentManagerConfig.java index 1541f00cca3..a87d2db59e5 100644 --- a/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManagerConfig.java +++ b/server/src/main/java/io/druid/db/DatabaseSegmentManagerConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.db; +package io.druid.db; import com.fasterxml.jackson.annotation.JsonProperty; import org.joda.time.Period; diff --git a/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManagerProvider.java b/server/src/main/java/io/druid/db/DatabaseSegmentManagerProvider.java similarity index 95% rename from server/src/main/java/com/metamx/druid/db/DatabaseSegmentManagerProvider.java rename to server/src/main/java/io/druid/db/DatabaseSegmentManagerProvider.java index 13226aab73e..c7cda31f8d5 100644 --- a/server/src/main/java/com/metamx/druid/db/DatabaseSegmentManagerProvider.java +++ b/server/src/main/java/io/druid/db/DatabaseSegmentManagerProvider.java @@ -17,15 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.db; +package io.druid.db; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Supplier; import com.google.inject.Inject; import com.google.inject.Provider; import com.metamx.common.lifecycle.Lifecycle; -import io.druid.db.DbConnector; -import io.druid.db.DbTablesConfig; /** */ diff --git a/server/src/main/java/io/druid/guice/guice/AWSModule.java b/server/src/main/java/io/druid/guice/AWSModule.java similarity index 96% rename from server/src/main/java/io/druid/guice/guice/AWSModule.java rename to server/src/main/java/io/druid/guice/AWSModule.java index 62030a7c15b..9a9b6d3b0f0 100644 --- a/server/src/main/java/io/druid/guice/guice/AWSModule.java +++ b/server/src/main/java/io/druid/guice/AWSModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.BasicAWSCredentials; @@ -27,7 +27,7 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Provides; import com.google.inject.ProvisionException; -import com.metamx.druid.loading.AWSCredentialsConfig; +import io.druid.segment.loading.AWSCredentialsConfig; import org.jets3t.service.S3ServiceException; import org.jets3t.service.impl.rest.httpclient.RestS3Service; diff --git a/server/src/main/java/io/druid/guice/guice/AnnouncerModule.java b/server/src/main/java/io/druid/guice/AnnouncerModule.java similarity index 98% rename from server/src/main/java/io/druid/guice/guice/AnnouncerModule.java rename to server/src/main/java/io/druid/guice/AnnouncerModule.java index c746b500022..c7cc0c78ef0 100644 --- a/server/src/main/java/io/druid/guice/guice/AnnouncerModule.java +++ b/server/src/main/java/io/druid/guice/AnnouncerModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; diff --git a/server/src/main/java/io/druid/guice/guice/BrokerModule.java b/server/src/main/java/io/druid/guice/BrokerModule.java similarity index 98% rename from server/src/main/java/io/druid/guice/guice/BrokerModule.java rename to server/src/main/java/io/druid/guice/BrokerModule.java index acb0bd2325f..06bb2a35796 100644 --- a/server/src/main/java/io/druid/guice/guice/BrokerModule.java +++ b/server/src/main/java/io/druid/guice/BrokerModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; diff --git a/server/src/main/java/io/druid/guice/guice/CassandraDataSegmentPusherProvider.java b/server/src/main/java/io/druid/guice/CassandraDataSegmentPusherProvider.java similarity index 86% rename from server/src/main/java/io/druid/guice/guice/CassandraDataSegmentPusherProvider.java rename to server/src/main/java/io/druid/guice/CassandraDataSegmentPusherProvider.java index 97a0fde64c1..7ce7e2219fa 100644 --- a/server/src/main/java/io/druid/guice/guice/CassandraDataSegmentPusherProvider.java +++ b/server/src/main/java/io/druid/guice/CassandraDataSegmentPusherProvider.java @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.databind.ObjectMapper; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.loading.cassandra.CassandraDataSegmentConfig; -import com.metamx.druid.loading.cassandra.CassandraDataSegmentPusher; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.loading.cassandra.CassandraDataSegmentConfig; +import io.druid.segment.loading.cassandra.CassandraDataSegmentPusher; import javax.validation.constraints.NotNull; diff --git a/server/src/main/java/io/druid/guice/guice/CoordinatorModule.java b/server/src/main/java/io/druid/guice/CoordinatorModule.java similarity index 84% rename from server/src/main/java/io/druid/guice/guice/CoordinatorModule.java rename to server/src/main/java/io/druid/guice/CoordinatorModule.java index fb800c68bcd..75b7ab93e32 100644 --- a/server/src/main/java/io/druid/guice/guice/CoordinatorModule.java +++ b/server/src/main/java/io/druid/guice/CoordinatorModule.java @@ -17,28 +17,28 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Provides; import com.metamx.common.concurrent.ScheduledExecutorFactory; -import com.metamx.druid.db.DatabaseRuleManager; -import com.metamx.druid.db.DatabaseRuleManagerConfig; -import com.metamx.druid.db.DatabaseRuleManagerProvider; -import com.metamx.druid.db.DatabaseSegmentManager; -import com.metamx.druid.db.DatabaseSegmentManagerConfig; -import com.metamx.druid.db.DatabaseSegmentManagerProvider; -import com.metamx.druid.master.DruidMaster; -import com.metamx.druid.master.DruidMasterConfig; -import com.metamx.druid.master.LoadQueueTaskMaster; import io.druid.client.ServerInventoryViewConfig; import io.druid.client.indexing.IndexingServiceClient; +import io.druid.db.DatabaseRuleManager; +import io.druid.db.DatabaseRuleManagerConfig; +import io.druid.db.DatabaseRuleManagerProvider; +import io.druid.db.DatabaseSegmentManager; +import io.druid.db.DatabaseSegmentManagerConfig; +import io.druid.db.DatabaseSegmentManagerProvider; import io.druid.server.http.MasterRedirectInfo; import io.druid.server.http.RedirectFilter; import io.druid.server.http.RedirectInfo; import io.druid.server.http.RedirectServlet; +import io.druid.server.master.DruidMaster; +import io.druid.server.master.DruidMasterConfig; +import io.druid.server.master.LoadQueueTaskMaster; import org.apache.curator.framework.CuratorFramework; /** diff --git a/server/src/main/java/io/druid/guice/guice/DataSegmentPullerModule.java b/server/src/main/java/io/druid/guice/DataSegmentPullerModule.java similarity index 85% rename from server/src/main/java/io/druid/guice/guice/DataSegmentPullerModule.java rename to server/src/main/java/io/druid/guice/DataSegmentPullerModule.java index ec167922f94..6b33cf401a5 100644 --- a/server/src/main/java/io/druid/guice/guice/DataSegmentPullerModule.java +++ b/server/src/main/java/io/druid/guice/DataSegmentPullerModule.java @@ -17,19 +17,19 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.multibindings.MapBinder; -import com.metamx.druid.loading.DataSegmentPuller; -import com.metamx.druid.loading.HdfsDataSegmentPuller; -import com.metamx.druid.loading.LocalDataSegmentPuller; -import com.metamx.druid.loading.OmniSegmentLoader; -import com.metamx.druid.loading.S3DataSegmentPuller; -import com.metamx.druid.loading.SegmentLoader; -import com.metamx.druid.loading.cassandra.CassandraDataSegmentConfig; -import com.metamx.druid.loading.cassandra.CassandraDataSegmentPuller; +import io.druid.segment.loading.DataSegmentPuller; +import io.druid.segment.loading.HdfsDataSegmentPuller; +import io.druid.segment.loading.LocalDataSegmentPuller; +import io.druid.segment.loading.OmniSegmentLoader; +import io.druid.segment.loading.S3DataSegmentPuller; +import io.druid.segment.loading.SegmentLoader; +import io.druid.segment.loading.cassandra.CassandraDataSegmentConfig; +import io.druid.segment.loading.cassandra.CassandraDataSegmentPuller; import org.apache.hadoop.conf.Configuration; /** diff --git a/server/src/main/java/io/druid/guice/guice/DataSegmentPusherModule.java b/server/src/main/java/io/druid/guice/DataSegmentPusherModule.java similarity index 85% rename from server/src/main/java/io/druid/guice/guice/DataSegmentPusherModule.java rename to server/src/main/java/io/druid/guice/DataSegmentPusherModule.java index 42de20929bd..cd65b35b7ee 100644 --- a/server/src/main/java/io/druid/guice/guice/DataSegmentPusherModule.java +++ b/server/src/main/java/io/druid/guice/DataSegmentPusherModule.java @@ -17,14 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.loading.HdfsDataSegmentPusherConfig; -import com.metamx.druid.loading.S3DataSegmentPusherConfig; -import com.metamx.druid.loading.cassandra.CassandraDataSegmentConfig; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.loading.HdfsDataSegmentPusherConfig; +import io.druid.segment.loading.S3DataSegmentPusherConfig; +import io.druid.segment.loading.cassandra.CassandraDataSegmentConfig; import org.apache.hadoop.conf.Configuration; /** diff --git a/server/src/main/java/io/druid/guice/guice/DataSegmentPusherProvider.java b/server/src/main/java/io/druid/guice/DataSegmentPusherProvider.java similarity index 94% rename from server/src/main/java/io/druid/guice/guice/DataSegmentPusherProvider.java rename to server/src/main/java/io/druid/guice/DataSegmentPusherProvider.java index 12e7b396b02..564f5002e94 100644 --- a/server/src/main/java/io/druid/guice/guice/DataSegmentPusherProvider.java +++ b/server/src/main/java/io/druid/guice/DataSegmentPusherProvider.java @@ -17,12 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.google.inject.Provider; -import com.metamx.druid.loading.DataSegmentPusher; +import io.druid.segment.loading.DataSegmentPusher; /** */ diff --git a/server/src/main/java/io/druid/guice/guice/DruidProcessingModule.java b/server/src/main/java/io/druid/guice/DruidProcessingModule.java similarity index 96% rename from server/src/main/java/io/druid/guice/guice/DruidProcessingModule.java rename to server/src/main/java/io/druid/guice/DruidProcessingModule.java index 087247b32bb..cf0157de9e0 100644 --- a/server/src/main/java/io/druid/guice/guice/DruidProcessingModule.java +++ b/server/src/main/java/io/druid/guice/DruidProcessingModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.common.base.Supplier; import com.google.common.collect.ImmutableMap; @@ -27,14 +27,14 @@ import com.google.inject.Provides; import com.google.inject.ProvisionException; import com.metamx.common.concurrent.ExecutorServiceConfig; import com.metamx.common.logger.Logger; -import com.metamx.druid.DruidProcessingConfig; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceMetricEvent; import io.druid.collections.StupidPool; import io.druid.concurrent.Execs; -import io.druid.guice.guice.annotations.Global; -import io.druid.guice.guice.annotations.Processing; +import io.druid.guice.annotations.Global; +import io.druid.guice.annotations.Processing; import io.druid.query.MetricsEmittingExecutorService; +import io.druid.server.DruidProcessingConfig; import java.lang.reflect.InvocationTargetException; import java.nio.ByteBuffer; diff --git a/server/src/main/java/io/druid/guice/guice/HdfsDataSegmentPusherProvider.java b/server/src/main/java/io/druid/guice/HdfsDataSegmentPusherProvider.java similarity index 88% rename from server/src/main/java/io/druid/guice/guice/HdfsDataSegmentPusherProvider.java rename to server/src/main/java/io/druid/guice/HdfsDataSegmentPusherProvider.java index c0fca1d2fbf..c6cbf50d16a 100644 --- a/server/src/main/java/io/druid/guice/guice/HdfsDataSegmentPusherProvider.java +++ b/server/src/main/java/io/druid/guice/HdfsDataSegmentPusherProvider.java @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.databind.ObjectMapper; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.loading.HdfsDataSegmentPusher; -import com.metamx.druid.loading.HdfsDataSegmentPusherConfig; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.loading.HdfsDataSegmentPusher; +import io.druid.segment.loading.HdfsDataSegmentPusherConfig; import org.apache.hadoop.conf.Configuration; import javax.validation.constraints.NotNull; diff --git a/server/src/main/java/io/druid/guice/guice/HistoricalModule.java b/server/src/main/java/io/druid/guice/HistoricalModule.java similarity index 90% rename from server/src/main/java/io/druid/guice/guice/HistoricalModule.java rename to server/src/main/java/io/druid/guice/HistoricalModule.java index 1ba3a239dc3..0e00526351b 100644 --- a/server/src/main/java/io/druid/guice/guice/HistoricalModule.java +++ b/server/src/main/java/io/druid/guice/HistoricalModule.java @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; import com.metamx.common.logger.Logger; -import com.metamx.druid.coordination.ServerManager; -import com.metamx.druid.coordination.ZkCoordinator; +import io.druid.server.coordination.ServerManager; +import io.druid.server.coordination.ZkCoordinator; /** */ diff --git a/server/src/main/java/io/druid/guice/guice/HttpClientModule.java b/server/src/main/java/io/druid/guice/HttpClientModule.java similarity index 98% rename from server/src/main/java/io/druid/guice/guice/HttpClientModule.java rename to server/src/main/java/io/druid/guice/HttpClientModule.java index 14c224a44cd..8bf7c70b698 100644 --- a/server/src/main/java/io/druid/guice/guice/HttpClientModule.java +++ b/server/src/main/java/io/druid/guice/HttpClientModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.Supplier; @@ -33,7 +33,7 @@ import com.metamx.common.lifecycle.Lifecycle; import com.metamx.http.client.HttpClient; import com.metamx.http.client.HttpClientConfig; import com.metamx.http.client.HttpClientInit; -import io.druid.guice.guice.annotations.Global; +import io.druid.guice.annotations.Global; import org.joda.time.Duration; import org.joda.time.Period; diff --git a/server/src/main/java/io/druid/guice/guice/IndexingServiceDiscoveryModule.java b/server/src/main/java/io/druid/guice/IndexingServiceDiscoveryModule.java similarity index 93% rename from server/src/main/java/io/druid/guice/guice/IndexingServiceDiscoveryModule.java rename to server/src/main/java/io/druid/guice/IndexingServiceDiscoveryModule.java index a59d0839999..60e0c15281b 100644 --- a/server/src/main/java/io/druid/guice/guice/IndexingServiceDiscoveryModule.java +++ b/server/src/main/java/io/druid/guice/IndexingServiceDiscoveryModule.java @@ -17,15 +17,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Provides; import com.google.inject.TypeLiteral; -import com.metamx.druid.client.indexing.IndexingServiceSelector; -import com.metamx.druid.client.indexing.IndexingServiceSelectorConfig; import io.druid.client.indexing.IndexingService; +import io.druid.client.indexing.IndexingServiceSelector; +import io.druid.client.indexing.IndexingServiceSelectorConfig; import io.druid.client.selector.DiscoverySelector; import io.druid.client.selector.Server; import org.apache.curator.x.discovery.ServiceDiscovery; diff --git a/server/src/main/java/io/druid/guice/guice/LocalDataSegmentPusherProvider.java b/server/src/main/java/io/druid/guice/LocalDataSegmentPusherProvider.java similarity index 86% rename from server/src/main/java/io/druid/guice/guice/LocalDataSegmentPusherProvider.java rename to server/src/main/java/io/druid/guice/LocalDataSegmentPusherProvider.java index 84350024083..3af8510dd1d 100644 --- a/server/src/main/java/io/druid/guice/guice/LocalDataSegmentPusherProvider.java +++ b/server/src/main/java/io/druid/guice/LocalDataSegmentPusherProvider.java @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.databind.ObjectMapper; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.loading.LocalDataSegmentPusher; -import com.metamx.druid.loading.LocalDataSegmentPusherConfig; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.loading.LocalDataSegmentPusher; +import io.druid.segment.loading.LocalDataSegmentPusherConfig; import javax.validation.constraints.NotNull; diff --git a/server/src/main/java/io/druid/guice/guice/QueryRunnerFactoryModule.java b/server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java similarity index 84% rename from server/src/main/java/io/druid/guice/guice/QueryRunnerFactoryModule.java rename to server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java index 78a2c76f850..212e3fa6f62 100644 --- a/server/src/main/java/io/druid/guice/guice/QueryRunnerFactoryModule.java +++ b/server/src/main/java/io/druid/guice/QueryRunnerFactoryModule.java @@ -17,26 +17,25 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.common.collect.ImmutableMap; import com.google.inject.Binder; import com.google.inject.TypeLiteral; import com.google.inject.multibindings.MapBinder; -import com.metamx.druid.query.group.GroupByQueryEngine; -import com.metamx.druid.query.group.GroupByQueryRunnerFactory; -import com.metamx.druid.query.metadata.SegmentMetadataQueryRunnerFactory; -import com.metamx.druid.query.search.SearchQueryRunnerFactory; -import com.metamx.druid.query.timeboundary.TimeBoundaryQueryRunnerFactory; -import com.metamx.druid.query.timeseries.TimeseriesQueryRunnerFactory; -import io.druid.guice.QueryToolChestModule; import io.druid.query.Query; import io.druid.query.QueryRunnerFactory; import io.druid.query.groupby.GroupByQuery; +import io.druid.query.groupby.GroupByQueryEngine; +import io.druid.query.groupby.GroupByQueryRunnerFactory; +import io.druid.query.metadata.SegmentMetadataQueryRunnerFactory; import io.druid.query.metadata.metadata.SegmentMetadataQuery; +import io.druid.query.search.SearchQueryRunnerFactory; import io.druid.query.search.search.SearchQuery; import io.druid.query.timeboundary.TimeBoundaryQuery; +import io.druid.query.timeboundary.TimeBoundaryQueryRunnerFactory; import io.druid.query.timeseries.TimeseriesQuery; +import io.druid.query.timeseries.TimeseriesQueryRunnerFactory; import java.util.Map; diff --git a/server/src/main/java/io/druid/guice/guice/QueryableModule.java b/server/src/main/java/io/druid/guice/QueryableModule.java similarity index 98% rename from server/src/main/java/io/druid/guice/guice/QueryableModule.java rename to server/src/main/java/io/druid/guice/QueryableModule.java index b0a83701a4d..184f80a1b58 100644 --- a/server/src/main/java/io/druid/guice/guice/QueryableModule.java +++ b/server/src/main/java/io/druid/guice/QueryableModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.databind.Module; import com.fasterxml.jackson.databind.module.SimpleModule; diff --git a/server/src/main/java/io/druid/guice/guice/S3DataSegmentPusherProvider.java b/server/src/main/java/io/druid/guice/S3DataSegmentPusherProvider.java similarity index 88% rename from server/src/main/java/io/druid/guice/guice/S3DataSegmentPusherProvider.java rename to server/src/main/java/io/druid/guice/S3DataSegmentPusherProvider.java index 19b03ef3855..2cb9765cbf7 100644 --- a/server/src/main/java/io/druid/guice/guice/S3DataSegmentPusherProvider.java +++ b/server/src/main/java/io/druid/guice/S3DataSegmentPusherProvider.java @@ -17,13 +17,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.databind.ObjectMapper; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.loading.S3DataSegmentPusher; -import com.metamx.druid.loading.S3DataSegmentPusherConfig; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.loading.S3DataSegmentPusher; +import io.druid.segment.loading.S3DataSegmentPusherConfig; import org.jets3t.service.impl.rest.httpclient.RestS3Service; import javax.validation.constraints.NotNull; diff --git a/server/src/main/java/io/druid/guice/guice/ServerModule.java b/server/src/main/java/io/druid/guice/ServerModule.java similarity index 95% rename from server/src/main/java/io/druid/guice/guice/ServerModule.java rename to server/src/main/java/io/druid/guice/ServerModule.java index 3b217f1269e..e65204f20a2 100644 --- a/server/src/main/java/io/druid/guice/guice/ServerModule.java +++ b/server/src/main/java/io/druid/guice/ServerModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; @@ -25,7 +25,7 @@ import com.google.inject.Provides; import com.metamx.common.concurrent.ScheduledExecutorFactory; import com.metamx.common.concurrent.ScheduledExecutors; import com.metamx.common.lifecycle.Lifecycle; -import io.druid.guice.guice.annotations.Self; +import io.druid.guice.annotations.Self; import io.druid.server.DruidNode; import io.druid.server.initialization.initialization.ZkPathsConfig; diff --git a/server/src/main/java/io/druid/guice/guice/ServerViewModule.java b/server/src/main/java/io/druid/guice/ServerViewModule.java similarity index 98% rename from server/src/main/java/io/druid/guice/guice/ServerViewModule.java rename to server/src/main/java/io/druid/guice/ServerViewModule.java index f6a439d2782..9ccee0984e0 100644 --- a/server/src/main/java/io/druid/guice/guice/ServerViewModule.java +++ b/server/src/main/java/io/druid/guice/ServerViewModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; diff --git a/server/src/main/java/io/druid/guice/guice/StorageNodeModule.java b/server/src/main/java/io/druid/guice/StorageNodeModule.java similarity index 84% rename from server/src/main/java/io/druid/guice/guice/StorageNodeModule.java rename to server/src/main/java/io/druid/guice/StorageNodeModule.java index b5e17a9c673..2ee270cc330 100644 --- a/server/src/main/java/io/druid/guice/guice/StorageNodeModule.java +++ b/server/src/main/java/io/druid/guice/StorageNodeModule.java @@ -17,18 +17,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice; +package io.druid.guice; import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Provides; -import com.metamx.druid.loading.MMappedQueryableIndexFactory; -import com.metamx.druid.loading.QueryableIndexFactory; -import com.metamx.druid.loading.SegmentLoaderConfig; -import com.metamx.druid.query.DefaultQueryRunnerFactoryConglomerate; -import com.metamx.druid.query.QueryRunnerFactoryConglomerate; import io.druid.client.DruidServerConfig; -import io.druid.guice.guice.annotations.Self; +import io.druid.guice.annotations.Self; +import io.druid.query.DefaultQueryRunnerFactoryConglomerate; +import io.druid.query.QueryRunnerFactoryConglomerate; +import io.druid.segment.loading.MMappedQueryableIndexFactory; +import io.druid.segment.loading.QueryableIndexFactory; +import io.druid.segment.loading.SegmentLoaderConfig; import io.druid.server.DruidNode; import io.druid.server.coordination.DruidServerMetadata; diff --git a/server/src/main/java/io/druid/guice/guice/annotations/Client.java b/server/src/main/java/io/druid/guice/annotations/Client.java similarity index 96% rename from server/src/main/java/io/druid/guice/guice/annotations/Client.java rename to server/src/main/java/io/druid/guice/annotations/Client.java index 34617592e44..240a0a8bcd5 100644 --- a/server/src/main/java/io/druid/guice/guice/annotations/Client.java +++ b/server/src/main/java/io/druid/guice/annotations/Client.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice.annotations; +package io.druid.guice.annotations; import com.google.inject.BindingAnnotation; diff --git a/server/src/main/java/io/druid/guice/guice/annotations/Processing.java b/server/src/main/java/io/druid/guice/annotations/Processing.java similarity index 96% rename from server/src/main/java/io/druid/guice/guice/annotations/Processing.java rename to server/src/main/java/io/druid/guice/annotations/Processing.java index 33117be1083..e386476c1c9 100644 --- a/server/src/main/java/io/druid/guice/guice/annotations/Processing.java +++ b/server/src/main/java/io/druid/guice/annotations/Processing.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package io.druid.guice.guice.annotations; +package io.druid.guice.annotations; import com.google.inject.BindingAnnotation; diff --git a/server/src/main/java/io/druid/segment/loading/AWSCredentialsConfig.java b/server/src/main/java/io/druid/segment/loading/AWSCredentialsConfig.java new file mode 100644 index 00000000000..b9a032fd4ea --- /dev/null +++ b/server/src/main/java/io/druid/segment/loading/AWSCredentialsConfig.java @@ -0,0 +1,43 @@ +/* + * 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.segment.loading; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + */ +public class AWSCredentialsConfig +{ + @JsonProperty + private String accessKey = ""; + + @JsonProperty + private String secretKey = ""; + + public String getAccessKey() + { + return accessKey; + } + + public String getSecretKey() + { + return secretKey; + } +} diff --git a/server/src/main/java/com/metamx/druid/loading/DataSegmentKiller.java b/server/src/main/java/io/druid/segment/loading/DataSegmentKiller.java similarity index 96% rename from server/src/main/java/com/metamx/druid/loading/DataSegmentKiller.java rename to server/src/main/java/io/druid/segment/loading/DataSegmentKiller.java index e2360155fdc..4c84ba887a2 100644 --- a/server/src/main/java/com/metamx/druid/loading/DataSegmentKiller.java +++ b/server/src/main/java/io/druid/segment/loading/DataSegmentKiller.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import io.druid.client.DataSegment; diff --git a/server/src/main/java/com/metamx/druid/loading/DataSegmentPuller.java b/server/src/main/java/io/druid/segment/loading/DataSegmentPuller.java similarity index 98% rename from server/src/main/java/com/metamx/druid/loading/DataSegmentPuller.java rename to server/src/main/java/io/druid/segment/loading/DataSegmentPuller.java index 4325561e943..cd525a8b81b 100644 --- a/server/src/main/java/com/metamx/druid/loading/DataSegmentPuller.java +++ b/server/src/main/java/io/druid/segment/loading/DataSegmentPuller.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import io.druid.client.DataSegment; diff --git a/server/src/main/java/com/metamx/druid/loading/DataSegmentPusher.java b/server/src/main/java/io/druid/segment/loading/DataSegmentPusher.java similarity index 96% rename from server/src/main/java/com/metamx/druid/loading/DataSegmentPusher.java rename to server/src/main/java/io/druid/segment/loading/DataSegmentPusher.java index 4d877477a4f..88535622314 100644 --- a/server/src/main/java/com/metamx/druid/loading/DataSegmentPusher.java +++ b/server/src/main/java/io/druid/segment/loading/DataSegmentPusher.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import io.druid.client.DataSegment; diff --git a/server/src/main/java/com/metamx/druid/loading/DataSegmentPusherUtil.java b/server/src/main/java/io/druid/segment/loading/DataSegmentPusherUtil.java similarity index 98% rename from server/src/main/java/com/metamx/druid/loading/DataSegmentPusherUtil.java rename to server/src/main/java/io/druid/segment/loading/DataSegmentPusherUtil.java index 643d2762a01..bba69a41fa2 100644 --- a/server/src/main/java/com/metamx/druid/loading/DataSegmentPusherUtil.java +++ b/server/src/main/java/io/druid/segment/loading/DataSegmentPusherUtil.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.google.common.base.Joiner; import io.druid.client.DataSegment; diff --git a/server/src/main/java/com/metamx/druid/loading/DelegatingSegmentLoader.java b/server/src/main/java/io/druid/segment/loading/DelegatingSegmentLoader.java similarity index 98% rename from server/src/main/java/com/metamx/druid/loading/DelegatingSegmentLoader.java rename to server/src/main/java/io/druid/segment/loading/DelegatingSegmentLoader.java index 91ed6ec0a3f..a584d8c869e 100644 --- a/server/src/main/java/com/metamx/druid/loading/DelegatingSegmentLoader.java +++ b/server/src/main/java/io/druid/segment/loading/DelegatingSegmentLoader.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.metamx.common.MapUtils; import io.druid.client.DataSegment; diff --git a/server/src/main/java/com/metamx/druid/loading/HdfsDataSegmentPuller.java b/server/src/main/java/io/druid/segment/loading/HdfsDataSegmentPuller.java similarity index 98% rename from server/src/main/java/com/metamx/druid/loading/HdfsDataSegmentPuller.java rename to server/src/main/java/io/druid/segment/loading/HdfsDataSegmentPuller.java index 4f05b3b23d9..02c959c1c9b 100644 --- a/server/src/main/java/com/metamx/druid/loading/HdfsDataSegmentPuller.java +++ b/server/src/main/java/io/druid/segment/loading/HdfsDataSegmentPuller.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.google.common.io.Closeables; import com.google.inject.Inject; diff --git a/server/src/main/java/com/metamx/druid/loading/HdfsDataSegmentPusher.java b/server/src/main/java/io/druid/segment/loading/HdfsDataSegmentPusher.java similarity index 99% rename from server/src/main/java/com/metamx/druid/loading/HdfsDataSegmentPusher.java rename to server/src/main/java/io/druid/segment/loading/HdfsDataSegmentPusher.java index 301f47b8af7..aec51b8feb4 100644 --- a/server/src/main/java/com/metamx/druid/loading/HdfsDataSegmentPusher.java +++ b/server/src/main/java/io/druid/segment/loading/HdfsDataSegmentPusher.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableMap; diff --git a/server/src/main/java/com/metamx/druid/loading/HdfsDataSegmentPusherConfig.java b/server/src/main/java/io/druid/segment/loading/HdfsDataSegmentPusherConfig.java similarity index 92% rename from server/src/main/java/com/metamx/druid/loading/HdfsDataSegmentPusherConfig.java rename to server/src/main/java/io/druid/segment/loading/HdfsDataSegmentPusherConfig.java index 61061f7ecbf..e329fdeb4c4 100644 --- a/server/src/main/java/com/metamx/druid/loading/HdfsDataSegmentPusherConfig.java +++ b/server/src/main/java/io/druid/segment/loading/HdfsDataSegmentPusherConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/loading/LocalDataSegmentPuller.java b/server/src/main/java/io/druid/segment/loading/LocalDataSegmentPuller.java similarity index 98% rename from server/src/main/java/com/metamx/druid/loading/LocalDataSegmentPuller.java rename to server/src/main/java/io/druid/segment/loading/LocalDataSegmentPuller.java index c3aca6f4376..89fe4c72f24 100644 --- a/server/src/main/java/com/metamx/druid/loading/LocalDataSegmentPuller.java +++ b/server/src/main/java/io/druid/segment/loading/LocalDataSegmentPuller.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.google.common.io.Files; import com.metamx.common.MapUtils; diff --git a/server/src/main/java/com/metamx/druid/loading/LocalDataSegmentPusher.java b/server/src/main/java/io/druid/segment/loading/LocalDataSegmentPusher.java similarity index 98% rename from server/src/main/java/com/metamx/druid/loading/LocalDataSegmentPusher.java rename to server/src/main/java/io/druid/segment/loading/LocalDataSegmentPusher.java index 8cdb62ed0bc..774d1b6fc4a 100644 --- a/server/src/main/java/com/metamx/druid/loading/LocalDataSegmentPusher.java +++ b/server/src/main/java/io/druid/segment/loading/LocalDataSegmentPusher.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableMap; diff --git a/server/src/main/java/com/metamx/druid/loading/LocalDataSegmentPusherConfig.java b/server/src/main/java/io/druid/segment/loading/LocalDataSegmentPusherConfig.java similarity index 90% rename from server/src/main/java/com/metamx/druid/loading/LocalDataSegmentPusherConfig.java rename to server/src/main/java/io/druid/segment/loading/LocalDataSegmentPusherConfig.java index 7addab21ce5..823ffe38ee5 100644 --- a/server/src/main/java/com/metamx/druid/loading/LocalDataSegmentPusherConfig.java +++ b/server/src/main/java/io/druid/segment/loading/LocalDataSegmentPusherConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,10 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.fasterxml.jackson.annotation.JsonProperty; -import org.skife.config.Config; import java.io.File; diff --git a/server/src/main/java/com/metamx/druid/loading/MMappedQueryableIndexFactory.java b/server/src/main/java/io/druid/segment/loading/MMappedQueryableIndexFactory.java similarity index 98% rename from server/src/main/java/com/metamx/druid/loading/MMappedQueryableIndexFactory.java rename to server/src/main/java/io/druid/segment/loading/MMappedQueryableIndexFactory.java index 3480a96d47a..717b0b513a0 100644 --- a/server/src/main/java/com/metamx/druid/loading/MMappedQueryableIndexFactory.java +++ b/server/src/main/java/io/druid/segment/loading/MMappedQueryableIndexFactory.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.metamx.common.logger.Logger; import io.druid.segment.IndexIO; diff --git a/server/src/main/java/com/metamx/druid/loading/OmniSegmentLoader.java b/server/src/main/java/io/druid/segment/loading/OmniSegmentLoader.java similarity index 99% rename from server/src/main/java/com/metamx/druid/loading/OmniSegmentLoader.java rename to server/src/main/java/io/druid/segment/loading/OmniSegmentLoader.java index fe44c8895f0..4eff9fa56a1 100644 --- a/server/src/main/java/com/metamx/druid/loading/OmniSegmentLoader.java +++ b/server/src/main/java/io/druid/segment/loading/OmniSegmentLoader.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; diff --git a/server/src/main/java/com/metamx/druid/loading/QueryableIndexFactory.java b/server/src/main/java/io/druid/segment/loading/QueryableIndexFactory.java similarity index 91% rename from server/src/main/java/com/metamx/druid/loading/QueryableIndexFactory.java rename to server/src/main/java/io/druid/segment/loading/QueryableIndexFactory.java index 208f9d5e161..cf802b56e41 100644 --- a/server/src/main/java/com/metamx/druid/loading/QueryableIndexFactory.java +++ b/server/src/main/java/io/druid/segment/loading/QueryableIndexFactory.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import io.druid.segment.QueryableIndex; diff --git a/server/src/main/java/com/metamx/druid/loading/S3DataSegmentKiller.java b/server/src/main/java/io/druid/segment/loading/S3DataSegmentKiller.java similarity index 98% rename from server/src/main/java/com/metamx/druid/loading/S3DataSegmentKiller.java rename to server/src/main/java/io/druid/segment/loading/S3DataSegmentKiller.java index 01c3c50b9d4..0003aa2adcf 100644 --- a/server/src/main/java/com/metamx/druid/loading/S3DataSegmentKiller.java +++ b/server/src/main/java/io/druid/segment/loading/S3DataSegmentKiller.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.google.inject.Inject; import com.metamx.common.MapUtils; diff --git a/server/src/main/java/com/metamx/druid/loading/S3DataSegmentPuller.java b/server/src/main/java/io/druid/segment/loading/S3DataSegmentPuller.java similarity index 99% rename from server/src/main/java/com/metamx/druid/loading/S3DataSegmentPuller.java rename to server/src/main/java/io/druid/segment/loading/S3DataSegmentPuller.java index a552fe94418..d5e650c3737 100644 --- a/server/src/main/java/com/metamx/druid/loading/S3DataSegmentPuller.java +++ b/server/src/main/java/io/druid/segment/loading/S3DataSegmentPuller.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.google.common.base.Throwables; import com.google.common.io.ByteStreams; diff --git a/server/src/main/java/com/metamx/druid/loading/S3DataSegmentPusher.java b/server/src/main/java/io/druid/segment/loading/S3DataSegmentPusher.java similarity index 99% rename from server/src/main/java/com/metamx/druid/loading/S3DataSegmentPusher.java rename to server/src/main/java/io/druid/segment/loading/S3DataSegmentPusher.java index 08688ded001..f41776fb4f6 100644 --- a/server/src/main/java/com/metamx/druid/loading/S3DataSegmentPusher.java +++ b/server/src/main/java/io/druid/segment/loading/S3DataSegmentPusher.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Joiner; diff --git a/server/src/main/java/com/metamx/druid/loading/S3DataSegmentPusherConfig.java b/server/src/main/java/io/druid/segment/loading/S3DataSegmentPusherConfig.java similarity index 89% rename from server/src/main/java/com/metamx/druid/loading/S3DataSegmentPusherConfig.java rename to server/src/main/java/io/druid/segment/loading/S3DataSegmentPusherConfig.java index 70fa23c4278..b74d22597d7 100644 --- a/server/src/main/java/com/metamx/druid/loading/S3DataSegmentPusherConfig.java +++ b/server/src/main/java/io/druid/segment/loading/S3DataSegmentPusherConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,11 +17,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.fasterxml.jackson.annotation.JsonProperty; -import org.skife.config.Config; -import org.skife.config.Default; /** */ diff --git a/server/src/main/java/com/metamx/druid/loading/SegmentLoader.java b/server/src/main/java/io/druid/segment/loading/SegmentLoader.java similarity index 97% rename from server/src/main/java/com/metamx/druid/loading/SegmentLoader.java rename to server/src/main/java/io/druid/segment/loading/SegmentLoader.java index 0402a964b3c..95caacb0ac3 100644 --- a/server/src/main/java/com/metamx/druid/loading/SegmentLoader.java +++ b/server/src/main/java/io/druid/segment/loading/SegmentLoader.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import io.druid.client.DataSegment; import io.druid.segment.Segment; diff --git a/server/src/main/java/com/metamx/druid/loading/SegmentLoaderConfig.java b/server/src/main/java/io/druid/segment/loading/SegmentLoaderConfig.java similarity index 93% rename from server/src/main/java/com/metamx/druid/loading/SegmentLoaderConfig.java rename to server/src/main/java/io/druid/segment/loading/SegmentLoaderConfig.java index 9b2b0342150..a7b603582d8 100644 --- a/server/src/main/java/com/metamx/druid/loading/SegmentLoaderConfig.java +++ b/server/src/main/java/io/druid/segment/loading/SegmentLoaderConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/loading/SegmentLoadingException.java b/server/src/main/java/io/druid/segment/loading/SegmentLoadingException.java similarity index 93% rename from server/src/main/java/com/metamx/druid/loading/SegmentLoadingException.java rename to server/src/main/java/io/druid/segment/loading/SegmentLoadingException.java index d52fd6e3a82..7196d37dccb 100644 --- a/server/src/main/java/com/metamx/druid/loading/SegmentLoadingException.java +++ b/server/src/main/java/io/druid/segment/loading/SegmentLoadingException.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; /** */ diff --git a/server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java b/server/src/main/java/io/druid/segment/loading/SingleSegmentLoader.java similarity index 99% rename from server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java rename to server/src/main/java/io/druid/segment/loading/SingleSegmentLoader.java index 36955406461..d331248d525 100644 --- a/server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java +++ b/server/src/main/java/io/druid/segment/loading/SingleSegmentLoader.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; diff --git a/server/src/main/java/com/metamx/druid/loading/cassandra/CassandraDataSegmentConfig.java b/server/src/main/java/io/druid/segment/loading/cassandra/CassandraDataSegmentConfig.java similarity index 92% rename from server/src/main/java/com/metamx/druid/loading/cassandra/CassandraDataSegmentConfig.java rename to server/src/main/java/io/druid/segment/loading/cassandra/CassandraDataSegmentConfig.java index e392cc4bb0d..d9551a78782 100644 --- a/server/src/main/java/com/metamx/druid/loading/cassandra/CassandraDataSegmentConfig.java +++ b/server/src/main/java/io/druid/segment/loading/cassandra/CassandraDataSegmentConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading.cassandra; +package io.druid.segment.loading.cassandra; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/loading/cassandra/CassandraDataSegmentPuller.java b/server/src/main/java/io/druid/segment/loading/cassandra/CassandraDataSegmentPuller.java similarity index 96% rename from server/src/main/java/com/metamx/druid/loading/cassandra/CassandraDataSegmentPuller.java rename to server/src/main/java/io/druid/segment/loading/cassandra/CassandraDataSegmentPuller.java index cb77a16b21a..2321cf9fdcd 100644 --- a/server/src/main/java/com/metamx/druid/loading/cassandra/CassandraDataSegmentPuller.java +++ b/server/src/main/java/io/druid/segment/loading/cassandra/CassandraDataSegmentPuller.java @@ -17,14 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading.cassandra; +package io.druid.segment.loading.cassandra; import com.google.common.io.Files; import com.google.inject.Inject; import com.metamx.common.ISE; import com.metamx.common.logger.Logger; -import com.metamx.druid.loading.DataSegmentPuller; -import com.metamx.druid.loading.SegmentLoadingException; import com.netflix.astyanax.connectionpool.OperationResult; import com.netflix.astyanax.connectionpool.exceptions.ConnectionException; import com.netflix.astyanax.model.ColumnList; @@ -32,6 +30,8 @@ import com.netflix.astyanax.recipes.storage.ChunkedStorage; import com.netflix.astyanax.recipes.storage.ObjectMetadata; import io.druid.client.DataSegment; import io.druid.common.utils.CompressionUtils; +import io.druid.segment.loading.DataSegmentPuller; +import io.druid.segment.loading.SegmentLoadingException; import org.apache.commons.io.FileUtils; import java.io.File; diff --git a/server/src/main/java/com/metamx/druid/loading/cassandra/CassandraDataSegmentPusher.java b/server/src/main/java/io/druid/segment/loading/cassandra/CassandraDataSegmentPusher.java similarity index 95% rename from server/src/main/java/com/metamx/druid/loading/cassandra/CassandraDataSegmentPusher.java rename to server/src/main/java/io/druid/segment/loading/cassandra/CassandraDataSegmentPusher.java index e2983cc4a69..ca0b1577884 100644 --- a/server/src/main/java/com/metamx/druid/loading/cassandra/CassandraDataSegmentPusher.java +++ b/server/src/main/java/io/druid/segment/loading/cassandra/CassandraDataSegmentPusher.java @@ -17,20 +17,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading.cassandra; +package io.druid.segment.loading.cassandra; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Joiner; import com.google.common.collect.ImmutableMap; import com.google.inject.Inject; import com.metamx.common.logger.Logger; -import com.metamx.druid.loading.DataSegmentPusher; -import com.metamx.druid.loading.DataSegmentPusherUtil; import com.netflix.astyanax.MutationBatch; import com.netflix.astyanax.recipes.storage.ChunkedStorage; import io.druid.client.DataSegment; import io.druid.common.utils.CompressionUtils; import io.druid.segment.IndexIO; +import io.druid.segment.loading.DataSegmentPusher; +import io.druid.segment.loading.DataSegmentPusherUtil; import java.io.File; import java.io.FileInputStream; diff --git a/server/src/main/java/com/metamx/druid/loading/cassandra/CassandraStorage.java b/server/src/main/java/io/druid/segment/loading/cassandra/CassandraStorage.java similarity index 97% rename from server/src/main/java/com/metamx/druid/loading/cassandra/CassandraStorage.java rename to server/src/main/java/io/druid/segment/loading/cassandra/CassandraStorage.java index e9d04609135..3a693575c18 100644 --- a/server/src/main/java/com/metamx/druid/loading/cassandra/CassandraStorage.java +++ b/server/src/main/java/io/druid/segment/loading/cassandra/CassandraStorage.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading.cassandra; +package io.druid.segment.loading.cassandra; import com.netflix.astyanax.AstyanaxContext; import com.netflix.astyanax.Keyspace; diff --git a/server/src/main/java/com/metamx/druid/DruidProcessingConfig.java b/server/src/main/java/io/druid/server/DruidProcessingConfig.java similarity index 93% rename from server/src/main/java/com/metamx/druid/DruidProcessingConfig.java rename to server/src/main/java/io/druid/server/DruidProcessingConfig.java index b497ae8f6ce..ada4eef609d 100644 --- a/server/src/main/java/com/metamx/druid/DruidProcessingConfig.java +++ b/server/src/main/java/io/druid/server/DruidProcessingConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid; +package io.druid.server; import com.metamx.common.concurrent.ExecutorServiceConfig; import org.skife.config.Config; diff --git a/server/src/main/java/io/druid/server/QueryServlet.java b/server/src/main/java/io/druid/server/QueryServlet.java index d3e2d7e7522..49d32ebe0dd 100644 --- a/server/src/main/java/io/druid/server/QueryServlet.java +++ b/server/src/main/java/io/druid/server/QueryServlet.java @@ -32,8 +32,8 @@ import com.metamx.common.logger.Logger; import com.metamx.emitter.service.AlertEvent; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceMetricEvent; -import io.druid.guice.guice.annotations.Json; -import io.druid.guice.guice.annotations.Smile; +import io.druid.guice.annotations.Json; +import io.druid.guice.annotations.Smile; import io.druid.query.Query; import io.druid.query.QuerySegmentWalker; import io.druid.server.log.RequestLogger; diff --git a/server/src/main/java/com/metamx/druid/coordination/DataSegmentChangeHandler.java b/server/src/main/java/io/druid/server/coordination/DataSegmentChangeHandler.java similarity index 96% rename from server/src/main/java/com/metamx/druid/coordination/DataSegmentChangeHandler.java rename to server/src/main/java/io/druid/server/coordination/DataSegmentChangeHandler.java index 640abfba82b..b3c7b5dbe03 100644 --- a/server/src/main/java/com/metamx/druid/coordination/DataSegmentChangeHandler.java +++ b/server/src/main/java/io/druid/server/coordination/DataSegmentChangeHandler.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import io.druid.client.DataSegment; diff --git a/server/src/main/java/com/metamx/druid/coordination/DataSegmentChangeRequest.java b/server/src/main/java/io/druid/server/coordination/DataSegmentChangeRequest.java similarity index 97% rename from server/src/main/java/com/metamx/druid/coordination/DataSegmentChangeRequest.java rename to server/src/main/java/io/druid/server/coordination/DataSegmentChangeRequest.java index 2649dd0492a..0c29d1e1c75 100644 --- a/server/src/main/java/com/metamx/druid/coordination/DataSegmentChangeRequest.java +++ b/server/src/main/java/io/druid/server/coordination/DataSegmentChangeRequest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; diff --git a/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestDrop.java b/server/src/main/java/io/druid/server/coordination/SegmentChangeRequestDrop.java similarity index 97% rename from server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestDrop.java rename to server/src/main/java/io/druid/server/coordination/SegmentChangeRequestDrop.java index b115db25ffa..ad2e44bb6a7 100644 --- a/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestDrop.java +++ b/server/src/main/java/io/druid/server/coordination/SegmentChangeRequestDrop.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestLoad.java b/server/src/main/java/io/druid/server/coordination/SegmentChangeRequestLoad.java similarity index 97% rename from server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestLoad.java rename to server/src/main/java/io/druid/server/coordination/SegmentChangeRequestLoad.java index 4582689560f..192559071c5 100644 --- a/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestLoad.java +++ b/server/src/main/java/io/druid/server/coordination/SegmentChangeRequestLoad.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestNoop.java b/server/src/main/java/io/druid/server/coordination/SegmentChangeRequestNoop.java similarity index 91% rename from server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestNoop.java rename to server/src/main/java/io/druid/server/coordination/SegmentChangeRequestNoop.java index e72154fd81d..e713278b47c 100644 --- a/server/src/main/java/com/metamx/druid/coordination/SegmentChangeRequestNoop.java +++ b/server/src/main/java/io/druid/server/coordination/SegmentChangeRequestNoop.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; /** */ diff --git a/server/src/main/java/com/metamx/druid/coordination/ServerManager.java b/server/src/main/java/io/druid/server/coordination/ServerManager.java similarity index 97% rename from server/src/main/java/com/metamx/druid/coordination/ServerManager.java rename to server/src/main/java/io/druid/server/coordination/ServerManager.java index 9b8afa6dbff..ce64a93f9a1 100644 --- a/server/src/main/java/com/metamx/druid/coordination/ServerManager.java +++ b/server/src/main/java/io/druid/server/coordination/ServerManager.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import com.google.common.base.Function; import com.google.common.base.Predicates; @@ -25,16 +25,12 @@ import com.google.common.collect.Ordering; import com.google.inject.Inject; import com.metamx.common.ISE; import com.metamx.common.guava.FunctionalIterable; -import com.metamx.druid.loading.SegmentLoader; -import com.metamx.druid.loading.SegmentLoadingException; -import com.metamx.druid.query.QueryRunnerFactoryConglomerate; -import com.metamx.druid.query.ReferenceCountingSegmentQueryRunner; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceMetricEvent; import io.druid.client.DataSegment; import io.druid.collections.CountingMap; -import io.druid.guice.guice.annotations.Processing; +import io.druid.guice.annotations.Processing; import io.druid.query.BySegmentQueryRunner; import io.druid.query.FinalizeResultsQueryRunner; import io.druid.query.MetricsEmittingQueryRunner; @@ -42,14 +38,18 @@ import io.druid.query.NoopQueryRunner; import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; +import io.druid.query.QueryRunnerFactoryConglomerate; import io.druid.query.QuerySegmentWalker; import io.druid.query.QueryToolChest; +import io.druid.query.ReferenceCountingSegmentQueryRunner; import io.druid.query.SegmentDescriptor; import io.druid.query.spec.QuerySegmentSpec; import io.druid.query.spec.SpecificSegmentQueryRunner; import io.druid.query.spec.SpecificSegmentSpec; import io.druid.segment.ReferenceCountingSegment; import io.druid.segment.Segment; +import io.druid.segment.loading.SegmentLoader; +import io.druid.segment.loading.SegmentLoadingException; import io.druid.timeline.TimelineObjectHolder; import io.druid.timeline.VersionedIntervalTimeline; import io.druid.timeline.partition.PartitionChunk; diff --git a/server/src/main/java/com/metamx/druid/coordination/ZkCoordinator.java b/server/src/main/java/io/druid/server/coordination/ZkCoordinator.java similarity index 97% rename from server/src/main/java/com/metamx/druid/coordination/ZkCoordinator.java rename to server/src/main/java/io/druid/server/coordination/ZkCoordinator.java index 941a7e72aed..bc739e4be3e 100644 --- a/server/src/main/java/com/metamx/druid/coordination/ZkCoordinator.java +++ b/server/src/main/java/io/druid/server/coordination/ZkCoordinator.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Throwables; @@ -26,12 +26,10 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.inject.Inject; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.loading.SegmentLoaderConfig; -import com.metamx.druid.loading.SegmentLoadingException; import com.metamx.emitter.EmittingLogger; import io.druid.client.DataSegment; -import io.druid.server.coordination.DataSegmentAnnouncer; -import io.druid.server.coordination.DruidServerMetadata; +import io.druid.segment.loading.SegmentLoaderConfig; +import io.druid.segment.loading.SegmentLoadingException; import io.druid.server.initialization.initialization.ZkPathsConfig; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.cache.ChildData; diff --git a/server/src/main/java/com/metamx/druid/coordination/ZkCoordinatorConfig.java b/server/src/main/java/io/druid/server/coordination/ZkCoordinatorConfig.java similarity index 92% rename from server/src/main/java/com/metamx/druid/coordination/ZkCoordinatorConfig.java rename to server/src/main/java/io/druid/server/coordination/ZkCoordinatorConfig.java index 6f17f5f9a17..c524f152d8c 100644 --- a/server/src/main/java/com/metamx/druid/coordination/ZkCoordinatorConfig.java +++ b/server/src/main/java/io/druid/server/coordination/ZkCoordinatorConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import org.skife.config.Config; diff --git a/server/src/main/java/io/druid/server/http/InfoResource.java b/server/src/main/java/io/druid/server/http/InfoResource.java index 2eaed9527e5..982e97ee4cb 100644 --- a/server/src/main/java/io/druid/server/http/InfoResource.java +++ b/server/src/main/java/io/druid/server/http/InfoResource.java @@ -27,15 +27,15 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.inject.Inject; -import com.metamx.druid.db.DatabaseRuleManager; -import com.metamx.druid.db.DatabaseSegmentManager; -import com.metamx.druid.master.DruidMaster; -import com.metamx.druid.master.rules.Rule; import io.druid.client.DataSegment; import io.druid.client.DruidDataSource; import io.druid.client.DruidServer; import io.druid.client.InventoryView; import io.druid.client.indexing.IndexingServiceClient; +import io.druid.db.DatabaseRuleManager; +import io.druid.db.DatabaseSegmentManager; +import io.druid.server.master.DruidMaster; +import io.druid.server.master.rules.Rule; import org.joda.time.Interval; import javax.annotation.Nullable; diff --git a/server/src/main/java/io/druid/server/http/MasterRedirectInfo.java b/server/src/main/java/io/druid/server/http/MasterRedirectInfo.java index b239112abae..3857ea04d63 100644 --- a/server/src/main/java/io/druid/server/http/MasterRedirectInfo.java +++ b/server/src/main/java/io/druid/server/http/MasterRedirectInfo.java @@ -21,7 +21,7 @@ package io.druid.server.http; import com.google.common.base.Throwables; import com.google.inject.Inject; -import com.metamx.druid.master.DruidMaster; +import io.druid.server.master.DruidMaster; import java.net.URL; diff --git a/server/src/main/java/io/druid/server/http/MasterResource.java b/server/src/main/java/io/druid/server/http/MasterResource.java index 385a3394220..794e48a1c24 100644 --- a/server/src/main/java/io/druid/server/http/MasterResource.java +++ b/server/src/main/java/io/druid/server/http/MasterResource.java @@ -20,8 +20,8 @@ package io.druid.server.http; import com.google.inject.Inject; -import com.metamx.druid.master.DruidMaster; -import com.metamx.druid.master.LoadPeonCallback; +import io.druid.server.master.DruidMaster; +import io.druid.server.master.LoadPeonCallback; import javax.ws.rs.Consumes; import javax.ws.rs.GET; diff --git a/server/src/main/java/io/druid/server/http/MasterSegmentSettingsResource.java b/server/src/main/java/io/druid/server/http/MasterSegmentSettingsResource.java index 70f4e5af955..e86311ccaec 100644 --- a/server/src/main/java/io/druid/server/http/MasterSegmentSettingsResource.java +++ b/server/src/main/java/io/druid/server/http/MasterSegmentSettingsResource.java @@ -19,8 +19,8 @@ package io.druid.server.http; -import com.metamx.druid.master.MasterSegmentSettings; import io.druid.common.config.JacksonConfigManager; +import io.druid.server.master.MasterSegmentSettings; import javax.inject.Inject; import javax.ws.rs.Consumes; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/ConfigModule.java b/server/src/main/java/io/druid/server/initialization/initialization/ConfigModule.java index 0f696fb5261..4ff54fbf82b 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/ConfigModule.java +++ b/server/src/main/java/io/druid/server/initialization/initialization/ConfigModule.java @@ -23,8 +23,8 @@ import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.Provides; import com.metamx.common.config.Config; -import io.druid.guice.guice.JsonConfigurator; -import io.druid.guice.guice.LazySingleton; +import io.druid.guice.JsonConfigurator; +import io.druid.guice.LazySingleton; import org.skife.config.ConfigurationObjectFactory; import javax.validation.Validation; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/EmitterModule.java b/server/src/main/java/io/druid/server/initialization/initialization/EmitterModule.java index 5573b4653cc..a719502c51a 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/EmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/initialization/EmitterModule.java @@ -36,9 +36,9 @@ import com.metamx.common.logger.Logger; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.core.Emitter; import com.metamx.emitter.service.ServiceEmitter; -import io.druid.guice.guice.LazySingleton; -import io.druid.guice.guice.ManageLifecycle; -import io.druid.guice.guice.annotations.Self; +import io.druid.guice.LazySingleton; +import io.druid.guice.ManageLifecycle; +import io.druid.guice.annotations.Self; import io.druid.server.DruidNode; import java.lang.annotation.Annotation; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/HttpEmitterModule.java b/server/src/main/java/io/druid/server/initialization/initialization/HttpEmitterModule.java index cf6478a1397..7e408dc9b38 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/HttpEmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/initialization/HttpEmitterModule.java @@ -30,9 +30,9 @@ import com.metamx.emitter.core.Emitter; import com.metamx.emitter.core.HttpPostEmitter; import com.metamx.http.client.HttpClientConfig; import com.metamx.http.client.HttpClientInit; -import io.druid.guice.guice.JsonConfigProvider; -import io.druid.guice.guice.LazySingleton; -import io.druid.guice.guice.ManageLifecycle; +import io.druid.guice.JsonConfigProvider; +import io.druid.guice.LazySingleton; +import io.druid.guice.ManageLifecycle; import javax.annotation.Nullable; import javax.net.ssl.SSLContext; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/Initialization.java b/server/src/main/java/io/druid/server/initialization/initialization/Initialization.java index 4ce5f5d65c4..7e5349a759f 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/Initialization.java +++ b/server/src/main/java/io/druid/server/initialization/initialization/Initialization.java @@ -28,10 +28,10 @@ import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.Module; import com.metamx.common.ISE; -import io.druid.guice.guice.DruidGuiceExtensions; -import io.druid.guice.guice.DruidSecondaryModule; -import io.druid.guice.guice.annotations.Json; -import io.druid.guice.guice.annotations.Smile; +import io.druid.guice.DruidGuiceExtensions; +import io.druid.guice.DruidSecondaryModule; +import io.druid.guice.annotations.Json; +import io.druid.guice.annotations.Smile; import io.druid.initialization.DruidModule; import io.druid.jackson.JacksonModule; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/JettyServerModule.java b/server/src/main/java/io/druid/server/initialization/initialization/JettyServerModule.java index c31aa7f5489..2c5d81ab0a7 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/JettyServerModule.java +++ b/server/src/main/java/io/druid/server/initialization/initialization/JettyServerModule.java @@ -42,9 +42,9 @@ 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.guice.JsonConfigProvider; -import io.druid.guice.guice.LazySingleton; -import io.druid.guice.guice.annotations.Self; +import io.druid.guice.JsonConfigProvider; +import io.druid.guice.LazySingleton; +import io.druid.guice.annotations.Self; import io.druid.server.DruidNode; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; diff --git a/server/src/main/java/io/druid/server/initialization/initialization/LogEmitterModule.java b/server/src/main/java/io/druid/server/initialization/initialization/LogEmitterModule.java index ea1fa615384..1d84b3fb352 100644 --- a/server/src/main/java/io/druid/server/initialization/initialization/LogEmitterModule.java +++ b/server/src/main/java/io/druid/server/initialization/initialization/LogEmitterModule.java @@ -28,8 +28,8 @@ import com.google.inject.name.Named; import com.metamx.emitter.core.Emitter; import com.metamx.emitter.core.LoggingEmitter; import com.metamx.emitter.core.LoggingEmitterConfig; -import io.druid.guice.guice.JsonConfigProvider; -import io.druid.guice.guice.ManageLifecycle; +import io.druid.guice.JsonConfigProvider; +import io.druid.guice.ManageLifecycle; /** */ diff --git a/server/src/main/java/io/druid/server/log/FileRequestLoggerProvider.java b/server/src/main/java/io/druid/server/log/FileRequestLoggerProvider.java index c1b67d509ad..c698e55daf7 100644 --- a/server/src/main/java/io/druid/server/log/FileRequestLoggerProvider.java +++ b/server/src/main/java/io/druid/server/log/FileRequestLoggerProvider.java @@ -24,7 +24,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.ObjectMapper; import com.metamx.common.concurrent.ScheduledExecutorFactory; -import io.druid.guice.guice.annotations.Json; +import io.druid.guice.annotations.Json; import javax.validation.constraints.NotNull; import java.io.File; diff --git a/server/src/main/java/com/metamx/druid/master/BalancerSegmentHolder.java b/server/src/main/java/io/druid/server/master/BalancerSegmentHolder.java similarity index 97% rename from server/src/main/java/com/metamx/druid/master/BalancerSegmentHolder.java rename to server/src/main/java/io/druid/server/master/BalancerSegmentHolder.java index 25375ed8ca6..928933ec552 100644 --- a/server/src/main/java/com/metamx/druid/master/BalancerSegmentHolder.java +++ b/server/src/main/java/io/druid/server/master/BalancerSegmentHolder.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import io.druid.client.DataSegment; import io.druid.client.DruidServer; diff --git a/server/src/main/java/com/metamx/druid/master/BalancerStrategy.java b/server/src/main/java/io/druid/server/master/BalancerStrategy.java similarity index 97% rename from server/src/main/java/com/metamx/druid/master/BalancerStrategy.java rename to server/src/main/java/io/druid/server/master/BalancerStrategy.java index 715f7f271be..5283f1cfba0 100644 --- a/server/src/main/java/com/metamx/druid/master/BalancerStrategy.java +++ b/server/src/main/java/io/druid/server/master/BalancerStrategy.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import io.druid.client.DataSegment; diff --git a/server/src/main/java/io/druid/server/master/BalancerStrategyFactory.java b/server/src/main/java/io/druid/server/master/BalancerStrategyFactory.java new file mode 100644 index 00000000000..abdb9e88020 --- /dev/null +++ b/server/src/main/java/io/druid/server/master/BalancerStrategyFactory.java @@ -0,0 +1,26 @@ +/* + * 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.master; + +import org.joda.time.DateTime; + +public interface BalancerStrategyFactory +{ + public BalancerStrategy createBalancerStrategy(DateTime referenceTimestamp); +} diff --git a/server/src/main/java/com/metamx/druid/master/CostBalancerStrategy.java b/server/src/main/java/io/druid/server/master/CostBalancerStrategy.java similarity index 99% rename from server/src/main/java/com/metamx/druid/master/CostBalancerStrategy.java rename to server/src/main/java/io/druid/server/master/CostBalancerStrategy.java index 460fe1b3184..abd66d694da 100644 --- a/server/src/main/java/com/metamx/druid/master/CostBalancerStrategy.java +++ b/server/src/main/java/io/druid/server/master/CostBalancerStrategy.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.metamx.common.Pair; import com.metamx.emitter.EmittingLogger; diff --git a/server/src/main/java/com/metamx/druid/SearchResultBuilder.java b/server/src/main/java/io/druid/server/master/CostBalancerStrategyFactory.java similarity index 57% rename from server/src/main/java/com/metamx/druid/SearchResultBuilder.java rename to server/src/main/java/io/druid/server/master/CostBalancerStrategyFactory.java index dfd37885f61..832ee851277 100644 --- a/server/src/main/java/com/metamx/druid/SearchResultBuilder.java +++ b/server/src/main/java/io/druid/server/master/CostBalancerStrategyFactory.java @@ -16,36 +16,16 @@ * 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.master; -package com.metamx.druid; - -import com.google.common.collect.Lists; -import io.druid.query.Result; -import io.druid.query.search.SearchResultValue; -import io.druid.query.search.search.SearchHit; import org.joda.time.DateTime; -/** - */ -public class SearchResultBuilder +public class CostBalancerStrategyFactory implements BalancerStrategyFactory { - private final DateTime timestamp; - private final Iterable hits; - public SearchResultBuilder( - DateTime timestamp, - Iterable hits - ) + @Override + public BalancerStrategy createBalancerStrategy(DateTime referenceTimestamp) { - this.timestamp = timestamp; - this.hits = hits; - } - - public Result build() - { - return new Result( - timestamp, - new SearchResultValue(Lists.newArrayList(hits)) - ); + return new CostBalancerStrategy(referenceTimestamp); } } diff --git a/server/src/main/java/com/metamx/druid/master/DruidCluster.java b/server/src/main/java/io/druid/server/master/DruidCluster.java similarity index 98% rename from server/src/main/java/com/metamx/druid/master/DruidCluster.java rename to server/src/main/java/io/druid/server/master/DruidCluster.java index e96750f4315..dd9d0c33bc5 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidCluster.java +++ b/server/src/main/java/io/druid/server/master/DruidCluster.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.Maps; import com.google.common.collect.MinMaxPriorityQueue; diff --git a/server/src/main/java/com/metamx/druid/master/DruidMaster.java b/server/src/main/java/io/druid/server/master/DruidMaster.java similarity index 99% rename from server/src/main/java/com/metamx/druid/master/DruidMaster.java rename to server/src/main/java/io/druid/server/master/DruidMaster.java index 56348a6f1fd..0cf0b202761 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidMaster.java +++ b/server/src/main/java/io/druid/server/master/DruidMaster.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.base.Function; import com.google.common.base.Predicate; @@ -37,8 +37,6 @@ import com.metamx.common.guava.Comparators; import com.metamx.common.guava.FunctionalIterable; import com.metamx.common.lifecycle.LifecycleStart; import com.metamx.common.lifecycle.LifecycleStop; -import com.metamx.druid.db.DatabaseRuleManager; -import com.metamx.druid.db.DatabaseSegmentManager; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceMetricEvent; @@ -49,7 +47,9 @@ import io.druid.client.ServerInventoryView; import io.druid.client.indexing.IndexingServiceClient; import io.druid.common.config.JacksonConfigManager; import io.druid.concurrent.Execs; -import io.druid.guice.guice.ManageLifecycle; +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 org.apache.curator.framework.CuratorFramework; diff --git a/server/src/main/java/com/metamx/druid/master/DruidMasterBalancer.java b/server/src/main/java/io/druid/server/master/DruidMasterBalancer.java similarity index 99% rename from server/src/main/java/com/metamx/druid/master/DruidMasterBalancer.java rename to server/src/main/java/io/druid/server/master/DruidMasterBalancer.java index ae4604c8274..c2a350d8765 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidMasterBalancer.java +++ b/server/src/main/java/io/druid/server/master/DruidMasterBalancer.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.Lists; import com.google.common.collect.Maps; diff --git a/server/src/main/java/com/metamx/druid/master/DruidMasterCleanup.java b/server/src/main/java/io/druid/server/master/DruidMasterCleanup.java similarity index 99% rename from server/src/main/java/com/metamx/druid/master/DruidMasterCleanup.java rename to server/src/main/java/io/druid/server/master/DruidMasterCleanup.java index d5c25ea7187..5ee60d8a643 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidMasterCleanup.java +++ b/server/src/main/java/io/druid/server/master/DruidMasterCleanup.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.Maps; import com.google.common.collect.MinMaxPriorityQueue; diff --git a/server/src/main/java/com/metamx/druid/master/DruidMasterConfig.java b/server/src/main/java/io/druid/server/master/DruidMasterConfig.java similarity index 95% rename from server/src/main/java/com/metamx/druid/master/DruidMasterConfig.java rename to server/src/main/java/io/druid/server/master/DruidMasterConfig.java index 04896b637ab..d279b91d5c1 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidMasterConfig.java +++ b/server/src/main/java/io/druid/server/master/DruidMasterConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import org.joda.time.Duration; import org.skife.config.Config; diff --git a/server/src/main/java/com/metamx/druid/master/DruidMasterHelper.java b/server/src/main/java/io/druid/server/master/DruidMasterHelper.java similarity index 91% rename from server/src/main/java/com/metamx/druid/master/DruidMasterHelper.java rename to server/src/main/java/io/druid/server/master/DruidMasterHelper.java index d218fa46f28..860a8546e7a 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidMasterHelper.java +++ b/server/src/main/java/io/druid/server/master/DruidMasterHelper.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; /** */ diff --git a/server/src/main/java/com/metamx/druid/master/DruidMasterLogger.java b/server/src/main/java/io/druid/server/master/DruidMasterLogger.java similarity index 99% rename from server/src/main/java/com/metamx/druid/master/DruidMasterLogger.java rename to server/src/main/java/io/druid/server/master/DruidMasterLogger.java index c0689f4c518..6201df44f3f 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidMasterLogger.java +++ b/server/src/main/java/io/druid/server/master/DruidMasterLogger.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.Maps; import com.google.common.collect.MinMaxPriorityQueue; diff --git a/server/src/main/java/com/metamx/druid/master/DruidMasterRuleRunner.java b/server/src/main/java/io/druid/server/master/DruidMasterRuleRunner.java similarity index 96% rename from server/src/main/java/com/metamx/druid/master/DruidMasterRuleRunner.java rename to server/src/main/java/io/druid/server/master/DruidMasterRuleRunner.java index cff13183cfd..a8f5a5dcd18 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidMasterRuleRunner.java +++ b/server/src/main/java/io/druid/server/master/DruidMasterRuleRunner.java @@ -17,12 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; -import com.metamx.druid.db.DatabaseRuleManager; -import com.metamx.druid.master.rules.Rule; import com.metamx.emitter.EmittingLogger; import io.druid.client.DataSegment; +import io.druid.db.DatabaseRuleManager; +import io.druid.server.master.rules.Rule; import org.joda.time.DateTime; import java.util.List; diff --git a/server/src/main/java/com/metamx/druid/master/DruidMasterRuntimeParams.java b/server/src/main/java/io/druid/server/master/DruidMasterRuntimeParams.java similarity index 99% rename from server/src/main/java/com/metamx/druid/master/DruidMasterRuntimeParams.java rename to server/src/main/java/io/druid/server/master/DruidMasterRuntimeParams.java index 15a7d605b00..b1c734013f5 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidMasterRuntimeParams.java +++ b/server/src/main/java/io/druid/server/master/DruidMasterRuntimeParams.java @@ -17,15 +17,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.metamx.common.guava.Comparators; -import com.metamx.druid.db.DatabaseRuleManager; import com.metamx.emitter.service.ServiceEmitter; import io.druid.client.DataSegment; import io.druid.client.DruidDataSource; +import io.druid.db.DatabaseRuleManager; import org.joda.time.DateTime; import java.util.Collection; diff --git a/server/src/main/java/com/metamx/druid/master/DruidMasterSegmentInfoLoader.java b/server/src/main/java/io/druid/server/master/DruidMasterSegmentInfoLoader.java similarity index 98% rename from server/src/main/java/com/metamx/druid/master/DruidMasterSegmentInfoLoader.java rename to server/src/main/java/io/druid/server/master/DruidMasterSegmentInfoLoader.java index 835e0979a7b..879c79d0da6 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidMasterSegmentInfoLoader.java +++ b/server/src/main/java/io/druid/server/master/DruidMasterSegmentInfoLoader.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.metamx.common.logger.Logger; import io.druid.client.DataSegment; diff --git a/server/src/main/java/com/metamx/druid/master/DruidMasterSegmentMerger.java b/server/src/main/java/io/druid/server/master/DruidMasterSegmentMerger.java similarity index 99% rename from server/src/main/java/com/metamx/druid/master/DruidMasterSegmentMerger.java rename to server/src/main/java/io/druid/server/master/DruidMasterSegmentMerger.java index 052fdd58414..2b962b51a2f 100644 --- a/server/src/main/java/com/metamx/druid/master/DruidMasterSegmentMerger.java +++ b/server/src/main/java/io/druid/server/master/DruidMasterSegmentMerger.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.base.Function; import com.google.common.base.Preconditions; diff --git a/server/src/main/java/com/metamx/druid/master/LoadPeonCallback.java b/server/src/main/java/io/druid/server/master/LoadPeonCallback.java similarity index 91% rename from server/src/main/java/com/metamx/druid/master/LoadPeonCallback.java rename to server/src/main/java/io/druid/server/master/LoadPeonCallback.java index 309a9d26b1e..50a513961e9 100644 --- a/server/src/main/java/com/metamx/druid/master/LoadPeonCallback.java +++ b/server/src/main/java/io/druid/server/master/LoadPeonCallback.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; /** */ diff --git a/server/src/main/java/com/metamx/druid/master/LoadQueuePeon.java b/server/src/main/java/io/druid/server/master/LoadQueuePeon.java similarity index 98% rename from server/src/main/java/com/metamx/druid/master/LoadQueuePeon.java rename to server/src/main/java/io/druid/server/master/LoadQueuePeon.java index b681f749b2a..890935c6297 100644 --- a/server/src/main/java/com/metamx/druid/master/LoadQueuePeon.java +++ b/server/src/main/java/io/druid/server/master/LoadQueuePeon.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Function; @@ -25,12 +25,12 @@ import com.google.common.collect.Collections2; import com.google.common.collect.Lists; import com.metamx.common.ISE; import com.metamx.common.guava.Comparators; -import com.metamx.druid.coordination.DataSegmentChangeRequest; -import com.metamx.druid.coordination.SegmentChangeRequestDrop; -import com.metamx.druid.coordination.SegmentChangeRequestLoad; -import com.metamx.druid.coordination.SegmentChangeRequestNoop; import com.metamx.emitter.EmittingLogger; import io.druid.client.DataSegment; +import io.druid.server.coordination.DataSegmentChangeRequest; +import io.druid.server.coordination.SegmentChangeRequestDrop; +import io.druid.server.coordination.SegmentChangeRequestLoad; +import io.druid.server.coordination.SegmentChangeRequestNoop; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.api.CuratorWatcher; import org.apache.curator.utils.ZKPaths; diff --git a/server/src/main/java/com/metamx/druid/master/LoadQueueTaskMaster.java b/server/src/main/java/io/druid/server/master/LoadQueueTaskMaster.java similarity index 95% rename from server/src/main/java/com/metamx/druid/master/LoadQueueTaskMaster.java rename to server/src/main/java/io/druid/server/master/LoadQueueTaskMaster.java index b870708d73b..1d1d114d6dc 100644 --- a/server/src/main/java/com/metamx/druid/master/LoadQueueTaskMaster.java +++ b/server/src/main/java/io/druid/server/master/LoadQueueTaskMaster.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.Inject; diff --git a/server/src/main/java/com/metamx/druid/master/MasterSegmentSettings.java b/server/src/main/java/io/druid/server/master/MasterSegmentSettings.java similarity index 80% rename from server/src/main/java/com/metamx/druid/master/MasterSegmentSettings.java rename to server/src/main/java/io/druid/server/master/MasterSegmentSettings.java index 1bafb38ecc8..a31f9b8dce8 100644 --- a/server/src/main/java/com/metamx/druid/master/MasterSegmentSettings.java +++ b/server/src/main/java/io/druid/server/master/MasterSegmentSettings.java @@ -1,22 +1,22 @@ /* -* Druid - a distributed column store. -* Copyright (C) 2012 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 com.metamx.druid.master; + * 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.master; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/master/MasterStats.java b/server/src/main/java/io/druid/server/master/MasterStats.java similarity index 98% rename from server/src/main/java/com/metamx/druid/master/MasterStats.java rename to server/src/main/java/io/druid/server/master/MasterStats.java index 3fbb46329f1..ed23b9f0b79 100644 --- a/server/src/main/java/com/metamx/druid/master/MasterStats.java +++ b/server/src/main/java/io/druid/server/master/MasterStats.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.Maps; import io.druid.collections.CountingMap; diff --git a/server/src/main/java/com/metamx/druid/master/MergerWhitelist.java b/server/src/main/java/io/druid/server/master/MergerWhitelist.java similarity index 94% rename from server/src/main/java/com/metamx/druid/master/MergerWhitelist.java rename to server/src/main/java/io/druid/server/master/MergerWhitelist.java index 8bfa7293b00..e84d91eead9 100644 --- a/server/src/main/java/com/metamx/druid/master/MergerWhitelist.java +++ b/server/src/main/java/io/druid/server/master/MergerWhitelist.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; diff --git a/server/src/main/java/com/metamx/druid/master/RandomBalancerStrategy.java b/server/src/main/java/io/druid/server/master/RandomBalancerStrategy.java similarity index 98% rename from server/src/main/java/com/metamx/druid/master/RandomBalancerStrategy.java rename to server/src/main/java/io/druid/server/master/RandomBalancerStrategy.java index b2ab0af8739..ec250553e43 100644 --- a/server/src/main/java/com/metamx/druid/master/RandomBalancerStrategy.java +++ b/server/src/main/java/io/druid/server/master/RandomBalancerStrategy.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import io.druid.client.DataSegment; diff --git a/server/src/main/java/io/druid/server/master/RandomBalancerStrategyFactory.java b/server/src/main/java/io/druid/server/master/RandomBalancerStrategyFactory.java new file mode 100644 index 00000000000..e2f4641ed56 --- /dev/null +++ b/server/src/main/java/io/druid/server/master/RandomBalancerStrategyFactory.java @@ -0,0 +1,30 @@ +/* + * 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.master; + +import org.joda.time.DateTime; + +public class RandomBalancerStrategyFactory implements BalancerStrategyFactory +{ + @Override + public BalancerStrategy createBalancerStrategy(DateTime referenceTimestamp) + { + return new RandomBalancerStrategy(); + } +} diff --git a/server/src/main/java/com/metamx/druid/master/ReplicationThrottler.java b/server/src/main/java/io/druid/server/master/ReplicationThrottler.java similarity index 98% rename from server/src/main/java/com/metamx/druid/master/ReplicationThrottler.java rename to server/src/main/java/io/druid/server/master/ReplicationThrottler.java index fc2774374bd..9584bf46f8c 100644 --- a/server/src/main/java/com/metamx/druid/master/ReplicationThrottler.java +++ b/server/src/main/java/io/druid/server/master/ReplicationThrottler.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.Lists; import com.google.common.collect.Maps; diff --git a/server/src/main/java/com/metamx/druid/master/ReservoirSegmentSampler.java b/server/src/main/java/io/druid/server/master/ReservoirSegmentSampler.java similarity index 98% rename from server/src/main/java/com/metamx/druid/master/ReservoirSegmentSampler.java rename to server/src/main/java/io/druid/server/master/ReservoirSegmentSampler.java index 0019c9e9f9d..80068867018 100644 --- a/server/src/main/java/com/metamx/druid/master/ReservoirSegmentSampler.java +++ b/server/src/main/java/io/druid/server/master/ReservoirSegmentSampler.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import io.druid.client.DataSegment; diff --git a/server/src/main/java/com/metamx/druid/master/SegmentReplicantLookup.java b/server/src/main/java/io/druid/server/master/SegmentReplicantLookup.java similarity index 99% rename from server/src/main/java/com/metamx/druid/master/SegmentReplicantLookup.java rename to server/src/main/java/io/druid/server/master/SegmentReplicantLookup.java index de8ce5e310f..cb5ff44b218 100644 --- a/server/src/main/java/com/metamx/druid/master/SegmentReplicantLookup.java +++ b/server/src/main/java/io/druid/server/master/SegmentReplicantLookup.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.HashBasedTable; import com.google.common.collect.Maps; diff --git a/server/src/main/java/com/metamx/druid/master/ServerHolder.java b/server/src/main/java/io/druid/server/master/ServerHolder.java similarity index 99% rename from server/src/main/java/com/metamx/druid/master/ServerHolder.java rename to server/src/main/java/io/druid/server/master/ServerHolder.java index e362b0fe8e3..bb02eb43ee4 100644 --- a/server/src/main/java/com/metamx/druid/master/ServerHolder.java +++ b/server/src/main/java/io/druid/server/master/ServerHolder.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.metamx.common.logger.Logger; import io.druid.client.DataSegment; diff --git a/server/src/main/java/com/metamx/druid/master/rules/DropRule.java b/server/src/main/java/io/druid/server/master/rules/DropRule.java similarity index 87% rename from server/src/main/java/com/metamx/druid/master/rules/DropRule.java rename to server/src/main/java/io/druid/server/master/rules/DropRule.java index 218204462e7..013faf5e4ee 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/DropRule.java +++ b/server/src/main/java/io/druid/server/master/rules/DropRule.java @@ -17,12 +17,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; -import com.metamx.druid.master.DruidMaster; -import com.metamx.druid.master.DruidMasterRuntimeParams; -import com.metamx.druid.master.MasterStats; import io.druid.client.DataSegment; +import io.druid.server.master.DruidMaster; +import io.druid.server.master.DruidMasterRuntimeParams; +import io.druid.server.master.MasterStats; /** * DropRules indicate when segments should be completely removed from the cluster. diff --git a/server/src/main/java/com/metamx/druid/master/rules/IntervalDropRule.java b/server/src/main/java/io/druid/server/master/rules/IntervalDropRule.java similarity index 97% rename from server/src/main/java/com/metamx/druid/master/rules/IntervalDropRule.java rename to server/src/main/java/io/druid/server/master/rules/IntervalDropRule.java index 367d9953e51..b42e00d548f 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/IntervalDropRule.java +++ b/server/src/main/java/io/druid/server/master/rules/IntervalDropRule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/master/rules/IntervalLoadRule.java b/server/src/main/java/io/druid/server/master/rules/IntervalLoadRule.java similarity index 98% rename from server/src/main/java/com/metamx/druid/master/rules/IntervalLoadRule.java rename to server/src/main/java/io/druid/server/master/rules/IntervalLoadRule.java index 07b7009cf74..51628fedc6a 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/IntervalLoadRule.java +++ b/server/src/main/java/io/druid/server/master/rules/IntervalLoadRule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/master/rules/LoadRule.java b/server/src/main/java/io/druid/server/master/rules/LoadRule.java similarity index 94% rename from server/src/main/java/com/metamx/druid/master/rules/LoadRule.java rename to server/src/main/java/io/druid/server/master/rules/LoadRule.java index 0216e6a638b..f3ec5b314af 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/LoadRule.java +++ b/server/src/main/java/io/druid/server/master/rules/LoadRule.java @@ -17,19 +17,19 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import com.google.common.collect.Lists; import com.google.common.collect.MinMaxPriorityQueue; -import com.metamx.druid.master.BalancerStrategy; -import com.metamx.druid.master.DruidMaster; -import com.metamx.druid.master.DruidMasterRuntimeParams; -import com.metamx.druid.master.LoadPeonCallback; -import com.metamx.druid.master.MasterStats; -import com.metamx.druid.master.ReplicationThrottler; -import com.metamx.druid.master.ServerHolder; import com.metamx.emitter.EmittingLogger; import io.druid.client.DataSegment; +import io.druid.server.master.BalancerStrategy; +import io.druid.server.master.DruidMaster; +import io.druid.server.master.DruidMasterRuntimeParams; +import io.druid.server.master.LoadPeonCallback; +import io.druid.server.master.MasterStats; +import io.druid.server.master.ReplicationThrottler; +import io.druid.server.master.ServerHolder; import org.joda.time.DateTime; import java.util.ArrayList; diff --git a/server/src/main/java/com/metamx/druid/master/rules/PeriodDropRule.java b/server/src/main/java/io/druid/server/master/rules/PeriodDropRule.java similarity index 97% rename from server/src/main/java/com/metamx/druid/master/rules/PeriodDropRule.java rename to server/src/main/java/io/druid/server/master/rules/PeriodDropRule.java index 61d926fdbe9..7b35a5ac8b7 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/PeriodDropRule.java +++ b/server/src/main/java/io/druid/server/master/rules/PeriodDropRule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java b/server/src/main/java/io/druid/server/master/rules/PeriodLoadRule.java similarity index 98% rename from server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java rename to server/src/main/java/io/druid/server/master/rules/PeriodLoadRule.java index 9ffc81fbaf5..de6a3fa2d2f 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/PeriodLoadRule.java +++ b/server/src/main/java/io/druid/server/master/rules/PeriodLoadRule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/master/rules/Rule.java b/server/src/main/java/io/druid/server/master/rules/Rule.java similarity index 90% rename from server/src/main/java/com/metamx/druid/master/rules/Rule.java rename to server/src/main/java/io/druid/server/master/rules/Rule.java index 55b9adb9be2..a34011b1aec 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/Rule.java +++ b/server/src/main/java/io/druid/server/master/rules/Rule.java @@ -17,14 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.metamx.druid.master.DruidMaster; -import com.metamx.druid.master.DruidMasterRuntimeParams; -import com.metamx.druid.master.MasterStats; import io.druid.client.DataSegment; +import io.druid.server.master.DruidMaster; +import io.druid.server.master.DruidMasterRuntimeParams; +import io.druid.server.master.MasterStats; import org.joda.time.DateTime; /** diff --git a/server/src/main/java/com/metamx/druid/master/rules/RuleMap.java b/server/src/main/java/io/druid/server/master/rules/RuleMap.java similarity index 93% rename from server/src/main/java/com/metamx/druid/master/rules/RuleMap.java rename to server/src/main/java/io/druid/server/master/rules/RuleMap.java index 8354a5e110f..a8f80ee1b2d 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/RuleMap.java +++ b/server/src/main/java/io/druid/server/master/rules/RuleMap.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import com.google.common.collect.Lists; diff --git a/server/src/main/java/com/metamx/druid/master/rules/SizeDropRule.java b/server/src/main/java/io/druid/server/master/rules/SizeDropRule.java similarity index 97% rename from server/src/main/java/com/metamx/druid/master/rules/SizeDropRule.java rename to server/src/main/java/io/druid/server/master/rules/SizeDropRule.java index 3fd474bb395..7f6de2b1a06 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/SizeDropRule.java +++ b/server/src/main/java/io/druid/server/master/rules/SizeDropRule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/com/metamx/druid/master/rules/SizeLoadRule.java b/server/src/main/java/io/druid/server/master/rules/SizeLoadRule.java similarity index 98% rename from server/src/main/java/com/metamx/druid/master/rules/SizeLoadRule.java rename to server/src/main/java/io/druid/server/master/rules/SizeLoadRule.java index e864eca3114..361598cfb4e 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/SizeLoadRule.java +++ b/server/src/main/java/io/druid/server/master/rules/SizeLoadRule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/server/src/main/java/io/druid/server/metrics/DruidMonitorSchedulerConfig.java b/server/src/main/java/io/druid/server/metrics/DruidMonitorSchedulerConfig.java new file mode 100644 index 00000000000..9de045854de --- /dev/null +++ b/server/src/main/java/io/druid/server/metrics/DruidMonitorSchedulerConfig.java @@ -0,0 +1,45 @@ +/* + * 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.metrics; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.metamx.metrics.MonitorSchedulerConfig; +import org.joda.time.Duration; +import org.joda.time.Period; + +/** + */ +public class DruidMonitorSchedulerConfig extends MonitorSchedulerConfig +{ + @JsonProperty + private Period emissionPeriod = new Period("PT1M"); + + @JsonProperty + public Period getEmissionPeriod() + { + return emissionPeriod; + } + + @Override + public Duration getEmitterPeriod() + { + return emissionPeriod.toStandardDuration(); + } +} diff --git a/server/src/main/java/com/metamx/druid/metrics/MetricsModule.java b/server/src/main/java/io/druid/server/metrics/MetricsModule.java similarity index 94% rename from server/src/main/java/com/metamx/druid/metrics/MetricsModule.java rename to server/src/main/java/io/druid/server/metrics/MetricsModule.java index daf3cd2c65e..ee7dd20c2f8 100644 --- a/server/src/main/java/com/metamx/druid/metrics/MetricsModule.java +++ b/server/src/main/java/io/druid/server/metrics/MetricsModule.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.metrics; +package io.druid.server.metrics; import com.google.common.base.Preconditions; import com.google.common.base.Supplier; @@ -34,10 +34,10 @@ import com.metamx.emitter.service.ServiceEmitter; import com.metamx.metrics.Monitor; import com.metamx.metrics.MonitorScheduler; import io.druid.concurrent.Execs; -import io.druid.guice.guice.JsonConfigProvider; -import io.druid.guice.guice.JsonConfigurator; -import io.druid.guice.guice.LazySingleton; -import io.druid.guice.guice.ManageLifecycle; +import io.druid.guice.JsonConfigProvider; +import io.druid.guice.JsonConfigurator; +import io.druid.guice.LazySingleton; +import io.druid.guice.ManageLifecycle; import java.util.List; import java.util.Properties; diff --git a/server/src/main/java/com/metamx/druid/metrics/MonitorsConfig.java b/server/src/main/java/io/druid/server/metrics/MonitorsConfig.java similarity index 94% rename from server/src/main/java/com/metamx/druid/metrics/MonitorsConfig.java rename to server/src/main/java/io/druid/server/metrics/MonitorsConfig.java index 86c351b3a1d..1bf1e78bbac 100644 --- a/server/src/main/java/com/metamx/druid/metrics/MonitorsConfig.java +++ b/server/src/main/java/io/druid/server/metrics/MonitorsConfig.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.metrics; +package io.druid.server.metrics; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Lists; diff --git a/server/src/main/java/com/metamx/druid/metrics/ServerMonitor.java b/server/src/main/java/io/druid/server/metrics/ServerMonitor.java similarity index 96% rename from server/src/main/java/com/metamx/druid/metrics/ServerMonitor.java rename to server/src/main/java/io/druid/server/metrics/ServerMonitor.java index 20f2c913860..684068fa453 100644 --- a/server/src/main/java/com/metamx/druid/metrics/ServerMonitor.java +++ b/server/src/main/java/io/druid/server/metrics/ServerMonitor.java @@ -17,14 +17,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.metrics; +package io.druid.server.metrics; import com.google.inject.Inject; -import com.metamx.druid.coordination.ServerManager; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceMetricEvent; import com.metamx.metrics.AbstractMonitor; import io.druid.client.DruidServerConfig; +import io.druid.server.coordination.ServerManager; import java.util.Map; diff --git a/server/src/main/java/io/druid/server/sql/SQLRunner.java b/server/src/main/java/io/druid/server/sql/SQLRunner.java index abbcef30746..561b10f2618 100644 --- a/server/src/main/java/io/druid/server/sql/SQLRunner.java +++ b/server/src/main/java/io/druid/server/sql/SQLRunner.java @@ -27,8 +27,6 @@ import com.google.common.base.Joiner; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.io.Closeables; -import com.metamx.druid.sql.antlr4.DruidSQLLexer; -import com.metamx.druid.sql.antlr4.DruidSQLParser; import io.druid.data.input.Row; import io.druid.jackson.DefaultObjectMapper; import io.druid.query.Druids; @@ -38,6 +36,8 @@ import io.druid.query.aggregation.AggregatorFactory; import io.druid.query.dimension.DimensionSpec; import io.druid.query.groupby.GroupByQuery; import io.druid.query.timeseries.TimeseriesResultValue; +import io.druid.sql.antlr4.DruidSQLLexer; +import io.druid.sql.antlr4.DruidSQLParser; import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CommonTokenStream; diff --git a/server/src/test/java/com/metamx/druid/client/RangeIterable.java b/server/src/test/java/com/metamx/druid/client/RangeIterable.java deleted file mode 100644 index 5a566cab1b4..00000000000 --- a/server/src/test/java/com/metamx/druid/client/RangeIterable.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Druid - a distributed column store. - * Copyright (C) 2012 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 com.metamx.druid.client; - -import java.util.Iterator; - -/** - */ -public class RangeIterable implements Iterable -{ - private final int startValue; - private final int endValue; - private final int increment; - - public RangeIterable(int endValue) - { - this(0, endValue); - } - - public RangeIterable(int startValue, int endValue) - { - this(startValue, endValue, 1); - } - - public RangeIterable(int startValue, int endValue, int increment) - { - this.startValue = startValue; - this.endValue = endValue; - this.increment = increment; - } - - @Override - public Iterator iterator() - { - return new Iterator() - { - int value = startValue; - - @Override - public boolean hasNext() - { - return value < endValue; - } - - @Override - public Integer next() - { - try { - return value; - } - finally { - value += increment; - } - } - - @Override - public void remove() - { - throw new UnsupportedOperationException(); - } - }; - } -} diff --git a/server/src/test/java/com/metamx/druid/db/DatabaseSegmentManagerTest.java b/server/src/test/java/io/druid/db/DatabaseSegmentManagerTest.java similarity index 98% rename from server/src/test/java/com/metamx/druid/db/DatabaseSegmentManagerTest.java rename to server/src/test/java/io/druid/db/DatabaseSegmentManagerTest.java index 3e805e4b224..267f86a8a56 100644 --- a/server/src/test/java/com/metamx/druid/db/DatabaseSegmentManagerTest.java +++ b/server/src/test/java/io/druid/db/DatabaseSegmentManagerTest.java @@ -17,11 +17,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.db; +package io.druid.db; import com.google.common.base.Suppliers; import com.google.common.collect.Maps; -import io.druid.db.DbTablesConfig; import io.druid.jackson.DefaultObjectMapper; import org.easymock.EasyMock; import org.junit.After; diff --git a/server/src/test/java/com/metamx/druid/loading/CacheTestSegmentLoader.java b/server/src/test/java/io/druid/segment/loading/CacheTestSegmentLoader.java similarity index 98% rename from server/src/test/java/com/metamx/druid/loading/CacheTestSegmentLoader.java rename to server/src/test/java/io/druid/segment/loading/CacheTestSegmentLoader.java index f429c36096f..4fe600bda35 100644 --- a/server/src/test/java/com/metamx/druid/loading/CacheTestSegmentLoader.java +++ b/server/src/test/java/io/druid/segment/loading/CacheTestSegmentLoader.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.metamx.common.MapUtils; import io.druid.client.DataSegment; diff --git a/server/src/test/java/com/metamx/druid/loading/DataSegmentPusherUtilTest.java b/server/src/test/java/io/druid/segment/loading/DataSegmentPusherUtilTest.java similarity index 98% rename from server/src/test/java/com/metamx/druid/loading/DataSegmentPusherUtilTest.java rename to server/src/test/java/io/druid/segment/loading/DataSegmentPusherUtilTest.java index c05462d934d..de2a0c13399 100644 --- a/server/src/test/java/com/metamx/druid/loading/DataSegmentPusherUtilTest.java +++ b/server/src/test/java/io/druid/segment/loading/DataSegmentPusherUtilTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.google.common.collect.ImmutableMap; import io.druid.client.DataSegment; diff --git a/server/src/test/java/com/metamx/druid/loading/SingleSegmentLoaderTest.java b/server/src/test/java/io/druid/segment/loading/SingleSegmentLoaderTest.java similarity index 98% rename from server/src/test/java/com/metamx/druid/loading/SingleSegmentLoaderTest.java rename to server/src/test/java/io/druid/segment/loading/SingleSegmentLoaderTest.java index 62e82b6ad91..7a1867f9fa8 100644 --- a/server/src/test/java/com/metamx/druid/loading/SingleSegmentLoaderTest.java +++ b/server/src/test/java/io/druid/segment/loading/SingleSegmentLoaderTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.loading; +package io.druid.segment.loading; import com.google.common.collect.ImmutableMap; import io.druid.client.DataSegment; diff --git a/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestDropTest.java b/server/src/test/java/io/druid/server/coordination/SegmentChangeRequestDropTest.java similarity index 98% rename from server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestDropTest.java rename to server/src/test/java/io/druid/server/coordination/SegmentChangeRequestDropTest.java index 9e188d99860..89b330816f5 100644 --- a/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestDropTest.java +++ b/server/src/test/java/io/druid/server/coordination/SegmentChangeRequestDropTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestLoadTest.java b/server/src/test/java/io/druid/server/coordination/SegmentChangeRequestLoadTest.java similarity index 98% rename from server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestLoadTest.java rename to server/src/test/java/io/druid/server/coordination/SegmentChangeRequestLoadTest.java index 695e69d2c4c..305fa9ca740 100644 --- a/server/src/test/java/com/metamx/druid/coordination/SegmentChangeRequestLoadTest.java +++ b/server/src/test/java/io/druid/server/coordination/SegmentChangeRequestLoadTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java b/server/src/test/java/io/druid/server/coordination/ServerManagerTest.java similarity index 98% rename from server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java rename to server/src/test/java/io/druid/server/coordination/ServerManagerTest.java index 9635109bdd9..c47d073560e 100644 --- a/server/src/test/java/com/metamx/druid/coordination/ServerManagerTest.java +++ b/server/src/test/java/io/druid/server/coordination/ServerManagerTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.base.Function; @@ -35,10 +35,6 @@ import com.metamx.common.guava.Sequences; import com.metamx.common.guava.Yielder; import com.metamx.common.guava.YieldingAccumulator; import com.metamx.common.guava.YieldingSequenceBase; -import com.metamx.druid.loading.SegmentLoader; -import com.metamx.druid.loading.SegmentLoadingException; -import com.metamx.druid.metrics.NoopServiceEmitter; -import com.metamx.druid.query.QueryRunnerFactoryConglomerate; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceMetricEvent; import io.druid.client.DataSegment; @@ -49,6 +45,7 @@ import io.druid.query.NoopQueryRunner; import io.druid.query.Query; import io.druid.query.QueryRunner; import io.druid.query.QueryRunnerFactory; +import io.druid.query.QueryRunnerFactoryConglomerate; import io.druid.query.QueryToolChest; import io.druid.query.Result; import io.druid.query.aggregation.MetricManipulationFn; @@ -59,6 +56,9 @@ import io.druid.segment.QueryableIndex; import io.druid.segment.ReferenceCountingSegment; import io.druid.segment.Segment; import io.druid.segment.StorageAdapter; +import io.druid.segment.loading.SegmentLoader; +import io.druid.segment.loading.SegmentLoadingException; +import io.druid.server.metrics.NoopServiceEmitter; import io.druid.server.shard.shard.NoneShardSpec; import org.joda.time.Interval; import org.junit.Assert; diff --git a/server/src/test/java/com/metamx/druid/coordination/ZkCoordinatorTest.java b/server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java similarity index 93% rename from server/src/test/java/com/metamx/druid/coordination/ZkCoordinatorTest.java rename to server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java index 87fef52ca16..81acd7ce05d 100644 --- a/server/src/test/java/com/metamx/druid/coordination/ZkCoordinatorTest.java +++ b/server/src/test/java/io/druid/server/coordination/ZkCoordinatorTest.java @@ -17,27 +17,24 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.coordination; +package io.druid.server.coordination; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.util.concurrent.MoreExecutors; import com.metamx.common.logger.Logger; -import com.metamx.druid.loading.CacheTestSegmentLoader; -import com.metamx.druid.loading.SegmentLoaderConfig; -import com.metamx.druid.metrics.NoopServiceEmitter; -import com.metamx.druid.query.NoopQueryRunnerFactoryConglomerate; import io.druid.client.DataSegment; import io.druid.concurrent.Execs; import io.druid.curator.CuratorTestBase; import io.druid.curator.announcement.Announcer; import io.druid.jackson.DefaultObjectMapper; +import io.druid.query.NoopQueryRunnerFactoryConglomerate; import io.druid.segment.IndexIO; -import io.druid.server.coordination.DataSegmentAnnouncer; -import io.druid.server.coordination.DruidServerMetadata; -import io.druid.server.coordination.SingleDataSegmentAnnouncer; +import io.druid.segment.loading.CacheTestSegmentLoader; +import io.druid.segment.loading.SegmentLoaderConfig; import io.druid.server.initialization.initialization.ZkPathsConfig; +import io.druid.server.metrics.NoopServiceEmitter; import io.druid.server.shard.shard.NoneShardSpec; import org.joda.time.Interval; import org.junit.After; diff --git a/server/src/test/java/com/metamx/druid/utils/DruidMasterBalancerProfiler.java b/server/src/test/java/io/druid/server/master/DruidMasterBalancerProfiler.java similarity index 93% rename from server/src/test/java/com/metamx/druid/utils/DruidMasterBalancerProfiler.java rename to server/src/test/java/io/druid/server/master/DruidMasterBalancerProfiler.java index e85cea29e34..33e03f753b2 100644 --- a/server/src/test/java/com/metamx/druid/utils/DruidMasterBalancerProfiler.java +++ b/server/src/test/java/io/druid/server/master/DruidMasterBalancerProfiler.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.utils; +package io.druid.server.master; import com.google.common.base.Stopwatch; import com.google.common.collect.ImmutableList; @@ -25,25 +25,13 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.MinMaxPriorityQueue; -import com.metamx.druid.db.DatabaseRuleManager; -import com.metamx.druid.master.DruidCluster; -import com.metamx.druid.master.DruidMaster; -import com.metamx.druid.master.DruidMasterBalancerTester; -import com.metamx.druid.master.DruidMasterRuleRunner; -import com.metamx.druid.master.DruidMasterRuntimeParams; -import com.metamx.druid.master.LoadPeonCallback; -import com.metamx.druid.master.LoadQueuePeon; -import com.metamx.druid.master.LoadQueuePeonTester; -import com.metamx.druid.master.MasterSegmentSettings; -import com.metamx.druid.master.ReplicationThrottler; -import com.metamx.druid.master.SegmentReplicantLookup; -import com.metamx.druid.master.ServerHolder; -import com.metamx.druid.master.rules.PeriodLoadRule; -import com.metamx.druid.master.rules.Rule; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import io.druid.client.DataSegment; import io.druid.client.DruidServer; +import io.druid.db.DatabaseRuleManager; +import io.druid.server.master.rules.PeriodLoadRule; +import io.druid.server.master.rules.Rule; import io.druid.server.shard.shard.NoneShardSpec; import org.easymock.EasyMock; import org.joda.time.DateTime; diff --git a/server/src/test/java/com/metamx/druid/master/DruidMasterBalancerTest.java b/server/src/test/java/io/druid/server/master/DruidMasterBalancerTest.java similarity index 99% rename from server/src/test/java/com/metamx/druid/master/DruidMasterBalancerTest.java rename to server/src/test/java/io/druid/server/master/DruidMasterBalancerTest.java index 45edbafc172..c7e94e34b90 100644 --- a/server/src/test/java/com/metamx/druid/master/DruidMasterBalancerTest.java +++ b/server/src/test/java/io/druid/server/master/DruidMasterBalancerTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; diff --git a/server/src/test/java/com/metamx/druid/master/DruidMasterBalancerTester.java b/server/src/test/java/io/druid/server/master/DruidMasterBalancerTester.java similarity index 98% rename from server/src/test/java/com/metamx/druid/master/DruidMasterBalancerTester.java rename to server/src/test/java/io/druid/server/master/DruidMasterBalancerTester.java index ea72386293c..4cddc84b767 100644 --- a/server/src/test/java/com/metamx/druid/master/DruidMasterBalancerTester.java +++ b/server/src/test/java/io/druid/server/master/DruidMasterBalancerTester.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import io.druid.client.DataSegment; import io.druid.client.DruidServer; diff --git a/server/src/test/java/com/metamx/druid/master/DruidMasterRuleRunnerTest.java b/server/src/test/java/io/druid/server/master/DruidMasterRuleRunnerTest.java similarity index 99% rename from server/src/test/java/com/metamx/druid/master/DruidMasterRuleRunnerTest.java rename to server/src/test/java/io/druid/server/master/DruidMasterRuleRunnerTest.java index f91aa192c75..ec11fdf8688 100644 --- a/server/src/test/java/com/metamx/druid/master/DruidMasterRuleRunnerTest.java +++ b/server/src/test/java/io/druid/server/master/DruidMasterRuleRunnerTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; @@ -25,16 +25,16 @@ import com.google.common.collect.Maps; import com.google.common.collect.MinMaxPriorityQueue; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; -import com.metamx.druid.db.DatabaseRuleManager; -import com.metamx.druid.master.rules.IntervalDropRule; -import com.metamx.druid.master.rules.IntervalLoadRule; -import com.metamx.druid.master.rules.Rule; import com.metamx.emitter.EmittingLogger; import com.metamx.emitter.service.ServiceEmitter; import com.metamx.emitter.service.ServiceEventBuilder; import io.druid.client.DataSegment; import io.druid.client.DruidServer; +import io.druid.db.DatabaseRuleManager; import io.druid.segment.IndexIO; +import io.druid.server.master.rules.IntervalDropRule; +import io.druid.server.master.rules.IntervalLoadRule; +import io.druid.server.master.rules.Rule; import io.druid.server.shard.shard.NoneShardSpec; import org.easymock.EasyMock; import org.joda.time.DateTime; diff --git a/server/src/test/java/com/metamx/druid/master/DruidMasterSegmentMergerTest.java b/server/src/test/java/io/druid/server/master/DruidMasterSegmentMergerTest.java similarity index 99% rename from server/src/test/java/com/metamx/druid/master/DruidMasterSegmentMergerTest.java rename to server/src/test/java/io/druid/server/master/DruidMasterSegmentMergerTest.java index e287d2f7aac..156bf534a58 100644 --- a/server/src/test/java/com/metamx/druid/master/DruidMasterSegmentMergerTest.java +++ b/server/src/test/java/io/druid/server/master/DruidMasterSegmentMergerTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; diff --git a/server/src/test/java/com/metamx/druid/master/DruidMasterTest.java b/server/src/test/java/io/druid/server/master/DruidMasterTest.java similarity index 97% rename from server/src/test/java/com/metamx/druid/master/DruidMasterTest.java rename to server/src/test/java/io/druid/server/master/DruidMasterTest.java index 51adf2bb686..9417ecf556b 100644 --- a/server/src/test/java/com/metamx/druid/master/DruidMasterTest.java +++ b/server/src/test/java/io/druid/server/master/DruidMasterTest.java @@ -17,17 +17,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import com.google.common.collect.MapMaker; import com.metamx.common.concurrent.ScheduledExecutorFactory; -import com.metamx.druid.db.DatabaseSegmentManager; -import com.metamx.druid.metrics.NoopServiceEmitter; import io.druid.client.DataSegment; 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.metrics.NoopServiceEmitter; import org.apache.curator.framework.CuratorFramework; import org.easymock.EasyMock; import org.joda.time.Duration; diff --git a/server/src/test/java/com/metamx/druid/master/LoadQueuePeonTester.java b/server/src/test/java/io/druid/server/master/LoadQueuePeonTester.java similarity index 97% rename from server/src/test/java/com/metamx/druid/master/LoadQueuePeonTester.java rename to server/src/test/java/io/druid/server/master/LoadQueuePeonTester.java index 62b196aac6d..1339c84e63e 100644 --- a/server/src/test/java/com/metamx/druid/master/LoadQueuePeonTester.java +++ b/server/src/test/java/io/druid/server/master/LoadQueuePeonTester.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; +package io.druid.server.master; import io.druid.client.DataSegment; diff --git a/server/src/test/java/com/metamx/druid/master/ReservoirSegmentSamplerTest.java b/server/src/test/java/io/druid/server/master/ReservoirSegmentSamplerTest.java similarity index 99% rename from server/src/test/java/com/metamx/druid/master/ReservoirSegmentSamplerTest.java rename to server/src/test/java/io/druid/server/master/ReservoirSegmentSamplerTest.java index 33fafa72358..e48082bfdca 100644 --- a/server/src/test/java/com/metamx/druid/master/ReservoirSegmentSamplerTest.java +++ b/server/src/test/java/io/druid/server/master/ReservoirSegmentSamplerTest.java @@ -16,7 +16,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master; + +package io.druid.server.master; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; diff --git a/server/src/test/java/com/metamx/druid/master/rules/PeriodDropRuleTest.java b/server/src/test/java/io/druid/server/master/rules/PeriodDropRuleTest.java similarity index 98% rename from server/src/test/java/com/metamx/druid/master/rules/PeriodDropRuleTest.java rename to server/src/test/java/io/druid/server/master/rules/PeriodDropRuleTest.java index b214721083c..4419f20279b 100644 --- a/server/src/test/java/com/metamx/druid/master/rules/PeriodDropRuleTest.java +++ b/server/src/test/java/io/druid/server/master/rules/PeriodDropRuleTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import io.druid.client.DataSegment; import io.druid.server.shard.shard.NoneShardSpec; diff --git a/server/src/test/java/com/metamx/druid/master/rules/PeriodLoadRuleTest.java b/server/src/test/java/io/druid/server/master/rules/PeriodLoadRuleTest.java similarity index 98% rename from server/src/test/java/com/metamx/druid/master/rules/PeriodLoadRuleTest.java rename to server/src/test/java/io/druid/server/master/rules/PeriodLoadRuleTest.java index c09e5be3e19..9d2b415af85 100644 --- a/server/src/test/java/com/metamx/druid/master/rules/PeriodLoadRuleTest.java +++ b/server/src/test/java/io/druid/server/master/rules/PeriodLoadRuleTest.java @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.master.rules; +package io.druid.server.master.rules; import io.druid.client.DataSegment; import io.druid.server.shard.shard.NoneShardSpec; diff --git a/server/src/test/java/com/metamx/druid/metrics/NoopServiceEmitter.java b/server/src/test/java/io/druid/server/metrics/NoopServiceEmitter.java similarity index 92% rename from server/src/test/java/com/metamx/druid/metrics/NoopServiceEmitter.java rename to server/src/test/java/io/druid/server/metrics/NoopServiceEmitter.java index f980bc4885c..8a9a5944099 100644 --- a/server/src/test/java/com/metamx/druid/metrics/NoopServiceEmitter.java +++ b/server/src/test/java/io/druid/server/metrics/NoopServiceEmitter.java @@ -1,6 +1,6 @@ /* * Druid - a distributed column store. - * Copyright (C) 2012 Metamarkets Group Inc. + * 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 @@ -17,7 +17,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package com.metamx.druid.metrics; +package io.druid.server.metrics; import com.metamx.emitter.core.Event; import com.metamx.emitter.service.ServiceEmitter; diff --git a/services/src/main/java/io/druid/cli/CliBroker.java b/services/src/main/java/io/druid/cli/CliBroker.java index 3c40c24f14b..fc2f30fce35 100644 --- a/services/src/main/java/io/druid/cli/CliBroker.java +++ b/services/src/main/java/io/druid/cli/CliBroker.java @@ -21,23 +21,23 @@ package io.druid.cli; import com.google.inject.Injector; import com.metamx.common.logger.Logger; -import com.metamx.druid.metrics.MetricsModule; import io.airlift.command.Command; import io.druid.client.cache.CacheMonitor; import io.druid.curator.CuratorModule; +import io.druid.guice.BrokerModule; +import io.druid.guice.HttpClientModule; +import io.druid.guice.LifecycleModule; import io.druid.guice.QueryToolChestModule; -import io.druid.guice.guice.BrokerModule; -import io.druid.guice.guice.HttpClientModule; -import io.druid.guice.guice.LifecycleModule; -import io.druid.guice.guice.QueryableModule; -import io.druid.guice.guice.ServerModule; -import io.druid.guice.guice.ServerViewModule; -import io.druid.guice.guice.annotations.Client; +import io.druid.guice.QueryableModule; +import io.druid.guice.ServerModule; +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.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 2231fe39517..4ad9b57c328 100644 --- a/services/src/main/java/io/druid/cli/CliCoordinator.java +++ b/services/src/main/java/io/druid/cli/CliCoordinator.java @@ -22,20 +22,18 @@ package io.druid.cli; import com.google.inject.Injector; import com.google.inject.servlet.GuiceFilter; import com.metamx.common.logger.Logger; -import com.metamx.druid.master.DruidMaster; -import com.metamx.druid.metrics.MetricsModule; import io.airlift.command.Command; import io.druid.curator.CuratorModule; import io.druid.curator.discovery.DiscoveryModule; -import io.druid.guice.guice.CoordinatorModule; -import io.druid.guice.guice.DbConnectorModule; -import io.druid.guice.guice.HttpClientModule; -import io.druid.guice.guice.IndexingServiceDiscoveryModule; -import io.druid.guice.guice.JacksonConfigManagerModule; -import io.druid.guice.guice.LifecycleModule; -import io.druid.guice.guice.ServerModule; -import io.druid.guice.guice.ServerViewModule; -import io.druid.guice.guice.annotations.Self; +import io.druid.guice.CoordinatorModule; +import io.druid.guice.DbConnectorModule; +import io.druid.guice.HttpClientModule; +import io.druid.guice.IndexingServiceDiscoveryModule; +import io.druid.guice.JacksonConfigManagerModule; +import io.druid.guice.LifecycleModule; +import io.druid.guice.ServerModule; +import io.druid.guice.ServerViewModule; +import io.druid.guice.annotations.Self; import io.druid.server.StatusResource; import io.druid.server.http.InfoResource; import io.druid.server.http.MasterResource; @@ -44,6 +42,8 @@ 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.master.DruidMaster; +import io.druid.server.metrics.MetricsModule; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.DefaultHandler; diff --git a/services/src/main/java/io/druid/cli/CliHistorical.java b/services/src/main/java/io/druid/cli/CliHistorical.java index fef6ef57385..588402dfb48 100644 --- a/services/src/main/java/io/druid/cli/CliHistorical.java +++ b/services/src/main/java/io/druid/cli/CliHistorical.java @@ -21,27 +21,27 @@ package io.druid.cli; import com.google.inject.Injector; import com.metamx.common.logger.Logger; -import com.metamx.druid.coordination.ServerManager; -import com.metamx.druid.coordination.ZkCoordinator; -import com.metamx.druid.metrics.MetricsModule; -import com.metamx.druid.metrics.ServerMonitor; import io.airlift.command.Command; import io.druid.curator.CuratorModule; -import io.druid.guice.guice.AWSModule; -import io.druid.guice.guice.AnnouncerModule; -import io.druid.guice.guice.DataSegmentPullerModule; -import io.druid.guice.guice.DruidProcessingModule; -import io.druid.guice.guice.HistoricalModule; -import io.druid.guice.guice.HttpClientModule; -import io.druid.guice.guice.LifecycleModule; -import io.druid.guice.guice.QueryRunnerFactoryModule; -import io.druid.guice.guice.QueryableModule; -import io.druid.guice.guice.ServerModule; -import io.druid.guice.guice.StorageNodeModule; +import io.druid.guice.AWSModule; +import io.druid.guice.AnnouncerModule; +import io.druid.guice.DataSegmentPullerModule; +import io.druid.guice.DruidProcessingModule; +import io.druid.guice.HistoricalModule; +import io.druid.guice.HttpClientModule; +import io.druid.guice.LifecycleModule; +import io.druid.guice.QueryRunnerFactoryModule; +import io.druid.guice.QueryableModule; +import io.druid.guice.ServerModule; +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.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 1c9cac9cffe..7bdafa8879a 100644 --- a/services/src/main/java/io/druid/cli/CliMiddleManager.java +++ b/services/src/main/java/io/druid/cli/CliMiddleManager.java @@ -22,22 +22,22 @@ package io.druid.cli; import com.google.inject.Injector; import com.google.inject.servlet.GuiceFilter; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.worker.WorkerTaskMonitor; -import com.metamx.druid.indexing.worker.http.WorkerResource; -import com.metamx.druid.metrics.MetricsModule; import io.airlift.command.Command; import io.druid.curator.CuratorModule; -import io.druid.guice.guice.AWSModule; -import io.druid.guice.guice.HttpClientModule; -import io.druid.guice.guice.LifecycleModule; -import io.druid.guice.guice.MiddleManagerModule; -import io.druid.guice.guice.ServerModule; -import io.druid.guice.guice.TaskLogsModule; +import io.druid.guice.AWSModule; +import io.druid.guice.HttpClientModule; +import io.druid.guice.LifecycleModule; +import io.druid.guice.MiddleManagerModule; +import io.druid.guice.ServerModule; +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.metrics.MetricsModule; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.DefaultHandler; diff --git a/services/src/main/java/io/druid/cli/CliOverlord.java b/services/src/main/java/io/druid/cli/CliOverlord.java index 298e06edb4b..a9a694e506f 100644 --- a/services/src/main/java/io/druid/cli/CliOverlord.java +++ b/services/src/main/java/io/druid/cli/CliOverlord.java @@ -22,26 +22,26 @@ package io.druid.cli; import com.google.inject.Injector; import com.google.inject.servlet.GuiceFilter; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.coordinator.TaskMaster; -import com.metamx.druid.indexing.coordinator.http.IndexerCoordinatorResource; -import com.metamx.druid.metrics.MetricsModule; import io.airlift.command.Command; import io.druid.curator.CuratorModule; import io.druid.curator.discovery.DiscoveryModule; -import io.druid.guice.guice.AWSModule; -import io.druid.guice.guice.DbConnectorModule; -import io.druid.guice.guice.HttpClientModule; -import io.druid.guice.guice.JacksonConfigManagerModule; -import io.druid.guice.guice.LifecycleModule; -import io.druid.guice.guice.OverlordModule; -import io.druid.guice.guice.ServerModule; -import io.druid.guice.guice.TaskLogsModule; +import io.druid.guice.AWSModule; +import io.druid.guice.DbConnectorModule; +import io.druid.guice.HttpClientModule; +import io.druid.guice.JacksonConfigManagerModule; +import io.druid.guice.LifecycleModule; +import io.druid.guice.OverlordModule; +import io.druid.guice.ServerModule; +import io.druid.guice.TaskLogsModule; +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.metrics.MetricsModule; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.DefaultHandler; diff --git a/services/src/main/java/io/druid/cli/CliPeon.java b/services/src/main/java/io/druid/cli/CliPeon.java index 96fe304a7a3..f0f477edb5d 100644 --- a/services/src/main/java/io/druid/cli/CliPeon.java +++ b/services/src/main/java/io/druid/cli/CliPeon.java @@ -23,34 +23,34 @@ import com.google.common.base.Throwables; import com.google.inject.Injector; import com.metamx.common.lifecycle.Lifecycle; import com.metamx.common.logger.Logger; -import com.metamx.druid.indexing.coordinator.ThreadPoolTaskRunner; -import com.metamx.druid.indexing.worker.executor.ChatHandlerResource; -import com.metamx.druid.indexing.worker.executor.ExecutorLifecycle; -import com.metamx.druid.indexing.worker.executor.ExecutorLifecycleConfig; -import com.metamx.druid.metrics.MetricsModule; import io.airlift.command.Arguments; import io.airlift.command.Command; import io.airlift.command.Option; import io.druid.curator.CuratorModule; import io.druid.curator.discovery.DiscoveryModule; -import io.druid.guice.guice.AWSModule; -import io.druid.guice.guice.AnnouncerModule; -import io.druid.guice.guice.DataSegmentPusherModule; -import io.druid.guice.guice.DruidProcessingModule; -import io.druid.guice.guice.HttpClientModule; -import io.druid.guice.guice.IndexingServiceDiscoveryModule; -import io.druid.guice.guice.LifecycleModule; -import io.druid.guice.guice.PeonModule; -import io.druid.guice.guice.QueryRunnerFactoryModule; -import io.druid.guice.guice.QueryableModule; -import io.druid.guice.guice.ServerModule; -import io.druid.guice.guice.ServerViewModule; -import io.druid.guice.guice.StorageNodeModule; +import io.druid.guice.AWSModule; +import io.druid.guice.AnnouncerModule; +import io.druid.guice.DataSegmentPusherModule; +import io.druid.guice.DruidProcessingModule; +import io.druid.guice.HttpClientModule; +import io.druid.guice.IndexingServiceDiscoveryModule; +import io.druid.guice.LifecycleModule; +import io.druid.guice.PeonModule; +import io.druid.guice.QueryRunnerFactoryModule; +import io.druid.guice.QueryableModule; +import io.druid.guice.ServerModule; +import io.druid.guice.ServerViewModule; +import io.druid.guice.StorageNodeModule; +import io.druid.indexing.coordinator.ThreadPoolTaskRunner; +import io.druid.indexing.worker.executor.ChatHandlerResource; +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.metrics.MetricsModule; import java.io.File; import java.util.List; diff --git a/services/src/main/java/io/druid/cli/CliRealtime.java b/services/src/main/java/io/druid/cli/CliRealtime.java index e5c5c7a6fe0..760b05c7b59 100644 --- a/services/src/main/java/io/druid/cli/CliRealtime.java +++ b/services/src/main/java/io/druid/cli/CliRealtime.java @@ -21,27 +21,27 @@ package io.druid.cli; import com.google.inject.Injector; import com.metamx.common.logger.Logger; -import com.metamx.druid.metrics.MetricsModule; -import com.metamx.druid.realtime.RealtimeManager; import io.airlift.command.Command; import io.druid.curator.CuratorModule; -import io.druid.guice.guice.AWSModule; -import io.druid.guice.guice.AnnouncerModule; -import io.druid.guice.guice.DataSegmentPusherModule; -import io.druid.guice.guice.DbConnectorModule; -import io.druid.guice.guice.DruidProcessingModule; -import io.druid.guice.guice.HttpClientModule; -import io.druid.guice.guice.LifecycleModule; -import io.druid.guice.guice.QueryRunnerFactoryModule; -import io.druid.guice.guice.QueryableModule; -import io.druid.guice.guice.RealtimeModule; -import io.druid.guice.guice.ServerModule; -import io.druid.guice.guice.ServerViewModule; -import io.druid.guice.guice.StorageNodeModule; +import io.druid.guice.AWSModule; +import io.druid.guice.AnnouncerModule; +import io.druid.guice.DataSegmentPusherModule; +import io.druid.guice.DbConnectorModule; +import io.druid.guice.DruidProcessingModule; +import io.druid.guice.HttpClientModule; +import io.druid.guice.LifecycleModule; +import io.druid.guice.QueryRunnerFactoryModule; +import io.druid.guice.QueryableModule; +import io.druid.guice.RealtimeModule; +import io.druid.guice.ServerModule; +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.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 0796dda3b04..882b8ae1b8b 100644 --- a/services/src/main/java/io/druid/cli/CliRealtimeExample.java +++ b/services/src/main/java/io/druid/cli/CliRealtimeExample.java @@ -21,15 +21,15 @@ package io.druid.cli; import com.google.inject.Injector; import com.metamx.common.logger.Logger; -import com.metamx.druid.realtime.RealtimeManager; import druid.examples.guice.RealtimeExampleModule; import io.airlift.command.Command; -import io.druid.guice.guice.DruidProcessingModule; -import io.druid.guice.guice.LifecycleModule; -import io.druid.guice.guice.QueryRunnerFactoryModule; -import io.druid.guice.guice.QueryableModule; -import io.druid.guice.guice.ServerModule; -import io.druid.guice.guice.StorageNodeModule; +import io.druid.guice.DruidProcessingModule; +import io.druid.guice.LifecycleModule; +import io.druid.guice.QueryRunnerFactoryModule; +import io.druid.guice.QueryableModule; +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;