[
https://issues.apache.org/jira/browse/HADOOP-11887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14529604#comment-14529604
]
Kai Zheng commented on HADOOP-11887:
------------------------------------
Thanks Yi for taking care of this.
Thanks Colin for the review and great comments.
bq. Why are these variables global? Why is load_erasure_code_lib returning a
value that no functions are checking?
Yes I should and could avoid these global variables. {{load_erasure_code_lib}}
doesn't report exception but returns error that's to be checked by the caller.
The caller may just display the error (in pure native tool) or throw exception
with the error (in JNI Java). This patch was introducing ISA-L and setting up
the basic things to prepare for native erasure coders (Ref. HADOOP-11540), and
the main codes using this setup and calling the function will be attached
elsewhere.
bq. In general, we shouldn't have every function calling load_erasure_code_lib.
Instead, a static block in the java file should call load_erasure_code_lib once
on startup. If the function fails, it needs to raise a JNI exception.
I agree and will avoid calling the function in every exposed API. In native
coders (like patch to be attached in HADOOP-11540) the Java code does as you
suggested.
bq. I would really prefer not to change org_apache_hadoop.h here just for the
sake of a unit test. Let's just not call these functions if we aren't using JNI.
OK, maybe I could move the changes to it out of there. I put the change there
in case there could be similar situations like this (invoking a native call in
non-JNI environment) in future.
bq. Should this default to true? I don't think any Linux distros provide this
library, so it's important to bundle it.
I agree. ISA-L isn't something very general, and bundling it would be easier in
most cases.
Will update the patch accordingly. Thanks.
> Introduce Intel ISA-L erasure coding library for the native support
> -------------------------------------------------------------------
>
> Key: HADOOP-11887
> URL: https://issues.apache.org/jira/browse/HADOOP-11887
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: io
> Reporter: Kai Zheng
> Assignee: Kai Zheng
> Attachments: HADOOP-11887-v1.patch
>
>
> This is to introduce Intel ISA-L erasure coding library for the native
> support, via dynamic loading mechanism (dynamic module, like *.so in *nix and
> *.dll on Windows).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)