Hadoop Common
  1. Hadoop Common
  2. HADOOP-4060

[HOD] Make HOD to roll log files on the client

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.18.1
    • Component/s: contrib/hod
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      HOD client was modified to roll over client logs being written to the cluster directory. A new configuration parameter, hod.log-rollover-count, was introduced to specify how many rollover log files to retain.

      Description

      Currently HOD writes a log file on the client in the cluster directory, named hod-<username>.log. This file is appended to for each run of hod allocation that runs on the same cluster directory. Thus, the file can become quite large - particularly if the job is queued for a long time. If there are problems with the HOD client subsequently, this could result in stale file handles pointing to this large file, and cause disk space to fill up. Another problem is that a large log file is usually unusable for a user.

      1. HOD-LOG-ROTATION.txt
        3 kB
        Vinod Kumar Vavilapalli
      2. HOD-LOG-ROTATION.1.txt
        3 kB
        Vinod Kumar Vavilapalli

        Activity

        Hide
        Vinod Kumar Vavilapalli added a comment -

        Attaching a patch. This introduces a config parameter hod.log-rollover-count that takes the number of rolled-over logs that HOD client has to keep. It has to be a positive integer, defaults to 5. A zero value disables the roll-over and the log grows indefinitely (current behaviour). Rolled over logs have file-names of the form hod-%user.log.1, hod-%user.log.2 etc.

        Show
        Vinod Kumar Vavilapalli added a comment - Attaching a patch. This introduces a config parameter hod.log-rollover-count that takes the number of rolled-over logs that HOD client has to keep. It has to be a positive integer, defaults to 5. A zero value disables the roll-over and the log grows indefinitely (current behaviour). Rolled over logs have file-names of the form hod-%user.log.1, hod-%user.log.2 etc.
        Hide
        Hemanth Yamijala added a comment -

        One minor comment. Since the new config option is publicly visible in hod --help, it should be given a fixed small option in the help, like the other options. Currently, we are automatically assigning a free character to it, and it is always coming as -g, but this is not required, for e.g. if we add new options.

        Otherwise +1 for the patch.

        Show
        Hemanth Yamijala added a comment - One minor comment. Since the new config option is publicly visible in hod --help, it should be given a fixed small option in the help, like the other options. Currently, we are automatically assigning a free character to it, and it is always coming as -g, but this is not required, for e.g. if we add new options. Otherwise +1 for the patch.
        Hide
        Vinod Kumar Vavilapalli added a comment -

        New patch adding a short option -L for --hod.log-rollover-count.

        Show
        Vinod Kumar Vavilapalli added a comment - New patch adding a short option -L for --hod.log-rollover-count.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12389551/HOD-LOG-ROTATION.1.txt
        against trunk revision 692335.

        +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 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/3185/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3185/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3185/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3185/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12389551/HOD-LOG-ROTATION.1.txt against trunk revision 692335. +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 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/3185/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3185/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3185/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3185/console This message is automatically generated.
        Hide
        Hemanth Yamijala added a comment -

        The core test failures are not related to HOD.

        Show
        Hemanth Yamijala added a comment - The core test failures are not related to HOD.
        Hide
        Hemanth Yamijala added a comment -

        I just committed this to trunk. Thanks, Vinod.

        Can someone with access please commit this to the 0.18 branch also ? The revision number for trunk is 693705. I verified it merges cleanly.

        Show
        Hemanth Yamijala added a comment - I just committed this to trunk. Thanks, Vinod. Can someone with access please commit this to the 0.18 branch also ? The revision number for trunk is 693705. I verified it merges cleanly.
        Hide
        Hudson added a comment -
        Show
        Hudson added a comment - Integrated in Hadoop-trunk #600 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/600/ )
        Hide
        Nigel Daley added a comment -

        Commit merged to branch-0.18.

        Show
        Nigel Daley added a comment - Commit merged to branch-0.18.
        Hide
        Vinod Kumar Vavilapalli added a comment -

        The change is backwards compatible. A value of zero for -L brings back the old behaviour.

        Show
        Vinod Kumar Vavilapalli added a comment - The change is backwards compatible. A value of zero for -L brings back the old behaviour.

          People

          • Assignee:
            Vinod Kumar Vavilapalli
            Reporter:
            Hemanth Yamijala
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development