Description
When beeline has a connection to a server, in some env it has following problem:
0: jdbc:hive2://localhost> !verbose verbose: on 0: jdbc:hive2://localhost> !sh id java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.hive.beeline.Commands.addConf(Commands.java:758) at org.apache.hive.beeline.Commands.getHiveConf(Commands.java:704) at org.apache.hive.beeline.Commands.sh(Commands.java:1002) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:52) at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1081) at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:917) at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:845) at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:482) at org.apache.hive.beeline.BeeLine.main(BeeLine.java:465) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136) 0: jdbc:hive2://localhost> !sh echo hello java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.hive.beeline.Commands.addConf(Commands.java:758) at org.apache.hive.beeline.Commands.getHiveConf(Commands.java:704) at org.apache.hive.beeline.Commands.sh(Commands.java:1002) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:52) at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1081) at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:917) at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:845) at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:482) at org.apache.hive.beeline.BeeLine.main(BeeLine.java:465) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136) 0: jdbc:hive2://localhost>
Also it breaks if there is no connection established:
beeline> !sh id java.lang.NullPointerException at org.apache.hive.beeline.BeeLine.createStatement(BeeLine.java:1897) at org.apache.hive.beeline.Commands.getConfInternal(Commands.java:724) at org.apache.hive.beeline.Commands.getHiveConf(Commands.java:702) at org.apache.hive.beeline.Commands.sh(Commands.java:1002) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:52) at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1081) at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:917) at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:845) at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:482) at org.apache.hive.beeline.BeeLine.main(BeeLine.java:465) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136)