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 java.lang.String
EMPTY_STR
static int
QUERY_BY_INDEX
static int
QUERY_BY_ONQL_ALL_PARTITIONS
static int
QUERY_BY_ONQL_SHARDS
static int
QUERY_BY_ONQL_SINGLE_PARTITION
static int
QUERY_BY_PRIMARY_ALL_PARTITIONS
static int
QUERY_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 boolean
equals(java.lang.Object obj)
java.lang.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.java.lang.String
getKVStoreName()
Returns the name of the store containing the records associated with this split.long
getLength()
Get the size of the split, so that the input splits can be sorted by size.java.lang.String[]
getLocations()
Get the list of nodes by name where the data for the split would be local.java.util.List<java.util.Set<java.lang.Integer>>
getPartitionSets()
Returns aList
whose elements areSet
s of partitions; whose union is the set of all partitions in the store.int
getQueryBy()
PasswordCredentials
getSecurityCredentials()
java.lang.String
getSecurityLogin()
java.lang.String
getSecurityTrust()
java.util.Set<oracle.kv.impl.topo.RepGroupId>
getShardSet()
java.lang.String
getTableName()
java.lang.String
getWhereClause()
int
hashCode()
void
readFields(java.io.DataInput in)
Deserialize the fields of this object fromin
.TableInputSplit
setQueryInfo(int newQueryBy, java.lang.String whereClause)
java.lang.String
toString()
void
write(java.io.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 java.lang.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:
getLength
in classInputSplit
- Returns:
- the number of bytes in the split
-
getLocations
public java.lang.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:
getLocations
in classInputSplit
- Returns:
- a new array of the node nodes.
-
getKVHelperHosts
public java.lang.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.
-
getKVStoreName
public java.lang.String getKVStoreName()
Returns the name of the store containing the records associated with this split.
-
getTableName
public java.lang.String getTableName()
-
getPartitionSets
public java.util.List<java.util.Set<java.lang.Integer>> getPartitionSets()
Returns aList
whose elements areSet
s of partitions; whose union is the set of all partitions in the store.
-
setQueryInfo
public TableInputSplit setQueryInfo(int newQueryBy, java.lang.String whereClause)
-
getQueryBy
public int getQueryBy()
-
getWhereClause
public java.lang.String getWhereClause()
-
getShardSet
public java.util.Set<oracle.kv.impl.topo.RepGroupId> getShardSet()
-
getSecurityLogin
public java.lang.String getSecurityLogin()
-
getSecurityCredentials
public PasswordCredentials getSecurityCredentials()
-
getSecurityTrust
public java.lang.String getSecurityTrust()
-
write
public void write(java.io.DataOutput out) throws java.io.IOException
Serialize the fields of this object toout
.
-
readFields
public void readFields(java.io.DataInput in) throws java.io.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:
readFields
in interfaceWritable
- Parameters:
in
-DataInput
to deseriablize this object from.- Throws:
java.io.IOException
- if an I/O error occurs
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-