[ https://issues.apache.org/jira/browse/RANGER-1365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15860190#comment-15860190 ]
Velmurugan Periasamy edited comment on RANGER-1365 at 2/9/17 8:58 PM: ---------------------------------------------------------------------- [~rmani] - can you please cherrypick this to ranger-0.7 ? After the ranger-0.7 branching, this is only available in master and this is needed in ranger-0.7 branch as well was (Author: vperiasamy): [~rmani] - can you please cherrypick this to ranger-0.7 ? > Modify Ranger Hbase Plugin ColumnIterator to use Cell instead of KeyValue (to > avoid ClassCastException in certain cases) > ------------------------------------------------------------------------------------------------------------------------ > > Key: RANGER-1365 > URL: https://issues.apache.org/jira/browse/RANGER-1365 > Project: Ranger > Issue Type: Bug > Components: plugins, Ranger > Affects Versions: 0.7.0 > Reporter: Sergio Peleato > Assignee: Abhay Kulkarni > Priority: Critical > Fix For: 0.7.0 > > > [RangerAuthorizationCoprocessor|https://github.com/apache/ranger/blob/7a1c72262684a862f8df4ba908c5a2a918cb1f53/hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java#L1029] > and > [ColumnIterator|https://github.com/apache/ranger/blob/eb21ea6afb9f2ca0e26a769bfc6333ba3cce0e61/hbase-agent/src/main/java/org/apache/ranger/authorization/hbase/ColumnIterator.java#L76] > need to be modified to safely cast objects into Cell rather than KeyValue as > currently done. > In certain cases, the above issue causes HBase regionserver to throw the > below exception. > {noformat} > 2017-02-07 18:07:28,786 ERROR > [RpcServer.FifoWFPBQ.default.handler=18,queue=0,port=16020] > coprocessor.CoprocessorHost: The coprocessor > org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor threw > java.lang.ClassCastException: > org.apache.hadoop.hbase.io.encoding.BufferedDataBlockEncoder$ClonedSeekerState > cannot be cast to org.apache.hadoop.hbase.KeyValue > java.lang.ClassCastException: > org.apache.hadoop.hbase.io.encoding.BufferedDataBlockEncoder$ClonedSeekerState > cannot be cast to org.apache.hadoop.hbase.KeyValue > at > org.apache.ranger.authorization.hbase.ColumnIterator.next(ColumnIterator.java:76) > at > org.apache.ranger.authorization.hbase.ColumnIterator.next(ColumnIterator.java:32) > at > org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor.getColumnFamilies(RangerAuthorizationCoprocessor.java:247) > at > org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor.evaluateAccess(RangerAuthorizationCoprocessor.java:337) > at > org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor.requirePermission(RangerAuthorizationCoprocessor.java:535) > at > org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor.prePut(RangerAuthorizationCoprocessor.java:1029) > at > org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor.prePut(RangerAuthorizationCoprocessor.java:1091) > at > org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$30.call(RegionCoprocessorHost.java:885) > at > org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionOperation.call(RegionCoprocessorHost.java:1660) > at > org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1734) > at > org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1692) > at > org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.prePut(RegionCoprocessorHost.java:881) > at > org.apache.hadoop.hbase.regionserver.HRegion.doPreMutationHook(HRegion.java:3006) > at > org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2981) > at > org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2927) > at > org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver.rebuildIndices(UngroupedAggregateRegionObserver.java:848) > at > org.apache.phoenix.coprocessor.UngroupedAggregateRegionObserver.doPostScannerOpen(UngroupedAggregateRegionObserver.java:304) > at > org.apache.phoenix.coprocessor.BaseScannerRegionObserver.postScannerOpen(BaseScannerRegionObserver.java:217) > at > org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$52.call(RegionCoprocessorHost.java:1301) > at > org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionOperation.call(RegionCoprocessorHost.java:1660) > at > org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1734) > at > org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperationWithResult(RegionCoprocessorHost.java:1699) > at > org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.postScannerOpen(RegionCoprocessorHost.java:1296) > at > org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:2358) > at > org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32385) > at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2141) > at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:112) > at > org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:187) > at > org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:167) > {noformat} > CC [~kulkabhay]/[~vperiasamy]/[~rmani] -- This message was sent by Atlassian JIRA (v6.3.15#6346)