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

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


      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


    // setting these props to match LazySimpleSerde
    howlProperties.setProperty(Constants.SERIALIZATION_NULL_FORMAT, "\\N");
    howlProperties.setProperty(Constants.SERIALIZATION_FORMAT, "1");

    try {
      serde = new ColumnarSerDe();
      serde.initialize(context.getConfiguration(), howlProperties);
      objectInspector = createStructObjectInspector();

    } catch (SerDeException e) {
      throw new IOException(e);
View Full Code Here

    // setting these props to match LazySimpleSerde
    howlProperties.setProperty(Constants.SERIALIZATION_NULL_FORMAT, "\\N");
    howlProperties.setProperty(Constants.SERIALIZATION_FORMAT, "1");

    try {
      serde = new ColumnarSerDe();
      serde.initialize(context.getConfiguration(), howlProperties);
      oi = (StructObjectInspector) serde.getObjectInspector();
      structFields = oi.getAllStructFieldRefs();

    } catch (SerDeException e) {
View Full Code Here

        if(applyDateRanges)
            currentDate = HiveRCSchemaUtil.extractDayDate(this.reader.getSplitPath().toString());

        // All fields in a hive rc file are thrift serialized, the ColumnarSerDe is used for serialization and deserialization
        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

    // setting these props to match LazySimpleSerde
    hcatProperties.setProperty(Constants.SERIALIZATION_NULL_FORMAT, "\\N");
    hcatProperties.setProperty(Constants.SERIALIZATION_FORMAT, "1");

    try {
      serde = new ColumnarSerDe();
      serde.initialize(context.getConfiguration(), hcatProperties);
      objectInspector = createStructObjectInspector();

    } catch (SerDeException e) {
      throw new IOException(e);
View Full Code Here

    // setting these props to match LazySimpleSerde
    hcatProperties.setProperty(Constants.SERIALIZATION_NULL_FORMAT, "\\N");
    hcatProperties.setProperty(Constants.SERIALIZATION_FORMAT, "1");

    try {
      serde = new ColumnarSerDe();
      serde.initialize(context.getConfiguration(), hcatProperties);
      oi = (StructObjectInspector) serde.getObjectInspector();
      structFields = oi.getAllStructFieldRefs();

    } catch (SerDeException 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

        JobConf jobConf = new JobConf();
        RCFileOutputFormat outputFormat = new RCFileOutputFormat();
        @SuppressWarnings("rawtypes")
        RCFileInputFormat inputFormat = new RCFileInputFormat();
        @SuppressWarnings("deprecation")
        SerDe serde = new ColumnarSerDe();
        File file = File.createTempFile("presto_test", "rc-text");
        try {
            FileSplit split = createTestFile(file.getAbsolutePath(), outputFormat, serde, null);
            @SuppressWarnings("unchecked")
            RecordReader<?, BytesRefArrayWritable> recordReader = (RecordReader<?, BytesRefArrayWritable>) inputFormat.getRecordReader(split, jobConf, Reporter.NULL);
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

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.