Index: build.xml =================================================================== --- build.xml (revision 726789) +++ build.xml (working copy) @@ -114,7 +114,7 @@ - + @@ -124,6 +124,15 @@ + + + + + + + + + Index: serde/src/test/org/apache/hadoop/hive/serde2/thrift_test/CreateSequenceFile.java =================================================================== --- serde/src/test/org/apache/hadoop/hive/serde2/thrift_test/CreateSequenceFile.java (revision 0) +++ serde/src/test/org/apache/hadoop/hive/serde2/thrift_test/CreateSequenceFile.java (revision 0) @@ -0,0 +1,92 @@ +package org.apache.hadoop.hive.serde2.thrift_test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Random; + +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hive.ql.exec.ByteWritable; +import org.apache.hadoop.hive.serde2.thrift.test.Complex; +import org.apache.hadoop.hive.serde2.thrift.test.IntString; +import org.apache.hadoop.hive.serde.SerDe; +import org.apache.hadoop.hive.serde.thrift.ThriftSerDe; +import org.apache.hadoop.io.BytesWritable; +import org.apache.hadoop.io.SequenceFile; +import org.apache.hadoop.io.Text; +import org.apache.hadoop.io.Writable; +import org.apache.hadoop.mapred.JobConf; +import org.apache.hadoop.util.ReflectionUtils; +import org.apache.hadoop.hive.serde.Constants; + +public class CreateSequenceFile { + + public static void usage() { + System.out.println("Usage: CreateSequenceFile "); + System.exit(1); + } + + public static void main(String[] args) throws Exception { + + // Read parameters + int lines = 10; + List extraArgs = new ArrayList(); + for(int ai=0; ai alist = new ArrayList(); + alist.add(i); alist.add(i*2); alist.add(i*3); + ArrayList slist = new ArrayList(); + slist.add("" + i*10); slist.add("" + i*100); slist.add("" + i*1000); + ArrayList islist = new ArrayList(); + islist.add(new IntString(i*i, ""+ i*i*i)); + HashMap hash = new HashMap(); + hash.put("key_" + i, "value_" + i); + + Complex complex = new Complex( rand.nextInt(), + "record_" + (new Integer(i)).toString(), + alist, + slist, + islist, + hash); + + Writable value = serde.serialize(complex); + writer.append(key, value); + } + + // Close files + writer.close(); + } + +} Index: serde/build.xml =================================================================== --- serde/build.xml (revision 726789) +++ serde/build.xml (working copy) @@ -67,4 +67,15 @@ + + + + + + +