Class 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>
    • Constructor Detail

      • Worker

        public Worker()
    • Method Detail

      • get

        public org.apache.pulsar.functions.worker.WorkerService get()
        Specified by:
        get in interface java.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()