You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2016/10/25 22:26:58 UTC

[jira] [Commented] (SENTRY-1270) Improve error handling - Database with malformed URI causes NPE in HMS plugin during DDL

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

Hadoop QA commented on SENTRY-1270:
-----------------------------------

Here are the results of testing the latest attachment
https://issues.apache.org/jira/secure/attachment/12805338/SENTRY-1270.1.patch against master.

{color:red}Overall:{color} -1 due to an error

{color:red}ERROR:{color} mvn test exited 1

Console output: https://builds.apache.org/job/PreCommit-SENTRY-Build/2093/console

This message is automatically generated.

> Improve error handling - Database with malformed URI causes NPE in HMS plugin during DDL
> ----------------------------------------------------------------------------------------
>
>                 Key: SENTRY-1270
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1270
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.7.0
>            Reporter: Lenni Kuff
>            Assignee: Sravya Tirukkovalur
>         Attachments: SENTRY-1270.0.patch, SENTRY-1270.1.patch
>
>
> Exception:
> {code}
> Caused by: java.lang.NullPointerException
>         at org.apache.sentry.hdfs.MetastorePlugin.applyLocal(MetastorePlugin.java:336)
>         at org.apache.sentry.hdfs.MetastorePlugin.processUpdate(MetastorePlugin.java:364)
>         at org.apache.sentry.hdfs.MetastorePlugin.notifySentryAndApplyLocal(MetastorePlugin.java:341)
>         at org.apache.sentry.hdfs.MetastorePlugin.renameAuthzObject(MetastorePlugin.java:292)
>         at org.apache.sentry.binding.metastore.SentryMetastorePostEventListener.renameSentryTablePrivilege(SentryMetastorePostEventListener.java:336)
>         at org.apache.sentry.binding.metastore.SentryMetastorePostEventListener.onAlterTable(SentryMetastorePostEventListener.java:194)
>         at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_table_core(HiveMetaStore.java:3439)
>         ... 21 more
> {code}
> When looking in the HMS database we found:
> {code}
> SELECT "NAME", "DB_LOCATION_URI" FROM "DBS" WHERE NOT "DB_LOCATION_URI" LIKE 'hdfs://%/%';
> NAME | DB_LOCATION_URI 
> -----------+--------------------
> db_name | hdfs://nameservice1
> (1 row)
> {code}
> Fixed by manually updating the HMS DB:
> {code}
> UPDATE DBS
> SET DB_LOCATION_URI='hdfs://nameservice1/user/hive/warehouse/db_name.db'
> WHERE DB_ID=12345;
> {code}
> We should handle this more gracefully in Sentry.



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