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

Duplicate classes in chukwa-core jar

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The chukwa_jar target is creating a jar with duplicate classes in it. Specifically, 118 org.apache.hadoop.chukwa.datacollection classes appear twice.

        Activity

        Hide
        billgraham Bill Graham added a comment -

        Attached is a patch. I've run the following commands on jars created with aand without the patch to verify:

        $ jar tvf chukwa-core-0.4.0.jar | grep "2010 .*\.class" | wc -l                 
        546
        $ jar tvf chukwa-core-0.4.0.jar | grep "2010 .*\.class" | sort | uniq | wc -l
        428
        $ jar tvf chukwa-core-0.4.0-patched.jar | grep "2010 .*\.class" | wc -l         
        428
        $ jar tvf chukwa-core-0.4.0-patched.jar | grep "2010 .*\.class" | sort | uniq | wc -l
        428
        $ jar tvf chukwa-core-0.4.0.jar | grep "2010 .*\.class" | sort | uniq > nopatch-deduped.txt
        $ jar tvf chukwa-core-0.4.0.jar | grep "2010 .*\.class" | sort > nopatch-dups.txt
        $ jar tvf chukwa-core-0.4.0-patched.jar | grep "2010 .*\.class" | sort > patched.txt 
        
        $ diff nopatch-deduped.txt patched.txt
        [ nothing ] 
        $ diff nopatch-deduped.txt nopatch-dups.txt
        [ 118 classes ]
        
        Show
        billgraham Bill Graham added a comment - Attached is a patch. I've run the following commands on jars created with aand without the patch to verify: $ jar tvf chukwa-core-0.4.0.jar | grep "2010 .*\.class" | wc -l 546 $ jar tvf chukwa-core-0.4.0.jar | grep "2010 .*\.class" | sort | uniq | wc -l 428 $ jar tvf chukwa-core-0.4.0-patched.jar | grep "2010 .*\.class" | wc -l 428 $ jar tvf chukwa-core-0.4.0-patched.jar | grep "2010 .*\.class" | sort | uniq | wc -l 428 $ jar tvf chukwa-core-0.4.0.jar | grep "2010 .*\.class" | sort | uniq > nopatch-deduped.txt $ jar tvf chukwa-core-0.4.0.jar | grep "2010 .*\.class" | sort > nopatch-dups.txt $ jar tvf chukwa-core-0.4.0-patched.jar | grep "2010 .*\.class" | sort > patched.txt $ diff nopatch-deduped.txt patched.txt [ nothing ] $ diff nopatch-deduped.txt nopatch-dups.txt [ 118 classes ]
        Hide
        asrabkin Ari Rabkin added a comment -

        OK. I committed this. Thanks, Bill.

        Show
        asrabkin Ari Rabkin added a comment - OK. I committed this. Thanks, Bill.

          People

          • Assignee:
            billgraham Bill Graham
            Reporter:
            billgraham Bill Graham
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development