public class DatumCounterWriter extends Object implements org.apache.streams.core.StreamsPersistWriter
Modifier and Type | Field and Description |
---|---|
static Set<Integer> |
CLAIMED_ID
Set of all ids that have been claimed.
|
static ConcurrentHashMap<String,AtomicLong> |
COUNTS
The total count of data seen by a all instances of a processor.
|
static Random |
RAND
Random instance to generate ids
|
static ConcurrentHashMap<String,List<Object>> |
RECEIVED
The documents received
|
static Set<Integer> |
SEEN_DATA
Set of instance ids that received data.
|
Constructor and Description |
---|
DatumCounterWriter(String writerId) |
Modifier and Type | Method and Description |
---|---|
void |
cleanUp() |
int |
getDatumsCounted() |
String |
getId() |
void |
prepare(Object configurationObject) |
void |
write(org.apache.streams.core.StreamsDatum entry) |
public static Set<Integer> CLAIMED_ID
public static final Random RAND
public static final Set<Integer> SEEN_DATA
public static final ConcurrentHashMap<String,AtomicLong> COUNTS
public static final ConcurrentHashMap<String,List<Object>> RECEIVED
public DatumCounterWriter(String writerId)
public String getId()
getId
in interface org.apache.streams.core.StreamsOperation
public void write(org.apache.streams.core.StreamsDatum entry)
write
in interface org.apache.streams.core.StreamsPersistWriter
public void prepare(Object configurationObject)
prepare
in interface org.apache.streams.core.StreamsOperation
public void cleanUp()
cleanUp
in interface org.apache.streams.core.StreamsOperation
public int getDatumsCounted()
Copyright © 2017 The Apache Software Foundation. All rights reserved.