Class SourcesApiV3Resource
java.lang.Object
org.apache.pulsar.functions.worker.rest.FunctionApiResource
org.apache.pulsar.functions.worker.rest.api.v3.SourcesApiV3Resource
- All Implemented Interfaces:
Supplier<WorkerService>
- Direct Known Subclasses:
SourceApiV3Resource
@Produces("application/json")
@Consumes("application/json")
@Path("/sources")
public class SourcesApiV3Resource
extends FunctionApiResource
-
Field Summary
Fields inherited from class org.apache.pulsar.functions.worker.rest.FunctionApiResource
ATTRIBUTE_FUNCTION_WORKER, httpRequest, ORIGINAL_PRINCIPAL_HEADER, servletContext, uri -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidderegisterSource(String tenant, String namespace, String sourceName) List<org.apache.pulsar.common.io.ConfigFieldDefinition>org.apache.pulsar.common.io.SourceConfiggetSourceInfo(String tenant, String namespace, String sourceName) org.apache.pulsar.common.policies.data.SourceStatus.SourceInstanceStatus.SourceInstanceStatusDatagetSourceInstanceStatus(String tenant, String namespace, String sourceName, String instanceId) List<org.apache.pulsar.common.io.ConnectorDefinition>org.apache.pulsar.common.policies.data.SourceStatusgetSourceStatus(String tenant, String namespace, String sourceName) listSources(String tenant, String namespace) voidregisterSource(String tenant, String namespace, String sourceName, InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, String functionPkgUrl, org.apache.pulsar.common.io.SourceConfig sourceConfig) voidvoidrestartSource(String tenant, String namespace, String sourceName) voidrestartSource(String tenant, String namespace, String sourceName, String instanceId) voidstartSource(String tenant, String namespace, String sourceName) voidstartSource(String tenant, String namespace, String sourceName, String instanceId) voidstopSource(String tenant, String namespace, String sourceName) voidstopSource(String tenant, String namespace, String sourceName, String instanceId) voidupdateSource(String tenant, String namespace, String sourceName, InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, String functionPkgUrl, org.apache.pulsar.common.io.SourceConfig sourceConfig, org.apache.pulsar.common.functions.UpdateOptionsImpl updateOptions) Methods inherited from class org.apache.pulsar.functions.worker.rest.FunctionApiResource
authParams, clientAppId, clientAuthData, get
-
Constructor Details
-
SourcesApiV3Resource
public SourcesApiV3Resource()
-
-
Method Details
-
registerSource
@POST @Path("/{tenant}/{namespace}/{sourceName}") @Consumes("multipart/form-data") public void registerSource(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("sourceName") String sourceName, InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, String functionPkgUrl, org.apache.pulsar.common.io.SourceConfig sourceConfig) -
updateSource
@PUT @Path("/{tenant}/{namespace}/{sourceName}") @Consumes("multipart/form-data") public void updateSource(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("sourceName") String sourceName, InputStream uploadedInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, String functionPkgUrl, org.apache.pulsar.common.io.SourceConfig sourceConfig, org.apache.pulsar.common.functions.UpdateOptionsImpl updateOptions) -
deregisterSource
-
getSourceInfo
@GET @Produces("application/json") @Path("/{tenant}/{namespace}/{sourceName}") public org.apache.pulsar.common.io.SourceConfig getSourceInfo(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("sourceName") String sourceName) throws IOException - Throws:
IOException
-
getSourceInstanceStatus
@GET @Produces("application/json") @Path("/{tenant}/{namespace}/{sourceName}/{instanceId}/status") public org.apache.pulsar.common.policies.data.SourceStatus.SourceInstanceStatus.SourceInstanceStatusData getSourceInstanceStatus(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("sourceName") String sourceName, @PathParam("instanceId") String instanceId) throws IOException - Throws:
IOException
-
getSourceStatus
@GET @Produces("application/json") @Path("/{tenant}/{namespace}/{sourceName}/status") public org.apache.pulsar.common.policies.data.SourceStatus getSourceStatus(@PathParam("tenant") String tenant, @PathParam("namespace") String namespace, @PathParam("sourceName") String sourceName) throws IOException - Throws:
IOException
-
listSources
-
restartSource
-
restartSource
-
stopSource
-
stopSource
-
startSource
-
startSource
-
getSourceList
@GET @Produces("application/json") @Path("/builtinsources") public List<org.apache.pulsar.common.io.ConnectorDefinition> getSourceList() -
getSourceConfigDefinition
@GET @Produces("application/json") @Path("/builtinsources/{name}/configdefinition") public List<org.apache.pulsar.common.io.ConfigFieldDefinition> getSourceConfigDefinition(@PathParam("name") String name) throws IOException - Throws:
IOException
-
reloadSources
@POST @Path("/reloadBuiltInSources") public void reloadSources()
-