keksmd opened a new pull request, #960:
URL: https://github.com/apache/incubator-graphar/pull/960

   ### Reason for this PR
   
   Closes the remaining half of #953. The storage API merged in #958 defines
   `Storage`, `InputFile`, `OutputFile`, `SeekableInput`, and `PositionOutput`,
   but no implementation ships with it, so nothing in the Java tree can open a
   GraphAr file yet. Every later layer of #947 (physical IO, Parquet backend,
   reader, writer) needs at least one working adapter to be testable.
   
   ### What changes are included in this PR?
   
   A local filesystem adapter in a new `graphar-storage-local` module:
   
   - `LocalStorage` resolves a `file:` URI (and a bare path) to a 
`java.nio.Path`
     and hands back input and output files.
   - `LocalSeekableInput` reads at an absolute position and reports the end of 
the
     stream instead of a short buffer.
   - `LocalOutputFile` / `LocalPositionOutput` create parent directories on 
demand,
     refuse an existing target unless the caller asked to replace it, and report
     the number of bytes written so far.
   
   The module depends only on `graphar-storage-api`. It carries no GraphAr 
layout,
   format, projection, or query concern, per the boundary agreed in #953.
   
   ### Are these changes tested?
   
   Yes. `LocalStorageTest` covers the round trip, positional reads, 
end-of-stream
   behaviour, directory creation, and the refusal to overwrite an existing 
target.
   
   ```
   mvn --no-transfer-progress -pl storage-local -am clean verify
   Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
   BUILD SUCCESS
   ```
   
   ### Are there any user-facing changes?
   
   A new module and package `org.apache.graphar.storage.local`. Nothing existing
   changes.
   
   ## Checklist
   
   - [x] I have performed a self-review of my own code.
   - [ ] I have formatted my own code using `make cpplint` before submitting 
when changed files are in the `cpp` directory.
   - [x] I have performed `pre-commit run` before commit the changed files.
   - [x] I have added tests to prove my changes are effective.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to