public class Streams
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
Field name representing the unique id of the message
|
static java.lang.String |
KEY
Field name representing the message key
|
static java.lang.String |
MAX_CACHE_MEMORY
Configuration parameter that controls the maximum cache memory to use while iterating
through the scanned documents(default long: 100MB)
|
static java.lang.String |
MAX_SCANNER_THREADS
Configuration parameter to set the maximum number of background threads to scan the
documents(default int: 16)
|
static java.lang.String |
OFFSET
Field name representing offset of the message
|
static java.lang.String |
PARTITION
Field name representing partition id of the message
|
static java.lang.String |
PRODUCER
Field name representing producer of the message
|
static java.lang.String |
TOPIC
Field name representing topic of the message
|
static java.lang.String |
VALUE
Field name representing the message value(user provided message)
|
Constructor and Description |
---|
Streams() |
Modifier and Type | Method and Description |
---|---|
static org.ojai.store.DocumentStore |
getMessageStore(java.lang.String streamPath)
Returns a read-only DocumentStore object representing the stream of the given path
|
static org.ojai.store.DocumentStore |
getMessageStore(java.lang.String streamPath,
org.apache.hadoop.conf.Configuration conf)
Returns a read-only DocumentStore object representing the stream of the given path
|
static org.ojai.store.DocumentStore |
getMessageStore(java.lang.String streamPath,
org.apache.hadoop.conf.Configuration conf,
java.util.regex.Pattern regex)
Returns a read-only DocumentStore object representing the stream of the given path
User can also provide a regex representing all topics to read messages from
|
static org.ojai.store.DocumentStore |
getMessageStore(java.lang.String streamPath,
org.apache.hadoop.conf.Configuration conf,
java.lang.String... topics)
Returns a read-only DocumentStore object representing the stream of the given path
User can also provide only a subset of topics to read messages from
|
static org.ojai.store.DocumentStore |
getMessageStore(java.lang.String streamPath,
java.util.regex.Pattern regex)
Returns a read-only DocumentStore object representing the stream of the given path
User can also provide a regex representing all topics to read messages from
|
static org.ojai.store.DocumentStore |
getMessageStore(java.lang.String streamPath,
java.lang.String... topics)
Returns a read-only DocumentStore object representing the stream of the given path
User can also provide only a subset of topics to read messages from
|
static Admin |
newAdmin(org.apache.hadoop.conf.Configuration c)
Creates and returns an Admin instance with specified configuration.
|
static StreamDescriptor |
newStreamDescriptor()
Creates and returns a StreamDescriptor instance.
|
static TopicDescriptor |
newTopicDescriptor()
Creates and returns a TopicDescriptor instance.
|
public static final java.lang.String ID
public static final java.lang.String PARTITION
public static final java.lang.String TOPIC
public static final java.lang.String OFFSET
public static final java.lang.String PRODUCER
public static final java.lang.String KEY
public static final java.lang.String VALUE
public static final java.lang.String MAX_SCANNER_THREADS
public static final java.lang.String MAX_CACHE_MEMORY
public static org.ojai.store.DocumentStore getMessageStore(java.lang.String streamPath) throws java.io.IOException
streamPath
- the path to streamjava.io.IOException
public static org.ojai.store.DocumentStore getMessageStore(java.lang.String streamPath, org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
streamPath
- the path to streamconf
- hadoop configuration object
(can be used to set specific values for max scanner threads and max cache memory)java.io.IOException
public static org.ojai.store.DocumentStore getMessageStore(java.lang.String streamPath, java.lang.String... topics) throws java.io.IOException
streamPath
- the path to streamtopics
- list of topics to read messages fromjava.io.IOException
public static org.ojai.store.DocumentStore getMessageStore(java.lang.String streamPath, org.apache.hadoop.conf.Configuration conf, java.lang.String... topics) throws java.io.IOException
streamPath
- the path to streamconf
- hadoop configuration object
(can be used to set specific values for max scanner threads and max cache memory)topics
- list of topics to read messages fromjava.io.IOException
public static org.ojai.store.DocumentStore getMessageStore(java.lang.String streamPath, java.util.regex.Pattern regex) throws java.io.IOException
streamPath
- the path to streamregex
- Pattern representing topics to read messages fromjava.io.IOException
public static org.ojai.store.DocumentStore getMessageStore(java.lang.String streamPath, org.apache.hadoop.conf.Configuration conf, java.util.regex.Pattern regex) throws java.io.IOException
streamPath
- the path to streamconf
- hadoop configuration object
(can be used to set specific values for max scanner threads and max cache memory)regex
- Pattern representing topics to read messages fromjava.io.IOException
public static Admin newAdmin(org.apache.hadoop.conf.Configuration c) throws java.io.IOException
java.io.IOException
public static StreamDescriptor newStreamDescriptor()
public static TopicDescriptor newTopicDescriptor()