You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/10/08 20:26:02 UTC

[GitHub] [hbase] busbey opened a new pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

busbey opened a new pull request #2515:
URL: https://github.com/apache/hbase/pull/2515


   * removes some cruft from the hbase-shell pom that appears to be from coping the hbase-server pom long ago
   * puts the ruby scripts into the hbase-shell jar following the guide from jruby for packaging
   * removes hard coding the location of the implementation scripts from our runtime
   * removes hard coding the load path for the implementation from the test code (leaves hard coding the test code location)
   * provides a work around for a name conflict between our shell and the ruby stdlib shell.
   
   tested via unit tests:
   ```
   mvn -Dit.test=NoItTest -Dtest=NoUnitTests install && mvn --no-snapshot-updates -PrunAllTests -pl hbase-shell package 
   ```
   and via making an assembly:
   ```
   mvn --no-snapshot-updates -Dtest=NoUnitTests -Dit.test=NoItTests package assembly:single
   ```
   then testing with a stand alone cluster and using the shell with it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706900162


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   2m 41s |  Docker mode activated.  |
   | -0 :warning: |  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 :ok: |  mvndep  |   0m 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 30s |  master passed  |
   | +1 :green_heart: |  compile  |   3m 11s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 48s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 35s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 36s |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m  7s |  the patch passed  |
   | +1 :green_heart: |  javac  |   3m  7s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m 36s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 47s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 209m 15s |  root in the patch failed.  |
   |  |   | 252m 46s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/5/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 7a888c54f3e0 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 / 3d1aaa6632 |
   | Default Java | 2020-01-14 |
   | unit | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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-2515/5/testReport/ |
   | Max. process+thread count | 3556 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-705943792


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m  7s |  Docker mode activated.  |
   | -0 :warning: |  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 :ok: |  mvndep  |   0m 23s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m  2s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 34s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 10s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   2m 35s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 11s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 47s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 36s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 36s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m  7s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   2m 37s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 374m 53s |  root in the patch passed.  |
   |  |   | 411m 27s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 3e8aeaa91358 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 / bdcafa895c |
   | Default Java | 1.8.0_232 |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/1/testReport/ |
   | Max. process+thread count | 3952 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-705831620


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 34s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +0 :ok: |  shelldocs  |   0m  0s |  Shelldocs was not available.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  1s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 39s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   1m 57s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   8m 55s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 26s |  the patch passed  |
   | -0 :warning: |  checkstyle  |   1m 55s |  root: The patch generated 21 new + 0 unchanged - 0 fixed = 21 total (was 0)  |
   | -0 :warning: |  rubocop  |   0m 59s |  The patch generated 4 new + 1107 unchanged - 5 fixed = 1111 total (was 1112)  |
   | +1 :green_heart: |  shellcheck  |   0m  2s |  There were no new shellcheck issues.  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  xml  |   0m  4s |  The patch has no ill-formed XML file.  |
   | +1 :green_heart: |  hadoopcheck  |  17m  0s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.  |
   | +1 :green_heart: |  spotbugs  |   8m 57s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 40s |  The patch does not generate ASF License warnings.  |
   |  |   |  57m 32s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/1/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | dupname asflicense shellcheck shelldocs rubocop xml hadoopcheck spotbugs hbaseanti checkstyle |
   | uname | Linux 7246dc7e8d45 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 / bdcafa895c |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/1/artifact/yetus-general-check/output/diff-checkstyle-root.txt |
   | rubocop | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/1/artifact/yetus-general-check/output/diff-patch-rubocop.txt |
   | Max. process+thread count | 137 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/1/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) shellcheck=0.4.6 spotbugs=3.1.12 rubocop=0.80.0 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] busbey commented on a change in pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
busbey commented on a change in pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#discussion_r502685651



##########
File path: hbase-shell/pom.xml
##########
@@ -50,66 +44,22 @@
       </testResource>
     </testResources>
     <plugins>
-      <!-- Run with -Dmaven.test.skip.exec=true to build -tests.jar without running
-        tests (this is needed for upstream projects whose tests need this jar simply for
-        compilation) -->
-      <plugin>
-        <!--Make it so assembly:single does nothing in here-->
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <skipAssembly>true</skipAssembly>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
         <configuration>
           <archive>
             <manifest>
-              <mainClass>org/apache/hadoop/hbase/mapreduce/Driver</mainClass>
+              <mainClass>org.jruby.JarBootstrapMain</mainClass>
             </manifest>
           </archive>
-          <!-- Exclude these 2 packages, because their dependency _binary_ files
-            include the sources, and Maven 2.2 appears to add them to the sources to compile,
-            weird -->
-          <excludes>
-            <exclude>org/apache/jute/**</exclude>
-            <exclude>org/apache/zookeeper/**</exclude>
-            <exclude>**/*.jsp</exclude>
-            <exclude>hbase-site.xml</exclude>
-            <exclude>hdfs-site.xml</exclude>
-            <exclude>log4j.properties</exclude>
-            <exclude>mapred-queues.xml</exclude>
-            <exclude>mapred-site.xml</exclude>
-          </excludes>
         </configuration>
       </plugin>
       <!-- Make a jar and put the sources in the jar -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-source-plugin</artifactId>
       </plugin>
-      <!-- General ant tasks, bound to different build phases -->
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <!-- Add the generated sources -->
-          <execution>
-            <id>jspcSource-packageInfo-source</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>add-source</goal>
-            </goals>
-            <configuration>
-              <sources>
-                <source>${project.build.directory}/generated-jamon</source>
-                <source>${project.build.directory}/generated-sources/java</source>
-              </sources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>

Review comment:
       yeah. Those sources are things that we (maybe used to? maybe still do?) make in hbase-server that we have never made in hbase-shell.

##########
File path: hbase-shell/pom.xml
##########
@@ -50,66 +44,22 @@
       </testResource>
     </testResources>
     <plugins>
-      <!-- Run with -Dmaven.test.skip.exec=true to build -tests.jar without running
-        tests (this is needed for upstream projects whose tests need this jar simply for
-        compilation) -->
-      <plugin>
-        <!--Make it so assembly:single does nothing in here-->
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <skipAssembly>true</skipAssembly>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
         <configuration>
           <archive>
             <manifest>
-              <mainClass>org/apache/hadoop/hbase/mapreduce/Driver</mainClass>

Review comment:
       yeah I think it's from when we copied this pom out of hbase-server to create the hbase-shell module.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] busbey commented on a change in pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
busbey commented on a change in pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#discussion_r502685312



