Class TableHiveInputSplit
- java.lang.Object
-
- org.apache.hadoop.mapreduce.InputSplit
-
- org.apache.hadoop.mapred.FileSplit
-
- oracle.kv.hadoop.hive.table.TableHiveInputSplit
-
- All Implemented Interfaces:
Writable
,InputSplit
,InputSplitWithLocationInfo
public class TableHiveInputSplit extends FileSplit
Concrete implementation of the InputSplit interface required by version 1 of MapReduce to support Hive queries. A RecordReader will take instances of this class, where each such instance corresponds to data stored in an Oracle NoSQL Database store via the Table API, and use those instances to retrieve that data when performing a given Hive query against the store's data.Note that the Hive infrastructure requires that even though the data associated with instances of this class resides in a table in an Oracle NoSQL Database store rather than an HDFS file, this class still must subclass FileSplit. As a result, a Hadoop HDFS Path must be specified for this class.
Also note that although this InputSplit is based on version 1 of MapReduce (as requied by the Hive infrastructure), it wraps and delegates to a YARN based (MapReduce version 2) InputSplit. This is done because the InputSplit class Oracle NoSQL Database provides to support Hadoop integration is YARN based, and this class wishes to exploit and reuse the functionality already provided by the YARN based InputSplit class.
-
-
Constructor Summary
Constructors Constructor Description TableHiveInputSplit()
TableHiveInputSplit(Path filePath, TableInputSplit v2Split)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String[]
getKVHelperHosts()
String
getKVStoreName()
long
getLength()
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.Path
getPath()
Returns the HDFS Path associated with this split.int
getQueryBy()
PasswordCredentials
getSecurityCredentials()
String
getSecurityLogin()
String
getSecurityTrust()
String
getTableName()
String
getWhereClause()
int
hashCode()
void
readFields(DataInput in)
Deserialize the fields of this object fromin
.String
toString()
void
write(DataOutput out)
Serialize the fields of this object toout
.-
Methods inherited from class org.apache.hadoop.mapred.FileSplit
getLocationInfo, getStart
-
-
-
-
Constructor Detail
-
TableHiveInputSplit
public TableHiveInputSplit()
-
TableHiveInputSplit
public TableHiveInputSplit(Path filePath, TableInputSplit v2Split)
-
-
Method Detail
-
getPath
public Path getPath()
Returns the HDFS Path associated with this split.
-
getLength
public long getLength()
Get the size of the split, so that the input splits can be sorted by size.- Specified by:
getLength
in interfaceInputSplit
- Overrides:
getLength
in classFileSplit
- Returns:
- the number of bytes in the split
-
getLocations
public String[] getLocations() throws IOException
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 interfaceInputSplit
- Overrides:
getLocations
in classFileSplit
- Returns:
- a new array of the node nodes.
- Throws:
IOException
- if an I/O error occurs
-
write
public void write(DataOutput out) throws IOException
Serialize the fields of this object toout
.- Specified by:
write
in interfaceWritable
- Overrides:
write
in classFileSplit
- Parameters:
out
-DataOuput
to 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:
readFields
in interfaceWritable
- Overrides:
readFields
in classFileSplit
- Parameters:
in
-DataInput
to deseriablize this object from.- Throws:
IOException
- if an I/O error occurs
-
getKVStoreName
public String getKVStoreName()
-
getKVHelperHosts
public String[] getKVHelperHosts()
-
getTableName
public String getTableName()
-
getQueryBy
public int getQueryBy()
-
getWhereClause
public String getWhereClause()
-
getSecurityLogin
public String getSecurityLogin()
-
getSecurityCredentials
public PasswordCredentials getSecurityCredentials()
-
getSecurityTrust
public String getSecurityTrust()
-
-