ovasty opened a new issue, #49:
URL: https://github.com/apache/arrow-java/issues/49
## Describe the bug, including details regarding any error messages,
version, and platform.
I run Arrow's demo codes under JDK8 and Arrow 17.0.0, but it seems not work.
IPC reader example code as below:
`
try(
BufferAllocator allocator = new
RootAllocator(Long.MAX_VALUE);
FileInputStream fileInputStream = new FileInputStream(new
File("random_access_file.arrow"));
ArrowFileReader reader = new
ArrowFileReader(fileInputStream.getChannel(), allocator);
){
System.out.println("Record batches in file: " +
reader.getRecordBlocks().size());
for (ArrowBlock arrowBlock : reader.getRecordBlocks()) {
reader.loadRecordBatch(arrowBlock);
VectorSchemaRoot root = reader.getVectorSchemaRoot();
System.out.println("VectorSchemaRoot read: \n" +
root.contentToTSVString());
}
} catch (IOException e) {
e.printStackTrace();
}
`
demo
maven:
> <dependency>
> <groupId>org.apache.arrow</groupId>
> <artifactId>arrow-vector</artifactId>
> <version>17.0.0</version>
> </dependency>
> <dependency>
> <groupId>org.apache.arrow</groupId>
> <artifactId>arrow-memory-netty</artifactId>
> <version>17.0.0</version>
> </dependency>
the error info is:
`
Exception in thread "main" java.lang.NoSuchMethodError:
java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
at
org.apache.arrow.vector.ipc.ArrowFileReader.readSchema(ArrowFileReader.java:94)
at
org.apache.arrow.vector.ipc.ArrowReader.initialize(ArrowReader.java:179)
at
org.apache.arrow.vector.ipc.ArrowFileReader.initialize(ArrowFileReader.java:121)
at
org.apache.arrow.vector.ipc.ArrowReader.ensureInitialized(ArrowReader.java:172)
at
org.apache.arrow.vector.ipc.ArrowFileReader.getRecordBlocks(ArrowFileReader.java:180)
at com.hd.arrowdemo.Main.ipcReader(Main.java:93)
at com.hd.arrowdemo.Main.main(Main.java:44)
`
### Component(s)
Java
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]