You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Alexander Kolbasov (JIRA)" <ji...@apache.org> on 2017/02/08 05:11:41 UTC

[jira] [Comment Edited] (SENTRY-1624) DefaultSentryValidator doesn't correctly construct SentryOnFailureHookContextImpl

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

Alexander Kolbasov edited comment on SENTRY-1624 at 2/8/17 5:10 AM:
--------------------------------------------------------------------

It seems that the upstream Sentry build is failing for Hive v2. Looking at https://builds.apache.org/job/Sentry-jdk-1.7-v2/60/console we can see some hadoop/hive issues.

{code}
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project sentry-binding-hive-v2: Compilation failure
[ERROR] /home/jenkins/jenkins-slave/workspace/Sentry-jdk-1.7-v2/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java:[211,11] constructor SentryOnFailureHookContextImpl in class org.apache.sentry.binding.hive.SentryOnFailureHookContextImpl cannot be applied to given types;
[ERROR] required: java.lang.String,java.util.Set<org.apache.hadoop.hive.ql.hooks.ReadEntity>,java.util.Set<org.apache.hadoop.hive.ql.hooks.WriteEntity>,org.apache.hadoop.hive.ql.plan.HiveOperation,org.apache.sentry.core.model.db.Database,org.apache.sentry.core.model.db.Table,java.util.List<org.apache.sentry.core.model.db.AccessURI>,org.apache.sentry.core.model.db.AccessURI,java.lang.String,java.lang.String,org.apache.hadoop.hive.ql.metadata.AuthorizationException,org.apache.hadoop.conf.Configuration
[ERROR] found: java.lang.String,<nulltype>,<nulltype>,org.apache.hadoop.hive.ql.plan.HiveOperation,org.apache.sentry.core.model.db.Database,org.apache.sentry.core.model.db.Table,org.apache.sentry.core.model.db.AccessURI,org.apache.sentry.core.model.db.AccessURI,java.lang.String,java.lang.String,org.apache.hadoop.hive.ql.metadata.AuthorizationException,org.apache.sentry.binding.hive.conf.HiveAuthzConf
[ERROR] reason: actual argument org.apache.sentry.core.model.db.AccessURI cannot be converted to java.util.List<org.apache.sentry.core.model.db.AccessURI> by method invocation conversion
{code}

[~spena] did initial analysis on this and noted:

{quote}
I think the issue is on DefaultSentryValidator.java that passing the incorrect parameters to the SentryOnFailureHookContextImpl class.
See https://github.com/apache/sentry/blob/master/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java#L212

SentryOnFailureHookContextImpl expects a List<AccessURI>, but the above line passes a single AccessURI object.

CONSTRUCTOR
... 
java.util.List<org.apache.sentry.core.model.db.AccessURI>,
org.apache.sentry.core.model.db.AccessURI,
{quote}


was (Author: akolb):
It seems that the upstream Sentry build is failing. Looking at https://builds.apache.org/job/Sentry-jdk-1.7-v2/60/console we can see some hadoop/hive issues.

Does any one have a clue about what's going on?

- Sasha

{code}
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project sentry-binding-hive-v2: Compilation failure
[ERROR] /home/jenkins/jenkins-slave/workspace/Sentry-jdk-1.7-v2/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java:[211,11] constructor SentryOnFailureHookContextImpl in class org.apache.sentry.binding.hive.SentryOnFailureHookContextImpl cannot be applied to given types;
[ERROR] required: java.lang.String,java.util.Set<org.apache.hadoop.hive.ql.hooks.ReadEntity>,java.util.Set<org.apache.hadoop.hive.ql.hooks.WriteEntity>,org.apache.hadoop.hive.ql.plan.HiveOperation,org.apache.sentry.core.model.db.Database,org.apache.sentry.core.model.db.Table,java.util.List<org.apache.sentry.core.model.db.AccessURI>,org.apache.sentry.core.model.db.AccessURI,java.lang.String,java.lang.String,org.apache.hadoop.hive.ql.metadata.AuthorizationException,org.apache.hadoop.conf.Configuration
[ERROR] found: java.lang.String,<nulltype>,<nulltype>,org.apache.hadoop.hive.ql.plan.HiveOperation,org.apache.sentry.core.model.db.Database,org.apache.sentry.core.model.db.Table,org.apache.sentry.core.model.db.AccessURI,org.apache.sentry.core.model.db.AccessURI,java.lang.String,java.lang.String,org.apache.hadoop.hive.ql.metadata.AuthorizationException,org.apache.sentry.binding.hive.conf.HiveAuthzConf
[ERROR] reason: actual argument org.apache.sentry.core.model.db.AccessURI cannot be converted to java.util.List<org.apache.sentry.core.model.db.AccessURI> by method invocation conversion
{code}

[~spena] did initial analysis on this and noted:

{quote}
I think the issue is on DefaultSentryValidator.java that passing the incorrect parameters to the SentryOnFailureHookContextImpl class.
See https://github.com/apache/sentry/blob/master/sentry-binding/sentry-binding-hive-v2/src/main/java/org/apache/sentry/binding/hive/v2/authorizer/DefaultSentryValidator.java#L212

SentryOnFailureHookContextImpl expects a List<AccessURI>, but the above line passes a single AccessURI object.

CONSTRUCTOR
... 
java.util.List<org.apache.sentry.core.model.db.AccessURI>,
org.apache.sentry.core.model.db.AccessURI,
{quote}

> DefaultSentryValidator doesn't correctly construct SentryOnFailureHookContextImpl
> ---------------------------------------------------------------------------------
>
>                 Key: SENTRY-1624
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1624
>             Project: Sentry
>          Issue Type: Bug
>          Components: Sentry
>    Affects Versions: 1.8.0, sentry-ha-redesign
>            Reporter: Alexander Kolbasov
>            Assignee: Alexander Kolbasov
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)