Package org.apache.hadoop.hive.serde2.columnar

Examples of org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe


            HiveRCSchemaUtil.listToString(cols));
        props.setProperty(Constants.LIST_COLUMN_TYPES,
            HiveRCSchemaUtil.listToString(types));

        Configuration hiveConf = new HiveConf(conf, SessionState.class);
        ColumnarSerDe serde = new ColumnarSerDe();
        serde.initialize(hiveConf, props);

        return (ColumnarStruct) serde.deserialize(buff);
   }
View Full Code Here


      this.requiredColumns = requiredIndexes;
  }

  try {
      serde = new ColumnarSerDe();
      serde.initialize(hiveConf, props);
  } catch (SerDeException e) {
      LOG.error(e.toString(), e);
      throw new IOException(e);
  }
View Full Code Here

  public void testColumnarSerDe() throws Throwable {
    try {
      System.out.println("test: testColumnarSerde");
      // Create the SerDe
      ColumnarSerDe serDe = new ColumnarSerDe();
      Configuration conf = new Configuration();
      Properties tbl = createProperties();
      serDe.initialize(conf, tbl);

      // Data
      BytesRefArrayWritable braw = new BytesRefArrayWritable(8);
      String[] data = {"123", "456", "789", "1000", "5.3", "hive and hadoop", "1.", "NULL"};
      for (int i = 0; i < 8; i++) {
View Full Code Here

    fs = FileSystem.getLocal(conf);
    dir = new Path(System.getProperty("test.tmp.dir", ".") + "/mapred");
    file = new Path(dir, "test_rcfile");
    cleanup();
    // the SerDe part is from TestLazySimpleSerDe
    serDe = new ColumnarSerDe();
    // Create the SerDe
    tbl = createProperties();
    serDe.initialize(conf, tbl);
    try {
      bytesArray = new byte[][] {"123".getBytes("UTF-8"),
View Full Code Here

    boolean create = true;
    Configuration conf = new Configuration();
    FileSystem fs = FileSystem.getLocal(conf);
    Path file = null;
    // the SerDe part is from TestLazySimpleSerDe
    AbstractSerDe serDe = new ColumnarSerDe();
    // Create the SerDe
    Properties tbl = createProperties();
    serDe.initialize(conf, tbl);

    String usage = "Usage: RCFile " + "[-count N]" + " file";
    if (args.length == 0) {
      System.err.println(usage);
      System.exit(-1);
View Full Code Here

        "smallint:int:bigint:double:float:string:tinyint:boolean:timestamp");
    colCount = 9;
    tbl.setProperty(serdeConstants.SERIALIZATION_NULL_FORMAT, "NULL");

    try {
      serDe = new ColumnarSerDe();
      serDe.initialize(conf, tbl);
    } catch (SerDeException e) {
      new RuntimeException(e);
    }
  }
View Full Code Here

  public void testColumnarSerDe() throws Throwable {
    try {
      System.out.println("test: testColumnarSerde");
      // Create the SerDe
      ColumnarSerDe serDe = new ColumnarSerDe();
      Configuration conf = new Configuration();
      Properties tbl = createProperties();
      SerDeUtils.initializeSerDe(serDe, conf, tbl, null);

      // Data
View Full Code Here

        "smallint:int:bigint:double:float:string:tinyint:boolean:timestamp");
    colCount = 9;
    tbl.setProperty(serdeConstants.SERIALIZATION_NULL_FORMAT, "NULL");

    try {
      serDe = new ColumnarSerDe();
      SerDeUtils.initializeSerDe(serDe, conf, tbl, null);
    } catch (SerDeException e) {
      new RuntimeException(e);
    }
  }
View Full Code Here

    fs = FileSystem.getLocal(conf);
    dir = new Path(System.getProperty("test.tmp.dir", ".") + "/mapred");
    file = new Path(dir, "test_rcfile");
    cleanup();
    // the SerDe part is from TestLazySimpleSerDe
    serDe = new ColumnarSerDe();
    // Create the SerDe
    tbl = createProperties();
    SerDeUtils.initializeSerDe(serDe, conf, tbl, null);
    try {
      bytesArray = new byte[][] {"123".getBytes("UTF-8"),
View Full Code Here

    boolean create = true;
    Configuration conf = new Configuration();
    FileSystem fs = FileSystem.getLocal(conf);
    Path file = null;
    // the SerDe part is from TestLazySimpleSerDe
    AbstractSerDe serDe = new ColumnarSerDe();
    // Create the SerDe
    Properties tbl = createProperties();
    SerDeUtils.initializeSerDe(serDe, conf, tbl, null);

    String usage = "Usage: RCFile " + "[-count N]" + " file";
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.