Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-24901 Create versatile hbase-shell table formatter #2282

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

bitoffdev
Copy link
Contributor

Resolves https://issues.apache.org/jira/browse/HBASE-24901

Changelog

  • Add new abstract ::Shell::Formatter::TableFormatter implemented by
    AlignedTableFormatter, UnalignedTableFormatter, and JsonTableFormatter
  • Create ::Shell::Formatter::Util with common helper methods like to_iso_8601
    and set_text_width.
  • Create formatting mixins for commands with similar output requirements
    including snapshots and cell scanners.

- Add new abstract ::Shell::Formatter::TableFormatter implemented by
  AlignedTableFormatter, UnalignedTableFormatter, and JsonTableFormatter
- Create ::Shell::Formatter::Util with common helper methods like to_iso_8601
  and set_text_width.
- Create formatting mixins for commands with similar output requirements
  including snapshots and cell scanners.
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 6s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 20s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 7s Maven dependency ordering for patch
-0 ⚠️ rubocop 1m 18s The patch generated 150 new + 370 unchanged - 93 fixed = 520 total (was 463)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
+1 💚 asflicense 0m 20s The patch does not generate ASF License warnings.
4m 32s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #2282
Optional Tests dupname asflicense rubocop
uname Linux 6b48c4c0d366 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 1164531
rubocop https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/artifact/yetus-general-check/output/diff-patch-rubocop.txt
Max. process+thread count 47 (vs. ulimit of 12500)
modules C: . hbase-shell U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) rubocop=0.80.0
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@saintstack saintstack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skimmed. Its lovely.

How does json formatter deal w/ binary chars?

hbase-shell/src/main/ruby/hbase/table.rb Show resolved Hide resolved
hbase-shell/src/main/ruby/shell/commands/list_peers.rb Outdated Show resolved Hide resolved
hbase-shell/src/main/ruby/shell/formatter.rb Outdated Show resolved Hide resolved
@bitoffdev
Copy link
Contributor Author

Skimmed. Its lovely.

How does json formatter deal w/ binary chars?

The JSON formatter takes advantage of Ruby's builtin JSON.dump method to serialize individual keys and values (not the whole table at once). This method will escape any text (including binary characters) such that the output is valid JSON.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 6s Docker mode activated.
-0 ⚠️ yetus 0m 4s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for branch
+1 💚 mvninstall 4m 10s master passed
-0 ⚠️ javadoc 0m 18s root in master failed.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 4m 1s the patch passed
-0 ⚠️ javadoc 0m 16s root in the patch failed.
_ Other Tests _
+1 💚 unit 172m 23s root in the patch passed.
186m 34s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #2282
Optional Tests javac javadoc unit
uname Linux acec7e92e766 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 1164531
Default Java 2020-01-14
javadoc https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-root.txt
javadoc https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/testReport/
Max. process+thread count 6737 (vs. ulimit of 12500)
modules C: hbase-shell . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 27s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 23s Maven dependency ordering for branch
+1 💚 mvninstall 3m 40s master passed
+1 💚 javadoc 2m 15s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 3m 24s the patch passed
+1 💚 javadoc 2m 15s the patch passed
_ Other Tests _
-1 ❌ unit 256m 41s root in the patch failed.
271m 48s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #2282
Optional Tests javac javadoc unit
uname Linux d653cbb7f17f 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 1164531
Default Java 1.8.0_232
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/testReport/
Max. process+thread count 4562 (vs. ulimit of 12500)
modules C: hbase-shell . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/1/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

- Switch default TableFormatter to UnalignedTableFormatter. The current
  implementation of AlignedTableFormatter will truncate output cells that are
  too long, so it is not the best formatter to use by default.
- Remove extra specifications of num_cols from commands and allow
  TableFormatter to derive this attribute from headers and widths.
- Set default padding of UnalignedTableFormatter to zero
- Document AlignedTableFormatter#refresh_column_widths
- Use TableFormatter for list command
- Add formatter note to in-shell help
- Add more testing of the three TableFormatter implementations
- Remove TableFormatterAdapter. It was nice to use during development, but I
  think having it around will only cause confusion in the future. It is better
  for commands to specifically opt-in to using the new TableFormatter.
- Expose all the TableFormatter toggles as keyword arguments to set_formatter
- Refactor TableFormatter to be more reusable such that we only instantiate one
  instance of TableFormatter for the entire shell
- Switch default formatter to AlignedTableFormatter, but change the default
  options to have no border and allow overflow. This will be more familiar to
  users
- Address a few rubocop issues
@bitoffdev
Copy link
Contributor Author

I updated the patch so that the default table formatter is much closer in output to the old style. The output is aligned, but with no borders and no values will be truncated. Instead, long values will just make the line longer (and will no longer line up with their respective column headers). I'll post some more screenshots in Jira shortly.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 9s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 7s Maven dependency ordering for patch
-0 ⚠️ rubocop 1m 23s The patch generated 122 new + 372 unchanged - 94 fixed = 494 total (was 466)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
+1 💚 asflicense 0m 19s The patch does not generate ASF License warnings.
4m 19s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #2282
Optional Tests dupname asflicense rubocop
uname Linux ad66d5091b32 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 5b515de
rubocop https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/artifact/yetus-general-check/output/diff-patch-rubocop.txt
Max. process+thread count 44 (vs. ulimit of 12500)
modules C: . hbase-shell U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) rubocop=0.80.0
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

- Use instance variable @widths instead of previous access pattern in
  AlignedTableFormatter
@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 4s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for branch
+1 💚 mvninstall 4m 12s master passed
-0 ⚠️ javadoc 0m 18s root in master failed.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 3m 54s the patch passed
-0 ⚠️ javadoc 0m 16s root in the patch failed.
_ Other Tests _
-1 ❌ unit 146m 55s root in the patch failed.
160m 0s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #2282
Optional Tests javac javadoc unit
uname Linux bcbacb0e1749 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 5b515de
Default Java 2020-01-14
javadoc https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-root.txt
javadoc https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-root.txt
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/testReport/
Max. process+thread count 3840 (vs. ulimit of 12500)
modules C: hbase-shell . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 39s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 24s Maven dependency ordering for branch
+1 💚 mvninstall 4m 13s master passed
+1 💚 javadoc 2m 33s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 4m 2s the patch passed
+1 💚 javadoc 2m 42s the patch passed
_ Other Tests _
-1 ❌ unit 328m 34s root in the patch failed.
345m 56s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #2282
Optional Tests javac javadoc unit
uname Linux 4d4f6de769e9 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 5b515de
Default Java 1.8.0_232
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/testReport/
Max. process+thread count 5827 (vs. ulimit of 12500)
modules C: hbase-shell . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/2/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 6s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 24s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 7s Maven dependency ordering for patch
-0 ⚠️ rubocop 1m 21s The patch generated 122 new + 372 unchanged - 94 fixed = 494 total (was 466)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
+1 💚 asflicense 0m 21s The patch does not generate ASF License warnings.
4m 25s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #2282
Optional Tests dupname asflicense rubocop
uname Linux d3500a1745eb 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 5b515de
rubocop https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/artifact/yetus-general-check/output/diff-patch-rubocop.txt
Max. process+thread count 46 (vs. ulimit of 12500)
modules C: . hbase-shell U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) rubocop=0.80.0
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 2s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for branch
+1 💚 mvninstall 4m 45s master passed
-0 ⚠️ javadoc 0m 16s root in master failed.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 4m 32s the patch passed
-0 ⚠️ javadoc 0m 14s root in the patch failed.
_ Other Tests _
+1 💚 unit 252m 6s root in the patch passed.
265m 57s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #2282
Optional Tests javac javadoc unit
uname Linux 5a83ec4fd089 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 5b515de
Default Java 2020-01-14
javadoc https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-root.txt
javadoc https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/testReport/
Max. process+thread count 4423 (vs. ulimit of 12500)
modules C: hbase-shell . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 57s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 25s Maven dependency ordering for branch
+1 💚 mvninstall 4m 11s master passed
+1 💚 javadoc 2m 40s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 4m 4s the patch passed
+1 💚 javadoc 2m 47s the patch passed
_ Other Tests _
-1 ❌ unit 342m 6s root in the patch failed.
359m 45s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #2282
Optional Tests javac javadoc unit
uname Linux 7744c92f3d42 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 5b515de
Default Java 1.8.0_232
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/testReport/
Max. process+thread count 5271 (vs. ulimit of 12500)
modules C: hbase-shell . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/3/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