##########
File path: bin/hirb.rb
##########
@@ -15,217 +13,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-# File passed to org.jruby.Main by bin/hbase.  Pollutes jirb with hbase imports
-# and hbase  commands and then loads jirb.  Outputs a banner that tells user
-# where to find help, shell version, and loads up a custom hirb.
-#
-# In noninteractive mode, runs commands from stdin until completion or an error.
-# On success will exit with status 0, on any problem will exit non-zero. Callers
-# should only rely on "not equal to 0", because the current error exit code of 1
-# will likely be updated to diffentiate e.g. invalid commands, incorrect args,
-# permissions, etc.
-
-# TODO: Interrupt a table creation or a connection to a bad master.  Currently
-# has to time out.  Below we've set down the retries for rpc and hbase but
-# still can be annoying (And there seem to be times when we'll retry for
-# ever regardless)
-# TODO: Add support for listing and manipulating catalog tables, etc.
-# TODO: Encoding; need to know how to go from ruby String to UTF-8 bytes
-
-# Run the java magic include and import basic HBase types that will help ease
-# hbase hacking.
-include Java
-
-# Some goodies for hirb. Should these be left up to the user's discretion?
-require 'irb/completion'
-require 'pathname'
-
-# Add the directory names in hbase.jruby.sources commandline option
-# to the ruby load path so I can load up my HBase ruby modules
-sources = java.lang.System.getProperty('hbase.ruby.sources')
-$LOAD_PATH.unshift Pathname.new(sources)
-
-#
-# FIXME: Switch args processing to getopt
-#
-# See if there are args for this shell. If any, read and then strip from ARGV
-# so they don't go through to irb.  Output shell 'usage' if user types '--help'
-cmdline_help = <<HERE # HERE document output as shell usage
-Usage: shell [OPTIONS] [SCRIPTFILE [ARGUMENTS]]
-
- -d | --debug            Set DEBUG log levels.
- -h | --help             This help.
- -n | --noninteractive   Do not run within an IRB session and exit with non-zero
-                         status on first error.
- --top-level-defs        Compatibility flag to export HBase shell commands onto
-                         Ruby's main object
- -Dkey=value             Pass hbase-*.xml Configuration overrides. For example, to
-                         use an alternate zookeeper ensemble, pass:
-                           -Dhbase.zookeeper.quorum=zookeeper.example.org
-                         For faster fail, pass the below and vary the values:
-                           -Dhbase.client.retries.number=7
-                           -Dhbase.ipc.client.connect.max.retries=3
-HERE
-
-# Takes configuration and an arg that is expected to be key=value format.
-# If c is empty, creates one and returns it
-def add_to_configuration(c, arg)
-  kv = arg.split('=')
-  kv.length == 2 || (raise "Expected parameter #{kv} in key=value format")
-  c = org.apache.hadoop.hbase.HBaseConfiguration.create if c.nil?
-  c.set(kv[0], kv[1])
-  c
-end
-
-found = []
-script2run = nil
-log_level = org.apache.log4j.Level::ERROR
-@shell_debug = false
-interactive = true
-top_level_definitions = false
-_configuration = nil
-D_ARG = '-D'.freeze
-while (arg = ARGV.shift)
-  if arg == '-h' || arg == '--help'
-    puts cmdline_help
-    exit
-  elsif arg == D_ARG
-    argValue = ARGV.shift || (raise "#{D_ARG} takes a 'key=value' parameter")
-    _configuration = add_to_configuration(_configuration, argValue)
-    found.push(arg)
-    found.push(argValue)
-  elsif arg.start_with? D_ARG
-    _configuration = add_to_configuration(_configuration, arg[2..-1])
-    found.push(arg)
-  elsif arg == '-d' || arg == '--debug'
-    log_level = org.apache.log4j.Level::DEBUG
-    $fullBackTrace = true
-    @shell_debug = true
-    found.push(arg)
-    puts 'Setting DEBUG log level...'
-  elsif arg == '-n' || arg == '--noninteractive'
-    interactive = false
-    found.push(arg)
-  elsif arg == '-r' || arg == '--return-values'
-    warn '[INFO] the -r | --return-values option is ignored. we always behave '\
-         'as though it was given.'
-    found.push(arg)
-  elsif arg == '--top-level-defs'
-    top_level_definitions = true
-  else
-    # Presume it a script. Save it off for running later below
-    # after we've set up some environment.
-    script2run = arg
-    found.push(arg)
-    # Presume that any other args are meant for the script.
-    break
-  end
-end
-
-# Delete all processed args
-found.each { |arg| ARGV.delete(arg) }
-# Make sure debug flag gets back to IRB
-ARGV.unshift('-d') if @shell_debug
-
-# Set logging level to avoid verboseness
-org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level)
-org.apache.log4j.Logger.getLogger('org.apache.hadoop.hbase').setLevel(log_level)
-
-# Require HBase now after setting log levels
-require 'hbase_constants'
-
-# Load hbase shell
-require 'shell'
-
-# Require formatter
-require 'shell/formatter'
-
-# Setup the HBase module.  Create a configuration.
-@hbase = _configuration.nil? ? Hbase::Hbase.new : Hbase::Hbase.new(_configuration)
-
-# Setup console
-@shell = Shell::Shell.new(@hbase, interactive)
-@shell.debug = @shell_debug
-
-##
-# Toggle shell debugging
-#
-# @return [Boolean] true if debug is turned on after updating the flag
-def debug
-  if @shell_debug
-    @shell_debug = false
-    conf.back_trace_limit = 0
-    log_level = org.apache.log4j.Level::ERROR
-  else
-    @shell_debug = true
-    conf.back_trace_limit = 100
-    log_level = org.apache.log4j.Level::DEBUG
-  end
-  org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level)
-  org.apache.log4j.Logger.getLogger('org.apache.hadoop.hbase').setLevel(log_level)
-  debug?
-end
-
-##
-# Print whether debug is on or off
-def debug?
-  puts "Debug mode is #{@shell_debug ? 'ON' : 'OFF'}\n\n"
-  nil
-end
-
-
-# For backwards compatibility, this will export all the HBase shell commands, constants, and
-# instance variables (@hbase and @shell) onto Ruby's top-level receiver object known as "main".
-@shell.export_all(self) if top_level_definitions
-
-# If script2run, try running it.  If we're in interactive mode, will go on to run the shell unless
-# script calls 'exit' or 'exit 0' or 'exit errcode'.
-require 'shell/hbase_loader'
-if script2run
-  ::Shell::Shell.exception_handler(!$fullBackTrace) { @shell.eval_io(Hbase::Loader.file_for_load(script2run), filename = script2run) }
-end
-
-# If we are not running interactively, evaluate standard input
-::Shell::Shell.exception_handler(!$fullBackTrace) { @shell.eval_io(STDIN) } unless interactive
-
-if interactive
-  # Output a banner message that tells users where to go for help
-  @shell.print_banner
-
-  require 'irb'
-  require 'irb/ext/change-ws'
-  require 'irb/hirb'
-
-  module IRB
-    # Override of the default IRB.start
-    def self.start(ap_path = nil)
-      $0 = File.basename(ap_path, '.rb') if ap_path
-
-      IRB.setup(ap_path)
-      @CONF[:IRB_NAME] = 'hbase'
-      @CONF[:AP_NAME] = 'hbase'
-      @CONF[:BACK_TRACE_LIMIT] = 0 unless $fullBackTrace
-
-      hirb = if @CONF[:SCRIPT]
-               HIRB.new(nil, @CONF[:SCRIPT])
-             else
-               HIRB.new
-             end
-
-      shl = TOPLEVEL_BINDING.receiver.instance_variable_get :'@shell'
-      hirb.context.change_workspace shl.get_workspace
-
-      @CONF[:IRB_RC].call(hirb.context) if @CONF[:IRB_RC]
-      # Storing our current HBase IRB Context as the main context is imperative for several reasons,
-      # including auto-completion.
-      @CONF[:MAIN_CONTEXT] = hirb.context
-
-      catch(:IRB_EXIT) do
-        hirb.eval_input
-      end
-    end
-  end
-
-  IRB.start
-end
+puts <<EOF
+  This file has been superceded by packaging our ruby files into a jar
+  and using jruby's bootstrapping to invoke them. If you need to
+  source this file fo some reason it is now named 'jar-bootstrap.rb' and is
+  located in the root of the file hbase-shell.jar and in the source tree at
+  'hbase-shell/src/main/ruby'.
+EOF

Review comment:
       command line options should all still work; they get passed through. got something in mind besides `--noninteractive`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] busbey commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
busbey commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706417652


   the failures for precommit are all in code that doesn't change, looks like env issues. lemme try again.
   
   > [INFO] Running org.apache.hadoop.hbase.rsgroup.TestRSGroupsFallback
   > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.026 s <<< FAILURE! - in org.apache.hadoop.hbase.rsgroup.TestRSGroupsFallback
   > [ERROR] org.apache.hadoop.hbase.rsgroup.TestRSGroupsFallback  Time elapsed: 0.008 s  <<< ERROR!
   > java.io.IOException: Shutting down
   >       at org.apache.hadoop.hbase.rsgroup.TestRSGroupsFallback.setUp(TestRSGroupsFallback.java:64)
   > Caused by: java.lang.RuntimeException: Master not initialized after 200000ms
   >       at org.apache.hadoop.hbase.rsgroup.TestRSGroupsFallback.setUp(TestRSGroupsFallback.java:64)
   >
   >
   >
   > [INFO] Running org.apache.hadoop.hbase.rsgroup.TestMigrateRSGroupInfo
   > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.03 s <<< FAILURE! - in org.apache.hadoop.hbase.rsgroup.TestMigrateRSGroupInfo
   > [ERROR] org.apache.hadoop.hbase.rsgroup.TestMigrateRSGroupInfo  Time elapsed: 0.012 s  <<< ERROR!
   > java.io.IOException: Shutting down
   >       at org.apache.hadoop.hbase.rsgroup.TestMigrateRSGroupInfo.setUp(TestMigrateRSGroupInfo.java:79)
   > Caused by: java.lang.RuntimeException: Master not initialized after 200000ms
   >       at org.apache.hadoop.hbase.rsgroup.TestMigrateRSGroupInfo.setUp(TestMigrateRSGroupInfo.java:79)
   >
   > [INFO] Running org.apache.hadoop.hbase.TestAcidGuaranteesWithEagerPolicy
   > [INFO] Running org.apache.hadoop.hbase.rsgroup.TestRSGroupsCPHookCalled
   > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.025 s <<< FAILURE! - in org.apache.hadoop.hbase.rsgroup.TestRSGroupsCPHookCalled
   > [ERROR] org.apache.hadoop.hbase.rsgroup.TestRSGroupsCPHookCalled  Time elapsed: 0.009 s  <<< ERROR!
   > java.io.IOException: Shutting down
   >       at org.apache.hadoop.hbase.rsgroup.TestRSGroupsCPHookCalled.setUp(TestRSGroupsCPHookCalled.java:45)
   > Caused by: java.lang.RuntimeException: Master not initialized after 200000ms
   >       at org.apache.hadoop.hbase.rsgroup.TestRSGroupsCPHookCalled.setUp(TestRSGroupsCPHookCalled.java:45)
   >
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] busbey commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
busbey commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-705820578


   pushed an addendum after testing running the shell directly from a source build instead of a binary tarball. had a stale reference from when I was first testing running from source instead of build.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] busbey commented on a change in pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
busbey commented on a change in pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#discussion_r502685993



##########
File path: hbase-shell/src/main/ruby/hbase_shell.rb
##########
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Ruby has a stdlib named 'shell' so using "require 'shell'" does not
+# work if our shell implementation is not on the local filesystem.
+# this is the absolute path to our shell implementation when packaged
+# in a jar. The level of indirection provided by this file lets things
+# still behave the same as in earlier releases if folks unpackage the
+# jar contents onto the local filesystem if they need that for some
+# other reason.
+require 'uri:classloader:/shell.rb'

Review comment:
       yeah. it was not fun to figure that out. to say the least our tests failed in non-intuitive ways 😹 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706468314


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 20s |  Docker mode activated.  |
   | -0 :warning: |  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 :ok: |  mvndep  |   0m 20s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 50s |  master passed  |
   | +1 :green_heart: |  compile  |   3m 10s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 19s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 29s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 12s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 24s |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m  3s |  the patch passed  |
   | +1 :green_heart: |  javac  |   3m  3s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m 22s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 29s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 201m 14s |  root in the patch failed.  |
   |  |   | 242m 25s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/3/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux e5a394636bc2 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 / 665a8767a0 |
   | Default Java | 2020-01-14 |
   | unit | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/3/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-2515/3/testReport/ |
   | Max. process+thread count | 3470 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] saintstack commented on a change in pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
saintstack commented on a change in pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#discussion_r502713319



##########
File path: hbase-shell/src/main/ruby/hbase_shell.rb
##########
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Ruby has a stdlib named 'shell' so using "require 'shell'" does not
+# work if our shell implementation is not on the local filesystem.
+# this is the absolute path to our shell implementation when packaged
+# in a jar. The level of indirection provided by this file lets things
+# still behave the same as in earlier releases if folks unpackage the
+# jar contents onto the local filesystem if they need that for some
+# other reason.
+require 'uri:classloader:/shell.rb'

Review comment:
       Yuck. Good on you Sean.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706833840


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m  0s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +0 :ok: |  shelldocs  |   0m  0s |  Shelldocs was not available.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 25s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 51s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 13s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   9m 53s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 12s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 45s |  the patch passed  |
   | -0 :warning: |  checkstyle  |   2m 16s |  root: The patch generated 21 new + 0 unchanged - 0 fixed = 21 total (was 0)  |
   | -0 :warning: |  rubocop  |   1m  2s |  The patch generated 4 new + 1107 unchanged - 5 fixed = 1111 total (was 1112)  |
   | +1 :green_heart: |  shellcheck  |   0m  1s |  There were no new shellcheck issues.  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  xml  |   0m  3s |  The patch has no ill-formed XML file.  |
   | +1 :green_heart: |  hadoopcheck  |  18m 50s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.  |
   | +1 :green_heart: |  spotbugs  |  10m 10s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 33s |  The patch does not generate ASF License warnings.  |
   |  |   |  62m 12s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/5/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | dupname asflicense shellcheck shelldocs rubocop xml hadoopcheck spotbugs hbaseanti checkstyle |
   | uname | Linux b8ebb26c1606 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 / 3d1aaa6632 |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/5/artifact/yetus-general-check/output/diff-checkstyle-root.txt |
   | rubocop | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/5/artifact/yetus-general-check/output/diff-patch-rubocop.txt |
   | Max. process+thread count | 122 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/5/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) shellcheck=0.4.6 spotbugs=3.1.12 rubocop=0.80.0 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] busbey commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
busbey commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706818020


   ugh. a different failure in hbase-server every time. like the bad-old-days before the flakey lists.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] saintstack commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
saintstack commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-707204870


   @busbey  doesn't seem related
   
   [ERROR]   TestBucketCache.testRetrieveFromPMem:296->testRetrievalUtils:333


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-705831620






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] busbey commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
busbey commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-705820578


   pushed an addendum after testing running the shell directly from a source build instead of a binary tarball. had a stale reference from when I was first testing running from source instead of build.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-705906411


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   3m 11s |  Docker mode activated.  |
   | -0 :warning: |  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 :ok: |  mvndep  |   0m 20s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 46s |  master passed  |
   | +1 :green_heart: |  compile  |   3m 13s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 28s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 35s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 37s |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m 11s |  the patch passed  |
   | +1 :green_heart: |  javac  |   3m 11s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m 23s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 35s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 234m 26s |  root in the patch passed.  |
   |  |   | 278m 12s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 008c8e023c27 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 / bdcafa895c |
   | Default Java | 2020-01-14 |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/1/testReport/ |
   | Max. process+thread count | 4489 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] busbey commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
busbey commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706592312


   latest run failed in hbase-server again with
   
   > [INFO] Running org.apache.hadoop.hbase.rsgroup.TestRSGroupsKillRS
   > [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.029 s <<< FAILURE! - in org.apache.hadoop.hbase.rsgroup.TestRSGroupsKillRS
   > [ERROR] org.apache.hadoop.hbase.rsgroup.TestRSGroupsKillRS  Time elapsed: 0.012 s  <<< ERROR!
   > java.io.IOException: Shutting down
   > 	at org.apache.hadoop.hbase.rsgroup.TestRSGroupsKillRS.setUp(TestRSGroupsKillRS.java:72)
   > Caused by: java.lang.RuntimeException: Master not initialized after 200000ms
   > 	at org.apache.hadoop.hbase.rsgroup.TestRSGroupsKillRS.setUp(TestRSGroupsKillRS.java:72)
   
   a shutting down exception during set up sounds like something is wrong with our test set up. definitely not related to this change though.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706066269


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 12s |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  2s |  Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck  |
   ||| _ Prechecks _ |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 24s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 50s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 34s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m  7s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   2m 35s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 11s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 45s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 36s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 36s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m  3s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   2m 35s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 314m  9s |  root in the patch failed.  |
   |  |   | 350m  5s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 0d0e9d7f3560 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 / 78ae1f176d |
   | Default Java | 1.8.0_232 |
   | unit | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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-2515/2/testReport/ |
   | Max. process+thread count | 2841 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-705957976


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   0m 29s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  No case conflicting files found.  |
   | +0 :ok: |  shelldocs  |   0m  1s |  Shelldocs was not available.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 23s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 36s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   1m 57s |  master passed  |
   | +1 :green_heart: |  spotbugs  |   8m 50s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 14s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 24s |  the patch passed  |
   | -0 :warning: |  checkstyle  |   1m 57s |  root: The patch generated 21 new + 0 unchanged - 0 fixed = 21 total (was 0)  |
   | -0 :warning: |  rubocop  |   1m  0s |  The patch generated 4 new + 1107 unchanged - 5 fixed = 1111 total (was 1112)  |
   | +1 :green_heart: |  shellcheck  |   0m  1s |  There were no new shellcheck issues.  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  xml  |   0m  4s |  The patch has no ill-formed XML file.  |
   | +1 :green_heart: |  hadoopcheck  |  17m  5s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.  |
   | +1 :green_heart: |  spotbugs  |   8m 58s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 41s |  The patch does not generate ASF License warnings.  |
   |  |   |  56m 10s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/2/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | dupname asflicense shellcheck shelldocs rubocop xml hadoopcheck spotbugs hbaseanti checkstyle |
   | uname | Linux c402ffef26e3 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 / 78ae1f176d |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/2/artifact/yetus-general-check/output/diff-checkstyle-root.txt |
   | rubocop | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/2/artifact/yetus-general-check/output/diff-patch-rubocop.txt |
   | Max. process+thread count | 137 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/2/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) shellcheck=0.4.6 spotbugs=3.1.12 rubocop=0.80.0 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706653127


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 17s |  Docker mode activated.  |
   | -0 :warning: |  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 :ok: |  mvndep  |   0m 28s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 36s |  master passed  |
   | +1 :green_heart: |  compile  |   3m  5s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 21s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 29s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 12s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 32s |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m  4s |  the patch passed  |
   | +1 :green_heart: |  javac  |   3m  4s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m 17s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 27s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 238m 48s |  root in the patch passed.  |
   |  |   | 279m 53s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/4/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 5c92999615e6 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 / c367e91aff |
   | Default Java | 2020-01-14 |
   |  Test Results | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/4/testReport/ |
   | Max. process+thread count | 4507 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706017626


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 20s |  Docker mode activated.  |
   | -0 :warning: |  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 :ok: |  mvndep  |   0m 22s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 33s |  master passed  |
   | +1 :green_heart: |  compile  |   3m 10s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 20s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 32s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 12s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 31s |  the patch passed  |
   | +1 :green_heart: |  compile  |   3m  6s |  the patch passed  |
   | +1 :green_heart: |  javac  |   3m  6s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m 19s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   3m 28s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 200m 51s |  root in the patch failed.  |
   |  |   | 241m 53s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 0dca1f3bcab7 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 / 78ae1f176d |
   | Default Java | 2020-01-14 |
   | unit | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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-2515/2/testReport/ |
   | Max. process+thread count | 3809 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706637433


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m  0s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  1s |  No case conflicting files found.  |
   | +0 :ok: |  shelldocs  |   0m  1s |  Shelldocs was not available.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 20s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   3m 59s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 15s |  master passed  |
   | +1 :green_heart: |  spotbugs  |  10m  3s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 12s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 45s |  the patch passed  |
   | -0 :warning: |  checkstyle  |   2m 13s |  root: The patch generated 21 new + 0 unchanged - 0 fixed = 21 total (was 0)  |
   | -0 :warning: |  rubocop  |   1m  3s |  The patch generated 4 new + 1107 unchanged - 5 fixed = 1111 total (was 1112)  |
   | +1 :green_heart: |  shellcheck  |   0m  2s |  There were no new shellcheck issues.  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  xml  |   0m  4s |  The patch has no ill-formed XML file.  |
   | +1 :green_heart: |  hadoopcheck  |  18m 48s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.  |
   | +1 :green_heart: |  spotbugs  |  10m 13s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 34s |  The patch does not generate ASF License warnings.  |
   |  |   |  62m 25s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/4/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | dupname asflicense shellcheck shelldocs rubocop xml hadoopcheck spotbugs hbaseanti checkstyle |
   | uname | Linux a2e89e6d157a 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 / c367e91aff |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/4/artifact/yetus-general-check/output/diff-checkstyle-root.txt |
   | rubocop | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/4/artifact/yetus-general-check/output/diff-patch-rubocop.txt |
   | Max. process+thread count | 122 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/4/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) shellcheck=0.4.6 spotbugs=3.1.12 rubocop=0.80.0 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] asfgit closed pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #2515:
URL: https://github.com/apache/hbase/pull/2515


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] saintstack commented on a change in pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
saintstack commented on a change in pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#discussion_r502649225



##########
File path: hbase-shell/pom.xml
##########
@@ -50,66 +44,22 @@
       </testResource>
     </testResources>
     <plugins>
-      <!-- Run with -Dmaven.test.skip.exec=true to build -tests.jar without running
-        tests (this is needed for upstream projects whose tests need this jar simply for
-        compilation) -->
-      <plugin>
-        <!--Make it so assembly:single does nothing in here-->
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <skipAssembly>true</skipAssembly>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
         <configuration>
           <archive>
             <manifest>
-              <mainClass>org/apache/hadoop/hbase/mapreduce/Driver</mainClass>

Review comment:
       This looks like copy/paste error that you've just fixd.

##########
File path: bin/hirb.rb
##########
@@ -15,217 +13,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-# File passed to org.jruby.Main by bin/hbase.  Pollutes jirb with hbase imports
-# and hbase  commands and then loads jirb.  Outputs a banner that tells user
-# where to find help, shell version, and loads up a custom hirb.
-#
-# In noninteractive mode, runs commands from stdin until completion or an error.
-# On success will exit with status 0, on any problem will exit non-zero. Callers
-# should only rely on "not equal to 0", because the current error exit code of 1
-# will likely be updated to diffentiate e.g. invalid commands, incorrect args,
-# permissions, etc.
-
-# TODO: Interrupt a table creation or a connection to a bad master.  Currently
-# has to time out.  Below we've set down the retries for rpc and hbase but
-# still can be annoying (And there seem to be times when we'll retry for
-# ever regardless)
-# TODO: Add support for listing and manipulating catalog tables, etc.
-# TODO: Encoding; need to know how to go from ruby String to UTF-8 bytes
-
-# Run the java magic include and import basic HBase types that will help ease
-# hbase hacking.
-include Java
-
-# Some goodies for hirb. Should these be left up to the user's discretion?
-require 'irb/completion'
-require 'pathname'
-
-# Add the directory names in hbase.jruby.sources commandline option
-# to the ruby load path so I can load up my HBase ruby modules
-sources = java.lang.System.getProperty('hbase.ruby.sources')
-$LOAD_PATH.unshift Pathname.new(sources)
-
-#
-# FIXME: Switch args processing to getopt
-#
-# See if there are args for this shell. If any, read and then strip from ARGV
-# so they don't go through to irb.  Output shell 'usage' if user types '--help'
-cmdline_help = <<HERE # HERE document output as shell usage
-Usage: shell [OPTIONS] [SCRIPTFILE [ARGUMENTS]]
-
- -d | --debug            Set DEBUG log levels.
- -h | --help             This help.
- -n | --noninteractive   Do not run within an IRB session and exit with non-zero
-                         status on first error.
- --top-level-defs        Compatibility flag to export HBase shell commands onto
-                         Ruby's main object
- -Dkey=value             Pass hbase-*.xml Configuration overrides. For example, to
-                         use an alternate zookeeper ensemble, pass:
-                           -Dhbase.zookeeper.quorum=zookeeper.example.org
-                         For faster fail, pass the below and vary the values:
-                           -Dhbase.client.retries.number=7
-                           -Dhbase.ipc.client.connect.max.retries=3
-HERE
-
-# Takes configuration and an arg that is expected to be key=value format.
-# If c is empty, creates one and returns it
-def add_to_configuration(c, arg)
-  kv = arg.split('=')
-  kv.length == 2 || (raise "Expected parameter #{kv} in key=value format")
-  c = org.apache.hadoop.hbase.HBaseConfiguration.create if c.nil?
-  c.set(kv[0], kv[1])
-  c
-end
-
-found = []
-script2run = nil
-log_level = org.apache.log4j.Level::ERROR
-@shell_debug = false
-interactive = true
-top_level_definitions = false
-_configuration = nil
-D_ARG = '-D'.freeze
-while (arg = ARGV.shift)
-  if arg == '-h' || arg == '--help'
-    puts cmdline_help
-    exit
-  elsif arg == D_ARG
-    argValue = ARGV.shift || (raise "#{D_ARG} takes a 'key=value' parameter")
-    _configuration = add_to_configuration(_configuration, argValue)
-    found.push(arg)
-    found.push(argValue)
-  elsif arg.start_with? D_ARG
-    _configuration = add_to_configuration(_configuration, arg[2..-1])
-    found.push(arg)
-  elsif arg == '-d' || arg == '--debug'
-    log_level = org.apache.log4j.Level::DEBUG
-    $fullBackTrace = true
-    @shell_debug = true
-    found.push(arg)
-    puts 'Setting DEBUG log level...'
-  elsif arg == '-n' || arg == '--noninteractive'
-    interactive = false
-    found.push(arg)
-  elsif arg == '-r' || arg == '--return-values'
-    warn '[INFO] the -r | --return-values option is ignored. we always behave '\
-         'as though it was given.'
-    found.push(arg)
-  elsif arg == '--top-level-defs'
-    top_level_definitions = true
-  else
-    # Presume it a script. Save it off for running later below
-    # after we've set up some environment.
-    script2run = arg
-    found.push(arg)
-    # Presume that any other args are meant for the script.
-    break
-  end
-end
-
-# Delete all processed args
-found.each { |arg| ARGV.delete(arg) }
-# Make sure debug flag gets back to IRB
-ARGV.unshift('-d') if @shell_debug
-
-# Set logging level to avoid verboseness
-org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level)
-org.apache.log4j.Logger.getLogger('org.apache.hadoop.hbase').setLevel(log_level)
-
-# Require HBase now after setting log levels
-require 'hbase_constants'
-
-# Load hbase shell
-require 'shell'
-
-# Require formatter
-require 'shell/formatter'
-
-# Setup the HBase module.  Create a configuration.
-@hbase = _configuration.nil? ? Hbase::Hbase.new : Hbase::Hbase.new(_configuration)
-
-# Setup console
-@shell = Shell::Shell.new(@hbase, interactive)
-@shell.debug = @shell_debug
-
-##
-# Toggle shell debugging
-#
-# @return [Boolean] true if debug is turned on after updating the flag
-def debug
-  if @shell_debug
-    @shell_debug = false
-    conf.back_trace_limit = 0
-    log_level = org.apache.log4j.Level::ERROR
-  else
-    @shell_debug = true
-    conf.back_trace_limit = 100
-    log_level = org.apache.log4j.Level::DEBUG
-  end
-  org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level)
-  org.apache.log4j.Logger.getLogger('org.apache.hadoop.hbase').setLevel(log_level)
-  debug?
-end
-
-##
-# Print whether debug is on or off
-def debug?
-  puts "Debug mode is #{@shell_debug ? 'ON' : 'OFF'}\n\n"
-  nil
-end
-
-
-# For backwards compatibility, this will export all the HBase shell commands, constants, and
-# instance variables (@hbase and @shell) onto Ruby's top-level receiver object known as "main".
-@shell.export_all(self) if top_level_definitions
-
-# If script2run, try running it.  If we're in interactive mode, will go on to run the shell unless
-# script calls 'exit' or 'exit 0' or 'exit errcode'.
-require 'shell/hbase_loader'
-if script2run
-  ::Shell::Shell.exception_handler(!$fullBackTrace) { @shell.eval_io(Hbase::Loader.file_for_load(script2run), filename = script2run) }
-end
-
-# If we are not running interactively, evaluate standard input
-::Shell::Shell.exception_handler(!$fullBackTrace) { @shell.eval_io(STDIN) } unless interactive
-
-if interactive
-  # Output a banner message that tells users where to go for help
-  @shell.print_banner
-
-  require 'irb'
-  require 'irb/ext/change-ws'
-  require 'irb/hirb'
-
-  module IRB
-    # Override of the default IRB.start
-    def self.start(ap_path = nil)
-      $0 = File.basename(ap_path, '.rb') if ap_path
-
-      IRB.setup(ap_path)
-      @CONF[:IRB_NAME] = 'hbase'
-      @CONF[:AP_NAME] = 'hbase'
-      @CONF[:BACK_TRACE_LIMIT] = 0 unless $fullBackTrace
-
-      hirb = if @CONF[:SCRIPT]
-               HIRB.new(nil, @CONF[:SCRIPT])
-             else
-               HIRB.new
-             end
-
-      shl = TOPLEVEL_BINDING.receiver.instance_variable_get :'@shell'
-      hirb.context.change_workspace shl.get_workspace
-
-      @CONF[:IRB_RC].call(hirb.context) if @CONF[:IRB_RC]
-      # Storing our current HBase IRB Context as the main context is imperative for several reasons,
-      # including auto-completion.
-      @CONF[:MAIN_CONTEXT] = hirb.context
-
-      catch(:IRB_EXIT) do
-        hirb.eval_input
-      end
-    end
-  end
-
-  IRB.start
-end
+puts <<EOF
+  This file has been superceded by packaging our ruby files into a jar
+  and using jruby's bootstrapping to invoke them. If you need to
+  source this file fo some reason it is now named 'jar-bootstrap.rb' and is
+  located in the root of the file hbase-shell.jar and in the source tree at
+  'hbase-shell/src/main/ruby'.
+EOF

Review comment:
       The command-line options still work?

##########
File path: hbase-shell/src/main/ruby/hbase_shell.rb
##########
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Ruby has a stdlib named 'shell' so using "require 'shell'" does not
+# work if our shell implementation is not on the local filesystem.
+# this is the absolute path to our shell implementation when packaged
+# in a jar. The level of indirection provided by this file lets things
+# still behave the same as in earlier releases if folks unpackage the
+# jar contents onto the local filesystem if they need that for some
+# other reason.
+require 'uri:classloader:/shell.rb'

Review comment:
       ok

##########
File path: hbase-shell/pom.xml
##########
@@ -50,66 +44,22 @@
       </testResource>
     </testResources>
     <plugins>
-      <!-- Run with -Dmaven.test.skip.exec=true to build -tests.jar without running
-        tests (this is needed for upstream projects whose tests need this jar simply for
-        compilation) -->
-      <plugin>
-        <!--Make it so assembly:single does nothing in here-->
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <skipAssembly>true</skipAssembly>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
         <configuration>
           <archive>
             <manifest>
-              <mainClass>org/apache/hadoop/hbase/mapreduce/Driver</mainClass>
+              <mainClass>org.jruby.JarBootstrapMain</mainClass>
             </manifest>
           </archive>
-          <!-- Exclude these 2 packages, because their dependency _binary_ files
-            include the sources, and Maven 2.2 appears to add them to the sources to compile,
-            weird -->
-          <excludes>
-            <exclude>org/apache/jute/**</exclude>
-            <exclude>org/apache/zookeeper/**</exclude>
-            <exclude>**/*.jsp</exclude>
-            <exclude>hbase-site.xml</exclude>
-            <exclude>hdfs-site.xml</exclude>
-            <exclude>log4j.properties</exclude>
-            <exclude>mapred-queues.xml</exclude>
-            <exclude>mapred-site.xml</exclude>
-          </excludes>
         </configuration>
       </plugin>
       <!-- Make a jar and put the sources in the jar -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-source-plugin</artifactId>
       </plugin>
-      <!-- General ant tasks, bound to different build phases -->
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <executions>
-          <!-- Add the generated sources -->
-          <execution>
-            <id>jspcSource-packageInfo-source</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>add-source</goal>
-            </goals>
-            <configuration>
-              <sources>
-                <source>${project.build.directory}/generated-jamon</source>
-                <source>${project.build.directory}/generated-sources/java</source>
-              </sources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>

Review comment:
       More over copy/paste?

##########
File path: bin/hirb.rb
##########
@@ -15,217 +13,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-# File passed to org.jruby.Main by bin/hbase.  Pollutes jirb with hbase imports
-# and hbase  commands and then loads jirb.  Outputs a banner that tells user
-# where to find help, shell version, and loads up a custom hirb.
-#
-# In noninteractive mode, runs commands from stdin until completion or an error.
-# On success will exit with status 0, on any problem will exit non-zero. Callers
-# should only rely on "not equal to 0", because the current error exit code of 1
-# will likely be updated to diffentiate e.g. invalid commands, incorrect args,
-# permissions, etc.
-
-# TODO: Interrupt a table creation or a connection to a bad master.  Currently
-# has to time out.  Below we've set down the retries for rpc and hbase but
-# still can be annoying (And there seem to be times when we'll retry for
-# ever regardless)
-# TODO: Add support for listing and manipulating catalog tables, etc.
-# TODO: Encoding; need to know how to go from ruby String to UTF-8 bytes
-
-# Run the java magic include and import basic HBase types that will help ease
-# hbase hacking.
-include Java
-
-# Some goodies for hirb. Should these be left up to the user's discretion?
-require 'irb/completion'
-require 'pathname'
-
-# Add the directory names in hbase.jruby.sources commandline option
-# to the ruby load path so I can load up my HBase ruby modules
-sources = java.lang.System.getProperty('hbase.ruby.sources')
-$LOAD_PATH.unshift Pathname.new(sources)
-
-#
-# FIXME: Switch args processing to getopt
-#
-# See if there are args for this shell. If any, read and then strip from ARGV
-# so they don't go through to irb.  Output shell 'usage' if user types '--help'
-cmdline_help = <<HERE # HERE document output as shell usage
-Usage: shell [OPTIONS] [SCRIPTFILE [ARGUMENTS]]
-
- -d | --debug            Set DEBUG log levels.
- -h | --help             This help.
- -n | --noninteractive   Do not run within an IRB session and exit with non-zero
-                         status on first error.
- --top-level-defs        Compatibility flag to export HBase shell commands onto
-                         Ruby's main object
- -Dkey=value             Pass hbase-*.xml Configuration overrides. For example, to
-                         use an alternate zookeeper ensemble, pass:
-                           -Dhbase.zookeeper.quorum=zookeeper.example.org
-                         For faster fail, pass the below and vary the values:
-                           -Dhbase.client.retries.number=7
-                           -Dhbase.ipc.client.connect.max.retries=3
-HERE
-
-# Takes configuration and an arg that is expected to be key=value format.
-# If c is empty, creates one and returns it
-def add_to_configuration(c, arg)
-  kv = arg.split('=')
-  kv.length == 2 || (raise "Expected parameter #{kv} in key=value format")
-  c = org.apache.hadoop.hbase.HBaseConfiguration.create if c.nil?
-  c.set(kv[0], kv[1])
-  c
-end
-
-found = []
-script2run = nil
-log_level = org.apache.log4j.Level::ERROR
-@shell_debug = false
-interactive = true
-top_level_definitions = false
-_configuration = nil
-D_ARG = '-D'.freeze
-while (arg = ARGV.shift)
-  if arg == '-h' || arg == '--help'
-    puts cmdline_help
-    exit
-  elsif arg == D_ARG
-    argValue = ARGV.shift || (raise "#{D_ARG} takes a 'key=value' parameter")
-    _configuration = add_to_configuration(_configuration, argValue)
-    found.push(arg)
-    found.push(argValue)
-  elsif arg.start_with? D_ARG
-    _configuration = add_to_configuration(_configuration, arg[2..-1])
-    found.push(arg)
-  elsif arg == '-d' || arg == '--debug'
-    log_level = org.apache.log4j.Level::DEBUG
-    $fullBackTrace = true
-    @shell_debug = true
-    found.push(arg)
-    puts 'Setting DEBUG log level...'
-  elsif arg == '-n' || arg == '--noninteractive'
-    interactive = false
-    found.push(arg)
-  elsif arg == '-r' || arg == '--return-values'
-    warn '[INFO] the -r | --return-values option is ignored. we always behave '\
-         'as though it was given.'
-    found.push(arg)
-  elsif arg == '--top-level-defs'
-    top_level_definitions = true
-  else
-    # Presume it a script. Save it off for running later below
-    # after we've set up some environment.
-    script2run = arg
-    found.push(arg)
-    # Presume that any other args are meant for the script.
-    break
-  end
-end
-
-# Delete all processed args
-found.each { |arg| ARGV.delete(arg) }
-# Make sure debug flag gets back to IRB
-ARGV.unshift('-d') if @shell_debug
-
-# Set logging level to avoid verboseness
-org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level)
-org.apache.log4j.Logger.getLogger('org.apache.hadoop.hbase').setLevel(log_level)
-
-# Require HBase now after setting log levels
-require 'hbase_constants'
-
-# Load hbase shell
-require 'shell'
-
-# Require formatter
-require 'shell/formatter'
-
-# Setup the HBase module.  Create a configuration.
-@hbase = _configuration.nil? ? Hbase::Hbase.new : Hbase::Hbase.new(_configuration)
-
-# Setup console
-@shell = Shell::Shell.new(@hbase, interactive)
-@shell.debug = @shell_debug
-
-##
-# Toggle shell debugging
-#
-# @return [Boolean] true if debug is turned on after updating the flag
-def debug
-  if @shell_debug
-    @shell_debug = false
-    conf.back_trace_limit = 0
-    log_level = org.apache.log4j.Level::ERROR
-  else
-    @shell_debug = true
-    conf.back_trace_limit = 100
-    log_level = org.apache.log4j.Level::DEBUG
-  end
-  org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level)
-  org.apache.log4j.Logger.getLogger('org.apache.hadoop.hbase').setLevel(log_level)
-  debug?
-end
-
-##
-# Print whether debug is on or off
-def debug?
-  puts "Debug mode is #{@shell_debug ? 'ON' : 'OFF'}\n\n"
-  nil
-end
-
-
-# For backwards compatibility, this will export all the HBase shell commands, constants, and
-# instance variables (@hbase and @shell) onto Ruby's top-level receiver object known as "main".
-@shell.export_all(self) if top_level_definitions
-
-# If script2run, try running it.  If we're in interactive mode, will go on to run the shell unless
-# script calls 'exit' or 'exit 0' or 'exit errcode'.
-require 'shell/hbase_loader'
-if script2run
-  ::Shell::Shell.exception_handler(!$fullBackTrace) { @shell.eval_io(Hbase::Loader.file_for_load(script2run), filename = script2run) }
-end
-
-# If we are not running interactively, evaluate standard input
-::Shell::Shell.exception_handler(!$fullBackTrace) { @shell.eval_io(STDIN) } unless interactive
-
-if interactive
-  # Output a banner message that tells users where to go for help
-  @shell.print_banner
-
-  require 'irb'
-  require 'irb/ext/change-ws'
-  require 'irb/hirb'
-
-  module IRB
-    # Override of the default IRB.start
-    def self.start(ap_path = nil)
-      $0 = File.basename(ap_path, '.rb') if ap_path
-
-      IRB.setup(ap_path)
-      @CONF[:IRB_NAME] = 'hbase'
-      @CONF[:AP_NAME] = 'hbase'
-      @CONF[:BACK_TRACE_LIMIT] = 0 unless $fullBackTrace
-
-      hirb = if @CONF[:SCRIPT]
-               HIRB.new(nil, @CONF[:SCRIPT])
-             else
-               HIRB.new
-             end
-
-      shl = TOPLEVEL_BINDING.receiver.instance_variable_get :'@shell'
-      hirb.context.change_workspace shl.get_workspace
-
-      @CONF[:IRB_RC].call(hirb.context) if @CONF[:IRB_RC]
-      # Storing our current HBase IRB Context as the main context is imperative for several reasons,
-      # including auto-completion.
-      @CONF[:MAIN_CONTEXT] = hirb.context
-
-      catch(:IRB_EXIT) do
-        hirb.eval_input
-      end
-    end
-  end
-
-  IRB.start
-end
+puts <<EOF
+  This file has been superceded by packaging our ruby files into a jar
+  and using jruby's bootstrapping to invoke them. If you need to
+  source this file fo some reason it is now named 'jar-bootstrap.rb' and is
+  located in the root of the file hbase-shell.jar and in the source tree at
+  'hbase-shell/src/main/ruby'.
+EOF

Review comment:
       Nice being able to remove this.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706437660


   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   2m 15s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files found.  |
   | +0 :ok: |  shelldocs  |   0m  0s |  Shelldocs was not available.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any @author tags.  |
   ||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 20s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m  0s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   2m 17s |  master passed  |
   | +1 :green_heart: |  spotbugs  |  10m  5s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 12s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 45s |  the patch passed  |
   | -0 :warning: |  checkstyle  |   2m 14s |  root: The patch generated 21 new + 0 unchanged - 0 fixed = 21 total (was 0)  |
   | -0 :warning: |  rubocop  |   1m  3s |  The patch generated 4 new + 1107 unchanged - 5 fixed = 1111 total (was 1112)  |
   | +1 :green_heart: |  shellcheck  |   0m  2s |  There were no new shellcheck issues.  |
   | +1 :green_heart: |  whitespace  |   0m  0s |  The patch has no whitespace issues.  |
   | +1 :green_heart: |  xml  |   0m  4s |  The patch has no ill-formed XML file.  |
   | +1 :green_heart: |  hadoopcheck  |  18m 50s |  Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.  |
   | +1 :green_heart: |  spotbugs  |  10m 10s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 34s |  The patch does not generate ASF License warnings.  |
   |  |   |  63m 40s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/3/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | dupname asflicense shellcheck shelldocs rubocop xml hadoopcheck spotbugs hbaseanti checkstyle |
   | uname | Linux e2168fa47711 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 / 665a8767a0 |
   | checkstyle | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/3/artifact/yetus-general-check/output/diff-checkstyle-root.txt |
   | rubocop | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/3/artifact/yetus-general-check/output/diff-patch-rubocop.txt |
   | Max. process+thread count | 122 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/3/console |
   | versions | git=2.17.1 maven=(cecedd343002696d0abb50b32b541b8a6ba2883f) shellcheck=0.4.6 spotbugs=3.1.12 rubocop=0.80.0 |
   | Powered by | Apache Yetus 0.11.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] saintstack commented on a change in pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
saintstack commented on a change in pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#discussion_r502713440



##########
File path: bin/hirb.rb
##########
@@ -15,217 +13,10 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-#
-# File passed to org.jruby.Main by bin/hbase.  Pollutes jirb with hbase imports
-# and hbase  commands and then loads jirb.  Outputs a banner that tells user
-# where to find help, shell version, and loads up a custom hirb.
-#
-# In noninteractive mode, runs commands from stdin until completion or an error.
-# On success will exit with status 0, on any problem will exit non-zero. Callers
-# should only rely on "not equal to 0", because the current error exit code of 1
-# will likely be updated to diffentiate e.g. invalid commands, incorrect args,
-# permissions, etc.
-
-# TODO: Interrupt a table creation or a connection to a bad master.  Currently
-# has to time out.  Below we've set down the retries for rpc and hbase but
-# still can be annoying (And there seem to be times when we'll retry for
-# ever regardless)
-# TODO: Add support for listing and manipulating catalog tables, etc.
-# TODO: Encoding; need to know how to go from ruby String to UTF-8 bytes
-
-# Run the java magic include and import basic HBase types that will help ease
-# hbase hacking.
-include Java
-
-# Some goodies for hirb. Should these be left up to the user's discretion?
-require 'irb/completion'
-require 'pathname'
-
-# Add the directory names in hbase.jruby.sources commandline option
-# to the ruby load path so I can load up my HBase ruby modules
-sources = java.lang.System.getProperty('hbase.ruby.sources')
-$LOAD_PATH.unshift Pathname.new(sources)
-
-#
-# FIXME: Switch args processing to getopt
-#
-# See if there are args for this shell. If any, read and then strip from ARGV
-# so they don't go through to irb.  Output shell 'usage' if user types '--help'
-cmdline_help = <<HERE # HERE document output as shell usage
-Usage: shell [OPTIONS] [SCRIPTFILE [ARGUMENTS]]
-
- -d | --debug            Set DEBUG log levels.
- -h | --help             This help.
- -n | --noninteractive   Do not run within an IRB session and exit with non-zero
-                         status on first error.
- --top-level-defs        Compatibility flag to export HBase shell commands onto
-                         Ruby's main object
- -Dkey=value             Pass hbase-*.xml Configuration overrides. For example, to
-                         use an alternate zookeeper ensemble, pass:
-                           -Dhbase.zookeeper.quorum=zookeeper.example.org
-                         For faster fail, pass the below and vary the values:
-                           -Dhbase.client.retries.number=7
-                           -Dhbase.ipc.client.connect.max.retries=3
-HERE
-
-# Takes configuration and an arg that is expected to be key=value format.
-# If c is empty, creates one and returns it
-def add_to_configuration(c, arg)
-  kv = arg.split('=')
-  kv.length == 2 || (raise "Expected parameter #{kv} in key=value format")
-  c = org.apache.hadoop.hbase.HBaseConfiguration.create if c.nil?
-  c.set(kv[0], kv[1])
-  c
-end
-
-found = []
-script2run = nil
-log_level = org.apache.log4j.Level::ERROR
-@shell_debug = false
-interactive = true
-top_level_definitions = false
-_configuration = nil
-D_ARG = '-D'.freeze
-while (arg = ARGV.shift)
-  if arg == '-h' || arg == '--help'
-    puts cmdline_help
-    exit
-  elsif arg == D_ARG
-    argValue = ARGV.shift || (raise "#{D_ARG} takes a 'key=value' parameter")
-    _configuration = add_to_configuration(_configuration, argValue)
-    found.push(arg)
-    found.push(argValue)
-  elsif arg.start_with? D_ARG
-    _configuration = add_to_configuration(_configuration, arg[2..-1])
-    found.push(arg)
-  elsif arg == '-d' || arg == '--debug'
-    log_level = org.apache.log4j.Level::DEBUG
-    $fullBackTrace = true
-    @shell_debug = true
-    found.push(arg)
-    puts 'Setting DEBUG log level...'
-  elsif arg == '-n' || arg == '--noninteractive'
-    interactive = false
-    found.push(arg)
-  elsif arg == '-r' || arg == '--return-values'
-    warn '[INFO] the -r | --return-values option is ignored. we always behave '\
-         'as though it was given.'
-    found.push(arg)
-  elsif arg == '--top-level-defs'
-    top_level_definitions = true
-  else
-    # Presume it a script. Save it off for running later below
-    # after we've set up some environment.
-    script2run = arg
-    found.push(arg)
-    # Presume that any other args are meant for the script.
-    break
-  end
-end
-
-# Delete all processed args
-found.each { |arg| ARGV.delete(arg) }
-# Make sure debug flag gets back to IRB
-ARGV.unshift('-d') if @shell_debug
-
-# Set logging level to avoid verboseness
-org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level)
-org.apache.log4j.Logger.getLogger('org.apache.hadoop.hbase').setLevel(log_level)
-
-# Require HBase now after setting log levels
-require 'hbase_constants'
-
-# Load hbase shell
-require 'shell'
-
-# Require formatter
-require 'shell/formatter'
-
-# Setup the HBase module.  Create a configuration.
-@hbase = _configuration.nil? ? Hbase::Hbase.new : Hbase::Hbase.new(_configuration)
-
-# Setup console
-@shell = Shell::Shell.new(@hbase, interactive)
-@shell.debug = @shell_debug
-
-##
-# Toggle shell debugging
-#
-# @return [Boolean] true if debug is turned on after updating the flag
-def debug
-  if @shell_debug
-    @shell_debug = false
-    conf.back_trace_limit = 0
-    log_level = org.apache.log4j.Level::ERROR
-  else
-    @shell_debug = true
-    conf.back_trace_limit = 100
-    log_level = org.apache.log4j.Level::DEBUG
-  end
-  org.apache.log4j.Logger.getLogger('org.apache.zookeeper').setLevel(log_level)
-  org.apache.log4j.Logger.getLogger('org.apache.hadoop.hbase').setLevel(log_level)
-  debug?
-end
-
-##
-# Print whether debug is on or off
-def debug?
-  puts "Debug mode is #{@shell_debug ? 'ON' : 'OFF'}\n\n"
-  nil
-end
-
-
-# For backwards compatibility, this will export all the HBase shell commands, constants, and
-# instance variables (@hbase and @shell) onto Ruby's top-level receiver object known as "main".
-@shell.export_all(self) if top_level_definitions
-
-# If script2run, try running it.  If we're in interactive mode, will go on to run the shell unless
-# script calls 'exit' or 'exit 0' or 'exit errcode'.
-require 'shell/hbase_loader'
-if script2run
-  ::Shell::Shell.exception_handler(!$fullBackTrace) { @shell.eval_io(Hbase::Loader.file_for_load(script2run), filename = script2run) }
-end
-
-# If we are not running interactively, evaluate standard input
-::Shell::Shell.exception_handler(!$fullBackTrace) { @shell.eval_io(STDIN) } unless interactive
-
-if interactive
-  # Output a banner message that tells users where to go for help
-  @shell.print_banner
-
-  require 'irb'
-  require 'irb/ext/change-ws'
-  require 'irb/hirb'
-
-  module IRB
-    # Override of the default IRB.start
-    def self.start(ap_path = nil)
-      $0 = File.basename(ap_path, '.rb') if ap_path
-
-      IRB.setup(ap_path)
-      @CONF[:IRB_NAME] = 'hbase'
-      @CONF[:AP_NAME] = 'hbase'
-      @CONF[:BACK_TRACE_LIMIT] = 0 unless $fullBackTrace
-
-      hirb = if @CONF[:SCRIPT]
-               HIRB.new(nil, @CONF[:SCRIPT])
-             else
-               HIRB.new
-             end
-
-      shl = TOPLEVEL_BINDING.receiver.instance_variable_get :'@shell'
-      hirb.context.change_workspace shl.get_workspace
-
-      @CONF[:IRB_RC].call(hirb.context) if @CONF[:IRB_RC]
-      # Storing our current HBase IRB Context as the main context is imperative for several reasons,
-      # including auto-completion.
-      @CONF[:MAIN_CONTEXT] = hirb.context
-
-      catch(:IRB_EXIT) do
-        hirb.eval_input
-      end
-    end
-  end
-
-  IRB.start
-end
+puts <<EOF
+  This file has been superceded by packaging our ruby files into a jar
+  and using jruby's bootstrapping to invoke them. If you need to
+  source this file fo some reason it is now named 'jar-bootstrap.rb' and is
+  located in the root of the file hbase-shell.jar and in the source tree at
+  'hbase-shell/src/main/ruby'.
+EOF

Review comment:
       No. Just asking. I think I figured it myself later after reading more... that this stuff would still work.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] busbey commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
busbey commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-707833925


   yeah they're all spotty failures all over the place. I think the flaky infra needs a bigger window so it can catch rarer issues in the hbase-server module.
   
   I'll do another run locally for changed modules and those that depend on them before merging.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hbase] Apache-HBase commented on pull request #2515: HBASE-14067 bundle ruby files for hbase shell into a jar.

Posted by GitBox <gi...@apache.org>.
Apache-HBase commented on pull request #2515:
URL: https://github.com/apache/hbase/pull/2515#issuecomment-706659594


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   1m 11s |  Docker mode activated.  |
   | -0 :warning: |  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 :ok: |  mvndep  |   0m 20s |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m  1s |  master passed  |
   | +1 :green_heart: |  compile  |   2m 35s |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 17s |  branch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   2m 42s |  master passed  |
   ||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 12s |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   3m 49s |  the patch passed  |
   | +1 :green_heart: |  compile  |   2m 38s |  the patch passed  |
   | +1 :green_heart: |  javac  |   2m 38s |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m 13s |  patch has no errors when building our shaded downstream artifacts.  |
   | +1 :green_heart: |  javadoc  |   2m 36s |  the patch passed  |
   ||| _ Other Tests _ |
   | -1 :x: |  unit  | 321m 49s |  root in the patch failed.  |
   |  |   | 358m 33s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | Client=19.03.13 Server=19.03.13 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/4/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/2515 |
   | Optional Tests | javac javadoc unit shadedjars compile |
   | uname | Linux 48f127b50df0 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 / c367e91aff |
   | Default Java | 1.8.0_232 |
   | unit | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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-2515/4/testReport/ |
   | Max. process+thread count | 2686 (vs. ulimit of 30000) |
   | modules | C: hbase-shell hbase-assembly . U: . |
   | Console output | https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2515/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.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org