[
https://issues.apache.org/jira/browse/PARQUET-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17200505#comment-17200505
]
ASF GitHub Bot commented on PARQUET-1776:
-----------------------------------------
belugabehr edited a comment on pull request #815:
URL: https://github.com/apache/parquet-mr/pull/815#issuecomment-696754782
@HunterL
OK, so I've been recently diving into Java NIO a bit and let me add some
thoughts that relate to this task:
Please change the naming convention and drop the "Local" prefix. I think
Nio is probably best. As an example of why this matters:
```
// This exists in the current PR
return new LocalSeekableInputStream(Files.newInputStream(path));
```
Well that statement `Files.newInputStream(path)` will provide a new
InputStream, but the InputStream is totally driven by whatever the path points
at. Things within the JVM could be setup to allow the provided path to point
at an FTP location for example and that would be a _remote_ read and not a
_local_ read.
I also think you will have better luck storing, internal to the Input/Output
streams a `SeekableByteChannel` instead of an `OutputStream` or an
`InputStream`. This will allow you to easily track the position aspect of the
underlying stream without having to do it yourself. For example, the current
`OutputStream` implementation does not currently implement this feature:
```
@Override
public long getPos() throws IOException {
return 0;
}
```
Thanks.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add Java NIO Avro OutputFile InputFile
> --------------------------------------
>
> Key: PARQUET-1776
> URL: https://issues.apache.org/jira/browse/PARQUET-1776
> Project: Parquet
> Issue Type: Improvement
> Components: parquet-avro
> Reporter: David Mollitor
> Priority: Minor
>
> Add a wrapper around Java NIO Path for {{org.apache.parquet.io.OutputFile}}
> and {{org.apache.parquet.io.InputFile}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)