public final class WorkerUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WorkerUtils.NotLeaderAnymore |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.pulsar.client.api.Producer<byte[]> |
createExclusiveProducerWithRetry(org.apache.pulsar.client.api.PulsarClient client,
String topic,
String producerName,
Supplier<Boolean> isLeader,
int sleepInBetweenMs) |
static org.apache.pulsar.client.api.Reader<byte[]> |
createReader(org.apache.pulsar.client.api.ReaderBuilder readerBuilder,
String readerName,
String topic,
org.apache.pulsar.client.api.MessageId startMessageId) |
static void |
deleteFromBookkeeper(org.apache.distributedlog.api.namespace.Namespace namespace,
String packagePath) |
static void |
downloadFromBookkeeper(org.apache.distributedlog.api.namespace.Namespace namespace,
File outputFile,
String packagePath) |
static void |
downloadFromBookkeeper(org.apache.distributedlog.api.namespace.Namespace namespace,
OutputStream outputStream,
String packagePath) |
static File |
dumpToTmpFile(InputStream uploadedInputStream) |
static org.apache.distributedlog.DistributedLogConfiguration |
getDlogConf(WorkerConfig workerConfig) |
static org.apache.pulsar.common.policies.data.FunctionInstanceStatsImpl |
getFunctionInstanceStats(String fullyQualifiedInstanceName,
FunctionRuntimeInfo functionRuntimeInfo,
int instanceId) |
static PulsarAdmin |
getPulsarAdminClient(String pulsarWebServiceUrl) |
static PulsarAdmin |
getPulsarAdminClient(String pulsarWebServiceUrl,
String authPlugin,
String authParams,
String tlsTrustCertsFilePath,
Boolean allowTlsInsecureConnection,
Boolean enableTlsHostnameVerificationEnable) |
static org.apache.pulsar.client.api.PulsarClient |
getPulsarClient(String pulsarServiceUrl) |
static org.apache.pulsar.client.api.PulsarClient |
getPulsarClient(String pulsarServiceUrl,
String authPlugin,
String authParams,
Boolean useTls,
String tlsTrustCertsFilePath,
Boolean allowTlsInsecureConnection,
Boolean enableTlsHostnameVerificationEnable) |
static URI |
initializeDlogNamespace(org.apache.pulsar.common.conf.InternalConfigurationData internalConf) |
static URI |
newDlogNamespaceURI(String zookeeperServers) |
static void |
uploadFileToBookkeeper(String packagePath,
File sourceFile,
org.apache.distributedlog.api.namespace.Namespace dlogNamespace) |
static void |
uploadToBookeeper(org.apache.distributedlog.api.namespace.Namespace dlogNamespace,
InputStream uploadedInputStream,
String destPkgPath) |
public static void uploadFileToBookkeeper(String packagePath, File sourceFile, org.apache.distributedlog.api.namespace.Namespace dlogNamespace) throws IOException
IOExceptionpublic static void uploadToBookeeper(org.apache.distributedlog.api.namespace.Namespace dlogNamespace,
InputStream uploadedInputStream,
String destPkgPath)
throws IOException
IOExceptionpublic static void downloadFromBookkeeper(org.apache.distributedlog.api.namespace.Namespace namespace,
File outputFile,
String packagePath)
throws IOException
IOExceptionpublic static void downloadFromBookkeeper(org.apache.distributedlog.api.namespace.Namespace namespace,
OutputStream outputStream,
String packagePath)
throws IOException
IOExceptionpublic static void deleteFromBookkeeper(org.apache.distributedlog.api.namespace.Namespace namespace,
String packagePath)
throws IOException
IOExceptionpublic static org.apache.distributedlog.DistributedLogConfiguration getDlogConf(WorkerConfig workerConfig)
public static URI initializeDlogNamespace(org.apache.pulsar.common.conf.InternalConfigurationData internalConf) throws IOException
IOExceptionpublic static PulsarAdmin getPulsarAdminClient(String pulsarWebServiceUrl)
public static PulsarAdmin getPulsarAdminClient(String pulsarWebServiceUrl, String authPlugin, String authParams, String tlsTrustCertsFilePath, Boolean allowTlsInsecureConnection, Boolean enableTlsHostnameVerificationEnable)
public static org.apache.pulsar.client.api.PulsarClient getPulsarClient(String pulsarServiceUrl)
public static org.apache.pulsar.client.api.PulsarClient getPulsarClient(String pulsarServiceUrl, String authPlugin, String authParams, Boolean useTls, String tlsTrustCertsFilePath, Boolean allowTlsInsecureConnection, Boolean enableTlsHostnameVerificationEnable)
public static org.apache.pulsar.common.policies.data.FunctionInstanceStatsImpl getFunctionInstanceStats(String fullyQualifiedInstanceName, FunctionRuntimeInfo functionRuntimeInfo, int instanceId)
public static File dumpToTmpFile(InputStream uploadedInputStream)
public static org.apache.pulsar.client.api.Reader<byte[]> createReader(org.apache.pulsar.client.api.ReaderBuilder readerBuilder,
String readerName,
String topic,
org.apache.pulsar.client.api.MessageId startMessageId)
throws org.apache.pulsar.client.api.PulsarClientException
org.apache.pulsar.client.api.PulsarClientExceptionpublic static org.apache.pulsar.client.api.Producer<byte[]> createExclusiveProducerWithRetry(org.apache.pulsar.client.api.PulsarClient client,
String topic,
String producerName,
Supplier<Boolean> isLeader,
int sleepInBetweenMs)
throws WorkerUtils.NotLeaderAnymore
WorkerUtils.NotLeaderAnymoreCopyright © 2017–2021 Apache Software Foundation. All rights reserved.