public class KafkaLogManager extends AbstractLogManager
| Modifier and Type | Field and Description |
|---|---|
protected Properties |
adminProperties |
protected Properties |
consumerProperties |
static String |
DEFAULT_REPLICATION_FACTOR_PROP |
protected short |
defaultReplicationFactor |
static String |
DISABLE_SUBSCRIBE_PROP |
protected boolean |
disableSubscribe |
protected KafkaUtils |
kUtils |
protected KafkaNamespace |
ns |
protected String |
prefix |
protected Properties |
producerProperties |
appenders, tailers, tailersAssignments| Constructor and Description |
|---|
KafkaLogManager(String prefix,
Properties producerProperties,
Properties consumerProperties) |
KafkaLogManager(String zkServers,
String prefix,
Properties producerProperties,
Properties consumerProperties)
Deprecated.
since 10.2, zookeeper is not needed anymore, you need to remove the zkServers parameter.
|
checkInvalidAssignment, checkInvalidCodec, createIfNotExists, createTailer, delete, getAppender, getLatencyPerPartition, guessCodec, sameCodec, size, subscribeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateTailer, createTailer, createTailer, createTailer, createTailer, getAppender, getLag, getLatency, getLatency, getLatencyPerPartition, subscribepublic static final String DISABLE_SUBSCRIBE_PROP
public static final String DEFAULT_REPLICATION_FACTOR_PROP
protected final KafkaUtils kUtils
protected final Properties producerProperties
protected final Properties consumerProperties
protected final Properties adminProperties
protected final short defaultReplicationFactor
protected final boolean disableSubscribe
protected final KafkaNamespace ns
@Deprecated public KafkaLogManager(String zkServers, String prefix, Properties producerProperties, Properties consumerProperties)
public KafkaLogManager(String prefix, Properties producerProperties, Properties consumerProperties)
public void create(String name, int size)
create in class AbstractLogManagerprotected int getSize(String name)
getSize in class AbstractLogManagerpublic boolean exists(String name)
LogManagertrue if a Log with this name exists.public <M extends Externalizable> CloseableLogAppender<M> createAppender(String name, Codec<M> codec)
createAppender in class AbstractLogManagerprotected <M extends Externalizable> LogTailer<M> doCreateTailer(Collection<LogPartition> partitions, String group, Codec<M> codec)
doCreateTailer in class AbstractLogManagerprotected void checkValidPartition(LogPartition partition)
public Properties getProducerProperties()
public Properties getConsumerProperties()
public Properties getAdminProperties()
public void close()
close in interface AutoCloseableclose in interface LogManagerclose in class AbstractLogManagerpublic boolean supportSubscribe()
LogManagertrue if the Log LogManager.subscribe(java.lang.String, java.util.Collection<java.lang.String>, org.nuxeo.lib.stream.log.RebalanceListener, org.nuxeo.lib.stream.codec.Codec<M>) method is supported.supportSubscribe in interface LogManagersupportSubscribe in class AbstractLogManagerprotected <M extends Externalizable> LogTailer<M> doSubscribe(String group, Collection<String> names, RebalanceListener listener, Codec<M> codec)
doSubscribe in class AbstractLogManagerprotected Properties normalizeProducerProperties(Properties producerProperties)
protected Properties normalizeConsumerProperties(Properties consumerProperties)
protected Properties createAdminProperties(Properties producerProperties, Properties consumerProperties)
public List<LogLag> getLagPerPartition(String name, String group)
LogManagergroup and the producers for each partition. The result list is ordered,
for instance index 0 is lag for partition 0.public List<String> listAll()
LogManagerpublic List<String> listConsumerGroups(String name)
LogManagerCopyright © 2019 Nuxeo. All rights reserved.