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, subscribe
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createTailer, createTailer, createTailer, createTailer, createTailer, getAppender, getLag, getLatency, getLatency, getLatencyPerPartition, subscribe
public 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 AbstractLogManager
protected int getSize(String name)
getSize
in class AbstractLogManager
public boolean exists(String name)
LogManager
true
if a Log with this name
exists.public <M extends Externalizable> CloseableLogAppender<M> createAppender(String name, Codec<M> codec)
createAppender
in class AbstractLogManager
protected <M extends Externalizable> LogTailer<M> doCreateTailer(Collection<LogPartition> partitions, String group, Codec<M> codec)
doCreateTailer
in class AbstractLogManager
protected void checkValidPartition(LogPartition partition)
public Properties getProducerProperties()
public Properties getConsumerProperties()
public Properties getAdminProperties()
public void close()
close
in interface AutoCloseable
close
in interface LogManager
close
in class AbstractLogManager
public boolean supportSubscribe()
LogManager
true
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 LogManager
supportSubscribe
in class AbstractLogManager
protected <M extends Externalizable> LogTailer<M> doSubscribe(String group, Collection<String> names, RebalanceListener listener, Codec<M> codec)
doSubscribe
in class AbstractLogManager
protected Properties normalizeProducerProperties(Properties producerProperties)
protected Properties normalizeConsumerProperties(Properties consumerProperties)
protected Properties createAdminProperties(Properties producerProperties, Properties consumerProperties)
public List<LogLag> getLagPerPartition(String name, String group)
LogManager
group
and the producers for each partition. The result list is ordered,
for instance index 0 is lag for partition 0.public List<String> listAll()
LogManager
public List<String> listConsumerGroups(String name)
LogManager
Copyright © 2019 Nuxeo. All rights reserved.