org.apache.hadoop.mrunit.mock
Class MockInputSplit

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputSplit
      extended by org.apache.hadoop.mapred.FileSplit
          extended by org.apache.hadoop.mrunit.mock.MockInputSplit
All Implemented Interfaces:
org.apache.hadoop.io.Writable, org.apache.hadoop.mapred.InputSplit

public class MockInputSplit
extends org.apache.hadoop.mapred.FileSplit
implements org.apache.hadoop.mapred.InputSplit

A fake InputSplit object to be returned by our MockReporter to the user class.


Constructor Summary
MockInputSplit()
           
 
Method Summary
 long getLength()
           
 String[] getLocations()
           
static org.apache.hadoop.fs.Path getMockPath()
          Return the path object represented by this as a FileSplit.
 void readFields(DataInput in)
           
 String toString()
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.mapred.FileSplit
getPath, getStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockInputSplit

public MockInputSplit()
Method Detail

getLength

public long getLength()
Specified by:
getLength in interface org.apache.hadoop.mapred.InputSplit
Overrides:
getLength in class org.apache.hadoop.mapred.FileSplit

getLocations

public String[] getLocations()
                      throws IOException
Specified by:
getLocations in interface org.apache.hadoop.mapred.InputSplit
Overrides:
getLocations 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

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

toString

public String toString()
Overrides:
toString in class org.apache.hadoop.mapred.FileSplit

getMockPath

public static org.apache.hadoop.fs.Path getMockPath()
Return the path object represented by this as a FileSplit.



Copyright © 2012 The Apache Software Foundation. All Rights Reserved.