org.apache.hadoop.hive.ql.io
Class CombineHiveInputFormat.CombineHiveInputSplit

java.lang.Object
  extended by org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.CombineHiveInputSplit
All Implemented Interfaces:
org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim, org.apache.hadoop.io.Writable, org.apache.hadoop.mapred.InputSplit
Enclosing class:
CombineHiveInputFormat<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>

public static class CombineHiveInputFormat.CombineHiveInputSplit
extends Object
implements org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim

CombineHiveInputSplit encapsulates an InputSplit with its corresponding inputFormatClassName. A CombineHiveInputSplit comprises of multiple chunks from different files. Since, they belong to a single directory, there is a single inputformat for all the chunks.


Constructor Summary
CombineHiveInputFormat.CombineHiveInputSplit()
           
CombineHiveInputFormat.CombineHiveInputSplit(org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim inputSplitShim)
           
CombineHiveInputFormat.CombineHiveInputSplit(org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim inputSplitShim)
           
 
Method Summary
 org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim getInputSplitShim()
           
 org.apache.hadoop.mapred.JobConf getJob()
           
 long getLength()
           
 long getLength(int i)
          Returns the length of the ith Path.
 long[] getLengths()
          Returns an array containing the lengths of the files in the split.
 String[] getLocations()
          Returns all the Paths where this input-split resides.
 int getNumPaths()
          Returns the number of Paths in the split.
 long getOffset(int i)
          Returns the start offset of the ith Path.
 org.apache.hadoop.fs.Path getPath(int i)
          Returns the ith Path.
 org.apache.hadoop.fs.Path[] getPaths()
          Returns all the Paths in the split.
 long[] getStartOffsets()
          Returns an array containing the startoffsets of the files in the split.
 String inputFormatClassName()
          Returns the inputFormat class name for the i-th chunk.
 void readFields(DataInput in)
          Writable interface.
 void setInputFormatClassName(String inputFormatClassName)
           
 void shrinkSplit(long length)
           
 String toString()
          Prints this obejct as a string.
 void write(DataOutput out)
          Writable interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CombineHiveInputFormat.CombineHiveInputSplit

public CombineHiveInputFormat.CombineHiveInputSplit()
                                             throws IOException
Throws:
IOException

CombineHiveInputFormat.CombineHiveInputSplit

public CombineHiveInputFormat.CombineHiveInputSplit(org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim inputSplitShim)
                                             throws IOException
Throws:
IOException

CombineHiveInputFormat.CombineHiveInputSplit

public CombineHiveInputFormat.CombineHiveInputSplit(org.apache.hadoop.mapred.JobConf job,
                                                    org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim inputSplitShim)
                                             throws IOException
Throws:
IOException
Method Detail

getInputSplitShim

public org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim getInputSplitShim()

inputFormatClassName

public String inputFormatClassName()
Returns the inputFormat class name for the i-th chunk.


setInputFormatClassName

public void setInputFormatClassName(String inputFormatClassName)

getJob

public org.apache.hadoop.mapred.JobConf getJob()
Specified by:
getJob in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim

getLength

public long getLength()
Specified by:
getLength in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim
Specified by:
getLength in interface org.apache.hadoop.mapred.InputSplit

getStartOffsets

public long[] getStartOffsets()
Returns an array containing the startoffsets of the files in the split.

Specified by:
getStartOffsets in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim

getLengths

public long[] getLengths()
Returns an array containing the lengths of the files in the split.

Specified by:
getLengths in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim

getOffset

public long getOffset(int i)
Returns the start offset of the ith Path.

Specified by:
getOffset in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim

getLength

public long getLength(int i)
Returns the length of the ith Path.

Specified by:
getLength in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim

getNumPaths

public int getNumPaths()
Returns the number of Paths in the split.

Specified by:
getNumPaths in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim

getPath

public org.apache.hadoop.fs.Path getPath(int i)
Returns the ith Path.

Specified by:
getPath in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim

getPaths

public org.apache.hadoop.fs.Path[] getPaths()
Returns all the Paths in the split.

Specified by:
getPaths in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim

getLocations

public String[] getLocations()
                      throws IOException
Returns all the Paths where this input-split resides.

Specified by:
getLocations in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim
Specified by:
getLocations in interface org.apache.hadoop.mapred.InputSplit
Throws:
IOException

toString

public String toString()
Prints this obejct as a string.

Specified by:
toString in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim
Overrides:
toString in class Object

readFields

public void readFields(DataInput in)
                throws IOException
Writable interface.

Specified by:
readFields in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException
Writable interface.

Specified by:
write in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

shrinkSplit

public void shrinkSplit(long length)
Specified by:
shrinkSplit in interface org.apache.hadoop.hive.shims.HadoopShims.InputSplitShim


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