| Package | Description |
|---|---|
| org.apache.twill.discovery |
Classes in this package provides service discovery implementations.
|
| org.apache.twill.internal |
This package provides internal classes for Twill.
|
| org.apache.twill.zookeeper |
This package provides functionality for ZooKeeper interactions.
|
| Constructor and Description |
|---|
ZKDiscoveryService(ZKClient zkClient)
Constructs ZKDiscoveryService using the provided zookeeper client for storing service registry.
|
ZKDiscoveryService(ZKClient zkClient,
String namespace)
Constructs ZKDiscoveryService using the provided zookeeper client for storing service registry under namespace.
|
| Modifier and Type | Field and Description |
|---|---|
protected ZKClient |
AbstractZKServiceController.zkClient |
protected ZKClient |
AbstractTwillService.zkClient |
| Modifier and Type | Method and Description |
|---|---|
static <V> void |
ZKMessages.sendMessage(ZKClient zkClient,
String messagePathPrefix,
org.apache.twill.internal.state.Message message,
com.google.common.util.concurrent.SettableFuture<V> completion,
V completionResult)
Creates a message node in zookeeper.
|
static <V> com.google.common.util.concurrent.ListenableFuture<V> |
ZKMessages.sendMessage(ZKClient zkClient,
String messagePathPrefix,
org.apache.twill.internal.state.Message message,
V completionResult)
Creates a message node in zookeeper.
|
| Constructor and Description |
|---|
AbstractTwillController(String appName,
RunId runId,
ZKClient zkClient,
boolean logCollectionEnabled,
Iterable<LogHandler> logHandlers) |
AbstractTwillService(ZKClient zkClient,
RunId runId) |
AbstractZKServiceController(RunId runId,
ZKClient zkClient) |
BasicTwillContext(RunId runId,
RunId appRunId,
InetAddress host,
String[] args,
String[] appArgs,
TwillRunnableSpecification spec,
int instanceId,
DiscoveryService discoveryService,
DiscoveryServiceClient discoveryServiceClient,
ZKClient zkClient,
int instanceCount,
int allowedMemoryMB,
int virtualCores) |
ElectionRegistry(ZKClient zkClient) |
TwillContainerLauncher(RuntimeSpecification runtimeSpec,
ContainerInfo containerInfo,
ProcessLauncher.PrepareLaunchContext launchContext,
ZKClient zkClient,
int instanceCount,
JvmOptions jvmOpts,
int reservedMemory,
double minHeapRatio,
Location secureStoreLocation) |
TwillZKPathService(ZKClient zkClient,
RunId runId) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
ZKClientService
A
ZKClient that extends from Service to provide lifecycle management functions. |
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractZKClient
An abstract base implementation of
ZKClient that simplifies implementation by providing forwarding for
methods that are meant to be delegated to other methods. |
class |
ForwardingZKClient |
class |
ForwardingZKClientService |
| Modifier and Type | Method and Description |
|---|---|
ZKClient |
ForwardingZKClient.getDelegate() |
static ZKClient |
ZKClients.namespace(ZKClient zkClient,
String namespace)
Creates a
ZKClient that will add prefix namespace for every paths. |
static ZKClient |
ZKClients.retryOnFailure(ZKClient client,
RetryStrategy retryStrategy)
Creates a
ZKClient that will retry interim failure (e.g. |
static ZKClient |
ZKClients.reWatchOnExpire(ZKClient client)
Creates a
ZKClient that will perform auto re-watch on all existing watches
when reconnection happens after session expiration. |
| Modifier and Type | Method and Description |
|---|---|
static OperationFuture<String> |
ZKOperations.createDeleteIfExists(ZKClient zkClient,
String path,
byte[] data,
org.apache.zookeeper.CreateMode createMode,
boolean createParent,
org.apache.zookeeper.data.ACL... acls)
Creates a ZK node of the given path.
|
static ZKClientService |
ZKClientServices.delegate(ZKClient client)
Creates a
ZKClientService from the given ZKClient if the given ZKClient is an instance of
ZKClientService or is a ForwardingZKClient that eventually trace back to a delegate of type
ZKClientService. |
static ZKClientService |
ZKClientServices.delegate(ZKClient client,
ZKClientService clientService)
Creates a
ZKClientService that for all ZKClient methods would be delegated to another
ZKClient, while methods for ZKClientService would be delegated to another ZKClientService,
which the given ZKClient and ZKClientService could be different instances. |
static ZKClient |
ZKClients.namespace(ZKClient zkClient,
String namespace)
Creates a
ZKClient that will add prefix namespace for every paths. |
static OperationFuture<String> |
ZKOperations.recursiveDelete(ZKClient zkClient,
String path)
Deletes the given path recursively.
|
static ZKClient |
ZKClients.retryOnFailure(ZKClient client,
RetryStrategy retryStrategy)
Creates a
ZKClient that will retry interim failure (e.g. |
static ZKClient |
ZKClients.reWatchOnExpire(ZKClient client)
Creates a
ZKClient that will perform auto re-watch on all existing watches
when reconnection happens after session expiration. |
static Cancellable |
ZKOperations.watchChildren(ZKClient zkClient,
String path,
ZKOperations.ChildrenCallback callback) |
static Cancellable |
ZKOperations.watchData(ZKClient zkClient,
String path,
ZKOperations.DataCallback callback)
Watch for data changes of the given path.
|
static com.google.common.util.concurrent.ListenableFuture<String> |
ZKOperations.watchDeleted(ZKClient zkClient,
String path) |
static void |
ZKOperations.watchDeleted(ZKClient zkClient,
String path,
com.google.common.util.concurrent.SettableFuture<String> completion) |
| Constructor and Description |
|---|
ForwardingZKClient(ZKClient delegate) |
Copyright © 2013-2020 The Apache Software Foundation. All rights reserved.