/*
 * InputSplit class for Syndicate
 */
package SyndicateHadoop.input;

import JSyndicateFS.FileSystem;
import JSyndicateFS.Path;
import java.io.IOException;
import org.apache.hadoop.mapreduce.InputSplit;

/**
 *
 * @author iychoi
 */
public class SyndicateInputSplit extends InputSplit {

    private FileSystem filesystem;
    private Path path;
    private long start;
    private long length;

    /*
     * Constructs a split
     */
    public SyndicateInputSplit(FileSystem fs, Path path, long start, long length) {
        if(fs == null)
            throw new IllegalArgumentException("Can not create Input Split from null file system");
        if(path == null)
            throw new IllegalArgumentException("Can not create Input Split from null path");
        
        this.filesystem = fs;
        this.path = path;
        this.start = start;
        this.length = length;
    }

    public FileSystem getFileSystem() {
        return this.filesystem;
    }
    
    /*
     * The file containing this split's data
     */
    public Path getPath() {
        return this.path;
    }

    /*
     * The position of split start
     */
    public long getStart() {
        return this.start;
    }

    /*
     * The number of bytes in the file to process
     */
    @Override
    public long getLength() {
        return this.length;
    }

    @Override
    public String toString() {
        return this.path.getPath() + ":" + start + "+" + length;
    }

    @Override
    public String[] getLocations() throws IOException, InterruptedException {
        return null;
    }
}

@@ -139,27 +139,152 @@
 java.io.
-IOException
+DataInput;%0Aimport java.io.DataOutput;%0Aimport java.io.IOException;%0Aimport org.apache.hadoop.io.Text;%0Aimport org.apache.hadoop.io.Writable
 ;%0Aimport
@@ -354,16 +354,16 @@
 hoi%0A */%0A
-
 public c
@@ -406,16 +406,36 @@
 utSplit 
+implements Writable 
 %7B%0A%0A    p
@@ -1715,19 +1715,522 @@
     
-return null
+String volume = this.filesystem.getConfiguration().getVolumeName();%0A        return new String%5B%5D %7Bvolume%7D;%0A    %7D%0A%0A    @Override%0A    public void write(DataOutput out) throws IOException %7B%0A        Text.writeString(out, this.path.getPath());%0A        out.writeLong(this.start);%0A        out.writeLong(this.length);%0A    %7D%0A%0A    @Override%0A    public void readFields(DataInput in) throws IOException %7B%0A        this.path = new Path(Text.readString(in));%0A        this.start = in.readLong();%0A        this.length = in.readLong()
 ;%0A  

Add writable interface to InputSplit