Package oracle.kv.hadoop.table
Class TableInputSplit
java.lang.Object
org.apache.hadoop.mapreduce.InputSplit
oracle.kv.hadoop.table.TableInputSplit
- All Implemented Interfaces:
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
Modifier and TypeFieldDescriptionstatic final String
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
String[]
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.Returns the name of the store containing the records associated with this split.long
Get the size of the split, so that the input splits can be sorted by size.String[]
Get the list of nodes by name where the data for the split would be local.Returns aList
whose elements areSet
s of partitions; whose union is the set of all partitions in the store.int
Set<oracle.kv.impl.topo.RepGroupId>
int
hashCode()
void
readFields
(DataInput in) Deserialize the fields of this object fromin
.setQueryInfo
(int newQueryBy, String whereClause) toString()
void
write
(DataOutput out) Serialize the fields of this object toout
.Methods inherited from class org.apache.hadoop.mapreduce.InputSplit
getLocationInfo
-
Field Details
-
QUERY_BY_PRIMARY_ALL_PARTITIONS
public static final int QUERY_BY_PRIMARY_ALL_PARTITIONS- See Also:
-
QUERY_BY_PRIMARY_SINGLE_PARTITION
public static final int QUERY_BY_PRIMARY_SINGLE_PARTITION- See Also:
-
QUERY_BY_INDEX
public static final int QUERY_BY_INDEX- See Also:
-
QUERY_BY_ONQL_ALL_PARTITIONS
public static final int QUERY_BY_ONQL_ALL_PARTITIONS- See Also:
-
QUERY_BY_ONQL_SINGLE_PARTITION
public static final int QUERY_BY_ONQL_SINGLE_PARTITION- See Also:
-
QUERY_BY_ONQL_SHARDS
public static final int QUERY_BY_ONQL_SHARDS- See Also:
-
EMPTY_STR
- See Also:
-
-
Constructor Details
-
TableInputSplit
public TableInputSplit()No-arg constructor required by Hadoop semantics.
-
-
Method Details
-
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
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
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
Returns the name of the store containing the records associated with this split. -
getTableName
-
getPartitionSets
Returns aList
whose elements areSet
s of partitions; whose union is the set of all partitions in the store. -
setQueryInfo
-
getQueryBy
public int getQueryBy() -
getWhereClause
-
getShardSet
-
getSecurityLogin
-
getSecurityCredentials
-
getSecurityTrust
-
write
Serialize the fields of this object toout
.- Specified by:
write
in interfaceWritable
- Parameters:
out
-DataOuput
to serialize this object into.- Throws:
IOException
- if an I/O error occurs
-
readFields
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:
IOException
- if an I/O error occurs
-
equals
-
hashCode
public int hashCode() -
toString
-