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:
Supplier<org.apache.pulsar.functions.worker.WorkerService>
@Path("/worker")
public class Worker
extends AdminResource
implements Supplier<org.apache.pulsar.functions.worker.WorkerService>
-
Field Summary
Fields inherited from class org.apache.pulsar.broker.admin.AdminResource
namespaceName, topicNameFields inherited from class org.apache.pulsar.broker.web.PulsarWebResource
httpRequest, servletContext, uri -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddrain()voiddrainAtLeader(String workerId) org.apache.pulsar.functions.worker.WorkerServiceget()List<org.apache.pulsar.common.functions.WorkerInfo>org.apache.pulsar.common.functions.WorkerInfoList<org.apache.pulsar.common.io.ConnectorDefinition>org.apache.pulsar.client.admin.LongRunningProcessStatusorg.apache.pulsar.client.admin.LongRunningProcessStatusgetDrainStatusFromLeader(String workerId) voidMethods inherited from class org.apache.pulsar.broker.admin.AdminResource
bookKeeper, checkArgument, checkBacklogQuota, checkNotNull, checkNotNull, checkTopicExistsAsync, checkTopicLevelPolicyEnable, clusters, clustersAsync, dispatchRate, domain, fetchPartitionedTopicMetadata, fetchPartitionedTopicMetadataCheckAllowAutoCreation, filterSystemTopic, getNamespacePolicies, getNamespacePolicies, getNamespacePoliciesAsync, getNamespaceReplicatedClusters, getNamespaceReplicatedClustersAsync, getPartitionedTopicList, getPartitionedTopicListAsync, getPartitionedTopicMetadata, getPartitionedTopicMetadataAsync, getPartitionedTopicNotFoundErrorMessage, getSchemaCompatibilityStrategyAsync, getSchemaCompatibilityStrategyAsyncWithoutAuth, getSubNotFoundErrorMessage, getTopicNotFoundErrorMessage, getTopicPartitionList, getTopicPoliciesAsyncWithRetry, getTopicPoliciesAsyncWithRetry, internalCreatePartitionedTopic, internalCreatePartitionedTopic, isLeaderBroker, isManagedLedgerNotFoundException, isNamespaceReplicated, isNotFoundException, isRedirectException, jsonMapper, namespaceBacklogQuota, replicatorDispatchRate, setServletContext, subscribeRate, subscriptionDispatchRate, tryCreateExtendedPartitionsAsync, tryCreatePartitionsAsync, validateAdminAccessForTenant, validateAndGetWorkerService, validateBundleOwnership, validateClusterExists, validateGlobalNamespaceOwnership, validateNamespaceName, validateNamespaceName, validatePartitionedTopicMetadataAsync, validatePartitionedTopicName, validatePersistencePolicies, validatePersistentTopicName, validatePersistentTopicName, validatePoliciesReadOnlyAccess, validatePoliciesReadOnlyAccessAsync, validateSuperUserAccess, validateTopicName, validateTopicNameMethods 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, resumeAsyncResponseExceptionally, setPulsar, splitPath, sync, tenantResources, topicResources, validateAdminAccessForTenant, validateAdminAccessForTenantAsync, validateAdminAccessForTenantAsync, validateBrokerName, validateBundleOwnership, validateBundleOwnershipAsync, validateClusterForTenant, validateClusterForTenantAsync, validateClusterOwnership, validateClusterOwnershipAsync, validateGlobalNamespaceOwnership, validateGlobalNamespaceOwnershipAsync, validateNamespaceBundleOwnership, validateNamespaceBundleOwnershipAsync, validateNamespaceBundleRange, validateNamespaceOperation, validateNamespaceOperationAsync, validateNamespacePolicyOperation, validateNamespacePolicyOperationAsync, validatePeerClusterConflict, validatePeerClusterConflictAsync, validateSuperUserAccessAsync, validateTenantOperation, validateTenantOperationAsync, validateTopicOperation, validateTopicOperation, validateTopicOperationAsync, validateTopicOperationAsync, validateTopicOwnership, validateTopicOwnershipAsync, validateTopicPolicyOperation, validateTopicPolicyOperationAsync
-
Constructor Details
-
Worker
public Worker()
-
-
Method Details
-
get
public org.apache.pulsar.functions.worker.WorkerService get() -
getCluster
@GET @Path("/cluster") @Produces("application/json") public 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 Map<String,Collection<String>> getAssignments() -
getConnectorsList
@GET @Path("/connectors") @Produces("application/json") public List<org.apache.pulsar.common.io.ConnectorDefinition> getConnectorsList() throws IOException- Throws:
IOException
-
rebalance
@PUT @Path("/rebalance") public void rebalance() -
drainAtLeader
-
drain
@PUT @Path("/drain") public void drain() -
getDrainStatusFromLeader
@GET @Path("/leader/drain") public org.apache.pulsar.client.admin.LongRunningProcessStatus getDrainStatusFromLeader(@QueryParam("workerId") String workerId) -
getDrainStatus
@GET @Path("/drain") public org.apache.pulsar.client.admin.LongRunningProcessStatus getDrainStatus() -
isLeaderReady
-