package test;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

import org.apache.hadoop.io.Writable;

public class DummyInputSplit implements org.apache.hadoop.mapred.InputSplit, Writable
{
    private long _length;
    
    public DummyInputSplit(long length)
    {
        _length = length;
    }
    
    @Override
    public void readFields(DataInput in) throws IOException
    {
        _length = in.readLong();
    }

    @Override
    public void write(DataOutput out) throws IOException
    {
        out.writeLong(_length);
    }

    @Override
    public long getLength() throws IOException
    {
        return _length;
    }

    @Override
    public String[] getLocations() throws IOException
    {
        return new String[]{};
    }

}
