Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-2857

libhdfs: no way to set JVM args other than classpath

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.16.0
    • 0.18.0
    • None
    • None
    • Reviewed

    Description

      I would like a way to set other Java system properties and/or other Java VM arguments when using libhdfs - i.e. I want to be able to say start a profiler, attach a debugger, or increase the memory available to the VM.

      At present, new JVMs are initialised from the getJNIEnv(void) method in src/c++/libhdfs/hdfsJniHelper.c
      This method initialises the -Djava.class.path JVM argument from the CLASSPATH environment variable. I am proposing that another env variable should be added, the contents of which is passed (almost) verbatim as JVM arguments.

      Eg, say the env var JVM_ARGS is used. The string from the env var would be tokenised on "one or more spaces", and would be passed as additional JVM arguments, by make a larger JavaVMOption options[] array, and setting vm_args.nOptions = 1+ number of passed arguments.

      Only flaw I can see with this is that none of the passed parameters can contain spaces.

      Attachments

        1. v2.patch.libhdfs.jvm.args
          3 kB
          Craig Macdonald
        2. patch.libhdfs.jvm.args
          2 kB
          Craig Macdonald

        Activity

          People

            craigm Craig Macdonald
            craigm Craig Macdonald
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5h
                5h
                Remaining:
                Remaining Estimate - 5h
                5h
                Logged:
                Time Spent - Not Specified
                Not Specified