public abstract class ComponentImpl extends Object implements Component<PulsarWorkerService>
| Modifier and Type | Class and Description |
|---|---|
protected class |
ComponentImpl.GetStatus<S,T> |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType |
componentType |
protected Supplier<PulsarWorkerService> |
workerServiceSupplier |
| Constructor and Description |
|---|
ComponentImpl(Supplier<PulsarWorkerService> workerServiceSupplier,
org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType componentType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowFunctionOps(org.apache.pulsar.common.naming.NamespaceName namespaceName,
String role,
AuthenticationDataSource authenticationData) |
void |
changeFunctionInstanceStatus(String tenant,
String namespace,
String componentName,
String instanceId,
boolean start,
URI uri,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
void |
changeFunctionStatusAllInstances(String tenant,
String namespace,
String componentName,
boolean start,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
protected void |
componentInstanceStatusRequestValidate(String tenant,
String namespace,
String componentName,
int instanceId,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
protected void |
componentStatusRequestValidate(String tenant,
String namespace,
String componentName,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
static String |
createPackagePath(String tenant,
String namespace,
String functionName,
String fileName) |
void |
deregisterFunction(String tenant,
String namespace,
String componentName,
String clientRole,
AuthenticationDataHttps clientAuthenticationDataHttps) |
javax.ws.rs.core.StreamingOutput |
downloadFunction(String path,
String clientRole,
AuthenticationDataHttps clientAuthenticationDataHttps) |
javax.ws.rs.core.StreamingOutput |
downloadFunction(String tenant,
String namespace,
String componentName,
String clientRole,
AuthenticationDataHttps clientAuthenticationDataHttps) |
protected ClassLoader |
getClassLoaderFromPackage(String className,
File packageFile,
String narExtractionDirectory) |
org.apache.pulsar.common.functions.FunctionConfig |
getFunctionInfo(String tenant,
String namespace,
String componentName,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
org.apache.pulsar.common.policies.data.FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData |
getFunctionsInstanceStats(String tenant,
String namespace,
String componentName,
String instanceId,
URI uri,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
org.apache.pulsar.common.functions.FunctionState |
getFunctionState(String tenant,
String namespace,
String functionName,
String key,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
org.apache.pulsar.common.policies.data.FunctionStats |
getFunctionStats(String tenant,
String namespace,
String componentName,
URI uri,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
List<org.apache.pulsar.common.io.ConnectorDefinition> |
getListOfConnectors() |
boolean |
isAuthorizedRole(String tenant,
String namespace,
String clientRole,
AuthenticationDataSource authenticationData) |
boolean |
isSuperUser(String clientRole,
AuthenticationDataSource authenticationData) |
List<String> |
listFunctions(String tenant,
String namespace,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
void |
putFunctionState(String tenant,
String namespace,
String functionName,
String key,
org.apache.pulsar.common.functions.FunctionState state,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
void |
reloadConnectors(String clientRole,
AuthenticationDataSource authenticationData) |
void |
restartFunctionInstance(String tenant,
String namespace,
String componentName,
String instanceId,
URI uri,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
void |
restartFunctionInstances(String tenant,
String namespace,
String componentName,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
void |
startFunctionInstance(String tenant,
String namespace,
String componentName,
String instanceId,
URI uri,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
void |
startFunctionInstances(String tenant,
String namespace,
String componentName,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
void |
stopFunctionInstance(String tenant,
String namespace,
String componentName,
String instanceId,
URI uri,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
void |
stopFunctionInstances(String tenant,
String namespace,
String componentName,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
String |
triggerFunction(String tenant,
String namespace,
String functionName,
String input,
InputStream uploadedInputStream,
String topic,
String clientRole,
AuthenticationDataSource clientAuthenticationDataHttps) |
void |
uploadFunction(InputStream uploadedInputStream,
String path,
String clientRole,
AuthenticationDataSource authenticationData) |
protected void |
validateGetFunctionInstanceRequestParams(String tenant,
String namespace,
String componentName,
org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType componentType,
String instanceId) |
protected void |
validateGetFunctionRequestParams(String tenant,
String namespace,
String subject,
org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType componentType) |
PulsarWorkerService |
worker() |
protected final Supplier<PulsarWorkerService> workerServiceSupplier
protected final org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType componentType
public ComponentImpl(Supplier<PulsarWorkerService> workerServiceSupplier, org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType componentType)
public PulsarWorkerService worker()
worker in interface Component<PulsarWorkerService>public void deregisterFunction(String tenant, String namespace, String componentName, String clientRole, AuthenticationDataHttps clientAuthenticationDataHttps)
deregisterFunction in interface Component<PulsarWorkerService>public org.apache.pulsar.common.functions.FunctionConfig getFunctionInfo(String tenant, String namespace, String componentName, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
getFunctionInfo in interface Component<PulsarWorkerService>public void stopFunctionInstance(String tenant, String namespace, String componentName, String instanceId, URI uri, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
stopFunctionInstance in interface Component<PulsarWorkerService>public void startFunctionInstance(String tenant, String namespace, String componentName, String instanceId, URI uri, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
startFunctionInstance in interface Component<PulsarWorkerService>public void changeFunctionInstanceStatus(String tenant, String namespace, String componentName, String instanceId, boolean start, URI uri, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
public void restartFunctionInstance(String tenant, String namespace, String componentName, String instanceId, URI uri, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
restartFunctionInstance in interface Component<PulsarWorkerService>public void stopFunctionInstances(String tenant, String namespace, String componentName, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
stopFunctionInstances in interface Component<PulsarWorkerService>public void startFunctionInstances(String tenant, String namespace, String componentName, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
startFunctionInstances in interface Component<PulsarWorkerService>public void changeFunctionStatusAllInstances(String tenant, String namespace, String componentName, boolean start, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
public void restartFunctionInstances(String tenant, String namespace, String componentName, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
restartFunctionInstances in interface Component<PulsarWorkerService>public org.apache.pulsar.common.policies.data.FunctionStats getFunctionStats(String tenant, String namespace, String componentName, URI uri, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
getFunctionStats in interface Component<PulsarWorkerService>public org.apache.pulsar.common.policies.data.FunctionStats.FunctionInstanceStats.FunctionInstanceStatsData getFunctionsInstanceStats(String tenant, String namespace, String componentName, String instanceId, URI uri, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
getFunctionsInstanceStats in interface Component<PulsarWorkerService>public List<String> listFunctions(String tenant, String namespace, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
listFunctions in interface Component<PulsarWorkerService>public List<org.apache.pulsar.common.io.ConnectorDefinition> getListOfConnectors()
getListOfConnectors in interface Component<PulsarWorkerService>public void reloadConnectors(String clientRole, AuthenticationDataSource authenticationData)
reloadConnectors in interface Component<PulsarWorkerService>public String triggerFunction(String tenant, String namespace, String functionName, String input, InputStream uploadedInputStream, String topic, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
triggerFunction in interface Component<PulsarWorkerService>public org.apache.pulsar.common.functions.FunctionState getFunctionState(String tenant, String namespace, String functionName, String key, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
getFunctionState in interface Component<PulsarWorkerService>public void putFunctionState(String tenant, String namespace, String functionName, String key, org.apache.pulsar.common.functions.FunctionState state, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
putFunctionState in interface Component<PulsarWorkerService>public void uploadFunction(InputStream uploadedInputStream, String path, String clientRole, AuthenticationDataSource authenticationData)
uploadFunction in interface Component<PulsarWorkerService>public javax.ws.rs.core.StreamingOutput downloadFunction(String tenant, String namespace, String componentName, String clientRole, AuthenticationDataHttps clientAuthenticationDataHttps)
downloadFunction in interface Component<PulsarWorkerService>public javax.ws.rs.core.StreamingOutput downloadFunction(String path, String clientRole, AuthenticationDataHttps clientAuthenticationDataHttps)
downloadFunction in interface Component<PulsarWorkerService>protected void validateGetFunctionInstanceRequestParams(String tenant, String namespace, String componentName, org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType componentType, String instanceId) throws IllegalArgumentException
IllegalArgumentExceptionprotected void validateGetFunctionRequestParams(String tenant, String namespace, String subject, org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType componentType) throws IllegalArgumentException
IllegalArgumentExceptionpublic static String createPackagePath(String tenant, String namespace, String functionName, String fileName)
public boolean isAuthorizedRole(String tenant, String namespace, String clientRole, AuthenticationDataSource authenticationData) throws PulsarAdminException
PulsarAdminExceptionprotected void componentStatusRequestValidate(String tenant, String namespace, String componentName, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
protected void componentInstanceStatusRequestValidate(String tenant, String namespace, String componentName, int instanceId, String clientRole, AuthenticationDataSource clientAuthenticationDataHttps)
public boolean isSuperUser(String clientRole, AuthenticationDataSource authenticationData)
public boolean allowFunctionOps(org.apache.pulsar.common.naming.NamespaceName namespaceName,
String role,
AuthenticationDataSource authenticationData)
protected ClassLoader getClassLoaderFromPackage(String className, File packageFile, String narExtractionDirectory)
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.