[jira] [Commented] (HBASE-11589) AccessControlException handling in HBase rpc server and client. AccessControlException should be a not retriable exception

2014-08-08 Thread Andrew Purtell (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-11589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14091278#comment-14091278
 ] 

Andrew Purtell commented on HBASE-11589:


Will commit later today unless objection

 AccessControlException handling in HBase rpc server and client. 
 AccessControlException should be a not retriable exception
 --

 Key: HBASE-11589
 URL: https://issues.apache.org/jira/browse/HBASE-11589
 Project: HBase
  Issue Type: Bug
  Components: IPC/RPC
Affects Versions: 0.98.3
 Environment: SLES 11 SP1
Reporter: Kashif J S
Assignee: Qiang Tian
 Fix For: 0.99.0, 2.0.0, 0.98.6

 Attachments: hbase-11589-master-v1.patch, 
 hbase-11589-master-v2.patch, hbase-11589-master.patch


 RPC server does not handle the AccessControlException thrown by 
 authorizeConnection failure properly and in return sends IOException to the 
 HBase client. 
 Ultimately the client does retries and gets RetriesExhaustedException but 
 does not getting any link or information or stack trace about 
 AccessControlException.
 In short summary, upon inspection of RPCServer.java, it seems 
 for the Listener, the Reader read code as below does not handle 
 AccessControlException
 {noformat}
 void doRead(….
 …..
 …..
   try {
 count = c.readAndProcess(); // This readAndProcess method throws 
 AccessControlException from processOneRpc(byte[] buf) which is not handled ?
   } catch (InterruptedException ieo) {
 throw ieo;
   } catch (Exception e) {
 LOG.warn(getName() + : count of bytes read:  + count, e);
 count = -1; //so that the (count  0) block is executed
   }
 {noformat}
 Below is the client logs if authorizeConnection throws AccessControlException:
 2014-07-24 19:40:58,768 INFO  [main] 
 client.HConnectionManager$HConnectionImplementation: getMaster attempt 7 of 7 
 failed; no more retrying.
 com.google.protobuf.ServiceException: java.io.IOException: Call to 
 host-10-18-40-101/10.18.40.101:6 failed on local exception: 
 java.io.EOFException
 at 
 org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1674)
 at 
 org.apache.hadoop.hbase.ipc.RpcClient$BlockingRpcChannelImplementation.callBlockingMethod(RpcClient.java:1715)
 at 
 org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$BlockingStub.isMasterRunning(MasterProtos.java:42561)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.isMasterRunning(HConnectionManager.java:1688)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(HConnectionManager.java:1597)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStub(HConnectionManager.java:1623)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(HConnectionManager.java:1677)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getKeepAliveMasterService(HConnectionManager.java:1885)
 [...]
 Caused by: java.io.IOException: Call to host-10-18-40-101/10.18.40.101:6 
 failed on local exception: java.io.EOFException
 at 
 org.apache.hadoop.hbase.ipc.RpcClient.wrapException(RpcClient.java:1485)
 at org.apache.hadoop.hbase.ipc.RpcClient.call(RpcClient.java:1457)
 at 
 org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1657)
 ... 254 more
 Caused by: java.io.EOFException
 at java.io.DataInputStream.readInt(DataInputStream.java:375)
 at 
 org.apache.hadoop.hbase.ipc.RpcClient$Connection.readResponse(RpcClient.java:1072)
 at 
 org.apache.hadoop.hbase.ipc.RpcClient$Connection.run(RpcClient.java:728)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (HBASE-11589) AccessControlException handling in HBase rpc server and client. AccessControlException should be a not retriable exception

2014-08-05 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-11589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14086019#comment-14086019
 ] 

Hadoop QA commented on HBASE-11589:
---

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12659807/hbase-11589-master-v1.patch
  against trunk revision .
  ATTACHMENT ID: 12659807

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  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:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
   org.apache.hadoop.hbase.procedure.TestProcedureManager
  org.apache.hadoop.hbase.ipc.TestIPC
  org.apache.hadoop.hbase.master.TestClockSkewDetection

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10295//console

This message is automatically generated.

 AccessControlException handling in HBase rpc server and client. 
 AccessControlException should be a not retriable exception
 --

 Key: HBASE-11589
 URL: https://issues.apache.org/jira/browse/HBASE-11589
 Project: HBase
  Issue Type: Bug
  Components: IPC/RPC
Affects Versions: 0.98.3
 Environment: SLES 11 SP1
Reporter: Kashif J S
Assignee: Qiang Tian
 Attachments: hbase-11589-master-v1.patch, hbase-11589-master.patch


 RPC server does not handle the AccessControlException thrown by 
 authorizeConnection failure properly and in return sends IOException to the 
 HBase client. 
 Ultimately the client does retries and gets RetriesExhaustedException but 
 does not getting any link or information or stack trace about 
 AccessControlException.
 In short summary, upon inspection of RPCServer.java, it seems 
 for the Listener, the Reader read code as below does not handle 
 AccessControlException
 {noformat}
 void doRead(….
 …..
 …..
   try {
 count = c.readAndProcess(); // This readAndProcess method throws 
 AccessControlException from processOneRpc(byte[] buf) which is not handled ?
   } catch (InterruptedException ieo) {
 throw ieo;
   } catch (Exception e) {
 LOG.warn(getName() + : count of bytes read:  + count, e);
 count = -1; //so that the (count  0) block is executed
   }
 {noformat}
 

[jira] [Commented] (HBASE-11589) AccessControlException handling in HBase rpc server and client. AccessControlException should be a not retriable exception

2014-08-05 Thread Qiang Tian (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-11589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14086028#comment-14086028
 ] 

Qiang Tian commented on HBASE-11589:


all test failures are about java.net.UnknownHostException: 
asf901.ygridcore.net: asf901.ygridcore.net, looks temporary DNS failure?

 AccessControlException handling in HBase rpc server and client. 
 AccessControlException should be a not retriable exception
 --

 Key: HBASE-11589
 URL: https://issues.apache.org/jira/browse/HBASE-11589
 Project: HBase
  Issue Type: Bug
  Components: IPC/RPC
Affects Versions: 0.98.3
 Environment: SLES 11 SP1
Reporter: Kashif J S
Assignee: Qiang Tian
 Attachments: hbase-11589-master-v1.patch, hbase-11589-master.patch


 RPC server does not handle the AccessControlException thrown by 
 authorizeConnection failure properly and in return sends IOException to the 
 HBase client. 
 Ultimately the client does retries and gets RetriesExhaustedException but 
 does not getting any link or information or stack trace about 
 AccessControlException.
 In short summary, upon inspection of RPCServer.java, it seems 
 for the Listener, the Reader read code as below does not handle 
 AccessControlException
 {noformat}
 void doRead(….
 …..
 …..
   try {
 count = c.readAndProcess(); // This readAndProcess method throws 
 AccessControlException from processOneRpc(byte[] buf) which is not handled ?
   } catch (InterruptedException ieo) {
 throw ieo;
   } catch (Exception e) {
 LOG.warn(getName() + : count of bytes read:  + count, e);
 count = -1; //so that the (count  0) block is executed
   }
 {noformat}
 Below is the client logs if authorizeConnection throws AccessControlException:
 2014-07-24 19:40:58,768 INFO  [main] 
 client.HConnectionManager$HConnectionImplementation: getMaster attempt 7 of 7 
 failed; no more retrying.
 com.google.protobuf.ServiceException: java.io.IOException: Call to 
 host-10-18-40-101/10.18.40.101:6 failed on local exception: 
 java.io.EOFException
 at 
 org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1674)
 at 
 org.apache.hadoop.hbase.ipc.RpcClient$BlockingRpcChannelImplementation.callBlockingMethod(RpcClient.java:1715)
 at 
 org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$BlockingStub.isMasterRunning(MasterProtos.java:42561)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.isMasterRunning(HConnectionManager.java:1688)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(HConnectionManager.java:1597)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStub(HConnectionManager.java:1623)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(HConnectionManager.java:1677)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getKeepAliveMasterService(HConnectionManager.java:1885)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin$MasterCallable.prepare(HBaseAdmin.java:3302)
 at 
 org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:113)
 at 
 org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:90)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.executeCallable(HBaseAdmin.java:3329)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:605)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:496)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:430)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
 org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:450)
 at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:311)
 at 
 org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:59)
 at 
 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
 at 
 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
 at 

