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

Sravya Tirukkovalur commented on SENTRY-1459:
---------------------------------------------

Thanks for your patch [~ankur.gupta]! I see that you changed the behavior of 
PathUtils.parsePath to handle empty URIs and return null. It would be good to 
make sure we change the java doc description for the function and shall we also 
make sure its current callers have good handling for null return value? 

Test failures do not look related. I see the same set of tests fail on other 
precommit jobs recently. 



> Alter view with HMS Client fails with "java.lang.IllegalArgumentException: 
> Can not create a Path from a null string"
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SENTRY-1459
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1459
>             Project: Sentry
>          Issue Type: Bug
>            Reporter: Sravya Tirukkovalur
>            Assignee: Ankur Gupta
>         Attachments: SENTRY-1459.001.patch
>
>
> {code}
> 2016-08-25 13:32:51,470 ERROR 
> org.apache.hadoop.hive.metastore.RetryingHMSHandler: [pool-6-thread-69]: 
> MetaException(message:java.lang.IllegalArgumentException: Can not create a 
> Path from a null string)
> at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:5438)
> at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_core(HiveMetaStore.java:3470)
> at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_with_environment_context(HiveMetaStore.java:3430)
> 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.invokeInternal(RetryingHMSHandler.java:133)
> at 
> org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:99)
> at com.sun.proxy.$Proxy20.alter_table_with_environment_context(Unknown Source)
> at 
> org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$alter_table_with_environment_context.getResult(ThriftHiveMetastore.java:9469)
> at 
> org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$alter_table_with_environment_context.getResult(ThriftHiveMetastore.java:9453)
> 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:684)
> at 
> org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge$Server$TUGIAssumingProcessor$1.run(HadoopThriftAuthBridge.java:679)
> 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:679)
> 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: Can not create a Path from a 
> null string
> at org.apache.hadoop.fs.Path.checkPathArg(Path.java:123)
> at org.apache.hadoop.fs.Path.<init>(Path.java:135)
> at org.apache.sentry.core.common.utils.PathUtils.parseURI(PathUtils.java:110)
> at 
> org.apache.sentry.core.common.utils.PathUtils.parseDFSURI(PathUtils.java:100)
> at 
> org.apache.sentry.binding.metastore.MetastoreAuthzBinding.authorizeAlterTable(MetastoreAuthzBinding.java:284)
> at 
> org.apache.sentry.binding.metastore.MetastoreAuthzBinding.onEvent(MetastoreAuthzBinding.java:188)
> at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.firePreEvent(HiveMetaStore.java:2028)
> at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_core(HiveMetaStore.java:3449)
> ... 22 more
> {code}
> Seems like we need to add a null path check here. See 
> MetastoreAuthzBindingBase. A test case can be added in TestMetastoreEndToEnd 
> for alter view.



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

Reply via email to