Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1365

Modify Ranger Hbase Plugin ColumnIterator to use Cell instead of KeyValue (to avoid ClassCastException in certain cases)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 0.7.0
    • 0.7.0
    • plugins, Ranger
    • None

    Description

      RangerAuthorizationCoprocessor and ColumnIterator 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.

      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)
      

      CC kulkabhay/vperiasamy/rmani

      Attachments

        Activity

          People

            abhayk Abhay Kulkarni
            speleato Sergio Peleato
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: