public class KubernetesRuntime extends Object implements Runtime
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
VALID_POD_NAME_REGEX |
| Modifier and Type | Method and Description |
|---|---|
static String |
createJobName(org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails,
String jobName) |
void |
deleteService() |
void |
deleteStatefulSet() |
static void |
doChecks(org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails,
String overridenJobName) |
CompletableFuture<org.apache.pulsar.functions.proto.InstanceCommunication.MetricsData> |
getAndResetMetrics() |
Throwable |
getDeathException() |
protected List<String> |
getExecutorCommand() |
CompletableFuture<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus> |
getFunctionStatus(int instanceId) |
CompletableFuture<org.apache.pulsar.functions.proto.InstanceCommunication.MetricsData> |
getMetrics(int instanceId) |
String |
getPrometheusMetrics() |
boolean |
isAlive() |
void |
join() |
void |
reinitialize() |
CompletableFuture<Void> |
resetMetrics() |
void |
start()
The core logic that creates a service first followed by statefulset.
|
void |
stop() |
public static final Pattern VALID_POD_NAME_REGEX
public void start()
throws Exception
public void reinitialize()
reinitialize in interface Runtimepublic Throwable getDeathException()
getDeathException in interface Runtimepublic CompletableFuture<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus> getFunctionStatus(int instanceId)
getFunctionStatus in interface Runtimepublic CompletableFuture<org.apache.pulsar.functions.proto.InstanceCommunication.MetricsData> getAndResetMetrics()
getAndResetMetrics in interface Runtimepublic CompletableFuture<Void> resetMetrics()
resetMetrics in interface Runtimepublic CompletableFuture<org.apache.pulsar.functions.proto.InstanceCommunication.MetricsData> getMetrics(int instanceId)
getMetrics in interface Runtimepublic String getPrometheusMetrics() throws IOException
getPrometheusMetrics in interface RuntimeIOExceptionpublic void deleteStatefulSet()
throws InterruptedException
InterruptedExceptionpublic void deleteService()
throws InterruptedException
InterruptedExceptionpublic static String createJobName(org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails, String jobName)
public static void doChecks(org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails,
String overridenJobName)
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.