Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19770

Add '--return-values' option to Shell to print return values of commands in interactive mode

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 2.0.0-beta-2, 1.4.2, 2.0.0
    • shell
    • None
    • Reviewed
    • Hide
      Introduces a new option to the HBase shell: -r, --return-values. When the shell is in "interactive" mode (default), the return value of shell commands are not returned to the user as they dirty the console output. For those who desire this functionality, the "--return-values" option restores the old functionality of the commands passing their return value to the user.
      Show
      Introduces a new option to the HBase shell: -r, --return-values. When the shell is in "interactive" mode (default), the return value of shell commands are not returned to the user as they dirty the console output. For those who desire this functionality, the "--return-values" option restores the old functionality of the commands passing their return value to the user.

    Description

      Another good find by our Romil.

      hbase(main):001:0> list
      TABLE
      a
      1 row(s)
      Took 0.8385 seconds
      hbase(main):002:0> tables=list
      TABLE
      a
      1 row(s)
      Took 0.0267 seconds
      hbase(main):003:0> puts tables
      
      hbase(main):004:0> p tables
      nil
      

      The list command should be returning ['a'] but is not.

      The command class itself appears to be doing the right thing – maybe the retval is getting lost somewhere else?

      FYI stack.

      Attachments

        1. HBASE-19770.ADDENDUM.branch-2.patch
          0.8 kB
          Josh Elser
        2. HBASE-19770.004.branch-2.patch
          5 kB
          Josh Elser
        3. HBASE-19770.003.branch-2.patch
          5 kB
          Josh Elser
        4. HBASE-19770.002.branch-2.patch
          4 kB
          Josh Elser
        5. HBASE-19770.001.branch-2.patch
          3 kB
          Josh Elser
        6. HBASE-19770.000.branch-2.addendum.patch
          0.8 kB
          Josh Elser

        Issue Links

          Activity

            People

              elserj Josh Elser
              romil.choksi Romil Choksi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: