public class PulsarConnectorUtils extends Object
| Constructor and Description |
|---|
PulsarConnectorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
createInstance(String userClassName,
Class<T> xface,
ClassLoader classLoader)
Create an instance of
userClassName using provided classLoader. |
static Properties |
getProperties(Map<String,String> configMap) |
static boolean |
isPartitionedTopic(org.apache.pulsar.common.naming.TopicName topicName,
PulsarAdmin pulsarAdmin) |
static org.apache.avro.Schema |
parseSchema(String schemaJson) |
static String |
restoreNamespaceDelimiterIfNeeded(String namespace,
PulsarConnectorConfig config) |
static String |
rewriteNamespaceDelimiterIfNeeded(String namespace,
PulsarConnectorConfig config) |
public static org.apache.avro.Schema parseSchema(String schemaJson)
public static boolean isPartitionedTopic(org.apache.pulsar.common.naming.TopicName topicName,
PulsarAdmin pulsarAdmin)
throws PulsarAdminException
PulsarAdminExceptionpublic static <T> T createInstance(String userClassName, Class<T> xface, ClassLoader classLoader)
userClassName using provided classLoader.
This instance should implement the provided interface xface.userClassName - user class namexface - the interface that the reflected instance should implementclassLoader - class loader to load the class.public static Properties getProperties(Map<String,String> configMap)
public static String rewriteNamespaceDelimiterIfNeeded(String namespace, PulsarConnectorConfig config)
public static String restoreNamespaceDelimiterIfNeeded(String namespace, PulsarConnectorConfig config)
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.