// metadata
// operations
job.set("mapred.input.dir", org.apache.hadoop.util.StringUtils.escapeString(currPath
.toString()));
PartitionDesc partDesc;
if (currTbl == null) {
partDesc = currPart;
} else {
partDesc = new PartitionDesc(currTbl, null);
}
Class<? extends InputFormat> formatter = partDesc.getInputFileFormatClass();
inputFormat = getInputFormatFromCache(formatter, job);
Utilities.copyTableJobPropertiesToConf(partDesc.getTableDesc(), job);
InputSplit[] splits = inputFormat.getSplits(job, 1);
FetchInputFormatSplit[] inputSplits = new FetchInputFormatSplit[splits.length];
for (int i = 0; i < splits.length; i++) {
inputSplits[i] = new FetchInputFormatSplit(splits[i], formatter.getName());
}
if (work.getSplitSample() != null) {
inputSplits = splitSampling(work.getSplitSample(), inputSplits);
}
this.inputSplits = inputSplits;
splitNum = 0;
serde = partDesc.getDeserializerClass().newInstance();
serde.initialize(job, partDesc.getOverlayedProperties());
if (currTbl != null) {
tblSerde = serde;
}
else {
tblSerde = currPart.getTableDesc().getDeserializerClass().newInstance();
tblSerde.initialize(job, currPart.getTableDesc().getProperties());
}
ObjectInspector outputOI = ObjectInspectorConverters.getConvertedOI(
serde.getObjectInspector(),
partitionedTableOI == null ? tblSerde.getObjectInspector() : partitionedTableOI, true);
partTblObjectInspectorConverter = ObjectInspectorConverters.getConverter(
serde.getObjectInspector(), outputOI);
if (LOG.isDebugEnabled()) {
LOG.debug("Creating fetchTask with deserializer typeinfo: "
+ serde.getObjectInspector().getTypeName());
LOG.debug("deserializer properties: " + partDesc.getOverlayedProperties());
}
if (currPart != null) {
getRowInspectorFromPartition(currPart, outputOI);
}