org.apache.hadoop.mapreduce.lib.db
Class DataDrivenDBInputFormat.DataDrivenDBInputSplit

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputSplit
      extended by org.apache.hadoop.mapreduce.lib.db.DBInputFormat.DBInputSplit
          extended by org.apache.hadoop.mapreduce.lib.db.DataDrivenDBInputFormat.DataDrivenDBInputSplit
All Implemented Interfaces:
org.apache.hadoop.io.Writable
Enclosing class:
DataDrivenDBInputFormat<T extends DBWritable>

@InterfaceStability.Evolving
public static class DataDrivenDBInputFormat.DataDrivenDBInputSplit
extends DBInputFormat.DBInputSplit

A InputSplit that spans a set of rows


Constructor Summary
DataDrivenDBInputFormat.DataDrivenDBInputSplit()
          Default Constructor
DataDrivenDBInputFormat.DataDrivenDBInputSplit(String lower, String upper)
          Convenience Constructor
 
Method Summary
 long getLength()
          Get the size of the split, so that the input splits can be sorted by size.
 String getLowerClause()
           
 String getUpperClause()
           
 void readFields(DataInput input)
          
 void write(DataOutput output)
          
 
Methods inherited from class org.apache.hadoop.mapreduce.lib.db.DBInputFormat.DBInputSplit
getEnd, getLocations, getStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataDrivenDBInputFormat.DataDrivenDBInputSplit

public DataDrivenDBInputFormat.DataDrivenDBInputSplit()
Default Constructor


DataDrivenDBInputFormat.DataDrivenDBInputSplit

public DataDrivenDBInputFormat.DataDrivenDBInputSplit(String lower,
                                                      String upper)
Convenience Constructor

Parameters:
lower - the string to be put in the WHERE clause to guard on the 'lower' end
upper - the string to be put in the WHERE clause to guard on the 'upper' end
Method Detail

getLength

public long getLength()
               throws IOException
Description copied from class: InputSplit
Get the size of the split, so that the input splits can be sorted by size.

Overrides:
getLength in class DBInputFormat.DBInputSplit
Returns:
The total row count in this split
Throws:
IOException

readFields

public void readFields(DataInput input)
                throws IOException

Specified by:
readFields in interface org.apache.hadoop.io.Writable
Overrides:
readFields in class DBInputFormat.DBInputSplit
Throws:
IOException

write

public void write(DataOutput output)
           throws IOException

Specified by:
write in interface org.apache.hadoop.io.Writable
Overrides:
write in class DBInputFormat.DBInputSplit
Throws:
IOException

getLowerClause

public String getLowerClause()

getUpperClause

public String getUpperClause()


Copyright © 2013 Apache Software Foundation. All Rights Reserved.