public class Streams extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ID
Field name representing the unique id of the message
|
static String |
KEY
Field name representing the message key
|
static String |
MAX_CACHE_MEMORY
Configuration parameter that controls the maximum cache memory to use while iterating
through the scanned documents(default long: 100MB)
|
static String |
MAX_SCANNER_THREADS
Configuration parameter to set the maximum number of background threads to scan the
documents(default int: 16)
|
static String |
OFFSET
Field name representing offset of the message
|
static String |
PARTITION
Field name representing partition id of the message
|
static String |
PRODUCER
Field name representing producer of the message
|
static String |
TOPIC
Field name representing topic of the message
|
static 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(String streamPath)
Returns a read-only DocumentStore object representing the stream of the given path
|
static org.ojai.store.DocumentStore |
getMessageStore(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(String streamPath,
org.apache.hadoop.conf.Configuration conf,
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(String streamPath,
org.apache.hadoop.conf.Configuration conf,
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(String streamPath,
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(String streamPath,
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
|
public static final String ID
public static final String PARTITION
public static final String TOPIC
public static final String OFFSET
public static final String PRODUCER
public static final String KEY
public static final String VALUE
public static final String MAX_SCANNER_THREADS
public static final String MAX_CACHE_MEMORY
public static org.ojai.store.DocumentStore getMessageStore(String streamPath) throws IOException
streamPath
- the path to streamIOException
public static org.ojai.store.DocumentStore getMessageStore(String streamPath, org.apache.hadoop.conf.Configuration conf) throws IOException
streamPath
- the path to streamconf
- hadoop configuration object
(can be used to set specific values for max scanner threads and max cache memory)IOException
public static org.ojai.store.DocumentStore getMessageStore(String streamPath, String... topics) throws IOException
streamPath
- the path to streamtopics
- list of topics to read messages fromIOException
public static org.ojai.store.DocumentStore getMessageStore(String streamPath, org.apache.hadoop.conf.Configuration conf, String... topics) throws 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 fromIOException
public static org.ojai.store.DocumentStore getMessageStore(String streamPath, Pattern regex) throws IOException
streamPath
- the path to streamregex
- Pattern representing topics to read messages fromIOException
public static org.ojai.store.DocumentStore getMessageStore(String streamPath, org.apache.hadoop.conf.Configuration conf, Pattern regex) throws 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 fromIOException
Copyright © 2016 Mapr Technologies, Inc.. All rights reserved.