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 Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected javax.servlet.http.HttpServletRequestprotected javax.servlet.ServletContextprotected javax.ws.rs.core.UriInfo -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.voiddrain()voiddrainAtLeader(String workerId) get()List<org.apache.pulsar.common.functions.WorkerInfo>org.apache.pulsar.common.functions.WorkerInfoList<org.apache.pulsar.common.io.ConnectorDefinition>getDrainStatus(String workerId) void
-
Field Details
-
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
- Specified by:
getin interfaceSupplier<WorkerService>
-
clientAppId
Deprecated.useauthParams()instead -
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
-
drain
@PUT @Path("/drain") public void drain() -
getDrainStatus
@GET @Path("/leader/drain") public LongRunningProcessStatus getDrainStatus(@QueryParam("workerId") String workerId) -
getDrainStatus
-
isLeaderReady
-
authParams()instead