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 19:09:13 GMT

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

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

| (/) *{color:green}+1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {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:green}+1{color} | {color:green} test4tests {color} | {color:green} 0m 0s {color}
| {color:green} The patch appears to include 1 new or modified test files. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 4m 13s {color}
| {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 55s {color} |
{color:green} master passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 42s {color} |
{color:green} master passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 1m 3s {color}
| {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 19s {color}
| {color:green} master passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 2m 25s {color} |
{color:green} master passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 40s {color} |
{color:green} master passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 39s {color} |
{color:green} master passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 52s {color}
| {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 52s {color} |
{color:green} the patch passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 52s {color} | {color:green}
the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 40s {color} |
{color:green} the patch passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 40s {color} | {color:green}
the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 1m 12s {color}
| {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green} 0m 17s {color}
| {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s {color}
| {color:green} Patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} hadoopcheck {color} | {color:green} 11m 34s {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 47s {color} |
{color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 44s {color} |
{color:green} the patch passed with JDK v1.8.0 {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 47s {color} |
{color:green} the patch passed with JDK v1.7.0_79 {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green} 133m 53s {color} | {color:green}
hbase-server in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 16s {color}
| {color:green} Patch does not generate ASF License warnings. {color} |
| {color:black}{color} | {color:black} {color} | {color:black} 165m 19s {color} | {color:black}
{color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12804959/HBASE-15465-master-v2.patch
|
| JIRA Issue | HBASE-15465 |
| Optional Tests |  asflicense  javac  javadoc  unit  findbugs  hadoopcheck  hbaseanti  checkstyle
 compile  |
| uname | Linux asf910.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/test_framework/yetus-0.2.1/lib/precommit/personality/hbase.sh
|
| git revision | master / a050e1d |
| 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 |
|  Test Results | https://builds.apache.org/job/PreCommit-HBASE-Build/1965/testReport/ |
| modules | C: hbase-server U: hbase-server |
| Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/1965/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-master-v2.patch, 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