[ https://issues.apache.org/jira/browse/HIVE-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066314#comment-13066314 ]
jirapos...@reviews.apache.org commented on HIVE-2139: ----------------------------------------------------- ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/958/ ----------------------------------------------------------- (Updated 2011-07-15 23:51:55.625387) Review request for hive and Carl Steinbach. Changes ------- Updated based on Carl's feedback. All unit tests passed except for "org.apache.hadoop.hive.cli.TestNegativeCliDriver.testNegativeCliDriver_script_broken_pipe1" which I don't think is me. I also exercised on the command line and it all seemed to work. Summary ------- This patch updates HiveServer and HiveMetastore to add proper cli handling - similar to that used in CliDriver (ie GnuParser). There's a common HiveCli class that's used by both main classes. I've attempted to make the cli's backward compatible with the prior command line processing. Notice I've "deprecated" (via warnings, but the code still runs) if the old style CLI usage is used. commands such as the following now work as expected: bin/hive --service hiveserver -t 200 -p 12000 --hiveconf hive.root.logger=DEBUG,console as does the following which generates usage information: bin/hive --service hiveserver -h Note: HiveMetastore as not initializing log4j, I updated the code to do similar to HiveServer (otw the hiveconf hive.root.logger option above didn't work). This addresses bug HIVE-2139. https://issues.apache.org/jira/browse/HIVE-2139 Diffs (updated) ----- ql/src/test/org/apache/hadoop/hive/ql/history/TestHiveHistory.java 728958d service/src/java/org/apache/hadoop/hive/service/HiveServer.java ea04be9 ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java 090ecfc ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java 61393c8 bin/ext/hiveserver.sh b5edce4 bin/ext/metastore.sh db15f6e cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java bd9f6b1 common/build.xml 0969e16 common/ivy.xml bee3bf0 common/src/java/org/apache/hadoop/hive/common/LogUtils.java PRE-CREATION common/src/java/org/apache/hadoop/hive/common/cli/CommonCliOptions.java PRE-CREATION hwi/src/java/org/apache/hadoop/hive/hwi/HWISessionItem.java 1bf8c97 metastore/ivy.xml 83218fc metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java e540c63 Diff: https://reviews.apache.org/r/958/diff Testing ------- I couldn't find any tests for these changes, so I verfied the changes manually. Thanks, Patrick > Enables HiveServer to accept -hiveconf option > --------------------------------------------- > > Key: HIVE-2139 > URL: https://issues.apache.org/jira/browse/HIVE-2139 > Project: Hive > Issue Type: Improvement > Components: CLI > Environment: Linux + CDH3u0 (Hive 0.7.0+27.1-2~lucid-cdh3) > Reporter: Kazuki Ohta > Assignee: Patrick Hunt > Attachments: HIVE-2139.patch > > > Currently, I'm trying to test HiveHBaseIntegration on HiveServer. But it > doesn't seem to accept -hiveconf command. > {code} > hive --service hiveserver -hiveconf hbase.zookeeper.quorum=hdp0,hdp1,hdp2 > Starting Hive Thrift Server > java.lang.NumberFormatException: For input string: "-hiveconf" > at > java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) > at java.lang.Integer.parseInt(Integer.java:449) > at java.lang.Integer.parseInt(Integer.java:499) > at org.apache.hadoop.hive.service.HiveServer.main(HiveServer.java:382) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.util.RunJar.main(RunJar.java:186) > {code} > Therefore, you need to throw the query like "set > hbase.zookeeper.quorum=hdp0,hdp1,hdp2" everytime. It's not convenient for > separating the configuration between server-side and client-side. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira