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,106 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.serde2.thrift_test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +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.thrift.ThriftSerDe; +import org.apache.hadoop.io.BytesWritable; +import org.apache.hadoop.io.SequenceFile; +import org.apache.hadoop.io.Writable; +import org.apache.hadoop.mapred.JobConf; +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 @@ + + + + + + +