Package org.apache.pulsar.client.admin
Interface Worker
public interface Worker
Admin interface for worker stats management.
-
Method Summary
Modifier and TypeMethodDescriptionGet the function assignment among the cluster.Get the function assignment among the cluster asynchronously.Get List of all workers belonging to this cluster.Get List of all workers belonging to this cluster asynchronously.Get the worker who is the leader of the cluster.Get the worker who is the leader of the cluster asynchronously.Get all functions stats on a worker.Get all functions stats on a worker asynchronously.Get worker metrics.Get worker metrics asynchronously.void
Triggers a rebalance of functions to workers.Triggers a rebalance of functions to workersasynchronously..
-
Method Details
-
getFunctionsStats
Get all functions stats on a worker.- Returns:
- Throws:
PulsarAdminException
-
getFunctionsStatsAsync
CompletableFuture<List<WorkerFunctionInstanceStats>> getFunctionsStatsAsync()Get all functions stats on a worker asynchronously.- Returns:
-
getMetrics
Get worker metrics.- Returns:
- Throws:
PulsarAdminException
-
getMetricsAsync
CompletableFuture<Collection<Metrics>> getMetricsAsync()Get worker metrics asynchronously.- Returns:
-
getCluster
Get List of all workers belonging to this cluster.- Returns:
- Throws:
PulsarAdminException
-
getClusterAsync
CompletableFuture<List<WorkerInfo>> getClusterAsync()Get List of all workers belonging to this cluster asynchronously.- Returns:
-
getClusterLeader
Get the worker who is the leader of the cluster.- Returns:
- Throws:
PulsarAdminException
-
getClusterLeaderAsync
CompletableFuture<WorkerInfo> getClusterLeaderAsync()Get the worker who is the leader of the cluster asynchronously.- Returns:
-
getAssignments
Get the function assignment among the cluster.- Returns:
- Throws:
PulsarAdminException
-
getAssignmentsAsync
CompletableFuture<Map<String,Collection<String>>> getAssignmentsAsync()Get the function assignment among the cluster asynchronously.- Returns:
-
rebalance
Triggers a rebalance of functions to workers.- Throws:
PulsarAdminException
-
rebalanceAsync
CompletableFuture<Void> rebalanceAsync()Triggers a rebalance of functions to workersasynchronously..- Throws:
PulsarAdminException
-