public class NoSQLConfiguration extends java.lang.Object implements ConfigurationStorable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ARG_BATCH_SIZE
Command line argument for the batch size property
|
static java.lang.String |
ARG_CONSISTENCY
Command line argument for the consistency property
|
static java.lang.String |
ARG_DEFAULT_ENTRY_PROCESSOR
Command line argument for the default
NoSQLEntryProcessor implementation |
static java.lang.String |
ARG_DEPTH
Command line argument for the depth property
|
static java.lang.String |
ARG_ENTRY_GROUPER
Command line argument for the entry grouper class property
|
static java.lang.String |
ARG_FORMATTER_CLASS
Command line argument for the formatter class property
|
static java.lang.String |
ARG_KVSTORE_HOSTS
Command line argument for the list of NoSQL service hosts
|
static java.lang.String |
ARG_KVSTORE_NAME
Command line argument for a KV store name
|
static java.lang.String |
ARG_KVSTORE_SECURITY
Command line argument for the security properties file property
|
static java.lang.String |
ARG_PARENT_KEY
Command line argument for the parent key property
|
static java.lang.String |
ARG_PARTITION_READER
Command line argument for the partition reader property
|
static java.lang.String |
ARG_RESULT_ENTRIES
Command line argument for the list of result entries property
|
static java.lang.String |
ARG_SECURITY_PROPS
Command line argument for the security properties file property
|
static java.lang.String |
ARG_SUB_RANGE
Command line argument for the sub range property
|
static java.lang.String |
ARG_TIME_OUT
Command line argument for the time out property
|
static java.lang.String |
ARG_TIME_OUT_UNIT
Command line argument for the time out unit
|
static java.lang.String |
CONF_BATCH_SIZE
Configuration property name for the batch size
|
static java.lang.String |
CONF_CONSISTENCY
Configuration property name for the consistency
|
static java.lang.String |
CONF_DEFAULT_ENTRY_PROCESSOR
Configuration property name for the default implementation of
NoSQLEntryProcessor |
static java.lang.String |
CONF_DEPTH
Configuration property name for the depth
|
static java.lang.String |
CONF_ENTRY_GROUPER
Configuration property name for the
NoSQLEntryGrouper class |
static java.lang.String |
CONF_FORMATTER_CLASS
Configuration property name for the formatter class
|
static java.lang.String |
CONF_KVSTORE_HOSTS
Configuration property name for the list of KV store hosts
|
static java.lang.String |
CONF_KVSTORE_NAME
Configuration property name for the KV store name
|
static java.lang.String |
CONF_KVSTORE_SECURITY
Configuration property name for the security properties file
|
static java.lang.String |
CONF_PARENT_KEY
Configuration property name for the KV store name
|
static java.lang.String |
CONF_PARTITION_READER
Configuration property name for the partition reader
|
static java.lang.String |
CONF_RESULT_ENTRIES
Configuration property name for the result entry list
|
static java.lang.String |
CONF_SUB_RANGE
Configuration property name for the minor key subrange
|
static java.lang.String |
CONF_TIME_OUT
Configuration property name for the time out
|
static java.lang.String |
CONF_TIME_OUT_UNIT
Configuration property name for the time out unit
|
static java.lang.Class<? extends NoSQLEntryGrouper> |
DEFAULT_ENTRY_GROUPER_CLASS
De default implementation of
NoSQLEntryGrouper used when the property CONF_ENTRY_GROUPER is not set |
Constructor and Description |
---|
NoSQLConfiguration() |
Modifier and Type | Method and Description |
---|---|
void |
addTargetEntries(java.lang.String[] entryKeys)
Adds an array of keys from NoSQL entries (key-value pairs) to be included in a
RecordInfo passed as a value to a job's mapper. |
void |
addTargetEntry(java.lang.String entryKey, java.lang.Class<? extends NoSQLEntryProcessor> entryProcessorClass)
Adds a key from a NoSQL entry (key-value pair )to be included in a
RecordInfo passed as a value to a job's mapper. |
int |
getBatchSize()
Gets the current batch size
|
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the current job configuration
|
oracle.kv.Consistency |
getConsistency() |
oracle.kv.Depth |
getDepth() |
java.lang.Class<? extends NoSQLEntryGrouper> |
getEntryGrouperClass()
Gets the
NoSQLEntryGrouper subclass which is in charge of grouping key-value pairs into a single record |
java.lang.Class<? extends NoSQLEntryProcessor> |
getEntryProcessor(java.lang.String entryKey)
Gets the entry processor assigned to process a NoSQL key-value pair identified by the given minor key.
|
java.lang.String |
getFormatterClassName() |
java.util.Properties |
getKvSecurityProps() |
java.lang.String[] |
getKvStoreHosts()
Gets an array containing the KV store hosts locations
|
java.lang.String |
getKvStoreName()
Gets the current KV store name
|
java.lang.String |
getKvStoreSecurityFile() |
oracle.kv.Key |
getParentKey()
Gets the major key used to select NoSQL entries
|
oracle.kv.KeyRange |
getSubRange() |
java.util.Collection<java.lang.String> |
getTargetEntries() |
long |
getTimeOut() |
java.util.concurrent.TimeUnit |
getTimeOutUnit() |
void |
load(org.apache.hadoop.conf.Configuration conf)
Loads the current state from the given job configuration
|
void |
removeAllTargetEntries()
Removes all the NoSQL minor keys that were added previously to be included in a job mapper value.
|
void |
setBatchSize(int batchSize)
Sets the current batch size
|
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the current job configuration
|
void |
setConsistency(oracle.kv.Consistency consistency) |
void |
setDefaultEntryProcessorClass(java.lang.Class<? extends NoSQLEntryProcessor> entryProcessorClass)
Sets the default implementation of
NoSQLEntryProcessor used for all the target entries for which an explicit entry processor was not specified |
void |
setDepth(oracle.kv.Depth depth) |
void |
setEntryGrouperClass(java.lang.Class<? extends NoSQLEntryGrouper> entryGrouperClass)
Sets the
NoSQLEntryGrouper subclass which is in charge of grouping key-value pairs into a single record |
void |
setFormatterClassName(java.lang.String formatterClassName) |
void |
setKvStoreHosts(java.lang.String[] kvStoreHosts)
Sets an array containing the KV store hosts locations
|
void |
setKvStoreName(java.lang.String kvStoreName)
Sets the current KV store name
|
void |
setKvStoreSecurityFile(java.lang.String kvStoreSecurityFile) |
void |
setParentKey(oracle.kv.Key parentKey)
Sets the major key used to select NoSQL entries
|
void |
setSubRange(oracle.kv.KeyRange subRange) |
void |
setTimeOut(long timeOut) |
void |
store(org.apache.hadoop.conf.Configuration conf)
Stores the current state into the given job configuration
|
java.lang.String |
toString() |
public static final java.lang.String ARG_KVSTORE_NAME
public static final java.lang.String ARG_KVSTORE_HOSTS
public static final java.lang.String ARG_BATCH_SIZE
public static final java.lang.String ARG_PARENT_KEY
public static final java.lang.String ARG_SUB_RANGE
public static final java.lang.String ARG_DEPTH
public static final java.lang.String ARG_CONSISTENCY
public static final java.lang.String ARG_TIME_OUT
public static final java.lang.String ARG_TIME_OUT_UNIT
public static final java.lang.String ARG_FORMATTER_CLASS
public static final java.lang.String ARG_KVSTORE_SECURITY
public static final java.lang.String ARG_PARTITION_READER
public static final java.lang.String ARG_SECURITY_PROPS
public static final java.lang.String ARG_RESULT_ENTRIES
public static final java.lang.String ARG_DEFAULT_ENTRY_PROCESSOR
NoSQLEntryProcessor
implementationpublic static final java.lang.String ARG_ENTRY_GROUPER
public static final java.lang.String CONF_KVSTORE_NAME
public static final java.lang.String CONF_KVSTORE_HOSTS
public static final java.lang.String CONF_BATCH_SIZE
public static final java.lang.String CONF_PARENT_KEY
public static final java.lang.String CONF_SUB_RANGE
public static final java.lang.String CONF_DEPTH
public static final java.lang.String CONF_CONSISTENCY
public static final java.lang.String CONF_TIME_OUT
public static final java.lang.String CONF_TIME_OUT_UNIT
public static final java.lang.String CONF_FORMATTER_CLASS
public static final java.lang.String CONF_KVSTORE_SECURITY
public static final java.lang.String CONF_PARTITION_READER
public static final java.lang.String CONF_RESULT_ENTRIES
public static final java.lang.String CONF_DEFAULT_ENTRY_PROCESSOR
NoSQLEntryProcessor
public static final java.lang.String CONF_ENTRY_GROUPER
NoSQLEntryGrouper
classpublic static final java.lang.Class<? extends NoSQLEntryGrouper> DEFAULT_ENTRY_GROUPER_CLASS
NoSQLEntryGrouper
used when the property CONF_ENTRY_GROUPER
is not setpublic void setEntryGrouperClass(java.lang.Class<? extends NoSQLEntryGrouper> entryGrouperClass)
NoSQLEntryGrouper
subclass which is in charge of grouping key-value pairs into a single recordentryGrouperClass
- a subclass of NoSQLEntryGrouper
public java.lang.Class<? extends NoSQLEntryGrouper> getEntryGrouperClass()
NoSQLEntryGrouper
subclass which is in charge of grouping key-value pairs into a single recordNoSQLEntryGrouper
public void addTargetEntry(java.lang.String entryKey, java.lang.Class<? extends NoSQLEntryProcessor> entryProcessorClass)
RecordInfo
passed as a value to a job's mapper. Optionally, an implementation of NoSQLEntryProcessor
can be specified to parse and process the NoSQL key-value pair. If no entry processor is passed, the entry processor returned by defaultEntryProcessorClass
is used.entryKey
- a minor key from NoSQLentryProcessorClass
- an implementation of NoSQLEntryProcessor
or nullpublic void addTargetEntries(java.lang.String[] entryKeys)
RecordInfo
passed as a value to a job's mapper. A default entry processor is used for all the entries.entryKeys
- an array of minor keys from NoSQLpublic void removeAllTargetEntries()
public java.util.Collection<java.lang.String> getTargetEntries()
public void setDefaultEntryProcessorClass(java.lang.Class<? extends NoSQLEntryProcessor> entryProcessorClass)
NoSQLEntryProcessor
used for all the target entries for which an explicit entry processor was not specifiedentryProcessorClass
- a subclass of NoSQLEntryProcessor
public java.lang.Class<? extends NoSQLEntryProcessor> getEntryProcessor(java.lang.String entryKey)
entryKey
- a minor key from NoSQLNoSQLEntryProcessor
public void store(org.apache.hadoop.conf.Configuration conf)
ConfigurationStorable
store
in interface ConfigurationStorable
public void load(org.apache.hadoop.conf.Configuration conf)
ConfigurationStorable
load
in interface ConfigurationStorable
public org.apache.hadoop.conf.Configuration getConfiguration()
public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration
- a job configurationpublic java.lang.String getKvStoreName()
public void setKvStoreName(java.lang.String kvStoreName)
kvStoreName
- a KV store namepublic java.lang.String[] getKvStoreHosts()
public void setKvStoreHosts(java.lang.String[] kvStoreHosts)
kvStoreHosts
- an array of KV hosts locationspublic int getBatchSize()
public void setBatchSize(int batchSize)
batchSize
-public oracle.kv.Key getParentKey()
public void setParentKey(oracle.kv.Key parentKey)
parentKey
-public oracle.kv.KeyRange getSubRange()
public void setSubRange(oracle.kv.KeyRange subRange)
public oracle.kv.Depth getDepth()
public void setDepth(oracle.kv.Depth depth)
public oracle.kv.Consistency getConsistency()
public void setConsistency(oracle.kv.Consistency consistency)
public long getTimeOut()
public void setTimeOut(long timeOut)
public java.lang.String getFormatterClassName()
public void setFormatterClassName(java.lang.String formatterClassName)
public java.lang.String getKvStoreSecurityFile()
public void setKvStoreSecurityFile(java.lang.String kvStoreSecurityFile)
public java.util.concurrent.TimeUnit getTimeOutUnit()
public java.util.Properties getKvSecurityProps()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.