Class Worker
- java.lang.Object
-
- org.apache.pulsar.broker.web.PulsarWebResource
-
- org.apache.pulsar.broker.admin.AdminResource
-
- org.apache.pulsar.broker.admin.v2.Worker
-
- All Implemented Interfaces:
java.util.function.Supplier<org.apache.pulsar.functions.worker.WorkerService>
@Path("/worker") public class Worker extends AdminResource implements java.util.function.Supplier<org.apache.pulsar.functions.worker.WorkerService>
-
-
Field Summary
-
Fields inherited from class org.apache.pulsar.broker.admin.AdminResource
namespaceName, topicName
-
Fields inherited from class org.apache.pulsar.broker.web.PulsarWebResource
httpRequest, servletContext, uri
-
-
Constructor Summary
Constructors Constructor Description Worker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddrain()voiddrainAtLeader(java.lang.String workerId)org.apache.pulsar.functions.worker.WorkerServiceget()java.util.Map<java.lang.String,java.util.Collection<java.lang.String>>getAssignments()java.util.List<org.apache.pulsar.common.functions.WorkerInfo>getCluster()org.apache.pulsar.common.functions.WorkerInfogetClusterLeader()java.util.List<org.apache.pulsar.common.io.ConnectorDefinition>getConnectorsList()org.apache.pulsar.client.admin.LongRunningProcessStatusgetDrainStatus()org.apache.pulsar.client.admin.LongRunningProcessStatusgetDrainStatusFromLeader(java.lang.String workerId)java.lang.BooleanisLeaderReady()voidrebalance()-
Methods inherited from class org.apache.pulsar.broker.admin.AdminResource
bookKeeper, checkArgument, checkBacklogQuota, checkNotNull, checkNotNull, checkTopicExistsAsync, checkTopicLevelPolicyEnable, clusters, dispatchRate, domain, fetchPartitionedTopicMetadata, fetchPartitionedTopicMetadataCheckAllowAutoCreation, getNamespacePolicies, getNamespacePolicies, getNamespacePoliciesAsync, getNamespaceReplicatedClusters, getPartitionedTopicList, getPartitionedTopicMetadata, getPartitionedTopicMetadataAsync, getSchemaCompatibilityStrategyAsync, getSchemaCompatibilityStrategyAsyncWithoutAuth, getTopicNotFoundErrorMessage, getTopicPartitionList, getTopicPoliciesAsyncWithRetry, getTopicPoliciesAsyncWithRetry, internalCreatePartitionedTopic, internalCreatePartitionedTopic, isLeaderBroker, isManagedLedgerNotFoundException, isNamespaceReplicated, isRedirectException, jsonMapper, namespaceBacklogQuota, replicatorDispatchRate, resumeAsyncResponseExceptionally, setServletContext, subscribeRate, subscriptionDispatchRate, tryCreatePartitionsAsync, validateAdminAccessForTenant, validateAndGetWorkerService, validateBundleOwnership, validateClusterExists, validateGlobalNamespaceOwnership, validateNamespaceName, validateNamespaceName, validatePartitionedTopicMetadata, validatePartitionedTopicName, validatePersistencePolicies, validatePersistentTopicName, validatePersistentTopicName, validatePoliciesReadOnlyAccess, validatePoliciesReadOnlyAccessAsync, validateSuperUserAccess, validateTopicName, validateTopicName
-
Methods inherited from class org.apache.pulsar.broker.web.PulsarWebResource
bookieResources, canUpdateCluster, checkAuthorizationAsync, checkLocalOrGetPeerReplicationCluster, checkLocalOrGetPeerReplicationCluster, clientAppId, clientAuthData, clusterResources, config, dynamicConfigurationResources, getClusterDataIfDifferentCluster, getLocalPolicies, getPulsarResources, hasActiveNamespace, hasSuperUserAccess, isBundleOwnedByAnyBroker, isClientAuthenticated, isLeaderBroker, isRequestHttps, namespaceIsolationPolicies, namespaceResources, originalPrincipal, pulsar, resourceGroupResources, setPulsar, splitPath, sync, tenantResources, topicResources, validateAdminAccessForTenant, validateAdminAccessForTenantAsync, validateAdminAccessForTenantAsync, validateBrokerName, validateBundleOwnership, validateClusterForTenant, validateClusterOwnership, validateClusterOwnershipAsync, validateGlobalNamespaceOwnership, validateGlobalNamespaceOwnershipAsync, validateNamespaceBundleOwnership, validateNamespaceBundleRange, validateNamespaceOperation, validateNamespaceOperationAsync, validateNamespacePolicyOperation, validateNamespacePolicyOperationAsync, validatePeerClusterConflict, validateSuperUserAccessAsync, validateTenantOperation, validateTenantOperationAsync, validateTopicOperation, validateTopicOperation, validateTopicOperationAsync, validateTopicOperationAsync, validateTopicOwnership, validateTopicOwnershipAsync, validateTopicPolicyOperation, validateTopicPolicyOperationAsync
-
-
-
-
Method Detail
-
get
public org.apache.pulsar.functions.worker.WorkerService get()
- Specified by:
getin interfacejava.util.function.Supplier<org.apache.pulsar.functions.worker.WorkerService>
-
getCluster
@GET @Path("/cluster") @Produces("application/json") public java.util.List<org.apache.pulsar.common.functions.WorkerInfo> getCluster()
-
getClusterLeader
@GET @Path("/cluster/leader") @Produces("application/json") public org.apache.pulsar.common.functions.WorkerInfo getClusterLeader()
-
getAssignments
@GET @Path("/assignments") @Produces("application/json") public java.util.Map<java.lang.String,java.util.Collection<java.lang.String>> getAssignments()
-
getConnectorsList
@GET @Path("/connectors") @Produces("application/json") public java.util.List<org.apache.pulsar.common.io.ConnectorDefinition> getConnectorsList() throws java.io.IOException- Throws:
java.io.IOException
-
rebalance
@PUT @Path("/rebalance") public void rebalance()
-
drainAtLeader
@PUT @Path("/leader/drain") public void drainAtLeader(@QueryParam("workerId") java.lang.String workerId)
-
drain
@PUT @Path("/drain") public void drain()
-
getDrainStatusFromLeader
@GET @Path("/leader/drain") public org.apache.pulsar.client.admin.LongRunningProcessStatus getDrainStatusFromLeader(@QueryParam("workerId") java.lang.String workerId)
-
getDrainStatus
@GET @Path("/drain") public org.apache.pulsar.client.admin.LongRunningProcessStatus getDrainStatus()
-
isLeaderReady
@GET @Path("/cluster/leader/ready") public java.lang.Boolean isLeaderReady()
-
-