Package oracle.kv.hadoop.table
Class TableInputSplit
- java.lang.Object
 - 
- org.apache.hadoop.mapreduce.InputSplit
 - 
- oracle.kv.hadoop.table.TableInputSplit
 
 
 
- 
- All Implemented Interfaces:
 Writable
public class TableInputSplit extends InputSplit implements Writable
Concrete implementation of the InputSplit interface required to perform Hadoop MapReduce. A RecordReader will take instances of this class, where each such instance corresponds to data stored in an Oracle NoSQL Database store, and use those instances to retrieve that data when performing the MapReduce job.- Since:
 - 3.1
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringEMPTY_STRstatic intQUERY_BY_INDEXstatic intQUERY_BY_ONQL_ALL_PARTITIONSstatic intQUERY_BY_ONQL_SHARDSstatic intQUERY_BY_ONQL_SINGLE_PARTITIONstatic intQUERY_BY_PRIMARY_ALL_PARTITIONSstatic intQUERY_BY_PRIMARY_SINGLE_PARTITION 
- 
Constructor Summary
Constructors Constructor Description TableInputSplit()No-arg constructor required by Hadoop semantics. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)String[]getKVHelperHosts()Returns a String array with elements of the form, '<hostname:port>'; where each elment specifies the connection information for each of store's helper hosts.StringgetKVStoreName()Returns the name of the store containing the records associated with this split.longgetLength()Get the size of the split, so that the input splits can be sorted by size.String[]getLocations()Get the list of nodes by name where the data for the split would be local.List<Set<Integer>>getPartitionSets()Returns aListwhose elements areSets of partitions; whose union is the set of all partitions in the store.intgetQueryBy()PasswordCredentialsgetSecurityCredentials()StringgetSecurityLogin()StringgetSecurityTrust()Set<oracle.kv.impl.topo.RepGroupId>getShardSet()StringgetTableName()StringgetWhereClause()inthashCode()voidreadFields(DataInput in)Deserialize the fields of this object fromin.TableInputSplitsetQueryInfo(int newQueryBy, String whereClause)StringtoString()voidwrite(DataOutput out)Serialize the fields of this object toout.- 
Methods inherited from class org.apache.hadoop.mapreduce.InputSplit
getLocationInfo 
 - 
 
 - 
 
- 
- 
Field Detail
- 
QUERY_BY_PRIMARY_ALL_PARTITIONS
public static final int QUERY_BY_PRIMARY_ALL_PARTITIONS
- See Also:
 - Constant Field Values
 
 
- 
QUERY_BY_PRIMARY_SINGLE_PARTITION
public static final int QUERY_BY_PRIMARY_SINGLE_PARTITION
- See Also:
 - Constant Field Values
 
 
- 
QUERY_BY_INDEX
public static final int QUERY_BY_INDEX
- See Also:
 - Constant Field Values
 
 
- 
QUERY_BY_ONQL_ALL_PARTITIONS
public static final int QUERY_BY_ONQL_ALL_PARTITIONS
- See Also:
 - Constant Field Values
 
 
- 
QUERY_BY_ONQL_SINGLE_PARTITION
public static final int QUERY_BY_ONQL_SINGLE_PARTITION
- See Also:
 - Constant Field Values
 
 
- 
QUERY_BY_ONQL_SHARDS
public static final int QUERY_BY_ONQL_SHARDS
- See Also:
 - Constant Field Values
 
 
- 
EMPTY_STR
public static final String EMPTY_STR
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getLength
public long getLength()
Get the size of the split, so that the input splits can be sorted by size.- Specified by:
 getLengthin classInputSplit- Returns:
 - the number of bytes in the split
 
 
- 
getLocations
public String[] getLocations()
Get the list of nodes by name where the data for the split would be local. The locations do not need to be serialized.- Specified by:
 getLocationsin classInputSplit- Returns:
 - a new array of the node nodes.
 
 
- 
getKVHelperHosts
public String[] getKVHelperHosts()
Returns a String array with elements of the form, '<hostname:port>'; where each elment specifies the connection information for each of store's helper hosts. Note that this method must be public so that instances of Hive InputSplit classes can wrap and delegate to an instance of this class. 
- 
getKVStoreName
public String getKVStoreName()
Returns the name of the store containing the records associated with this split. Note that this method must be public so that instances of Hive InputSplit classes can wrap and delegate to an instance of this class. 
- 
getTableName
public String getTableName()
 
- 
getPartitionSets
public List<Set<Integer>> getPartitionSets()
Returns aListwhose elements areSets of partitions; whose union is the set of all partitions in the store. Note that this method is declaredpublicso that the methodTableHiveInputSplit.getPartitionSetscan delegate to this method. 
- 
setQueryInfo
public TableInputSplit setQueryInfo(int newQueryBy, String whereClause)
 
- 
getQueryBy
public int getQueryBy()
 
- 
getWhereClause
public String getWhereClause()
 
- 
getShardSet
public Set<oracle.kv.impl.topo.RepGroupId> getShardSet()
 
- 
getSecurityLogin
public String getSecurityLogin()
 
- 
getSecurityCredentials
public PasswordCredentials getSecurityCredentials()
 
- 
getSecurityTrust
public String getSecurityTrust()
 
- 
write
public void write(DataOutput out) throws IOException
Serialize the fields of this object toout.- Specified by:
 writein interfaceWritable- Parameters:
 out-DataOuputto serialize this object into.- Throws:
 IOException- if an I/O error occurs
 
- 
readFields
public void readFields(DataInput in) throws IOException
Deserialize the fields of this object fromin.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
 readFieldsin interfaceWritable- Parameters:
 in-DataInputto deseriablize this object from.- Throws:
 IOException- if an I/O error occurs
 
 - 
 
 -