hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-15465) userPermission returned by getUserPermission() for the selected namespace does not have namespace set
Date Thu, 19 May 2016 08:19:13 GMT

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

Hadoop QA commented on HBASE-15465:
-----------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} patch {color} | {color:blue} 0m 1s {color} | {color:blue}
The patch file was not named according to hbase's naming conventions. Please see https://yetus.apache.org/documentation/0.2.1/precommit-patchnames
for instructions. {color} |
| {color:green}+1{color} | {color:green} hbaseanti {color} | {color:green} 0m 0s {color} |
{color:green} Patch does not have any anti-patterns. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s {color} | {color:green}
The patch does not contain any @author tags. {color} |
| {color:red}-1{color} | {color:red} test4tests {color} | {color:red} 0m 0s {color} | {color:red}
The patch doesn't appear to include any new or modified tests. Please justify why no new tests
are needed for this patch. Also please list what manual steps were performed to verify this
patch. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 2m 59s {color}
| {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 48s {color} |
{color:green} master passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 32s {color} |
{color:green} master passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 53s {color}
| {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 14s {color}
| {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 1m 55s {color} |
{color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 27s {color} |
{color:green} master passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 32s {color} |
{color:green} master passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 43s {color}
| {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 43s {color} |
{color:green} the patch passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 43s {color} | {color:green}
the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 39s {color} |
{color:green} the patch passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 39s {color} | {color:green}
the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 58s {color}
| {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 15s {color}
| {color:green} the patch passed {color} |
| {color:red}-1{color} | {color:red} whitespace {color} | {color:red} 0m 0s {color} | {color:red}
The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 8m 45s {color}
| {color:green} Patch does not cause any errors with Hadoop 2.4.1 2.5.2 2.6.0. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m 16s {color} |
{color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 30s {color} |
{color:green} the patch passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 34s {color} |
{color:green} the patch passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 103m 1s {color} | {color:green}
hbase-server in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 20s {color}
| {color:green} Patch does not generate ASF License warnings. {color} |
| {color:black}{color} | {color:black} {color} | {color:black} 127m 31s {color} | {color:black}
{color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12804624/HBASE-15465.patch.v1
|
| JIRA Issue | HBASE-15465 |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  hadoopcheck  hbaseanti  checkstyle
 compile  |
| uname | Linux asf900.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep
3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build@2/test_framework/yetus-0.2.1/lib/precommit/personality/hbase.sh
|
| git revision | master / 460b41c |
| Default Java | 1.7.0_79 |
| Multi-JDK versions |  /home/jenkins/tools/java/jdk1.8.0:1.8.0 /usr/local/jenkins/java/jdk1.7.0_79:1.7.0_79
|
| findbugs | v3.0.0 |
| whitespace | https://builds.apache.org/job/PreCommit-HBASE-Build/1956/artifact/patchprocess/whitespace-eol.txt
|
|  Test Results | https://builds.apache.org/job/PreCommit-HBASE-Build/1956/testReport/ |
| modules | C: hbase-server U: hbase-server |
| Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/1956/console |
| Powered by | Apache Yetus 0.2.1   http://yetus.apache.org |


This message was automatically generated.



> userPermission returned by getUserPermission() for the selected namespace does not have
namespace set
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-15465
>                 URL: https://issues.apache.org/jira/browse/HBASE-15465
>             Project: HBase
>          Issue Type: Bug
>          Components: Protobufs
>    Affects Versions: 1.2.0
>            Reporter: li xiang
>            Assignee: li xiang
>            Priority: Minor
>             Fix For: master
>
>         Attachments: HBASE-15465.patch.v0, HBASE-15465.patch.v1
>
>
> The request sent is with type = Namespace, but the response returned contains Global
permissions (that is, the field of namespace is not set)
> It is in hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java,
from line 2380, and I made some comments into it
> {code}
> /**
>    * A utility used to get permissions for selected namespace.
>    * <p>
>    * It's also called by the shell, in case you want to find references.
>    *
>    * @param protocol the AccessControlService protocol proxy
>    * @param namespace name of the namespace
>    * @throws ServiceException
>    */
>   public static List<UserPermission> getUserPermissions(
>       AccessControlService.BlockingInterface protocol,
>       byte[] namespace) throws ServiceException {
>     AccessControlProtos.GetUserPermissionsRequest.Builder builder =
>       AccessControlProtos.GetUserPermissionsRequest.newBuilder();
>     if (namespace != null) {
>       builder.setNamespaceName(ByteStringer.wrap(namespace)); 
>     }
>     builder.setType(AccessControlProtos.Permission.Type.Namespace);  //builder is set
with type = Namespace
>     AccessControlProtos.GetUserPermissionsRequest request = builder.build();  //I printed
the request, its type is Namespace, which is correct.
>     AccessControlProtos.GetUserPermissionsResponse response =  
>        protocol.getUserPermissions(null, request);
> /* I printed the response, it contains Global permissions, as below, not a Namespace
permission.
> user_permission {
>   user: "a1"
>   permission {
>     type: Global
>     global_permission {
>       action: READ
>       action: WRITE
>       action: ADMIN
>       action: EXEC
>       action: CREATE
>     }
>   }
> }
> AccessControlProtos.GetUserPermissionsRequest has a member called type_ to store the
type, but AccessControlProtos.GetUserPermissionsResponse does not.
> */
>      
>     List<UserPermission> perms = new ArrayList<UserPermission>(response.getUserPermissionCount());
>     for (AccessControlProtos.UserPermission perm: response.getUserPermissionList()) {
>       perms.add(ProtobufUtil.toUserPermission(perm));  // (1)
>     }
>     return perms;
>   }
> {code}
> it could be more reasonable to return user permissions with namespace set in getUserPermission()
for selected namespace ?



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

Mime
View raw message