sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan P (JIRA)" <>
Subject [jira] [Assigned] (SENTRY-654) Calls to append_partition fail when Sentry is enabled
Date Tue, 10 Mar 2015 01:37:38 GMT


Ryan P reassigned SENTRY-654:

    Assignee: Ryan P

On it

> Calls to append_partition fail when Sentry is enabled
> -----------------------------------------------------
>                 Key: SENTRY-654
>                 URL:
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>         Environment: CDH 5.3.1
>            Reporter: Richard Williams
>            Assignee: Ryan P
> When the Hive Metastore has org.apache.sentry.binding.metastore.MetastoreAuthzBinding
configured as a pre event listener class, calls to the metastore Thrift API's append_partition
method fail with a MetaException whose message is "java.lang.NullPointerException". In practice,
this causes LOAD DATA INPATH statements targeting particular partitions of a partitioned table
to fail. Example stack trace:
> Exception in thread "main" MetaException(message:java.lang.NullPointerException)
>         at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$append_partition_with_environment_context_result$
>         at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$append_partition_with_environment_context_result$
>         at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$
>         at org.apache.thrift.TServiceClient.receiveBase(
>         at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_append_partition_with_environment_context(
>         at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.append_partition_with_environment_context(
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.appendPartition(
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.appendPartition(
>         at Test.main(
> The likely cause of this is that HiveMetastoreAuthzBinding's authorizeAddPartition method,
which is triggered on both add_partition calls and append_partition calls, assumes that the
added Partition object's storage descriptor is not null. However, org.apache.hadoop.hive.metastore.HiveMetaStore's
append_partition_common method creates a Partition object on the fly based on the provided
database, table, and partition values, and it doesn't initialize that object's storage descriptor
until after it has already called firePreEvent (thereby signaling the pre event listeners
to execute). 

This message was sent by Atlassian JIRA

View raw message