Uploaded image for project: 'Chukwa'
  1. Chukwa
  2. CHUKWA-7

chukwa agent should do something sensible if CHUKWA_HOME isn't defined

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5.0
    • Component/s: Data Collection
    • Labels:
      None

      Description

      If Chukwa is started in such a way that CHUKWA_HOME doesn't get set, then pid files are stored in chukwa/null/var.... This comes up if, e.g., the agent is started within eclipse. We can make this case look prettier by defaulting to /tmp.

      1. CHUKWA-7.patch
        2 kB
        Eric Yang
      2. fixPidFile.patch
        2 kB
        Ari Rabkin

        Activity

        Hide
        asrabkin Ari Rabkin added a comment -

        This is always irked me, out of proportion to its actual inconvenience and significance.

        Show
        asrabkin Ari Rabkin added a comment - This is always irked me, out of proportion to its actual inconvenience and significance.
        Hide
        asrabkin Ari Rabkin added a comment -

        No JUnit tests, since this only comes into play in situations with a very specific set of environment variables.

        Show
        asrabkin Ari Rabkin added a comment - No JUnit tests, since this only comes into play in situations with a very specific set of environment variables.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12400550/fixPidFile.patch
        against trunk revision 746274.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 Eclipse classpath. The patch retains Eclipse classpath integrity.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3888/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3888/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3888/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3888/console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12400550/fixPidFile.patch against trunk revision 746274. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3888/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3888/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3888/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3888/console This message is automatically generated.
        Hide
        eyang Eric Yang added a comment -

        I think if CHUKWA_HOME is not defined, we might want to bail out instead of using /tmp/chukwa as CHUKWA_HOME. This will make Chukwa less platform dependent.

        Show
        eyang Eric Yang added a comment - I think if CHUKWA_HOME is not defined, we might want to bail out instead of using /tmp/chukwa as CHUKWA_HOME. This will make Chukwa less platform dependent.
        Hide
        asrabkin Ari Rabkin added a comment -

        Hrm. I think bailing out is almost always the wrong thing. I don't want to drive away people who are just playing with Chukwa for the first time by making them do anything to set it up. Given that this is purely a fallback anyway (and given that all our other scripts tie us to POSIX!) I think it's okay to hardcode /tmp as a default.

        Show
        asrabkin Ari Rabkin added a comment - Hrm. I think bailing out is almost always the wrong thing. I don't want to drive away people who are just playing with Chukwa for the first time by making them do anything to set it up. Given that this is purely a fallback anyway (and given that all our other scripts tie us to POSIX!) I think it's okay to hardcode /tmp as a default.
        Hide
        asrabkin Ari Rabkin added a comment -

        Talked to Eric. Will use system default temp dir, instead of hardcoding path.

        Show
        asrabkin Ari Rabkin added a comment - Talked to Eric. Will use system default temp dir, instead of hardcoding path.
        Hide
        asrabkin Ari Rabkin added a comment -

        against new chukwa trunk.

        Show
        asrabkin Ari Rabkin added a comment - against new chukwa trunk.
        Hide
        eyang Eric Yang added a comment -

        It's still using /tmp.

        Show
        eyang Eric Yang added a comment - It's still using /tmp.
        Hide
        eyang Eric Yang added a comment -

        It probably should use:

        System.getProperty("java.io.tmpdir")

        Show
        eyang Eric Yang added a comment - It probably should use: System.getProperty("java.io.tmpdir")
        Hide
        asrabkin Ari Rabkin added a comment -

        Patch is stale at this point.

        Show
        asrabkin Ari Rabkin added a comment - Patch is stale at this point.
        Hide
        afathalla Ahmed Fathalla added a comment -

        Any updates about this issue? It seems a decision was almost reached but the patch was never committed.

        Show
        afathalla Ahmed Fathalla added a comment - Any updates about this issue? It seems a decision was almost reached but the patch was never committed.
        Hide
        eyang Eric Yang added a comment -

        Same patch revised for current trunk and use java.io.tmpdir.

        Show
        eyang Eric Yang added a comment - Same patch revised for current trunk and use java.io.tmpdir.
        Hide
        eyang Eric Yang added a comment -

        I just committed this, thanks all.

        Show
        eyang Eric Yang added a comment - I just committed this, thanks all.

          People

          • Assignee:
            asrabkin Ari Rabkin
            Reporter:
            asrabkin Ari Rabkin
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development