Skip to content

[SPARK-24292][SQL] Proxy user cannot connect to HiveMetastore in loca…#21343

Closed
LantaoJin wants to merge 4 commits into
apache:masterfrom
LantaoJin:SPARK-24292
Closed

[SPARK-24292][SQL] Proxy user cannot connect to HiveMetastore in loca…#21343
LantaoJin wants to merge 4 commits into
apache:masterfrom
LantaoJin:SPARK-24292

Conversation

@LantaoJin

Copy link
Copy Markdown
Contributor

…l mode

What changes were proposed in this pull request?

#17335 has fixed the similar issue in yarn mode. Actually, in local mode we still face this problem.

If user want to create a table. Local mode is much easier than launching an AM in yarn.
bin/spark-sql --master local --proxy-user x_user
But it doesn't work:

Caused by: MetaException(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: GSS initiate failed
at org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232)
at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:316)
at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52)
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698)
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:420)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.(HiveMetaStoreClient.java:236)
at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.(SessionHiveMetaStoreClient.java:74)
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.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1521)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.(RetryingMetaStoreClient.java:86)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:132)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:104)
at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3005)
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3024)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:503)
at org.apache.spark.sql.hive.client.HiveClientImpl.(HiveClientImpl.scala:192)

How was this patch tested?

Run the command below to see if it works.
bin/spark-sql --master local --proxy-user x_user

@LantaoJin

Copy link
Copy Markdown
Contributor Author

@jerryshao @vanzin

@AmplabJenkins

Copy link
Copy Markdown

Can one of the admins verify this patch?

@LantaoJin

LantaoJin commented May 16, 2018

Copy link
Copy Markdown
Contributor Author

Sorry, the test case still failed. Will update it later.

@LantaoJin

Copy link
Copy Markdown
Contributor Author

Now the test case succeeds.

@LantaoJin

Copy link
Copy Markdown
Contributor Author

@gatorsmile @cloud-fan Could you help to review this?

@vanzin

vanzin commented May 22, 2018

Copy link
Copy Markdown
Contributor

How is this different from SPARK-23639 or, in other words, why doesn't the fix for that bug work for you?

@LantaoJin

Copy link
Copy Markdown
Contributor Author

@vanzin Seems duplicated. Let me check.

@LantaoJin

Copy link
Copy Markdown
Contributor Author

Cool, SPARK-23639 also works for me. Close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants