|
[
Permlink
| « Hide
]
Craig Macdonald added a comment - 22/Feb/08 01:04 PM
Patch attached. Arguments are read from HADOOP_JVM_ARGS env var, space delimited. Applies cleanly to trunk and 0.16 branch.
There's already a HADOOP_OPTS environment variable that's used by other scripts when starting Java. If these are meant to be libhdfs-specific options, then the environment variable name should make that clear. Thus it might be called LIBHDFS_OPTS.
I'm quite happy to rename the variable. To HADOOP_OPTS would make most sense to me, as the options that can be set (any JVM args including System properties etc, memory consumption, etc), are exactly the same as someone might set for Hadoop, so why should it be any different to HADOOP_OPTS? A user of a C application that uses libhdfs might not know that it's libhdfs that the C application uses, but rather just Hadoop in general, so HADOOP_OPTS might be better than LIBHDFS_OPTS. However, I'm happy to take arguments either way.
Make the call on the env vaar name, and can anyone provide feedback - I'm not a natural C coder. Should I be using strtok_r instead of strtok? Do I need to do the tokenisation twice? Corrected env var name as per Doug's suggestion; Added code documentation for the affected method, describing added env var.
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12380413/v2.patch.libhdfs.jvm.args against trunk revision 645773. @author +1. The patch does not contain any @author tags. tests included -1. The patch doesn't appear to include any new or modified tests. javadoc +1. The javadoc tool did not generate any warning messages. javac +1. The applied patch does not generate any new javac compiler warnings. release audit +1. The applied patch does not generate any new release audit warnings. findbugs +1. The patch does not introduce any new Findbugs warnings. core tests +1. The patch passed core unit tests. contrib tests +1. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/2266/testReport/ This message is automatically generated. Not sure that this patch needs tests. The libhdfs test harness creates a namenode then runs the entire test program once only.
I just committed this. Thanks, Craig!
ps. Next time please try to keep tabs out, they are set differently in different editors... Integrated in Hadoop-trunk #475 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/475/
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||