org.elasticsearch.hadoop.hive
Class EsHiveInputFormat
java.lang.Object
org.apache.hadoop.mapreduce.InputFormat<K,V>
org.elasticsearch.hadoop.mr.EsInputFormat<Text,Map<Writable,Writable>>
org.elasticsearch.hadoop.hive.EsHiveInputFormat
- All Implemented Interfaces:
- InputFormat<Text,Map<Writable,Writable>>
public class EsHiveInputFormat
- extends EsInputFormat<Text,Map<Writable,Writable>>
Hive specific InputFormat. Since Hive code base makes a lot of assumptions about the tables being actual files in HDFS (using instanceof checks without proper else) this class tries to 'fix' this by
adding a dummy FileInputFormat
to ESInputFormat.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EsHiveInputFormat
public EsHiveInputFormat()
getSplits
public FileSplit[] getSplits(JobConf job,
int numSplits)
throws IOException
- Specified by:
getSplits
in interface InputFormat<Text,Map<Writable,Writable>>
- Overrides:
getSplits
in class EsInputFormat<Text,Map<Writable,Writable>>
- Throws:
IOException
getRecordReader
public EsInputFormat.WritableShardRecordReader getRecordReader(InputSplit split,
JobConf job,
Reporter reporter)
- Specified by:
getRecordReader
in interface InputFormat<Text,Map<Writable,Writable>>
- Overrides:
getRecordReader
in class EsInputFormat<Text,Map<Writable,Writable>>