public class HiveAccessor extends HdfsSplittableDataAccessor
HdfsSplittableDataAccessor
. Modifier and Type | Field and Description |
---|---|
protected java.lang.Boolean |
filterInFragmenter |
conf, data, inputFormat, iter, jobConf, key, reader
Constructor and Description |
---|
HiveAccessor(InputData input)
Constructs a HiveAccessor and creates an InputFormat (derived from
InputFormat ) and the Hive partition
fields |
HiveAccessor(InputData input,
org.apache.hadoop.mapred.InputFormat<?,?> inputFormat)
Constructs a HiveAccessor
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
getReader(org.apache.hadoop.mapred.JobConf jobConf,
org.apache.hadoop.mapred.InputSplit split)
Creates the RecordReader suitable for this given split.
|
boolean |
openForRead()
Opens Hive data split for read.
|
closeForRead, getNextSplit, isThreadSafe, readNextObject
public HiveAccessor(InputData input) throws java.lang.Exception
InputFormat
) and the Hive partition
fieldsinput
- contains the InputFormat class name and the partition fieldsjava.lang.Exception
- if failed to create input formatpublic HiveAccessor(InputData input, org.apache.hadoop.mapred.InputFormat<?,?> inputFormat)
input
- contains the InputFormat class name and the partition fieldsinputFormat
- Hive InputFormatpublic boolean openForRead() throws java.lang.Exception
openForRead
in interface ReadAccessor
openForRead
in class HdfsSplittableDataAccessor
java.lang.Exception
- if filter could not be built, connection to Hive failed
or resource failed to openprotected java.lang.Object getReader(org.apache.hadoop.mapred.JobConf jobConf, org.apache.hadoop.mapred.InputSplit split) throws java.io.IOException
getReader
in class HdfsSplittableDataAccessor
jobConf
- configuration data for the Hadoop frameworksplit
- the split that was allocated for reading to this accessorjava.io.IOException
- if failed to create record reader