org.apache.hadoop.hive.ql.io
Class SymlinkTextInputFormat.SymlinkTextInputSplit

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputSplit
      extended by org.apache.hadoop.mapred.FileSplit
          extended by org.apache.hadoop.hive.ql.io.SymlinkTextInputFormat.SymlinkTextInputSplit
All Implemented Interfaces:
org.apache.hadoop.io.Writable, org.apache.hadoop.mapred.InputSplit
Enclosing class:
SymlinkTextInputFormat

public static class SymlinkTextInputFormat.SymlinkTextInputSplit
extends org.apache.hadoop.mapred.FileSplit

This input split wraps the FileSplit generated from TextInputFormat.getSplits(), while setting the original link file path as job input path. This is needed because MapOperator relies on the job input path to lookup correct child operators. The target data file is encapsulated in the wrapped FileSplit.


Constructor Summary
SymlinkTextInputFormat.SymlinkTextInputSplit()
           
SymlinkTextInputFormat.SymlinkTextInputSplit(org.apache.hadoop.fs.Path symlinkPath, org.apache.hadoop.mapred.FileSplit split)
           
 
Method Summary
 org.apache.hadoop.mapred.FileSplit getTargetSplit()
          Gets the target split, i.e.
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.mapred.FileSplit
getLength, getLocations, getPath, getStart, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SymlinkTextInputFormat.SymlinkTextInputSplit

public SymlinkTextInputFormat.SymlinkTextInputSplit()

SymlinkTextInputFormat.SymlinkTextInputSplit

public SymlinkTextInputFormat.SymlinkTextInputSplit(org.apache.hadoop.fs.Path symlinkPath,
                                                    org.apache.hadoop.mapred.FileSplit split)
                                             throws IOException
Throws:
IOException
Method Detail

getTargetSplit

public org.apache.hadoop.mapred.FileSplit getTargetSplit()
Gets the target split, i.e. the split of target data.


write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Overrides:
write in class org.apache.hadoop.mapred.FileSplit
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Overrides:
readFields in class org.apache.hadoop.mapred.FileSplit
Throws:
IOException


Copyright © 2014 The Apache Software Foundation. All rights reserved.