Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: scripts, shell
    • Labels:
      None

      Description

      Many of the admin utilities can potentially print a lot of output, but don't play nice with standard unix utilities like head. These tools should periodically check if the stdout pipe has been closed, and terminate appropriately, instead of continuing to execute and printing output that nobody will ever see.

      This check can be done using System.out.checkError().

        Issue Links

          Activity

          Hide
          mdrob Mike Drob added a comment -

          This patch illustrates places where a user may pipe the output to something like head or less. If other people have utilities that they use and would like better behaviour from, leave a comment. Otherwise, these are my main two, and I don't even know everything else that is out there.

          Show
          mdrob Mike Drob added a comment - This patch illustrates places where a user may pipe the output to something like head or less . If other people have utilities that they use and would like better behaviour from, leave a comment. Otherwise, these are my main two, and I don't even know everything else that is out there.
          Hide
          vines John Vines added a comment -

          I don't know too much about this, but it seems fine. If people want to see better behavior for other utilities, they can put in tickets down the road. I say ship it.

          Show
          vines John Vines added a comment - I don't know too much about this, but it seems fine. If people want to see better behavior for other utilities, they can put in tickets down the road. I say ship it.
          Hide
          elserj Josh Elser added a comment -

          +1

          Show
          elserj Josh Elser added a comment - +1
          Hide
          mdrob Mike Drob added a comment -

          I'm trying to figure out how to do this with the Shell too, since my common use cases for automation involve the -e and -f flags. However, JLine doesn't expose the underlying output stream to check for stream closed conditions, and this is further complicated by some commands optionally outputting to a separate file entirely.

          Show
          mdrob Mike Drob added a comment - I'm trying to figure out how to do this with the Shell too, since my common use cases for automation involve the -e and -f flags. However, JLine doesn't expose the underlying output stream to check for stream closed conditions, and this is further complicated by some commands optionally outputting to a separate file entirely.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit a1495e3829880c64fdf5eb1eb3bcc072b79701d1 in branch refs/heads/master from Mike Drob
          [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=a1495e3 ]

          ACCUMULO-1706 check for error on sysout

          Checking for error conditions inside of loops that use sysout in PrintInfo and FindOfflineTablets.

          Show
          jira-bot ASF subversion and git services added a comment - Commit a1495e3829880c64fdf5eb1eb3bcc072b79701d1 in branch refs/heads/master from Mike Drob [ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=a1495e3 ] ACCUMULO-1706 check for error on sysout Checking for error conditions inside of loops that use sysout in PrintInfo and FindOfflineTablets.
          Hide
          vines John Vines added a comment -

          You can always see about patching JLine to provide that functionality?

          Show
          vines John Vines added a comment - You can always see about patching JLine to provide that functionality?
          Hide
          vines John Vines added a comment -

          So is this wrapped? I see a commit a few days ago

          Show
          vines John Vines added a comment - So is this wrapped? I see a commit a few days ago
          Hide
          mdrob Mike Drob added a comment -

          Fixed for a couple of the admin utilities, will work with JLine separately to figure out how to solve the general case.

          Show
          mdrob Mike Drob added a comment - Fixed for a couple of the admin utilities, will work with JLine separately to figure out how to solve the general case.

            People

            • Assignee:
              mdrob Mike Drob
              Reporter:
              mdrob Mike Drob
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development