You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "Ryan P (JIRA)" <ji...@apache.org> on 2015/06/25 08:08:04 UTC

[jira] [Commented] (SENTRY-780) HDFS Plugin should not execute path callbacks for views

    [ https://issues.apache.org/jira/browse/SENTRY-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14600753#comment-14600753 ] 

Ryan P commented on SENTRY-780:
-------------------------------

Just to shed a little extra light on this:

As [~prasadm] mentioned this issue arrises when Sentry attempts to update HDFS path information. The except is thrown when we execute PathsUpdate.parsePath() on the non existent HDFS path. 

2015-06-25 05:58:12,334 ERROR org.apache.hadoop.hive.metastore.RetryingHMSHandler: MetaException(message:java.lang.IllegalArgumentException: data may not be null)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:5257)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_core(HiveMetaStore.java:3338)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_with_cascade(HiveMetaStore.java:3290)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:102)
	at com.sun.proxy.$Proxy10.alter_table_with_cascade(Unknown Source)
	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$alter_table_with_cascade.getResult(ThriftHiveMetastore.java:9131)
	at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$alter_table_with_cascade.getResult(ThriftHiveMetastore.java:9115)
	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
	at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge.java:681)
	at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge.java:676)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:415)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)
	at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor.process(HadoopThriftAuthBridge.java:676)
	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: data may not be null
	at org.apache.commons.httpclient.util.EncodingUtil.getBytes(EncodingUtil.java:203)
	at org.apache.commons.httpclient.util.URIUtil.encode(URIUtil.java:502)
	at org.apache.commons.httpclient.util.URIUtil.encodePath(URIUtil.java:382)
	at org.apache.commons.httpclient.util.URIUtil.encodePath(URIUtil.java:363)
	at org.apache.sentry.hdfs.PathsUpdate.parsePath(PathsUpdate.java:89)
	at org.apache.sentry.hdfs.MetastorePlugin.renameAuthzObject(MetastorePlugin.java:255)
	at org.apache.sentry.binding.metastore.SentryMetastorePostEventListener.renameSentryTablePrivilege(SentryMetastorePostEventListener.java:337)
	at org.apache.sentry.binding.metastore.SentryMetastorePostEventListener.onAlterTable(SentryMetastorePostEventListener.java:195)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_core(HiveMetaStore.java:3325)

The attached patch adds a simple sanity check to ensure we actually have locations to update. If the path is empty we forgo the plugin loop all together. 

> HDFS Plugin should not execute path callbacks for views
> -------------------------------------------------------
>
>                 Key: SENTRY-780
>                 URL: https://issues.apache.org/jira/browse/SENTRY-780
>             Project: Sentry
>          Issue Type: Bug
>          Components: Hdfs Plugin, Hive Plugin
>    Affects Versions: 1.5.0, 1.6.0
>            Reporter: Prasad Mujumdar
>            Assignee: Ryan P
>
> Metastore plugin {{SentryMetastorePostEventListener}} fires the HDFS path callbacks for view operations as well. Since views changes (create/alter/drop) are metadata only changes, we should not execute any HDFS callback here.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)