[GitHub] orc pull request #283: ORC-378

2018-06-14 Thread sershe
GitHub user sershe opened a pull request:

https://github.com/apache/orc/pull/283

ORC-378



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/sershe/orc master-378

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/orc/pull/283.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #283


commit 47f1aed7608ba276ff228f8094efde0c2c6514ee
Author: sergey 
Date:   2018-06-15T02:31:19Z

commit 1




---


[GitHub] orc pull request #222: ORC-310 better error handling for codec

2018-03-12 Thread sershe
Github user sershe commented on a diff in the pull request:

https://github.com/apache/orc/pull/222#discussion_r173943752
  
--- Diff: java/core/src/java/org/apache/orc/impl/RecordReaderUtils.java ---
@@ -306,15 +330,24 @@ public void releaseBuffer(ByteBuffer buffer) {
 
 @Override
 public DataReader clone() {
+  if (this.file != null) {
+throw new UnsupportedOperationException(
+"Cannot clone a DataReader that is already opened");
+  }
   try {
-return (DataReader) super.clone();
+DefaultDataReader clone = (DefaultDataReader) super.clone();
+// Make sure we don't share the same codec between two readers.
+clone.codec = OrcCodecPool.getCodec(clone.compressionKind);
--- End diff --

super.clone() is Object.clone(), so no 


---


[GitHub] orc pull request #222: ORC-310 better error handling for codec

2018-03-01 Thread sershe
Github user sershe commented on a diff in the pull request:

https://github.com/apache/orc/pull/222#discussion_r171728763
  
--- Diff: java/core/src/java/org/apache/orc/impl/ReaderImpl.java ---
@@ -472,8 +473,9 @@ public static OrcTail extractFileTail(ByteBuffer 
buffer, long fileLength, long m
 .setPostscript(ps)
 .setFooter(footer)
 .setFileLength(fileLength);
+  isCodecError = false;
 } finally {
--- End diff --

existing code


---


[GitHub] orc pull request #222: ORC-310 better error handling for codec

2018-03-01 Thread sershe
Github user sershe commented on a diff in the pull request:

https://github.com/apache/orc/pull/222#discussion_r171728816
  
--- Diff: java/core/src/java/org/apache/orc/impl/WriterImpl.java ---
@@ -645,6 +645,8 @@ public void 
appendUserMetadata(List userMetadata) {
 return ReaderImpl.deserializeStats(builder.getStatisticsList());
   }
 
+  // TODO: remove this
--- End diff --

Removed the attribute, clarified the TODO


---


[GitHub] orc issue #222: ORC-310 better error handling for codec

2018-03-01 Thread sershe
Github user sershe commented on the issue:

https://github.com/apache/orc/pull/222
  
Updated the JIRA with motivation. 
I will rename the flag; there isn't a better way primarily because of the 
TODOs you are asking me to remove - we don't have access to information about 
errors if the user and the return-er of the codec are two different pieces of 
code at different times.
There's also no good way to check the state of the codec to see if it's 
valid or not. Hadoop ZLib codec may just throw NPE in reset when it's invalid, 
so the "Safely" catch block will handle that case. However it's nice to give 
user an opportunity to be proactive about this, esp. in the case of the 
get-use-return usage pattern



---


[GitHub] orc pull request #222: ORC-310 better error handling for codec

2018-02-28 Thread sershe
GitHub user sershe opened a pull request:

https://github.com/apache/orc/pull/222

ORC-310 better error handling for codec



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/sershe/orc orc-310

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/orc/pull/222.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #222


commit d9727cb36c9b1e9f1c045e29d928401a680062cb
Author: sergey 
Date:   2018-03-01T00:00:51Z

ORC-310
better error handling for codec




---


[GitHub] orc pull request #102: ORC-166 : add codec pool to ORC; make sure end is cal...

2017-03-20 Thread sershe
GitHub user sershe opened a pull request:

https://github.com/apache/orc/pull/102

ORC-166 : add codec pool to ORC; make sure end is called on underlyin…

…g codecs (Sergey Shelukhin)

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/sershe/orc master-166

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/orc/pull/102.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #102


commit dd6cab70e37c7eb0ba2c7dbac78d463b1f33c873
Author: Sergey Shelukhin 
Date:   2017-03-21T02:13:06Z

ORC-166 : add codec pool to ORC; make sure end is called on underlying 
codecs (Sergey Shelukhin)




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] orc pull request: ORC-55. Resynchronize storage-api and orc with t...

2016-05-24 Thread sershe
Github user sershe commented on the pull request:

https://github.com/apache/orc/pull/25#issuecomment-221338899
  
+1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---