[jira] [Commented] (HBASE-11589) AccessControlException handling in HBase rpc server and client. AccessControlException should be a not retriable exception

2014-08-05 Thread Andrew Purtell (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-11589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14086390#comment-14086390
 ] 

Andrew Purtell commented on HBASE-11589:


We already have an AccessDeniedException. This patch adds a new 
AccessControlException. The naming is too close, we should have one or the 
other. Given that client code, if security is active, is already expecting ADE, 
I think that's the best choice. 

 AccessControlException handling in HBase rpc server and client. 
 AccessControlException should be a not retriable exception
 --

 Key: HBASE-11589
 URL: https://issues.apache.org/jira/browse/HBASE-11589
 Project: HBase
  Issue Type: Bug
  Components: IPC/RPC
Affects Versions: 0.98.3
 Environment: SLES 11 SP1
Reporter: Kashif J S
Assignee: Qiang Tian
 Attachments: hbase-11589-master-v1.patch, hbase-11589-master.patch


 RPC server does not handle the AccessControlException thrown by 
 authorizeConnection failure properly and in return sends IOException to the 
 HBase client. 
 Ultimately the client does retries and gets RetriesExhaustedException but 
 does not getting any link or information or stack trace about 
 AccessControlException.
 In short summary, upon inspection of RPCServer.java, it seems 
 for the Listener, the Reader read code as below does not handle 
 AccessControlException
 {noformat}
 void doRead(….
 …..
 …..
   try {
 count = c.readAndProcess(); // This readAndProcess method throws 
 AccessControlException from processOneRpc(byte[] buf) which is not handled ?
   } catch (InterruptedException ieo) {
 throw ieo;
   } catch (Exception e) {
 LOG.warn(getName() + : count of bytes read:  + count, e);
 count = -1; //so that the (count  0) block is executed
   }
 {noformat}
 Below is the client logs if authorizeConnection throws AccessControlException:
 2014-07-24 19:40:58,768 INFO  [main] 
 client.HConnectionManager$HConnectionImplementation: getMaster attempt 7 of 7 
 failed; no more retrying.
 com.google.protobuf.ServiceException: java.io.IOException: Call to 
 host-10-18-40-101/10.18.40.101:6 failed on local exception: 
 java.io.EOFException
 at 
 org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1674)
 at 
 org.apache.hadoop.hbase.ipc.RpcClient$BlockingRpcChannelImplementation.callBlockingMethod(RpcClient.java:1715)
 at 
 org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$BlockingStub.isMasterRunning(MasterProtos.java:42561)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.isMasterRunning(HConnectionManager.java:1688)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(HConnectionManager.java:1597)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStub(HConnectionManager.java:1623)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(HConnectionManager.java:1677)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getKeepAliveMasterService(HConnectionManager.java:1885)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin$MasterCallable.prepare(HBaseAdmin.java:3302)
 at 
 org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:113)
 at 
 org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:90)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.executeCallable(HBaseAdmin.java:3329)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:605)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:496)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:430)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
 org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:450)
 at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:311)
 at 
 org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:59)
 at 
 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
 at 
 

[jira] [Commented] (HBASE-11589) AccessControlException handling in HBase rpc server and client. AccessControlException should be a not retriable exception

2014-08-05 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-11589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14087255#comment-14087255
 ] 

Hadoop QA commented on HBASE-11589:
---

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12660026/hbase-11589-master-v2.patch
  against trunk revision .
  ATTACHMENT ID: 12660026

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  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:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

 {color:red}-1 core tests{color}.  The patch failed these unit tests:
   org.apache.hadoop.hbase.master.TestRestartCluster
  org.apache.hadoop.hbase.regionserver.TestRegionReplicas
  org.apache.hadoop.hbase.replication.TestPerTableCFReplication
  org.apache.hadoop.hbase.client.TestReplicasClient
  
org.apache.hadoop.hbase.master.TestMasterOperationsForRegionReplicas

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html
Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/10311//console

This message is automatically generated.

 AccessControlException handling in HBase rpc server and client. 
 AccessControlException should be a not retriable exception
 --

 Key: HBASE-11589
 URL: https://issues.apache.org/jira/browse/HBASE-11589
 Project: HBase
  Issue Type: Bug
  Components: IPC/RPC
Affects Versions: 0.98.3
 Environment: SLES 11 SP1
Reporter: Kashif J S
Assignee: Qiang Tian
 Attachments: hbase-11589-master-v1.patch, 
 hbase-11589-master-v2.patch, hbase-11589-master.patch


 RPC server does not handle the AccessControlException thrown by 
 authorizeConnection failure properly and in return sends IOException to the 
 HBase client. 
 Ultimately the client does retries and gets RetriesExhaustedException but 
 does not getting any link or information or stack trace about 
 AccessControlException.
 In short summary, upon inspection of RPCServer.java, it seems 
 for the Listener, the Reader read code as below does not handle 
 AccessControlException
 {noformat}
 void doRead(….
 …..
 …..
   try {
 count = c.readAndProcess(); // This readAndProcess method throws 
 AccessControlException from processOneRpc(byte[] buf) which is not handled ?
   } catch (InterruptedException ieo) 

[jira] [Commented] (HBASE-11589) AccessControlException handling in HBase rpc server and client. AccessControlException should be a not retriable exception

2014-08-04 Thread Qiang Tian (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-11589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14084515#comment-14084515
 ] 

Qiang Tian commented on HBASE-11589:


hi [~kashi...@huawei.com], 
The AccessControlException is thrown in processOneRpc, right?
it looks the rpc server does handle the exception - it send the 
AuthorizationException back to client and close the client connection. but both 
AuthorizationException  and AccessControlException are not instance of 
DoNotRetryIOException -- it looks we use it to make retry decision at client 
side, in this case it should be handled in 
RpcRetryingCaller#callWithRetries-translateException

a simple fix is to send AccessDeniedException to client in authorizeConnection, 
but there are 
other AccessControlException references in rpcServer.java..better changed as 
well?

[~nkeywal],
what do you think?
thanks.




 AccessControlException handling in HBase rpc server and client. 
 AccessControlException should be a not retriable exception
 --

 Key: HBASE-11589
 URL: https://issues.apache.org/jira/browse/HBASE-11589
 Project: HBase
  Issue Type: Bug
  Components: IPC/RPC
Affects Versions: 0.98.3
 Environment: SLES 11 SP1
Reporter: Kashif J S

 RPC server does not handle the AccessControlException thrown by 
 authorizeConnection failure properly and in return sends IOException to the 
 HBase client. 
 Ultimately the client does retries and gets RetriesExhaustedException but 
 does not getting any link or information or stack trace about 
 AccessControlException.
 In short summary, upon inspection of RPCServer.java, it seems 
 for the Listener, the Reader read code as below does not handle 
 AccessControlException
 {noformat}
 void doRead(….
 …..
 …..
   try {
 count = c.readAndProcess(); // This readAndProcess method throws 
 AccessControlException from processOneRpc(byte[] buf) which is not handled ?
   } catch (InterruptedException ieo) {
 throw ieo;
   } catch (Exception e) {
 LOG.warn(getName() + : count of bytes read:  + count, e);
 count = -1; //so that the (count  0) block is executed
   }
 {noformat}
 Below is the client logs if authorizeConnection throws AccessControlException:
 2014-07-24 19:40:58,768 INFO  [main] 
 client.HConnectionManager$HConnectionImplementation: getMaster attempt 7 of 7 
 failed; no more retrying.
 com.google.protobuf.ServiceException: java.io.IOException: Call to 
 host-10-18-40-101/10.18.40.101:6 failed on local exception: 
 java.io.EOFException
 at 
 org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1674)
 at 
 org.apache.hadoop.hbase.ipc.RpcClient$BlockingRpcChannelImplementation.callBlockingMethod(RpcClient.java:1715)
 at 
 org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$BlockingStub.isMasterRunning(MasterProtos.java:42561)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.isMasterRunning(HConnectionManager.java:1688)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(HConnectionManager.java:1597)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStub(HConnectionManager.java:1623)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(HConnectionManager.java:1677)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getKeepAliveMasterService(HConnectionManager.java:1885)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin$MasterCallable.prepare(HBaseAdmin.java:3302)
 at 
 org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:113)
 at 
 org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:90)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.executeCallable(HBaseAdmin.java:3329)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:605)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:496)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:430)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
 

