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

ASF GitHub Bot commented on KYLIN-3518:
---------------------------------------

shaofengshi closed pull request #215: KYLIN-3518 Coprocessor reports NPE when 
execute a query on HBase 2.0
URL: https://github.com/apache/kylin/pull/215
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/build/deploy/server.xml b/build/deploy/server.xml
index 96f329b8fe..920be253e4 100644
--- a/build/deploy/server.xml
+++ b/build/deploy/server.xml
@@ -26,7 +26,7 @@
     <!--APR library loader. Documentation at /docs/apr.html -->
     <Listener className="org.apache.catalina.core.AprLifecycleListener" 
SSLEngine="on" />
     <!--Initialize Jasper prior to webapps are loaded. Documentation at 
/docs/jasper-howto.html -->
-    <Listener className="org.apache.catalina.core.JasperListener" />
+    <!-- <Listener className="org.apache.catalina.core.JasperListener" /> -->
     <!-- Prevent memory leaks due to use of particular java/javax APIs-->
     <Listener 
className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
     <Listener 
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
diff --git a/build/script/elimate-jar-conflict.sh 
b/build/script/elimate-jar-conflict.sh
new file mode 100644
index 0000000000..d02a87416e
--- /dev/null
+++ b/build/script/elimate-jar-conflict.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+current_dir=`pwd`
+cd ${current_dir}/build/tomcat/webapps
+unzip kylin.war && rm -f kylin.war
+cd WEB-INF/lib
+#remove slf4j-api-1.7.21.jar to solve slf4j conflict
+rm -f slf4j-api-1.7.21.jar
+mkdir modify_avatica_jar && mv avatica-1.10.0.jar modify_avatica_jar
+cd modify_avatica_jar
+#remove org/slf4j in avatica-1.10.0.jar and repackage it to solve slf4j 
conflict
+unzip avatica-1.10.0.jar && rm -f avatica-1.10.0.jar
+rm -rf org/slf4j && jar -cf avatica-1.10.0.jar ./
+rm -rf `ls | egrep -v avatica-1.10.0.jar`
+mv avatica-1.10.0.jar ..
+cd .. && rm -rf modify_avatica_jar
+cd ${current_dir}/build/tomcat/webapps
+#repackage kylin.war
+jar -cf kylin.war ./ && rm -rf `ls | egrep -v kylin.war`
+cd ${current_dir}
\ No newline at end of file
diff --git a/build/script/prepare.sh b/build/script/prepare.sh
index deaf58de91..be9dd9d0a8 100755
--- a/build/script/prepare.sh
+++ b/build/script/prepare.sh
@@ -31,6 +31,9 @@ export version
 sh build/script/prepare-libs.sh || { exit 1; }
 
 cp server/target/kylin-server-${version}.war build/tomcat/webapps/kylin.war
+
+sh build/script/elimate-jar-conflict.sh
+
 chmod 644 build/tomcat/webapps/kylin.war
 
 echo "add js css to war"
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
index ded35009da..2beddc7439 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/CubeVisitService.java
@@ -24,6 +24,7 @@
 import java.net.InetAddress;
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
@@ -31,12 +32,11 @@
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.hadoop.hbase.Cell;
 import org.apache.hadoop.hbase.CellUtil;
-import org.apache.hadoop.hbase.Coprocessor;
 import org.apache.hadoop.hbase.CoprocessorEnvironment;
 import org.apache.hadoop.hbase.DoNotRetryIOException;
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorException;
-import org.apache.hadoop.hbase.coprocessor.CoprocessorService;
+import org.apache.hadoop.hbase.coprocessor.RegionCoprocessor;
 import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
 import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.RegionScanner;
@@ -78,7 +78,7 @@
 
 @SuppressWarnings("unused")
 //used in hbase endpoint
-public class CubeVisitService extends CubeVisitProtos.CubeVisitService 
implements Coprocessor, CoprocessorService {
+public class CubeVisitService extends CubeVisitProtos.CubeVisitService 
implements RegionCoprocessor {
 
     private static final Logger logger = 
LoggerFactory.getLogger(CubeVisitService.class);
     //TODO limit memory footprint
@@ -448,7 +448,7 @@ public void stop(CoprocessorEnvironment env) throws 
IOException {
     }
 
     @Override
-    public Service getService() {
-        return this;
+    public Iterable<Service> getServices() {
+        return Collections.singleton(this);
     }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Coprocessor reports NPE when execute a query on HBase 2.0
> ---------------------------------------------------------
>
>                 Key: KYLIN-3518
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3518
>             Project: Kylin
>          Issue Type: Bug
>          Components: Storage - HBase
>            Reporter: Shaofeng SHI
>            Priority: Major
>             Fix For: v2.5.0
>
>
> On HDP 3.0, build a cube and then run a simple count query, NPE occurred:
>  
> {code:java}
> 2018-08-28 01:30:16,969 DEBUG [Query f7bf8004-b516-e372-18df-0d507075d471-71] 
> v2.CubeHBaseRPC:315 : hbase.rpc.timeout = 90000 ms, use 81000 ms as timeout 
> for coprocessor
> 2018-08-28 01:30:16,983 INFO [Query f7bf8004-b516-e372-18df-0d507075d471-71] 
> v2.CubeHBaseEndpointRPC:141 : Serialized scanRequestBytes 522 bytes, 
> rawScanBytesString 44 bytes
> 2018-08-28 01:30:16,984 INFO [Query f7bf8004-b516-e372-18df-0d507075d471-71] 
> v2.CubeHBaseEndpointRPC:143 : The scan 67b41fc6 for segment 
> kylin_sales_cube_clone[20120101000000_20130101000000] is as below with 1 
> separate raw scans, shard part of start/end key is set to 0
> 2018-08-28 01:30:16,991 INFO [Query f7bf8004-b516-e372-18df-0d507075d471-71] 
> v2.CubeHBaseRPC:288 : Visiting hbase table KYLIN_5Q088VO5I0: cuboid require 
> post aggregation, from 0 to 16384 Start: 
> \x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00 
> (\x00\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00) Stop: 
> \x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\xFF\xFF\xFF\x00 
> (\x00\x00\x00\x00\x00\x00\x00\x00@\x00\xFF\xFF\xFF\x00), No Fuzzy Key
> 2018-08-28 01:30:16,991 DEBUG [Query f7bf8004-b516-e372-18df-0d507075d471-71] 
> v2.CubeHBaseEndpointRPC:148 : Submitting rpc to 1 shards starting from shard 
> 0, scan range count 1
> 2018-08-28 01:30:17,010 INFO [Query f7bf8004-b516-e372-18df-0d507075d471-71] 
> common.KylinConfig:332 : Loading kylin-defaults.properties from 
> file:/root/shaofengshi/apache-kylin-2.5.0-SNAPSHOT-bin/tomcat/webapps/kylin/WEB-INF/lib/kylin-core-common-2.5.0-SNAPSHOT.jar!/kylin-defaults.properties
> 2018-08-28 01:30:17,033 DEBUG [Query f7bf8004-b516-e372-18df-0d507075d471-71] 
> common.KylinConfig:291 : KYLIN_CONF property was not set, will seek 
> KYLIN_HOME env variable
> 2018-08-28 01:30:17,051 INFO [pool-14-thread-1] hbase.HBaseConnection:110 : 
> Creating coprocessor thread pool with max of 2048, core of 2048
> 2018-08-28 01:30:17,094 INFO [Query f7bf8004-b516-e372-18df-0d507075d471-71] 
> gtrecord.SequentialCubeTupleIterator:73 : Using SortedIteratorMergerWithLimit 
> to merge segment results
> 2018-08-28 01:30:17,097 DEBUG [Query f7bf8004-b516-e372-18df-0d507075d471-71] 
> enumerator.OLAPEnumerator:117 : return TupleIterator...
> 2018-08-28 01:30:21,607 INFO [kylin-coproc--pool9-t1] 
> client.RpcRetryingCallerImpl:134 : Call exception, tries=6, retries=6, 
> started=4410 ms ago, cancelled=false, msg=java.io.IOException
> at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:468)
> at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:131)
> at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
> at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)
> Caused by: java.lang.NullPointerException
> at 
> org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.CubeVisitService.visitCube(CubeVisitService.java:253)
> at 
> org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos$CubeVisitService.callMethod(CubeVisitProtos.java:5555)
> at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8032)
> at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2426)
> at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2408)
> at 
> org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42010)
> at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409)
> ... 3 more
> , details=row '' on table 'KYLIN_5Q088VO5I0' at 
> region=KYLIN_5Q088VO5I0,,1535417272444.27b82cb4702db4557a98b9a7e60b7692., 
> hostname=ignite03.com,16020,1534313612401, seqNum=2
> 2018-08-28 01:30:25,633 INFO [kylin-coproc--pool9-t1] 
> client.RpcRetryingCallerImpl:134 : Call exception, tries=7, retries=7, 
> started=8436 ms ago, cancelled=false, msg=java.io.IOException
> at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:468)
> at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:131)
> at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
> at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)
> Caused by: java.lang.NullPointerException
> at 
> org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.CubeVisitService.visitCube(CubeVisitService.java:253)
> at 
> org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos$CubeVisitService.callMethod(CubeVisitProtos.java:5555)
> at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8032)
> at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2426)
> at 
> org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2408)
> at 
> org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42010)
> at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409)
> ... 3 more
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to