Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-1257

Make TestHadoopExamples modular enough to support longevity tests.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.8.0
    • Component/s: tests
    • Labels:
      None

      Description

      TestHadoopExamples is really just a super of what we eventually will add in the Longevity suite. It will be good to create a super class, then, which wraps the hadoop examples jars, whic BOTH the smoke tests AND longevity tests can both use and customize to suite their needs.

      Advantages:

      • less code duplication
      • easier to add in new longevity tests
      • longevity tests focus on customizing , rather than defining the tests classes.

      We can go about this two ways:

      1) Use the approach of TestHadoopExamples: define all examples in a k/v map, with parameters or

      2) Write individual unit tests for each benchmark (i.e. TestDFSIO), as is done in Dasha's BIGTOP-1208 patch.

      Part of this JIRA i think is to audit the longevity suite for other duplications, to see where we can merge efforts.

      1. BIGTOP-1257.patch
        1 kB
        Dasha Boudnik
      2. BIGTOP-1257.patch
        2 kB
        Dasha Boudnik
      3. BIGTOP-1257-README.patch
        0.9 kB
        Konstantin Boudnik
      4. BIGTOP-1257-README.patch
        1.0 kB
        Dasha Boudnik
      5. BIGTOP-1257-README.patch
        0.7 kB
        Dasha Boudnik
      6. BIGTOP-1257-README.patch
        0.5 kB
        Dasha Boudnik

        Activity

        Hide
        cos Konstantin Boudnik added a comment -

        Great minds think alike apparently I've asking Dasha to look into how we can suite up (as in test suite) longevity runs. My line of thinking was to have a JUnit Suite class that will combine DFSIO, SLive (possibly others) so that one can variate the load and time of the runs by simply setting some external parameters.

        Looks like you're thinking of reusing some of the hadoop examples for the same purpose, right? I presume you have an aim at teragen/terasort and others of the kind?

        Show
        cos Konstantin Boudnik added a comment - Great minds think alike apparently I've asking Dasha to look into how we can suite up (as in test suite) longevity runs. My line of thinking was to have a JUnit Suite class that will combine DFSIO, SLive (possibly others) so that one can variate the load and time of the runs by simply setting some external parameters. Looks like you're thinking of reusing some of the hadoop examples for the same purpose, right? I presume you have an aim at teragen/terasort and others of the kind?
        Hide
        jayunit100 jay vyas added a comment - - edited

        Yup ! Well, I see that Dasha's patch does some things better than HadoopExamples (its got great fine grained control). But its build specific to DFSIO. So im basically suggesting that we have one super class, which is a wrapper to hadoop-examples-jar, and then all hadoop-examples tests (DFSIO, TestHadoopExamples, etc...) can use it as a utility to drive their speicif cimplementations of word count, DFSIO, teragen, etc.

        So maybe :

        • The Suite: is "TestHadoopExamples"
        • Run the Suite with "longevity" configuration: You get dasha's tests.
        • Run the Suite with "smoke" configuration: You get VM scaled tests.
        Show
        jayunit100 jay vyas added a comment - - edited Yup ! Well, I see that Dasha's patch does some things better than HadoopExamples (its got great fine grained control). But its build specific to DFSIO. So im basically suggesting that we have one super class, which is a wrapper to hadoop-examples-jar, and then all hadoop-examples tests (DFSIO, TestHadoopExamples, etc...) can use it as a utility to drive their speicif cimplementations of word count, DFSIO, teragen, etc. So maybe : The Suite: is "TestHadoopExamples" Run the Suite with "longevity" configuration: You get dasha's tests. Run the Suite with "smoke" configuration: You get VM scaled tests.
        Hide
        jayunit100 jay vyas added a comment - - edited

        (cleanup horrible typos)
        TL;DR : Are we in agreement that a superclass test suite can be used to drive both longevity AND regular hadoop examples? (i.e. lets call it "AbstractHadoopExamplesSuite"),

        And then have:

        • "TestHadoopExamples extends AbstractHadoopExamplesSuite" ?
        • And later in a next iteration, have "TestLongevityHadoopExamples extends AbstractHadoopExamplesSuite".
        Show
        jayunit100 jay vyas added a comment - - edited (cleanup horrible typos) TL;DR : Are we in agreement that a superclass test suite can be used to drive both longevity AND regular hadoop examples? (i.e. lets call it "AbstractHadoopExamplesSuite"), And then have: "TestHadoopExamples extends AbstractHadoopExamplesSuite" ? And later in a next iteration, have "TestLongevityHadoopExamples extends AbstractHadoopExamplesSuite".
        Hide
        cos Konstantin Boudnik added a comment - - edited

        I'd say it is enough to have longevity to be the child of examples, no?

        What's calling for an extra abstraction?

        Show
        cos Konstantin Boudnik added a comment - - edited I'd say it is enough to have longevity to be the child of examples, no? What's calling for an extra abstraction?
        Hide
        jayunit100 jay vyas added a comment -

        Sure thats a good start. But I guess TestHadoopExamples will still be a large class that isnt quite as easy to customize. But its a good start . So shall we define that as the task :

        • Refactor TestHadoopExamples so that each run test call in the K:V mapping can easily be overriden in a subclass.
        • Also add parameters where necessary so that any Longevity tests can be written in a class that extends TestHadoopExamples.
        Show
        jayunit100 jay vyas added a comment - Sure thats a good start. But I guess TestHadoopExamples will still be a large class that isnt quite as easy to customize. But its a good start . So shall we define that as the task : Refactor TestHadoopExamples so that each run test call in the K:V mapping can easily be overriden in a subclass. Also add parameters where necessary so that any Longevity tests can be written in a class that extends TestHadoopExamples.
        Hide
        cos Konstantin Boudnik added a comment -

        Sounds about right I guess. Let's see a patch, perhaps?

        Show
        cos Konstantin Boudnik added a comment - Sounds about right I guess. Let's see a patch, perhaps?
        Hide
        dasha.boudnik Dasha Boudnik added a comment -

        Patch for parameterization of TestHadoopExamples

        Show
        dasha.boudnik Dasha Boudnik added a comment - Patch for parameterization of TestHadoopExamples
        Hide
        dasha.boudnik Dasha Boudnik added a comment -

        Whitespaces fixed

        Show
        dasha.boudnik Dasha Boudnik added a comment - Whitespaces fixed
        Hide
        cos Konstantin Boudnik added a comment -

        Would you mind updating the bigtop-tests/test-artifacts/hadoop/README to reflect new system property addition so we can commit it?

        Show
        cos Konstantin Boudnik added a comment - Would you mind updating the bigtop-tests/test-artifacts/hadoop/README to reflect new system property addition so we can commit it?
        Hide
        dasha.boudnik Dasha Boudnik added a comment - - edited

        Patch for README file attached.

        Show
        dasha.boudnik Dasha Boudnik added a comment - - edited Patch for README file attached.
        Hide
        cos Konstantin Boudnik added a comment -

        Could you please add a short example too?

        Show
        cos Konstantin Boudnik added a comment - Could you please add a short example too?
        Hide
        dasha.boudnik Dasha Boudnik added a comment -

        Readme with examples for system properties.

        Show
        dasha.boudnik Dasha Boudnik added a comment - Readme with examples for system properties.
        Hide
        cos Konstantin Boudnik added a comment -

        Sorry for not making it clear right away, but could you please format the new text to be no longer than 80 characters? Thank you!

        Show
        cos Konstantin Boudnik added a comment - Sorry for not making it clear right away, but could you please format the new text to be no longer than 80 characters? Thank you!
        Hide
        dasha.boudnik Dasha Boudnik added a comment -

        Attached.

        Show
        dasha.boudnik Dasha Boudnik added a comment - Attached.
        Hide
        cos Konstantin Boudnik added a comment -

        +1
        will commit it in a moment.

        Show
        cos Konstantin Boudnik added a comment - +1 will commit it in a moment.
        Hide
        cos Konstantin Boudnik added a comment -

        hmm... I can't apply the patch. Could you make sure you have uploaded the correct file?

        Show
        cos Konstantin Boudnik added a comment - hmm... I can't apply the patch. Could you make sure you have uploaded the correct file?
        Hide
        cos Konstantin Boudnik added a comment -

        Weird, I have manually applied your changes and produced a new patch (attached) which is seemingly identical to yours except that I can apply it now.

        Anyway, committing now

        Show
        cos Konstantin Boudnik added a comment - Weird, I have manually applied your changes and produced a new patch (attached) which is seemingly identical to yours except that I can apply it now. Anyway, committing now
        Hide
        cos Konstantin Boudnik added a comment -

        Committed to the master. Thanks Dasha!

        Show
        cos Konstantin Boudnik added a comment - Committed to the master. Thanks Dasha!

          People

          • Assignee:
            dasha.boudnik Dasha Boudnik
            Reporter:
            jayunit100 jay vyas
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development