[
https://issues.apache.org/jira/browse/HADOOP-10838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14096183#comment-14096183
]
Todd Lipcon commented on HADOOP-10838:
--------------------------------------
Patch looks good except for one small issue:
{code}
+ if (unlikely(ret == INVALID_CHECKSUM_DETECTED)) {
+ long pos = base_pos + (error_data.bad_data - data) + checksumNum *
+ bytes_per_checksum;
+ throw_checksum_exception(
+ env, error_data.got_crc, error_data.expected_crc,
+ j_filename, pos);
+ } else if (unlikely(ret != CHECKSUMS_VALID)) {
+ THROW(env, "java/lang/AssertionError",
+ "Bad response code from native bulk_verify_crc");
+ }
{code}
In both of these error conditions, you need a 'return', or else you'll go back
through the loop again. That would likely cause a crash -- it's illegal to make
most JNI calls while an exception is pending.
+1 once that's addressed
> Byte array native checksumming
> ------------------------------
>
> Key: HADOOP-10838
> URL: https://issues.apache.org/jira/browse/HADOOP-10838
> Project: Hadoop Common
> Issue Type: Improvement
> Components: performance
> Reporter: James Thomas
> Assignee: James Thomas
> Attachments: HADOOP-10838.2.patch, HADOOP-10838.3.patch,
> HADOOP-10838.patch, HDFS-3528.patch, HDFS-6560.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)