import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.net.URI;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.IOUtils;
import org.apache.hadoop.io.SequenceFile;
import org.apache.hadoop.io.Text;

public class Txt2SeqConverter
{
	public static void main(String[] args)
	{
	  	FileSystem fs = null;
	  	String seqFileName = args[1];
		Configuration conf = new Configuration();
		try {
		  	fs = FileSystem.get(URI.create(seqFileName), conf);
		} catch (IOException e)
		{
			System.out.println("ERROR: " + e.getMessage()); 
		}
		  
		Path path = new Path(seqFileName);

		IntWritable key = new IntWritable();
		Text value = new Text();
		SequenceFile.Writer writer = null;
		try
		{
		  	writer = SequenceFile.createWriter(fs, conf, path, IntWritable.class, Text.class);
			BufferedReader br = new BufferedReader(new FileReader(args[0]));

			int transactionID = 1;
			String transaction = null;
			while ((transaction = br.readLine()) != null)
			{
			  key.set(transactionID);
			  value.set(transaction);
			  writer.append(key, value);

			  transactionID++;
			}
		} catch (IOException e) {
			System.out.println("ERROR: " + e.getMessage()); 
		} finally {
		  	IOUtils.closeStream(writer);
		}
	}
}


@@ -450,16 +450,183 @@
 rgs)%0A%09%7B%0A
+%09  %09if (args.length != 2) %0A%09%09%7B%0A%09%09  %09System.out.println(%22Usage: env HADOOP_CLASSPATH=.:$HADOOP_CLASSPATH hadoop Txt2SeqConverter input output%22);%0A%09%09%09System.exit(1);%0A%09%09%7D%0A
 %09  %09File

Add usage.