Repository navigation
PARQUET-77: ByteBuffer use in read and write paths - #267
Closed
jaltekruse wants to merge 102 commits into
Closed
jaltekruse wants to merge 102 commits into
jaltekruse wants to merge 102 commits into
Conversation
…copy through read path.
Use reflect to call new API to keep compatible.
Fix bugs in Binary.
add compatible method initFromPage in ValueReaders. add toByteBuffer method in ByteBufferInputStream. add V21FileAPI class to encapsulate v21 APIs and make it a singlton. add ByteBuffer based equal and compareto method in Binary.
Add compatibility function to read directly into a byte buffer
… memory can be released before stats are written.
…tor to allocate the ByteBuffer. Conflicts: parquet-column/src/main/java/parquet/column/ColumnWriteStore.java parquet-column/src/main/java/parquet/column/ColumnWriter.java parquet-column/src/main/java/parquet/column/ParquetProperties.java parquet-column/src/main/java/parquet/column/impl/ColumnWriteStoreV1.java parquet-column/src/main/java/parquet/column/impl/ColumnWriterV1.java parquet-column/src/main/java/parquet/column/values/dictionary/DictionaryValuesWriter.java parquet-column/src/main/java/parquet/column/values/rle/RunLengthBitPackingHybridValuesWriter.java parquet-column/src/test/java/parquet/column/values/dictionary/TestDictionary.java parquet-column/src/test/java/parquet/io/TestColumnIO.java parquet-hadoop/src/main/java/parquet/hadoop/ColumnChunkPageWriteStore.java parquet-hadoop/src/main/java/parquet/hadoop/InternalParquetRecordWriter.java parquet-hadoop/src/main/java/parquet/hadoop/ParquetRecordWriter.java parquet-hadoop/src/test/java/parquet/hadoop/TestParquetFileWriter.java
Conflicts: parquet-column/src/main/java/parquet/column/values/dictionary/DictionaryValuesWriter.java
Member
There was a problem hiding this comment.
could be generic and do the cast as well with:
@SuppressWarning("unchecked")
<T> T borrow(GenericObjectPool pool) {
...
return (T) ...
...
}
…to Hadoop 2.0 compression APIs.
…od for getting a compressor.
…e got lost somewhere.
…red in the newer version.
Member
There was a problem hiding this comment.
does it need to be public? make it package protected if possible.
Contributor
Author
There was a problem hiding this comment.
Drill creates one of these to compress and decompress page data itself. I could add a factory method that takes an allocator on the CodecFactory to allow creating without exposing the whole class. We don't need to subclass this over in Drill or anything.
Contributor
Author
There was a problem hiding this comment.
I made the change described above and pushed a new commit
Member
|
This looks fine to me. |
… on the allocators used by a DirectCodecFactory. Moved the DirectCodecFactory class to package private access and added a factory method to create one on the CodecFactory class.
… and is no longer accessible in this class.
Member
|
+1 |
I had been a little too aggressive hiding things from the outside world, we still need access to the codec factory itself in Drill. Most of the new code has been hidden from the public interface.
…m that does not implement the byte buffer based read method in the Hadoop 2.x API.
… name for the class that was being used to detect if the Hadoop 2.x API was available. Additionally the check for actual implementation of the read method was not functioning properly. The UnsupportedOperationException that will be thrown from the method will actually be wrapped in an InvocationTargetException now that the method is being invoked with reflection. The code to detect if a call fails has been moved back down to where the actual read method is called, because making it work properly in the static block was too much of a headache, creating an instance of an FSDataInputStream that fulfilled the correct interfaces would have required more reflection hacks. I do properly set the flag used to track availability of the API to avoid the previous behavior of always relying on exception based control flow for fallback, it just happens more lazily than was attempted with the earlier work to simplify this class.
…g is very wrong, so it shouldn't get wrapped in a ShouldNeverHappenException. This invocationTargetException will wrap any kind of exception coming out of the method, including an IOException.
This was referenced Jul 13, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This work is based on the GSOC project from the summer of 2014. We have expanded on it to fix bugs and change the write path to use ByteBuffers as well. This PR replaces several earlier PRs.
closes #6, closes #49, closes #50, closes #267