Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-1978

All but first option in LIBHDFS_OPTS is ignored

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.21.0
    • 0.22.0
    • libhdfs
    • None
    • RHEL 5.5
      JDK 1.6.0_24

    • Reviewed

    Description

      In getJNIEnv, we go though LIBHDFS_OPTS with strok and count the number of args. Then create an array of options based on that information. But when we actually setup the options we only the first arg. I believe the fix is pasted inline.

      Index: src/c++/libhdfs/hdfsJniHelper.c
      ===================================================================
      --- src/c++/libhdfs/hdfsJniHelper.c	(revision 1124544)
      +++ src/c++/libhdfs/hdfsJniHelper.c	(working copy)
      @@ -442,6 +442,7 @@
                   int argNum = 1;
                   for (;argNum < noArgs ; argNum++) {
                       options[argNum].optionString = result; //optHadoopArg;
      +                result = strtok( NULL, jvmArgDelims);
                   }
               }
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            eli Eli Collins Assign to me
            brocknoland Brock Noland
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment