Document HTTP based segment management and Deprecate classes to remove in future (#4997)

* document http segment management

* deprecated classes that shouldn't be used any further
This commit is contained in:
Himanshu 2017-11-01 11:59:27 -05:00 committed by Fangjin Yang
parent 6c725a7e06
commit 654cdc07f5
17 changed files with 49 additions and 1 deletions

View File

@ -109,6 +109,11 @@ You can optionally only configure caching to be enabled on the broker by setting
See [cache configuration](caching.html) for how to configure cache settings. See [cache configuration](caching.html) for how to configure cache settings.
### Segment Discovery
|Property|Possible Values|Description|Default|
|--------|---------------|-----------|-------|
|`druid.announcer.type`|batch or http|Segment discovery method to use. "http" enables discovering segments using HTTP instead of zookeeper.|batch|
### Others ### Others
|Property|Possible Values|Description|Default| |Property|Possible Values|Description|Default|

View File

@ -38,6 +38,17 @@ The coordinator node uses several of the global configs in [Configuration](../co
|`druid.coordinator.asOverlord.enabled`|Boolean value for whether this coordinator node should act like an overlord as well. This configuration allows users to simplify a druid cluster by not having to deploy any standalone overlord nodes. If set to true, then overlord console is available at `http://coordinator-host:port/console.html` and be sure to set `druid.coordinator.asOverlord.overlordService` also. See next.|false| |`druid.coordinator.asOverlord.enabled`|Boolean value for whether this coordinator node should act like an overlord as well. This configuration allows users to simplify a druid cluster by not having to deploy any standalone overlord nodes. If set to true, then overlord console is available at `http://coordinator-host:port/console.html` and be sure to set `druid.coordinator.asOverlord.overlordService` also. See next.|false|
|`druid.coordinator.asOverlord.overlordService`| Required, if `druid.coordinator.asOverlord.enabled` is `true`. This must be same value as `druid.service` on standalone Overlord nodes and `druid.selectors.indexing.serviceName` on Middle Managers.|NULL| |`druid.coordinator.asOverlord.overlordService`| Required, if `druid.coordinator.asOverlord.enabled` is `true`. This must be same value as `druid.service` on standalone Overlord nodes and `druid.selectors.indexing.serviceName` on Middle Managers.|NULL|
### Segment Management
|Property|Possible Values|Description|Default|
|--------|---------------|-----------|-------|
|`druid.announcer.type`|batch or http|Segment discovery method to use. "http" enables discovering segments using HTTP instead of zookeeper.|batch|
|`druid.coordinator.loadqueuepeon.type`|curator or http|Whether to use "http" or "curator" implementation to assign segment loads/drops to historical|curator|
#### Additional config when "http" loadqueuepeon is used
|Property|Description|Default|
|--------|-----------|-------|
|`druid.coordinator.loadqueuepeon.http.batchSize`|Number of segment load/drop requests to batch in one HTTP request. Note that it must be smaller than `druid.segmentCache.numLoadingThreads` config on historical node.|1|
### Metadata Retrieval ### Metadata Retrieval
|Property|Description|Default| |Property|Description|Default|

View File

@ -43,7 +43,9 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
/** /**
* This class is deprecated. Use {@link HttpServerInventoryView} instead.
*/ */
@Deprecated
@ManageLifecycle @ManageLifecycle
public class BatchServerInventoryView extends AbstractCuratorServerInventoryView<Set<DataSegment>> public class BatchServerInventoryView extends AbstractCuratorServerInventoryView<Set<DataSegment>>
implements FilteredServerInventoryView implements FilteredServerInventoryView

View File

@ -38,7 +38,9 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
/** /**
* This class is deprecated. Use {@link HttpServerInventoryView} instead.
*/ */
@Deprecated
@ManageLifecycle @ManageLifecycle
public class SingleServerInventoryView extends AbstractCuratorServerInventoryView<DataSegment> implements FilteredServerInventoryView public class SingleServerInventoryView extends AbstractCuratorServerInventoryView<DataSegment> implements FilteredServerInventoryView
{ {

View File

@ -30,8 +30,11 @@ import org.apache.curator.x.discovery.ServiceInstance;
import java.util.Map; import java.util.Map;
/** /**
* This class is deprecated, Add service to {@link io.druid.discovery.DruidNodeAnnouncer} node announcement instead.
*
* Uses the Curator Service Discovery recipe to announce services. * Uses the Curator Service Discovery recipe to announce services.
*/ */
@Deprecated
public class CuratorServiceAnnouncer implements ServiceAnnouncer public class CuratorServiceAnnouncer implements ServiceAnnouncer
{ {
private static final EmittingLogger log = new EmittingLogger(CuratorServiceAnnouncer.class); private static final EmittingLogger log = new EmittingLogger(CuratorServiceAnnouncer.class);

View File

@ -19,6 +19,10 @@
package io.druid.curator.discovery; package io.druid.curator.discovery;
/**
* This class is only used by Deprecated classes.
*/
@Deprecated
public class CuratorServiceUtils public class CuratorServiceUtils
{ {
/** /**

View File

@ -24,6 +24,7 @@ import io.druid.server.DruidNode;
/** /**
* Does nothing. * Does nothing.
*/ */
@Deprecated
public class NoopServiceAnnouncer implements ServiceAnnouncer public class NoopServiceAnnouncer implements ServiceAnnouncer
{ {
@Override @Override

View File

@ -28,7 +28,9 @@ import java.io.IOException;
import java.util.Collection; import java.util.Collection;
/** /**
* Use {@link io.druid.discovery.DruidNodeDiscovery} for discovery.
*/ */
@Deprecated
public class ServerDiscoveryFactory public class ServerDiscoveryFactory
{ {
private final ServiceDiscovery<Void> serviceDiscovery; private final ServiceDiscovery<Void> serviceDiscovery;

View File

@ -36,7 +36,9 @@ import java.util.Collection;
import java.util.Collections; import java.util.Collections;
/** /**
* Use {@link io.druid.discovery.DruidNodeDiscovery} for discovery.
*/ */
@Deprecated
public class ServerDiscoverySelector implements DiscoverySelector<Server> public class ServerDiscoverySelector implements DiscoverySelector<Server>
{ {
private static final Logger log = new Logger(ServerDiscoverySelector.class); private static final Logger log = new Logger(ServerDiscoverySelector.class);

View File

@ -22,9 +22,12 @@ package io.druid.curator.discovery;
import io.druid.server.DruidNode; import io.druid.server.DruidNode;
/** /**
* This class is deprecated, Add service to {@link io.druid.discovery.DruidNodeAnnouncer} node announcement instead.
*
* Announces our ability to serve a particular function. Multiple users may announce the same service, in which * Announces our ability to serve a particular function. Multiple users may announce the same service, in which
* case they are treated as interchangeable instances of that service. * case they are treated as interchangeable instances of that service.
*/ */
@Deprecated
public interface ServiceAnnouncer public interface ServiceAnnouncer
{ {
void announce(DruidNode node); void announce(DruidNode node);

View File

@ -43,6 +43,8 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
/** /**
* This class is deprecated. Use {@link io.druid.client.HttpServerInventoryView} for segment discovery.
*
* An InventoryManager watches updates to inventory on Zookeeper (or some other discovery-like service publishing * An InventoryManager watches updates to inventory on Zookeeper (or some other discovery-like service publishing
* system). It is built up on two object types: containers and inventory objects. * system). It is built up on two object types: containers and inventory objects.
* <p/> * <p/>
@ -52,6 +54,7 @@ import java.util.concurrent.atomic.AtomicReference;
* A Strategy is provided to the constructor of an Inventory manager, this strategy provides all of the * A Strategy is provided to the constructor of an Inventory manager, this strategy provides all of the
* object-specific logic to serialize, deserialize, compose and alter the container and inventory objects. * object-specific logic to serialize, deserialize, compose and alter the container and inventory objects.
*/ */
@Deprecated
public class CuratorInventoryManager<ContainerClass, InventoryClass> public class CuratorInventoryManager<ContainerClass, InventoryClass>
{ {
private static final Logger log = new Logger(CuratorInventoryManager.class); private static final Logger log = new Logger(CuratorInventoryManager.class);

View File

@ -214,6 +214,7 @@ class LookupListeningResource extends ListenerResource
} }
} }
@Deprecated
class LookupResourceListenerAnnouncer extends ListenerResourceAnnouncer class LookupResourceListenerAnnouncer extends ListenerResourceAnnouncer
{ {
@Inject @Inject

View File

@ -29,7 +29,9 @@ import io.druid.server.initialization.ZkPathsConfig;
import org.apache.curator.utils.ZKPaths; import org.apache.curator.utils.ZKPaths;
/** /**
* {@link DataSegmentServerAnnouncer} is deprecated.
*/ */
@Deprecated
public class CuratorDataSegmentServerAnnouncer implements DataSegmentServerAnnouncer public class CuratorDataSegmentServerAnnouncer implements DataSegmentServerAnnouncer
{ {
private static final Logger log = new Logger(CuratorDataSegmentServerAnnouncer.class); private static final Logger log = new Logger(CuratorDataSegmentServerAnnouncer.class);

View File

@ -20,7 +20,9 @@
package io.druid.server.coordination; package io.druid.server.coordination;
/** /**
* Use announcement made by {@link io.druid.discovery.DruidNodeAnnouncer}
*/ */
@Deprecated
public interface DataSegmentServerAnnouncer public interface DataSegmentServerAnnouncer
{ {
void announce(); void announce();

View File

@ -37,7 +37,9 @@ import org.apache.curator.utils.ZKPaths;
import java.io.IOException; import java.io.IOException;
/** /**
* Use {@link io.druid.server.coordinator.HttpLoadQueuePeon} for segment load/drops.
*/ */
@Deprecated
public class ZkCoordinator public class ZkCoordinator
{ {
private static final EmittingLogger log = new EmittingLogger(ZkCoordinator.class); private static final EmittingLogger log = new EmittingLogger(ZkCoordinator.class);

View File

@ -51,7 +51,9 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
/** /**
* Use {@link HttpLoadQueuePeon} instead.
*/ */
@Deprecated
public class CuratorLoadQueuePeon extends LoadQueuePeon public class CuratorLoadQueuePeon extends LoadQueuePeon
{ {
private static final EmittingLogger log = new EmittingLogger(CuratorLoadQueuePeon.class); private static final EmittingLogger log = new EmittingLogger(CuratorLoadQueuePeon.class);

View File

@ -31,8 +31,9 @@ import org.apache.curator.utils.ZKPaths;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
/** /**
* Announces that there is a particular ListenerResource at the listener_key. * Starting 0.11.0 Coordinator uses announcements made by {@link io.druid.discovery.DruidNodeAnnouncer} .
*/ */
@Deprecated
public abstract class ListenerResourceAnnouncer public abstract class ListenerResourceAnnouncer
{ {
private static final byte[] ANNOUNCE_BYTES = ByteBuffer private static final byte[] ANNOUNCE_BYTES = ByteBuffer