- Allow TableFormatter#start_table and TableFormatter#close_table to take
  keyword arguments
- Rewrite set_formatter as instance of Command class
- Add compatibility option to set_formatter called "old school" and adapt all
  commands to respect this option
@bitoffdev
Copy link
Contributor Author

bitoffdev commented Aug 24, 2020

For compatibility, I added an option to use the HBase 1 formatter via set_formatter :old_school. This sets a flag on the Shell instance that lets commands know they should match the output of HBase 1 rather than use the new TableFormatter.

old_school is enabled by default

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 7s Maven dependency ordering for patch
-0 ⚠️ rubocop 1m 32s The patch generated 147 new + 371 unchanged - 95 fixed = 518 total (was 466)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
+1 💚 asflicense 0m 20s The patch does not generate ASF License warnings.
4m 53s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #2282
Optional Tests dupname asflicense rubocop
uname Linux c635daf24887 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / e0c9f91
rubocop https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/artifact/yetus-general-check/output/diff-patch-rubocop.txt
Max. process+thread count 43 (vs. ulimit of 12500)
modules C: . hbase-shell U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) rubocop=0.80.0
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 26s Docker mode activated.
-0 ⚠️ yetus 0m 4s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for branch
+1 💚 mvninstall 4m 14s master passed
-0 ⚠️ javadoc 0m 19s root in master failed.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 4m 15s the patch passed
-0 ⚠️ javadoc 0m 15s root in the patch failed.
_ Other Tests _
+1 💚 unit 170m 14s root in the patch passed.
183m 58s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #2282
Optional Tests javac javadoc unit
uname Linux 06420257d295 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / e0c9f91
Default Java 2020-01-14
javadoc https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-root.txt
javadoc https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/testReport/
Max. process+thread count 6349 (vs. ulimit of 12500)
modules C: hbase-shell . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 29s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 37s Maven dependency ordering for branch
+1 💚 mvninstall 3m 37s master passed
+1 💚 javadoc 2m 22s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 3m 28s the patch passed
+1 💚 javadoc 2m 25s the patch passed
_ Other Tests _
-1 ❌ unit 337m 21s root in the patch failed.
353m 2s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #2282
Optional Tests javac javadoc unit
uname Linux d6385ed034a5 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / e0c9f91
Default Java 1.8.0_232
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/testReport/
Max. process+thread count 6075 (vs. ulimit of 12500)
modules C: hbase-shell . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/4/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 3m 36s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 23s Maven dependency ordering for branch
_ Patch Compile Tests _
+0 🆗 mvndep 0m 7s Maven dependency ordering for patch
-0 ⚠️ rubocop 1m 34s The patch generated 147 new + 371 unchanged - 95 fixed = 518 total (was 466)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
_ Other Tests _
+1 💚 asflicense 0m 21s The patch does not generate ASF License warnings.
7m 10s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/5/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #2282
Optional Tests dupname asflicense rubocop
uname Linux a5bcc3a3a6e2 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 047e061
rubocop https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/5/artifact/yetus-general-check/output/diff-patch-rubocop.txt
Max. process+thread count 47 (vs. ulimit of 12500)
modules C: . hbase-shell U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/5/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) rubocop=0.80.0
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 3m 45s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 1m 49s Maven dependency ordering for branch
+1 💚 mvninstall 4m 43s master passed
-0 ⚠️ javadoc 0m 14s root in master failed.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 4m 38s the patch passed
-0 ⚠️ javadoc 0m 16s root in the patch failed.
_ Other Tests _
-1 ❌ unit 210m 38s root in the patch failed.
228m 44s
Subsystem Report/Notes
Docker Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/5/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #2282
Optional Tests javac javadoc unit
uname Linux f3b32de10ff8 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 047e061
Default Java 2020-01-14
javadoc https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/5/artifact/yetus-jdk11-hadoop3-check/output/branch-javadoc-root.txt
javadoc https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/5/artifact/yetus-jdk11-hadoop3-check/output/patch-javadoc-root.txt
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/5/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/5/testReport/
Max. process+thread count 3780 (vs. ulimit of 12500)
modules C: hbase-shell . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2282/5/console
versions git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f)
Powered by Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants