[jira] [Commented] (HBASE-17285) Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase`
[ https://issues.apache.org/jira/browse/HBASE-17285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16176815#comment-16176815 ] Josh Elser commented on HBASE-17285: bq. happy to target master and see where it lands on backport for earlier release lines Kicked to 3.0.0. I don't have the motivation to do the testing across Hadoop2 and 3 given everything else. Let's just revisit later. Hopefully this issue will help folks running into the same issue until then :) > Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase` > -- > > Key: HBASE-17285 > URL: https://issues.apache.org/jira/browse/HBASE-17285 > Project: HBase > Issue Type: Bug > Components: scripts >Reporter: Josh Elser >Assignee: Josh Elser >Priority: Minor > Fix For: 3.0.0 > > Attachments: HBASE-17285.001.patch > > > Had the great fun of digging through this one. Had a user reporting that > hiveserver2 was no longer finding HBase jars on the classpath. This is > supposed to happen via {{hbase mapredcp}}. > It turned out that they had configured hive-env.sh to set > {{HADOOP_CLIENT_OPTS="-XX:+PrintGCDetails"}} (among other things), which > creates a big multi-line string instead of just a directory. Because of poor > quoting in {{bin/hbase}}, this gives you a wonderfully intuitive error: > {noformat} > Error: Could not find or load main class Heap > {noformat} > That {{Heap}} is actually from the JVM GC details that it was told to print. > While I don't expect this to be a common problem people run into, it's one > that we can address with better quoting. e.g. > {noformat} > + exec > /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java > -Dproc_mapredcp '-XX:OnOutOfMemoryError=kill -9 %p' -XX:+UseConcMarkSweepGC > -Dhbase.log.dir=/usr/local/lib/hbase//logs -Dhbase.log.file=hbase.log > -Dhbase.home.dir=/usr/local/lib/hbase/ -Dhbase.id.str= > -Dhbase.root.logger=INFO,console > '-Djava.library.path='\''/usr/local/lib/hadoop//lib/native' Heap PSYoungGen > total 76800K, used 7942K '[0x0007f550,' 0x0007faa8, > '0x0008)' eden space 66048K, 12% used > '[0x0007f550,0x0007f5cc19c0,0x0007f958)' from space > 10752K, 0% used '[0x0007fa00,0x0007fa00,0x0007faa8)' > to space 10752K, 0% used > '[0x0007f958,0x0007f958,0x0007fa00)' ParOldGen total > 174592K, used 0K '[0x0007e000,' 0x0007eaa8, > '0x0007f550)' object space 174592K, 0% used > '[0x0007e000,0x0007e000,0x0007eaa8)' PSPermGen total > 21504K, used 2756K '[0x0007dae0,' 0x0007dc30, > '0x0007e000)' object space 21504K, 12% used > '[0x0007dae0,0x0007db0b11b8,0x0007dc30)'\''' > -Dhbase.security.logger=INFO,NullAppender > org.apache.hadoop.hbase.util.MapreduceDependencyClasspathTool > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-17285) Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase`
[ https://issues.apache.org/jira/browse/HBASE-17285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16176692#comment-16176692 ] Hadoop QA commented on HBASE-17285: --- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s{color} | {color:blue} Docker mode activated. {color} | | {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 12s{color} | {color:red} HBASE-17285 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/0.4.0/precommit-patchnames for help. {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | HBASE-17285 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12842640/HBASE-17285.001.patch | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/8746/console | | Powered by | Apache Yetus 0.4.0 http://yetus.apache.org | This message was automatically generated. > Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase` > -- > > Key: HBASE-17285 > URL: https://issues.apache.org/jira/browse/HBASE-17285 > Project: HBase > Issue Type: Bug > Components: scripts >Reporter: Josh Elser >Assignee: Josh Elser >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-17285.001.patch > > > Had the great fun of digging through this one. Had a user reporting that > hiveserver2 was no longer finding HBase jars on the classpath. This is > supposed to happen via {{hbase mapredcp}}. > It turned out that they had configured hive-env.sh to set > {{HADOOP_CLIENT_OPTS="-XX:+PrintGCDetails"}} (among other things), which > creates a big multi-line string instead of just a directory. Because of poor > quoting in {{bin/hbase}}, this gives you a wonderfully intuitive error: > {noformat} > Error: Could not find or load main class Heap > {noformat} > That {{Heap}} is actually from the JVM GC details that it was told to print. > While I don't expect this to be a common problem people run into, it's one > that we can address with better quoting. e.g. > {noformat} > + exec > /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java > -Dproc_mapredcp '-XX:OnOutOfMemoryError=kill -9 %p' -XX:+UseConcMarkSweepGC > -Dhbase.log.dir=/usr/local/lib/hbase//logs -Dhbase.log.file=hbase.log > -Dhbase.home.dir=/usr/local/lib/hbase/ -Dhbase.id.str= > -Dhbase.root.logger=INFO,console > '-Djava.library.path='\''/usr/local/lib/hadoop//lib/native' Heap PSYoungGen > total 76800K, used 7942K '[0x0007f550,' 0x0007faa8, > '0x0008)' eden space 66048K, 12% used > '[0x0007f550,0x0007f5cc19c0,0x0007f958)' from space > 10752K, 0% used '[0x0007fa00,0x0007fa00,0x0007faa8)' > to space 10752K, 0% used > '[0x0007f958,0x0007f958,0x0007fa00)' ParOldGen total > 174592K, used 0K '[0x0007e000,' 0x0007eaa8, > '0x0007f550)' object space 174592K, 0% used > '[0x0007e000,0x0007e000,0x0007eaa8)' PSPermGen total > 21504K, used 2756K '[0x0007dae0,' 0x0007dc30, > '0x0007e000)' object space 21504K, 12% used > '[0x0007dae0,0x0007db0b11b8,0x0007dc30)'\''' > -Dhbase.security.logger=INFO,NullAppender > org.apache.hadoop.hbase.util.MapreduceDependencyClasspathTool > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-17285) Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase`
[ https://issues.apache.org/jira/browse/HBASE-17285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16176682#comment-16176682 ] Sean Busbey commented on HBASE-17285: - bump. still want this in 2.0 [~elserj], or happy to target master and see where it lands on backport for earlier release lines? > Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase` > -- > > Key: HBASE-17285 > URL: https://issues.apache.org/jira/browse/HBASE-17285 > Project: HBase > Issue Type: Bug > Components: scripts >Reporter: Josh Elser >Assignee: Josh Elser >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-17285.001.patch > > > Had the great fun of digging through this one. Had a user reporting that > hiveserver2 was no longer finding HBase jars on the classpath. This is > supposed to happen via {{hbase mapredcp}}. > It turned out that they had configured hive-env.sh to set > {{HADOOP_CLIENT_OPTS="-XX:+PrintGCDetails"}} (among other things), which > creates a big multi-line string instead of just a directory. Because of poor > quoting in {{bin/hbase}}, this gives you a wonderfully intuitive error: > {noformat} > Error: Could not find or load main class Heap > {noformat} > That {{Heap}} is actually from the JVM GC details that it was told to print. > While I don't expect this to be a common problem people run into, it's one > that we can address with better quoting. e.g. > {noformat} > + exec > /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java > -Dproc_mapredcp '-XX:OnOutOfMemoryError=kill -9 %p' -XX:+UseConcMarkSweepGC > -Dhbase.log.dir=/usr/local/lib/hbase//logs -Dhbase.log.file=hbase.log > -Dhbase.home.dir=/usr/local/lib/hbase/ -Dhbase.id.str= > -Dhbase.root.logger=INFO,console > '-Djava.library.path='\''/usr/local/lib/hadoop//lib/native' Heap PSYoungGen > total 76800K, used 7942K '[0x0007f550,' 0x0007faa8, > '0x0008)' eden space 66048K, 12% used > '[0x0007f550,0x0007f5cc19c0,0x0007f958)' from space > 10752K, 0% used '[0x0007fa00,0x0007fa00,0x0007faa8)' > to space 10752K, 0% used > '[0x0007f958,0x0007f958,0x0007fa00)' ParOldGen total > 174592K, used 0K '[0x0007e000,' 0x0007eaa8, > '0x0007f550)' object space 174592K, 0% used > '[0x0007e000,0x0007e000,0x0007eaa8)' PSPermGen total > 21504K, used 2756K '[0x0007dae0,' 0x0007dc30, > '0x0007e000)' object space 21504K, 12% used > '[0x0007dae0,0x0007db0b11b8,0x0007dc30)'\''' > -Dhbase.security.logger=INFO,NullAppender > org.apache.hadoop.hbase.util.MapreduceDependencyClasspathTool > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-17285) Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase`
[ https://issues.apache.org/jira/browse/HBASE-17285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15743110#comment-15743110 ] Josh Elser commented on HBASE-17285: bq. Unfortunately, all of the _OPTS handling in most of the Hadoop ecosystem scripts I've looked at do very bad things and are pretty much dependent upon using space delimiters. This means no, folks can't properly quote it in scripts and there are some limitations on these values. This obviously causes other problems (the biggest one probably being the inability to use directory paths with spaces) which is why shellcheck is throwing a fit. Ok, I'm not completely off my rocker :) bq. The only real solution I've found is to convert them all to arrays... Awesome, thanks for the tip! I'll try to take a look at what you've done upstream and try to clean things up downstream. Thanks for the quick review! > Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase` > -- > > Key: HBASE-17285 > URL: https://issues.apache.org/jira/browse/HBASE-17285 > Project: HBase > Issue Type: Bug > Components: scripts >Reporter: Josh Elser >Assignee: Josh Elser >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-17285.001.patch > > > Had the great fun of digging through this one. Had a user reporting that > hiveserver2 was no longer finding HBase jars on the classpath. This is > supposed to happen via {{hbase mapredcp}}. > It turned out that they had configured hive-env.sh to set > {{HADOOP_CLIENT_OPTS="-XX:+PrintGCDetails"}} (among other things), which > creates a big multi-line string instead of just a directory. Because of poor > quoting in {{bin/hbase}}, this gives you a wonderfully intuitive error: > {noformat} > Error: Could not find or load main class Heap > {noformat} > That {{Heap}} is actually from the JVM GC details that it was told to print. > While I don't expect this to be a common problem people run into, it's one > that we can address with better quoting. e.g. > {noformat} > + exec > /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java > -Dproc_mapredcp '-XX:OnOutOfMemoryError=kill -9 %p' -XX:+UseConcMarkSweepGC > -Dhbase.log.dir=/usr/local/lib/hbase//logs -Dhbase.log.file=hbase.log > -Dhbase.home.dir=/usr/local/lib/hbase/ -Dhbase.id.str= > -Dhbase.root.logger=INFO,console > '-Djava.library.path='\''/usr/local/lib/hadoop//lib/native' Heap PSYoungGen > total 76800K, used 7942K '[0x0007f550,' 0x0007faa8, > '0x0008)' eden space 66048K, 12% used > '[0x0007f550,0x0007f5cc19c0,0x0007f958)' from space > 10752K, 0% used '[0x0007fa00,0x0007fa00,0x0007faa8)' > to space 10752K, 0% used > '[0x0007f958,0x0007f958,0x0007fa00)' ParOldGen total > 174592K, used 0K '[0x0007e000,' 0x0007eaa8, > '0x0007f550)' object space 174592K, 0% used > '[0x0007e000,0x0007e000,0x0007eaa8)' PSPermGen total > 21504K, used 2756K '[0x0007dae0,' 0x0007dc30, > '0x0007e000)' object space 21504K, 12% used > '[0x0007dae0,0x0007db0b11b8,0x0007dc30)'\''' > -Dhbase.security.logger=INFO,NullAppender > org.apache.hadoop.hbase.util.MapreduceDependencyClasspathTool > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HBASE-17285) Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase`
[ https://issues.apache.org/jira/browse/HBASE-17285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15740383#comment-15740383 ] Allen Wittenauer commented on HBASE-17285: -- Unfortunately, all of the _OPTS handling in most of the Hadoop ecosystem scripts I've looked at do very bad things and are pretty much dependent upon using space delimiters. This means no, folks can't properly quote it in scripts and there are some limitations on these values. This obviously causes other problems (the biggest one probably being the inability to use directory paths with spaces) which is why shellcheck is throwing a fit. The only real solution I've found is to convert them all to arrays. This can be done in a somewhat backward compatible change, but it's massive amount of work, even for the rewritten scripts. See HADOOP-13365 for what I've started doing in Hadoop. > Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase` > -- > > Key: HBASE-17285 > URL: https://issues.apache.org/jira/browse/HBASE-17285 > Project: HBase > Issue Type: Bug > Components: scripts >Reporter: Josh Elser >Assignee: Josh Elser >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-17285.001.patch > > > Had the great fun of digging through this one. Had a user reporting that > hiveserver2 was no longer finding HBase jars on the classpath. This is > supposed to happen via {{hbase mapredcp}}. > It turned out that they had configured hive-env.sh to set > {{HADOOP_CLIENT_OPTS="-XX:+PrintGCDetails"}} (among other things), which > creates a big multi-line string instead of just a directory. Because of poor > quoting in {{bin/hbase}}, this gives you a wonderfully intuitive error: > {noformat} > Error: Could not find or load main class Heap > {noformat} > That {{Heap}} is actually from the JVM GC details that it was told to print. > While I don't expect this to be a common problem people run into, it's one > that we can address with better quoting. e.g. > {noformat} > + exec > /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java > -Dproc_mapredcp '-XX:OnOutOfMemoryError=kill -9 %p' -XX:+UseConcMarkSweepGC > -Dhbase.log.dir=/usr/local/lib/hbase//logs -Dhbase.log.file=hbase.log > -Dhbase.home.dir=/usr/local/lib/hbase/ -Dhbase.id.str= > -Dhbase.root.logger=INFO,console > '-Djava.library.path='\''/usr/local/lib/hadoop//lib/native' Heap PSYoungGen > total 76800K, used 7942K '[0x0007f550,' 0x0007faa8, > '0x0008)' eden space 66048K, 12% used > '[0x0007f550,0x0007f5cc19c0,0x0007f958)' from space > 10752K, 0% used '[0x0007fa00,0x0007fa00,0x0007faa8)' > to space 10752K, 0% used > '[0x0007f958,0x0007f958,0x0007fa00)' ParOldGen total > 174592K, used 0K '[0x0007e000,' 0x0007eaa8, > '0x0007f550)' object space 174592K, 0% used > '[0x0007e000,0x0007e000,0x0007eaa8)' PSPermGen total > 21504K, used 2756K '[0x0007dae0,' 0x0007dc30, > '0x0007e000)' object space 21504K, 12% used > '[0x0007dae0,0x0007db0b11b8,0x0007dc30)'\''' > -Dhbase.security.logger=INFO,NullAppender > org.apache.hadoop.hbase.util.MapreduceDependencyClasspathTool > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HBASE-17285) Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase`
[ https://issues.apache.org/jira/browse/HBASE-17285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15736984#comment-15736984 ] Hadoop QA commented on HBASE-17285: --- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 16s {color} | {color:blue} Docker mode activated. {color} | | {color:blue}0{color} | {color:blue} shelldocs {color} | {color:blue} 0m 3s {color} | {color:blue} Shelldocs was not available. {color} | | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s {color} | {color:green} The patch does not contain any @author tags. {color} | | {color:red}-1{color} | {color:red} shellcheck {color} | {color:red} 0m 4s {color} | {color:red} The patch generated 16 new + 453 unchanged - 8 fixed = 469 total (was 461) {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s {color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 26m 27s {color} | {color:green} Patch does not cause any errors with Hadoop 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3 or 3.0.0-alpha1. {color} | | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 14s {color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 27m 10s {color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Docker | Client=1.12.3 Server=1.12.3 Image:yetus/hbase:8d52d23 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12842640/HBASE-17285.001.patch | | JIRA Issue | HBASE-17285 | | Optional Tests | asflicense shellcheck shelldocs | | uname | Linux 497374c991da 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux | | Build tool | maven | | Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build/component/dev-support/hbase-personality.sh | | git revision | master / b554e05 | | shellcheck | v0.4.5 | | shellcheck | https://builds.apache.org/job/PreCommit-HBASE-Build/4863/artifact/patchprocess/diff-patch-shellcheck.txt | | modules | C: . U: . | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/4863/console | | Powered by | Apache Yetus 0.3.0 http://yetus.apache.org | This message was automatically generated. > Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase` > -- > > Key: HBASE-17285 > URL: https://issues.apache.org/jira/browse/HBASE-17285 > Project: HBase > Issue Type: Bug > Components: scripts >Reporter: Josh Elser >Assignee: Josh Elser >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-17285.001.patch > > > Had the great fun of digging through this one. Had a user reporting that > hiveserver2 was no longer finding HBase jars on the classpath. This is > supposed to happen via {{hbase mapredcp}}. > It turned out that they had configured hive-env.sh to set > {{HADOOP_CLIENT_OPTS="-XX:+PrintGCDetails"}} (among other things), which > creates a big multi-line string instead of just a directory. Because of poor > quoting in {{bin/hbase}}, this gives you a wonderfully intuitive error: > {noformat} > Error: Could not find or load main class Heap > {noformat} > That {{Heap}} is actually from the JVM GC details that it was told to print. > While I don't expect this to be a common problem people run into, it's one > that we can address with better quoting. e.g. > {noformat} > + exec > /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java > -Dproc_mapredcp '-XX:OnOutOfMemoryError=kill -9 %p' -XX:+UseConcMarkSweepGC > -Dhbase.log.dir=/usr/local/lib/hbase//logs -Dhbase.log.file=hbase.log > -Dhbase.home.dir=/usr/local/lib/hbase/ -Dhbase.id.str= > -Dhbase.root.logger=INFO,console > '-Djava.library.path='\''/usr/local/lib/hadoop//lib/native' Heap PSYoungGen > total 76800K, used 7942K '[0x0007f550,' 0x0007faa8, > '0x0008)' eden space 66048K, 12% used > '[0x0007f550,0x0007f5cc19c0,0x0007f958)' from space > 10752K, 0% used '[0x0007fa00,0x0007fa00,0x0007faa8)' > to space 10752K, 0% used > '[0x0007f958,0x0007f958,0x0007fa00)' ParOldGen total > 174592K, used 0K '[0x0007e000,' 0x0007eaa8, > '0x0007f550)' object space 174592K, 0% used > '[0x0007e000,0x0007e000,0x0007eaa8)' PSPermGen total > 21504K, used 2756K '[0x0007dae0,' 0x0007dc30, > '0x0007e000)' object space 21504K, 12% used
[jira] [Commented] (HBASE-17285) Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase`
[ https://issues.apache.org/jira/browse/HBASE-17285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15736947#comment-15736947 ] Josh Elser commented on HBASE-17285: Maybe I could appeal to the good graces of the [~aw] to tell me a better way to do it :) One issue I had was that if I quoted {{HBASE_OPTS}}, the leading JVM GC opts in {{HBASE_OPTS}} were getting incorrectly parsed. So the JVM would try to enable an option like {{UseConcMarkSweepGC -Dhbase.log.dir=..}} (treating the entire HBASE_OPTS as one JVM option to enable) which obviously fails. > Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase` > -- > > Key: HBASE-17285 > URL: https://issues.apache.org/jira/browse/HBASE-17285 > Project: HBase > Issue Type: Bug > Components: scripts >Reporter: Josh Elser >Assignee: Josh Elser >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-17285.001.patch > > > Had the great fun of digging through this one. Had a user reporting that > hiveserver2 was no longer finding HBase jars on the classpath. This is > supposed to happen via {{hbase mapredcp}}. > It turned out that they had configured hive-env.sh to set > {{HADOOP_CLIENT_OPTS="-XX:+PrintGCDetails"}} (among other things), which > creates a big multi-line string instead of just a directory. Because of poor > quoting in {{bin/hbase}}, this gives you a wonderfully intuitive error: > {noformat} > Error: Could not find or load main class Heap > {noformat} > That {{Heap}} is actually from the JVM GC details that it was told to print. > While I don't expect this to be a common problem people run into, it's one > that we can address with better quoting. e.g. > {noformat} > + exec > /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java > -Dproc_mapredcp '-XX:OnOutOfMemoryError=kill -9 %p' -XX:+UseConcMarkSweepGC > -Dhbase.log.dir=/usr/local/lib/hbase//logs -Dhbase.log.file=hbase.log > -Dhbase.home.dir=/usr/local/lib/hbase/ -Dhbase.id.str= > -Dhbase.root.logger=INFO,console > '-Djava.library.path='\''/usr/local/lib/hadoop//lib/native' Heap PSYoungGen > total 76800K, used 7942K '[0x0007f550,' 0x0007faa8, > '0x0008)' eden space 66048K, 12% used > '[0x0007f550,0x0007f5cc19c0,0x0007f958)' from space > 10752K, 0% used '[0x0007fa00,0x0007fa00,0x0007faa8)' > to space 10752K, 0% used > '[0x0007f958,0x0007f958,0x0007fa00)' ParOldGen total > 174592K, used 0K '[0x0007e000,' 0x0007eaa8, > '0x0007f550)' object space 174592K, 0% used > '[0x0007e000,0x0007e000,0x0007eaa8)' PSPermGen total > 21504K, used 2756K '[0x0007dae0,' 0x0007dc30, > '0x0007e000)' object space 21504K, 12% used > '[0x0007dae0,0x0007db0b11b8,0x0007dc30)'\''' > -Dhbase.security.logger=INFO,NullAppender > org.apache.hadoop.hbase.util.MapreduceDependencyClasspathTool > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HBASE-17285) Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase`
[ https://issues.apache.org/jira/browse/HBASE-17285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15736931#comment-15736931 ] Josh Elser commented on HBASE-17285: Chatting with Nick D who asked about shellcheck. Relevant portion: {noformat} In bin/hbase line 438: "$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError="kill -9 %p" $HEAP_SETTINGS $HBASE_OPTS $CLASS "$@" ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. In bin/hbase line 440: "$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError="kill -9 %p" $HEAP_SETTINGS $HBASE_OPTS "$JAVA_LIBRARY_PATH_OPT" $CLASS "$@" ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. In bin/hbase line 446: exec "$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError="kill -9 %p" $HEAP_SETTINGS $HBASE_OPTS $CLASS "$@" ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. In bin/hbase line 448: exec "$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError="kill -9 %p" $HEAP_SETTINGS $HBASE_OPTS "$JAVA_LIBRARY_PATH_OPT" $CLASS "$@" ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. ^-- SC2086: Double quote to prevent globbing and word splitting. {noformat} Essentially, the changes I added didn't create any new warnings :P > Misconfiguration of JVM GC options in HADOOP_CLIENT_OPTS may break `bin/hbase` > -- > > Key: HBASE-17285 > URL: https://issues.apache.org/jira/browse/HBASE-17285 > Project: HBase > Issue Type: Bug > Components: scripts >Reporter: Josh Elser >Assignee: Josh Elser >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-17285.001.patch > > > Had the great fun of digging through this one. Had a user reporting that > hiveserver2 was no longer finding HBase jars on the classpath. This is > supposed to happen via {{hbase mapredcp}}. > It turned out that they had configured hive-env.sh to set > {{HADOOP_CLIENT_OPTS="-XX:+PrintGCDetails"}} (among other things), which > creates a big multi-line string instead of just a directory. Because of poor > quoting in {{bin/hbase}}, this gives you a wonderfully intuitive error: > {noformat} > Error: Could not find or load main class Heap > {noformat} > That {{Heap}} is actually from the JVM GC details that it was told to print. > While I don't expect this to be a common problem people run into, it's one > that we can address with better quoting. e.g. > {noformat} > + exec > /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/bin/java > -Dproc_mapredcp '-XX:OnOutOfMemoryError=kill -9 %p' -XX:+UseConcMarkSweepGC > -Dhbase.log.dir=/usr/local/lib/hbase//logs -Dhbase.log.file=hbase.log > -Dhbase.home.dir=/usr/local/lib/hbase/ -Dhbase.id.str= > -Dhbase.root.logger=INFO,console > '-Djava.library.path='\''/usr/local/lib/hadoop//lib/native' Heap PSYoungGen > total 76800K, used 7942K '[0x0007f550,' 0x0007faa8, > '0x0008)' eden space 66048K, 12% used >