[jira] [Commented] (HBASE-11589) AccessControlException handling in HBase rpc server and client. AccessControlException should be a not retriable exception

2014-07-25 Thread Nicolas Liochon (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-11589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14074321#comment-14074321
 ] 

Nicolas Liochon commented on HBASE-11589:
-

Likely an issue in the 1.0  master branches as well.  Do you plan to submit a 
unit test or a fix Kashif?

 AccessControlException handling in HBase rpc server and client. 
 AccessControlException should be a not retriable exception
 --

 Key: HBASE-11589
 URL: https://issues.apache.org/jira/browse/HBASE-11589
 Project: HBase
  Issue Type: Bug
  Components: IPC/RPC
Affects Versions: 0.98.3
 Environment: SLES 11 SP1
Reporter: Kashif J S

 RPC server does not handle the AccessControlException thrown by 
 authorizeConnection failure properly and in return sends IOException to the 
 HBase client. 
 Ultimately the client does retries and gets RetriesExhaustedException but 
 does not getting any link or information or stack trace about 
 AccessControlException.
 In short summary, upon inspection of RPCServer.java, it seems 
 for the Listener, the Reader read code as below does not handle 
 AccessControlException
 void doRead(….
 …..
 …..
 try {
 count = c.readAndProcess(); // This readAndProcess method throws 
 AccessControlException from processOneRpc(byte[] buf) which is not handled ?
   } catch (InterruptedException ieo) {
 throw ieo;
   } catch (Exception e) {
 LOG.warn(getName() + : count of bytes read:  + count, e);
 count = -1; //so that the (count  0) block is executed
   }
 Below is the client logs if authorizeConnection throws AccessControlException:
 2014-07-24 19:40:58,768 INFO  [main] 
 client.HConnectionManager$HConnectionImplementation: getMaster attempt 7 of 7 
 failed; no more retrying.
 com.google.protobuf.ServiceException: java.io.IOException: Call to 
 host-10-18-40-101/10.18.40.101:6 failed on local exception: 
 java.io.EOFException
 at 
 org.apache.hadoop.hbase.ipc.RpcClient.callBlockingMethod(RpcClient.java:1674)
 at 
 org.apache.hadoop.hbase.ipc.RpcClient$BlockingRpcChannelImplementation.callBlockingMethod(RpcClient.java:1715)
 at 
 org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$BlockingStub.isMasterRunning(MasterProtos.java:42561)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.isMasterRunning(HConnectionManager.java:1688)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(HConnectionManager.java:1597)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$StubMaker.makeStub(HConnectionManager.java:1623)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(HConnectionManager.java:1677)
 at 
 org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getKeepAliveMasterService(HConnectionManager.java:1885)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin$MasterCallable.prepare(HBaseAdmin.java:3302)
 at 
 org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:113)
 at 
 org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:90)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.executeCallable(HBaseAdmin.java:3329)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:605)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:496)
 at 
 org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:430)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
 org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:450)
 at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:311)
 at 
 org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:59)
 at 
 org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:312)
 at 
 org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:169)
 at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
 at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
 at org.jruby.ast.IfNode.interpret(IfNode.java:117)