[ https://issues.apache.org/jira/browse/HIVE-27289?focusedWorklogId=858992&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-858992 ]
ASF GitHub Bot logged work on HIVE-27289: ----------------------------------------- Author: ASF GitHub Bot Created on: 25/Apr/23 17:40 Start Date: 25/Apr/23 17:40 Worklog Time Spent: 10m Work Description: nrg4878 commented on code in PR #4263: URL: https://github.com/apache/hive/pull/4263#discussion_r1176836581 ########## jdbc-handler/src/main/java/org/apache/hive/storage/jdbc/dao/TeradataDatabaseAccessor.java: ########## @@ -0,0 +1,41 @@ +/* + * + * Licensed 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. + */ +package org.apache.hive.storage.jdbc.dao; + +/** + * Teradata specific data accessor. This is needed because Teradata JDBC drivers do not support generic LIMIT and OFFSET + * escape functions + */ +public class TeradataDatabaseAccessor extends GenericJdbcDatabaseAccessor { + + @Override Review Comment: Not a nit. There should only be one file in this change, not sure how others got pulled in. Let me fix that. Issue Time Tracking ------------------- Worklog Id: (was: 858992) Time Spent: 50m (was: 40m) > Check for proxy hosts with subnet in IP results in exception > ------------------------------------------------------------- > > Key: HIVE-27289 > URL: https://issues.apache.org/jira/browse/HIVE-27289 > Project: Hive > Issue Type: Bug > Components: Standalone Metastore > Affects Versions: 4.0.0-alpha-2 > Reporter: Naveen Gangam > Assignee: Naveen Gangam > Priority: Minor > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > When running schematool for sysdb setup in a kerberized environment, the > check to see if the user is a super user fails when the > hadoop.proxyuser.hive.hosts contains a subnet in IPAddresses. (for example: > 192.168.0.3/23) > {noformat} > exec > /opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p11.35002917/lib/hadoop/bin/hadoop > jar > /opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p11.35002917/lib/hive/lib/hive-cli-3.1.3000.7.1.8.11-3.jar > org.apache.hive.beeline.schematool.HiveSchemaTool -verbose -dbType hive > -metaDbType mysql -initOrUpgradeSchema > WARNING: Use "yarn jar" to launch YARN applications. > SLF4J: Class path contains multiple SLF4J bindings. > SLF4J: Found binding in > [jar:file:/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p11.35002917/jars/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] > SLF4J: Found binding in > [jar:file:/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p11.35002917/jars/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class] > SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an > explanation. > SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory] > Hive Session ID = 93d863d8-cbe6-47fc-8817-49074841f9f1 > WARNING: An illegal reflective access operation has occurred > WARNING: Illegal reflective access by > org.apache.hadoop.hive.common.StringInternUtils > (file:/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p11.35002917/jars/hive-common-3.1.3000.7.1.8.11-3.jar) > to field java.net.URI.string > WARNING: Please consider reporting this to the maintainers of > org.apache.hadoop.hive.common.StringInternUtils > WARNING: Use --illegal-access=warn to enable warnings of further illegal > reflective access operations > WARNING: All illegal access operations will be denied in a future release > 23/04/22 12:01:38 ERROR metastore.HiveMetaStoreAuthorizer: [main]: > HiveMetaStoreAuthorizer.onEvent(): failed > java.lang.IllegalArgumentException: Could not parse [] > at > org.apache.commons.net.util.SubnetUtils.toInteger(SubnetUtils.java:287) > ~[commons-net-3.6.jar:3.6] > at > org.apache.commons.net.util.SubnetUtils.access$400(SubnetUtils.java:27) > ~[commons-net-3.6.jar:3.6] > at > org.apache.commons.net.util.SubnetUtils$SubnetInfo.isInRange(SubnetUtils.java:125) > ~[commons-net-3.6.jar:3.6] > at org.apache.hadoop.util.MachineList.includes(MachineList.java:155) > ~[hadoop-common-3.1.1.7.1.8.11-3.jar:?] > at > org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.checkUserHasHostProxyPrivileges(MetaStoreUtils.java:1347) > ~[hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer.isSuperUser(HiveMetaStoreAuthorizer.java:495) > ~[hive-exec-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer.skipAuthorization(HiveMetaStoreAuthorizer.java:558) > ~[hive-exec-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer.onEvent(HiveMetaStoreAuthorizer.java:104) > [hive-exec-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.firePreEvent(HiveMetaStore.java:4026) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_database_req(HiveMetaStore.java:1695) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > ~[?:?] > at > jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > ~[?:?] > at > jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:?] > at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:147) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at com.sun.proxy.$Proxy43.get_database_req(Unknown Source) [?:?] > at > org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getDatabase(HiveMetaStoreClient.java:1946) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getDatabase(HiveMetaStoreClient.java:1930) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > ~[?:?] > at > jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > ~[?:?] > at > jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:?] > at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] > at > org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:213) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at com.sun.proxy.$Proxy44.getDatabase(Unknown Source) [?:?] > at org.apache.hadoop.hive.ql.metadata.Hive.getDatabase(Hive.java:2161) > [hive-exec-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.session.HiveSessionImpl.configureSession(HiveSessionImpl.java:296) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.session.HiveSessionImpl.open(HiveSessionImpl.java:188) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.session.SessionManager.createSession(SessionManager.java:480) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.session.SessionManager.openSession(SessionManager.java:420) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.CLIService.openSession(CLIService.java:190) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.thrift.ThriftCLIService.getSessionHandle(ThriftCLIService.java:499) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.thrift.ThriftCLIService.OpenSession(ThriftCLIService.java:341) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:1006) > [hive-jdbc-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:313) > [hive-jdbc-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) > [hive-jdbc-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at java.sql.DriverManager.getConnection(DriverManager.java:677) > [java.sql:?] > at java.sql.DriverManager.getConnection(DriverManager.java:228) > [java.sql:?] > at > org.apache.hadoop.hive.metastore.tools.schematool.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:88) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.tools.schematool.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:103) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.CDHMetaStoreSchemaInfo.getMetaStoreSchemaVersion(CDHMetaStoreSchemaInfo.java:345) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.tools.schematool.SchemaToolTaskInitOrUpgrade.execute(SchemaToolTaskInitOrUpgrade.java:41) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool.run(MetastoreSchemaTool.java:454) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.beeline.schematool.HiveSchemaTool.main(HiveSchemaTool.java:138) > [hive-beeline-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > ~[?:?] > at > jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > ~[?:?] > at > jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:?] > at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] > at org.apache.hadoop.util.RunJar.run(RunJar.java:318) > [hadoop-common-3.1.1.7.1.8.11-3.jar:?] > at org.apache.hadoop.util.RunJar.main(RunJar.java:232) > [hadoop-common-3.1.1.7.1.8.11-3.jar:?] > 23/04/22 12:01:38 ERROR metastore.HiveMetaStoreAuthorizer: [main]: > HiveMetaStoreAuthorizer.onEvent(): failed > java.lang.IllegalArgumentException: Could not parse [] > at > org.apache.commons.net.util.SubnetUtils.toInteger(SubnetUtils.java:287) > ~[commons-net-3.6.jar:3.6] > at > org.apache.commons.net.util.SubnetUtils.access$400(SubnetUtils.java:27) > ~[commons-net-3.6.jar:3.6] > at > org.apache.commons.net.util.SubnetUtils$SubnetInfo.isInRange(SubnetUtils.java:125) > ~[commons-net-3.6.jar:3.6] > at org.apache.hadoop.util.MachineList.includes(MachineList.java:155) > ~[hadoop-common-3.1.1.7.1.8.11-3.jar:?] > at > org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.checkUserHasHostProxyPrivileges(MetaStoreUtils.java:1347) > ~[hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer.isSuperUser(HiveMetaStoreAuthorizer.java:495) > ~[hive-exec-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer.skipAuthorization(HiveMetaStoreAuthorizer.java:558) > ~[hive-exec-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer.onEvent(HiveMetaStoreAuthorizer.java:104) > [hive-exec-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.firePreEvent(HiveMetaStore.java:4026) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_database_req(HiveMetaStore.java:1695) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > ~[?:?] > at > jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > ~[?:?] > at > jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:?] > at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:147) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at com.sun.proxy.$Proxy43.get_database_req(Unknown Source) [?:?] > at > org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getDatabase(HiveMetaStoreClient.java:1946) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getDatabase(HiveMetaStoreClient.java:1930) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > ~[?:?] > at > jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > ~[?:?] > at > jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:?] > at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] > at > org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:213) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at com.sun.proxy.$Proxy44.getDatabase(Unknown Source) [?:?] > at org.apache.hadoop.hive.ql.metadata.Hive.getDatabase(Hive.java:2161) > [hive-exec-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.session.HiveSessionImpl.configureSession(HiveSessionImpl.java:296) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.session.HiveSessionImpl.open(HiveSessionImpl.java:188) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.session.SessionManager.createSession(SessionManager.java:480) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.session.SessionManager.openSession(SessionManager.java:420) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.CLIService.openSession(CLIService.java:190) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.thrift.ThriftCLIService.getSessionHandle(ThriftCLIService.java:499) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.service.cli.thrift.ThriftCLIService.OpenSession(ThriftCLIService.java:341) > [hive-service-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:1006) > [hive-jdbc-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:313) > [hive-jdbc-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) > [hive-jdbc-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at java.sql.DriverManager.getConnection(DriverManager.java:677) > [java.sql:?] > at java.sql.DriverManager.getConnection(DriverManager.java:228) > [java.sql:?] > at > org.apache.hadoop.hive.metastore.tools.schematool.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:88) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.tools.schematool.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:103) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.CDHMetaStoreSchemaInfo.getMetaStoreSchemaVersion(CDHMetaStoreSchemaInfo.java:345) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.tools.schematool.SchemaToolTaskInitOrUpgrade.execute(SchemaToolTaskInitOrUpgrade.java:41) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool.run(MetastoreSchemaTool.java:454) > [hive-standalone-metastore-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at > org.apache.hive.beeline.schematool.HiveSchemaTool.main(HiveSchemaTool.java:138) > [hive-beeline-3.1.3000.7.1.8.11-3.jar:3.1.3000.7.1.8.11-3] > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > ~[?:?] > at > jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > ~[?:?] > at > jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:?] > at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] > at org.apache.hadoop.util.RunJar.run(RunJar.java:318) > [hadoop-common-3.1.1.7.1.8.11-3.jar:?] > at org.apache.hadoop.util.RunJar.main(RunJar.java:232) > [hadoop-common-3.1.1.7.1.8.11-3.jar:?] > 23/04/22 12:01:38 ERROR metastore.RetryingHMSHandler: [main]: > MetaException(message:Could not parse []) > at > org.apache.hadoop.hive.ql.security.authorization.plugin.metastore.HiveMetaStoreAuthorizer.onEvent(HiveMetaStoreAuthorizer.java:110) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.firePreEvent(HiveMetaStore.java:4026) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_database_req(HiveMetaStore.java:1695) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:147) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108) > at com.sun.proxy.$Proxy43.get_database_req(Unknown Source) > at > org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getDatabase(HiveMetaStoreClient.java:1946) > at > org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getDatabase(HiveMetaStoreClient.java:1930) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) > at > org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:213) > at com.sun.proxy.$Proxy44.getDatabase(Unknown Source) > at org.apache.hadoop.hive.ql.metadata.Hive.getDatabase(Hive.java:2161) > at > org.apache.hive.service.cli.session.HiveSessionImpl.configureSession(HiveSessionImpl.java:296) > at > org.apache.hive.service.cli.session.HiveSessionImpl.open(HiveSessionImpl.java:188) > at > org.apache.hive.service.cli.session.SessionManager.createSession(SessionManager.java:480) > at > org.apache.hive.service.cli.session.SessionManager.openSession(SessionManager.java:420) > at > org.apache.hive.service.cli.CLIService.openSession(CLIService.java:190) > at > org.apache.hive.service.cli.thrift.ThriftCLIService.getSessionHandle(ThriftCLIService.java:499) > at > org.apache.hive.service.cli.thrift.ThriftCLIService.OpenSession(ThriftCLIService.java:341) > at > org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:1006) > at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:313) > at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) > at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677) > at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228) > at > org.apache.hadoop.hive.metastore.tools.schematool.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:88) > at > org.apache.hadoop.hive.metastore.tools.schematool.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:103) > at > org.apache.hadoop.hive.metastore.CDHMetaStoreSchemaInfo.getMetaStoreSchemaVersion(CDHMetaStoreSchemaInfo.java:345) > at > org.apache.hadoop.hive.metastore.tools.schematool.SchemaToolTaskInitOrUpgrade.execute(SchemaToolTaskInitOrUpgrade.java:41) > at > org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool.run(MetastoreSchemaTool.java:454) > at > org.apache.hive.beeline.schematool.HiveSchemaTool.main(HiveSchemaTool.java:138) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:566) > at org.apache.hadoop.util.RunJar.run(RunJar.java:318) > at org.apache.hadoop.util.RunJar.main(RunJar.java:232) > {noformat} > The root cause being HiveMetaStoreAuthorizer.isSuperUser() > String ipAddress = HiveMetaStore.HMSHandler.getIPAddress(); > --> this is null is kerberized environments when running from something like > schematool (and perhaps metatool as well). > when you have a CIDR representation in the IPAddress, then > SubnetInfo.isInRange("") throws the above exception. > So in such cases, it is better to use the localhost address before resorting > to "". -- This message was sent by Atlassian Jira (v8.20.10#820010)