Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.4.0
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Wrote a test that goes through the "hdfs dfsadmin -???" commands and makes sure no errors are returned as well as checking some functionality.

      1. bigtop-620.patch
        8 kB
        Sujay Rau
      2. bigtop-620.patch
        8 kB
        Sujay Rau

        Activity

        Hide
        Roman Shaposhnik added a comment -

        +1 and commited!

        Show
        Roman Shaposhnik added a comment - +1 and commited!
        Hide
        Sujay Rau added a comment -

        fixed package issue

        Show
        Sujay Rau added a comment - fixed package issue
        Hide
        Sujay Rau added a comment -

        Updated patch

        Show
        Sujay Rau added a comment - Updated patch
        Hide
        Roman Shaposhnik added a comment -

        Sorry for the belated reply (Hadoop summit). And sorry for not explaining Shell functionality – basically you don't need to do sudo once you've created a shell under particular user. IOW, the following:

        sh.exec("sudo -u hdfs hdfs dfsadmin -report"); 
        

        should be

        shHDFS.exec("hdfs dfsadmin -report"); 
        

        but the shell should be create like this:

        static Shell shHDFS = new Shell("/bin/bash", "hdfs");
        

        To answer your earlier question: the tests can't assume that they run on the NameNode, everything else should be fine.

        At some point we might need to introduce a feature that would let us classify the tests into buckets that are potentially destructive to the environment and the safe ones. But this is an open question of how to do easy-to-use testsuite creation.

        Show
        Roman Shaposhnik added a comment - Sorry for the belated reply (Hadoop summit). And sorry for not explaining Shell functionality – basically you don't need to do sudo once you've created a shell under particular user. IOW, the following: sh.exec("sudo -u hdfs hdfs dfsadmin -report"); should be shHDFS.exec("hdfs dfsadmin -report"); but the shell should be create like this: static Shell shHDFS = new Shell("/bin/bash", "hdfs"); To answer your earlier question: the tests can't assume that they run on the NameNode, everything else should be fine. At some point we might need to introduce a feature that would let us classify the tests into buckets that are potentially destructive to the environment and the safe ones. But this is an open question of how to do easy-to-use testsuite creation.
        Hide
        Sujay Rau added a comment -

        Updated patch by your suggestions.

        Show
        Sujay Rau added a comment - Updated patch by your suggestions.
        Hide
        Sujay Rau added a comment -

        Yes it does, unless switching in and out of safemode during the test messes things up.

        And kind of on that topic, are my tests allowed to, for example, shut down hdfs and restart it?

        Show
        Sujay Rau added a comment - Yes it does, unless switching in and out of safemode during the test messes things up. And kind of on that topic, are my tests allowed to, for example, shut down hdfs and restart it?
        Hide
        Roman Shaposhnik added a comment -

        Could you please update your patch to use Bigtop's Shell utility class? This is mainly to not expose the details of assuming a different user identity, instead:

        static Shell shRoot = new Shell("/bin/bash", "root");
        

        Let me know if you have any questions.

        Oh, and does your test leave NN in a usable state?

        Show
        Roman Shaposhnik added a comment - Could you please update your patch to use Bigtop's Shell utility class? This is mainly to not expose the details of assuming a different user identity, instead: static Shell shRoot = new Shell("/bin/bash", "root"); Let me know if you have any questions. Oh, and does your test leave NN in a usable state?
        Hide
        Sujay Rau added a comment -

        Added the patch for my test.

        Show
        Sujay Rau added a comment - Added the patch for my test.

          People

          • Assignee:
            Sujay Rau
            Reporter:
            Sujay Rau
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development