Class WorkerApiV2Resource

java.lang.Object
org.apache.pulsar.functions.worker.rest.api.v2.WorkerApiV2Resource
All Implemented Interfaces:
Supplier<WorkerService>

@Path("/worker") @Produces("application/json") @Consumes("application/json") public class WorkerApiV2Resource extends Object implements Supplier<WorkerService>
  • Field Details

    • ATTRIBUTE_WORKER_SERVICE

      public static final String ATTRIBUTE_WORKER_SERVICE
      See Also:
    • servletContext

      @Context protected javax.servlet.ServletContext servletContext
    • httpRequest

      @Context protected javax.servlet.http.HttpServletRequest httpRequest
    • uri

      @Context protected javax.ws.rs.core.UriInfo uri
  • Constructor Details

    • WorkerApiV2Resource

      public WorkerApiV2Resource()
  • Method Details

    • get

      public WorkerService get()
      Specified by:
      get in interface Supplier<WorkerService>
    • clientAppId

      @Deprecated public String clientAppId()
      Deprecated.
      use authParams() instead
    • authParams

      public AuthenticationParameters authParams()
    • 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") public List<org.apache.pulsar.common.io.ConnectorDefinition> getConnectorsList() throws IOException
      Throws:
      IOException
    • rebalance

      @PUT @Path("/rebalance") public void rebalance()
    • drainAtLeader

      @PUT @Path("/leader/drain") public void drainAtLeader(@QueryParam("workerId") String workerId)
    • drain

      @PUT @Path("/drain") public void drain()
    • getDrainStatus

      @GET @Path("/leader/drain") public LongRunningProcessStatus getDrainStatus(@QueryParam("workerId") String workerId)
    • getDrainStatus

      @GET @Path("/drain") public LongRunningProcessStatus getDrainStatus()
    • isLeaderReady

      @GET @Path("/cluster/leader/ready") public Boolean isLeaderReady()