Examples of materialize()


Examples of com.facebook.hive.orc.lazy.OrcLazyStruct.materialize()

    RecordReader rows = reader.rows(null);
    OrcLazyStruct lazyRow = null;
    OrcStruct row = null;
    for (int i = 0; i < 1500; i ++) {
      lazyRow = (OrcLazyStruct) rows.next(lazyRow);
      row = (OrcStruct) lazyRow.materialize();
      assertEquals(i % 1000,
          ((IntWritable) ((OrcLazyInt) row.getFieldValue(0)).materialize()).get());
    }
    rows.close();
  }
View Full Code Here

Examples of com.facebook.hive.orc.lazy.OrcLazyStruct.materialize()

    RecordReader rows = reader.rows(null);
    OrcLazyStruct lazyRow = null;
    OrcStruct row = null;
    for (int i = 0; i < 1500; i ++) {
      lazyRow = (OrcLazyStruct) rows.next(lazyRow);
      row = (OrcStruct) lazyRow.materialize();
      assertEquals(Integer.toString(i % 1000),
          ((Text) ((OrcLazyString) row.getFieldValue(0)).materialize()).toString());
    }
    rows.close();
  }
View Full Code Here

Examples of com.facebook.hive.orc.lazy.OrcLazyStruct.materialize()

    RecordReader rows = reader.rows(null);
    OrcLazyStruct lazyRow = null;
    OrcStruct row = null;
    for (int i = 0; i < 1500; i ++) {
      lazyRow = (OrcLazyStruct) rows.next(lazyRow);
      row = (OrcStruct) lazyRow.materialize();
      assertEquals(i % 1000,
          ((IntWritable) ((OrcLazyInt) row.getFieldValue(0)).materialize()).get());
    }
    rows.close();
  }
View Full Code Here

Examples of com.facebook.hive.orc.lazy.OrcLazyStruct.materialize()

    RecordReader rows = reader.rows(null);
    OrcLazyStruct lazyRow = null;
    OrcStruct row = null;
    for (int i = 0; i < 2000; i ++) {
      lazyRow = (OrcLazyStruct) rows.next(lazyRow);
      row = (OrcStruct) lazyRow.materialize();
      assertEquals(Integer.toString(i % 1000),
          ((Text) ((OrcLazyString) row.getFieldValue(0)).materialize()).toString());
    }
    rows.close();
  }
View Full Code Here

Examples of com.facebook.hive.orc.lazy.OrcLazyStruct.materialize()

    RecordReader rows = reader.rows(null);
    OrcLazyStruct lazyRow = null;
    OrcStruct row = null;
    for (int i = 0; i < 2000; i ++) {
      lazyRow = (OrcLazyStruct) rows.next(lazyRow);
      row = (OrcStruct) lazyRow.materialize();
      assertEquals(i % 1000,
          ((IntWritable) ((OrcLazyInt) row.getFieldValue(0)).materialize()).get());
    }
    rows.close();
  }
View Full Code Here

Examples of com.facebook.hive.orc.lazy.OrcLazyStruct.materialize()

    Reader reader = OrcFile.createReader(fs, testFilePath, conf);
    RecordReader rows = reader.rows(null);
    OrcLazyStruct lazyRow = null;
    OrcStruct row = null;
    lazyRow = (OrcLazyStruct) rows.next(lazyRow);
    row = (OrcStruct) lazyRow.materialize();
    assertEquals(0, ((IntWritable) ((OrcLazyInt) row.getFieldValue(0)).materialize()).get());
    // Seek to row 98 which is almost at the end of a stripe, this way it stays in the current
    // stripe, and if the row is not updated correctly will read off the end of a stream.
    rows.seekToRow(98);
    for (int i = 98; i < 200; i++) {
View Full Code Here

Examples of com.facebook.hive.orc.lazy.OrcLazyStruct.materialize()

    // Seek to row 98 which is almost at the end of a stripe, this way it stays in the current
    // stripe, and if the row is not updated correctly will read off the end of a stream.
    rows.seekToRow(98);
    for (int i = 98; i < 200; i++) {
      lazyRow = (OrcLazyStruct) rows.next(lazyRow);
      row = (OrcStruct) lazyRow.materialize();
      assertEquals(i, ((IntWritable) ((OrcLazyInt) row.getFieldValue(0)).materialize()).get());
    }
    rows.close();
  }
View Full Code Here

Examples of com.facebook.hive.orc.lazy.OrcLazyStruct.materialize()

    // Read what we wrote for the first stripe
    OrcLazyStruct lazyRow = null;
    OrcStruct row;
    for (int i = 0; i < 100; i ++) {
      lazyRow = (OrcLazyStruct) rows.next(lazyRow);
      row = (OrcStruct) lazyRow.materialize();
      assertEquals(i,
          ((IntWritable) ((OrcLazyInt) row.getFieldValue(0)).materialize()).get());
    }

    // Make sure that there's no additional data
View Full Code Here

Examples of com.facebook.hive.orc.lazy.OrcLazyStruct.materialize()

        reader.getContentLength() - secondStripe.getOffset(), null);

    // Read what we wrote for the first stripe
    for (int i = 0; i < 100; i ++) {
      lazyRow = (OrcLazyStruct) rows.next(lazyRow);
      row = (OrcStruct) lazyRow.materialize();
      assertEquals(i + 100,
          ((IntWritable) ((OrcLazyInt) row.getFieldValue(0)).materialize()).get());
    }

    // Make sure that there's no additional data
View Full Code Here

Examples of com.facebook.hive.orc.lazy.OrcLazyTimestamp.materialize()

        OrcLazyObjectInspectorUtils.createLazyObjectInspector(TypeInfoFactory.timestampTypeInfo);

    OrcLazyTimestamp lazyTimestamp2 = (OrcLazyTimestamp) timestampOI.copyObject(lazyTimestamp);

    Assert.assertEquals(new Timestamp(1), ((TimestampWritable) lazyTimestamp.materialize()).getTimestamp());
    Assert.assertEquals(new Timestamp(1), ((TimestampWritable) lazyTimestamp2.materialize()).getTimestamp());
  }

  /**
   * Tests that fields can be accessed from the OrcLazyStructObjectInspector in a case
   * insensitive manner.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.