org.apache.hadoop.hive.ql.io.orc.Reader.getRawDataSize()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(238)

本文整理了Java中org.apache.hadoop.hive.ql.io.orc.Reader.getRawDataSize方法的一些代码示例,展示了Reader.getRawDataSize的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reader.getRawDataSize方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.io.orc.Reader
类名称:Reader
方法名:getRawDataSize

Reader.getRawDataSize介绍

[英]Get the deserialized data size of the file
[中]获取文件的反序列化数据大小

代码示例

代码示例来源:origin: apache/hive

@Override
 public SerDeStats getStats() {
  stats.setRawDataSize(file.getRawDataSize());
  stats.setRowCount(file.getNumberOfRows());
  return stats;
 }
}

代码示例来源:origin: apache/hive

assertEquals(1668, reader.getRawDataSize());
assertEquals(8, reader.getRawDataSizeOfColumns(Lists.newArrayList("boolean1")));
assertEquals(8, reader.getRawDataSizeOfColumns(Lists.newArrayList("byte1")));

代码示例来源:origin: apache/hive

assertEquals(44500, reader.getRawDataSize());
assertEquals(1500, reader.getRawDataSizeOfColumns(Lists.newArrayList("bytes1")));
assertEquals(43000, reader.getRawDataSizeOfColumns(Lists.newArrayList("string1")));

代码示例来源:origin: apache/drill

@Override
 public SerDeStats getStats() {
  stats.setRawDataSize(file.getRawDataSize());
  stats.setRowCount(file.getNumberOfRows());
  return stats;
 }
}

代码示例来源:origin: apache/hive

assertEquals(1668, reader.getRawDataSize());
assertEquals(8, reader.getRawDataSizeOfColumns(Lists.newArrayList("boolean1")));
assertEquals(8, reader.getRawDataSizeOfColumns(Lists.newArrayList("byte1")));

代码示例来源:origin: apache/hive

assertEquals(6300000, reader.getRawDataSize());
assertEquals(2, stripeCount);

代码示例来源:origin: apache/hive

@Test
public void testOrcSerDeStatsMap() throws Exception {
 ObjectInspector inspector;
 synchronized (TestOrcSerDeStats.class) {
  inspector = ObjectInspectorFactory.getReflectionObjectInspector
    (MapStruct.class, ObjectInspectorFactory.ObjectInspectorOptions.JAVA);
 }
 Writer writer = OrcFile.createWriter(testFilePath,
   OrcFile.writerOptions(conf)
     .inspector(inspector)
     .stripeSize(10000)
     .bufferSize(10000));
 for (int row = 0; row < 1000; row++) {
  Map<String, Double> test = new HashMap<String, Double>();
  for (int i = 0; i < 10; i++) {
   test.put("hi" + i, 2.0);
  }
  writer.addRow(new MapStruct(test));
 }
 writer.close();
 // stats from writer
 assertEquals(1000, writer.getNumberOfRows());
 assertEquals(950000, writer.getRawDataSize());
 Reader reader = OrcFile.createReader(testFilePath,
   OrcFile.readerOptions(conf).filesystem(fs));
 // stats from reader
 assertEquals(1000, reader.getNumberOfRows());
 assertEquals(950000, reader.getRawDataSize());
 assertEquals(950000, reader.getRawDataSizeOfColumns(Lists.newArrayList("map1")));
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

@Override
 public SerDeStats getStats() {
  stats.setRawDataSize(file.getRawDataSize());
  stats.setRowCount(file.getNumberOfRows());
  return stats;
 }
}

代码示例来源:origin: apache/hive

@Test
public void testOrcSerDeStatsList() throws Exception {
 ObjectInspector inspector;
 synchronized (TestOrcSerDeStats.class) {
  inspector = ObjectInspectorFactory.getReflectionObjectInspector
    (ListStruct.class, ObjectInspectorFactory.ObjectInspectorOptions.JAVA);
 }
 Writer writer = OrcFile.createWriter(testFilePath,
   OrcFile.writerOptions(conf)
     .inspector(inspector)
     .stripeSize(10000)
     .bufferSize(10000));
 for (int row = 0; row < 5000; row++) {
  List<String> test = new ArrayList<String>();
  for (int i = 0; i < 1000; i++) {
   test.add("hi");
  }
  writer.addRow(new ListStruct(test));
 }
 writer.close();
 assertEquals(5000, writer.getNumberOfRows());
 assertEquals(430000000, writer.getRawDataSize());
 Reader reader = OrcFile.createReader(testFilePath,
   OrcFile.readerOptions(conf).filesystem(fs));
 // stats from reader
 assertEquals(5000, reader.getNumberOfRows());
 assertEquals(430000000, reader.getRawDataSize());
 assertEquals(430000000, reader.getRawDataSizeOfColumns(Lists.newArrayList("list1")));
}

代码示例来源:origin: asakusafw/asakusafw

status.getPath(),
orc.getNumberOfRows(),
orc.getRawDataSize()));

代码示例来源:origin: apache/hive

OrcFile.readerOptions(conf).filesystem(fs));
assertEquals(4, reader.getNumberOfRows());
assertEquals(273, reader.getRawDataSize());
assertEquals(15, reader.getRawDataSizeOfColumns(Lists.newArrayList("bytes1")));
assertEquals(258, reader.getRawDataSizeOfColumns(Lists.newArrayList("string1")));

相关文章