[ https://issues.apache.org/jira/browse/HIVE-18925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16393720#comment-16393720 ]
ASF GitHub Bot commented on HIVE-18925: --------------------------------------- GitHub user findepi opened a pull request: https://github.com/apache/hive/pull/319 HIVE-18925 Prevent failure when JVM zone had change on 1970-01-01 This prevents static initializer failure if JVM zone did not observe 1970-01-01 00:00:00, while retaining original behavior for all other zones. You can merge this pull request into a Git repository by running: $ git pull https://github.com/findepi/hive fix-startup-banderas Alternatively you can review and apply these changes as the patch at: https://github.com/apache/hive/pull/319.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #319 ---- commit 98b8becb0571da00bf90e073f13f70b4a7698472 Author: Piotr Findeisen <piotr.findeisen@...> Date: 2018-03-09T22:52:40Z HIVE-18925 Prevent failure when JVM zone had change on 1970-01-01 This prevents static initializer failure if JVM zone did not observe 1970-01-01 00:00:00, while retaining original behavior for all other zones. ---- > Hive doesn't work when JVM is America/Bahia_Banderas time zone > -------------------------------------------------------------- > > Key: HIVE-18925 > URL: https://issues.apache.org/jira/browse/HIVE-18925 > Project: Hive > Issue Type: Bug > Environment: JVM in America/Bahia_Banderas zone > Reporter: Piotr Findeisen > Priority: Major > Labels: pull-request-available > > Hive Server2 doesn't work if started with > {{-Duser.timezone=America/Bahia_Banderas}} > > Steps to reproduce > # use [https://github.com/big-data-europe/docker-hive] > # Add {{HADOOP_CLIENT_OPTS: '-Duser.timezone=America/Bahia_Banderas'}} to > {{hive-server}} docker container environment configuration > # {{docker-compose up}} > # > {code:java} > host# docker-compose exec hive-server bash > container# /opt/hive/bin/beeline -u jdbc:hive2://localhost:10000 > --verbose=true > ... > jdbc:hive2://localhost:10000> select 1;{code} > The above fails and prints > {noformat} > Error: java.lang.IllegalStateException: Can't overwrite cause with > org.joda.time.IllegalInstantException: Illegal instant due to time zone > offset transition (daylight savings time 'gap'): 1970-01-01T00:00:00.000 > (America/Bahia_Banderas) (state=08S01,code=0) > java.sql.SQLException: java.lang.IllegalStateException: Can't overwrite cause > with org.joda.time.IllegalInstantException: Illegal instant due to time zone > offset transition (daylight savings time 'gap'): 1970-01-01T00:00:00.000 > (America/Bahia_Banderas) > at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:323) > at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:253) > at org.apache.hive.beeline.Commands.executeInternal(Commands.java:997) > at org.apache.hive.beeline.Commands.execute(Commands.java:1205) > at org.apache.hive.beeline.Commands.sql(Commands.java:1134) > at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1314) > at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:1178) > at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1033) > at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:519) > at org.apache.hive.beeline.BeeLine.main(BeeLine.java:501) > 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) > Caused by: java.lang.IllegalStateException: Can't overwrite cause with > org.joda.time.IllegalInstantException: Illegal instant due to time zone > offset transition (daylight savings time 'gap'): 1970-01-01T00:00:00.000 > (America/Bahia_Banderas) > at java.lang.Throwable.initCause(Throwable.java:457) > at > org.apache.hive.service.cli.HiveSQLException.toStackTrace(HiveSQLException.java:237) > at > org.apache.hive.service.cli.HiveSQLException.toStackTrace(HiveSQLException.java:237) > at > org.apache.hive.service.cli.HiveSQLException.toCause(HiveSQLException.java:198) > at > org.apache.hive.service.cli.HiveSQLException.<init>(HiveSQLException.java:108) > at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:267) > at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:253) > at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:313) > ... 15 more > Caused by: java.lang.ExceptionInInitializerError: null > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:423) > at > org.apache.hive.service.cli.HiveSQLException.newInstance(HiveSQLException.java:245) > at > org.apache.hive.service.cli.HiveSQLException.toStackTrace(HiveSQLException.java:211) > ... 21 more{noformat} > From the above stacktrace it's not visible what is the cause, but i think > it's initialization of > {{org.apache.hive.common.util.TimestampParser#startingDateValue}} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)