Apache Arrow Java API Documentation [已关闭]

2022-09-02 02:03:05

我正在寻找Apache Arrow API的有用文档或示例。任何人都可以指出一些有用的资源吗?我只能找到一些博客和JAVA文档(这并没有说太多)。

根据我所读到的内容,它是用于快速分析的标准内存中列式数据库。是否可以将数据加载到箭头内存并进行操作?


答案 1

您应该使用箭头作为两个应用程序之间的中间人,这两个应用程序需要使用传递对象进行通信。

Arrow 不是一个独立的软件,而是一个组件,用于加速特定系统内的分析,并允许支持 Arrow 的系统以较低的开销交换数据。

例如,Arrow 提高了群集内数据移动的性能。

有关示例,请参阅测试

  @Test
  public void test() throws Exception {
    BufferAllocator allocator = new RootAllocator(Integer.MAX_VALUE);
    File testInFile = testFolder.newFile("testIn.arrow");
    File testOutFile = testFolder.newFile("testOut.arrow");

    writeInput(testInFile, allocator);

    String[] args = {"-i", testInFile.getAbsolutePath(), "-o", testOutFile.getAbsolutePath()};
    int result = new FileRoundtrip(System.out, System.err).run(args);
    assertEquals(0, result);

    validateOutput(testOutFile, allocator);
}

Apache Parquet也使用它。以下是从/到箭头对象的转换示例:

MessageType parquet = converter.fromArrow(allTypesArrowSchema).getParquetSchema();

Schema arrow = converter.fromParquet(supportedTypesParquetSchema).getArrowSchema();

答案 2

他们现在有一些关于如何在他们的网站上使用Apache Arrow的基本文档。虽然它可以使用一些填充。


推荐