[jira] [Created] (KYLIN-2699) Tomcat LinkageError for curator-client jar file conflict

2017-06-30 Thread qiumingming (JIRA)
qiumingming created KYLIN-2699:
--

 Summary: Tomcat LinkageError for curator-client jar file conflict
 Key: KYLIN-2699
 URL: https://issues.apache.org/jira/browse/KYLIN-2699
 Project: Kylin
  Issue Type: Bug
  Components: Job Engine, Web 
Affects Versions: v2.0.0
Reporter: qiumingming
Assignee: Dong Li


Exception: java.lang.LinkageError: loader constraint violation: loader 
(instance of sun/misc/Launcher$AppClassLoader) previously initiated loading for 
a different type with name "org/apache/curator/RetryPolicy"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at 
org.apache.curator.CuratorZookeeperClient.(CuratorZookeeperClient.java:97)
at 
org.apache.curator.framework.imps.CuratorFrameworkImpl.(CuratorFrameworkImpl.java:108)
at 
org.apache.curator.framework.CuratorFrameworkFactory$Builder.build(CuratorFrameworkFactory.java:124)
at 
org.apache.kylin.storage.hbase.util.ZookeeperJobLock.lock(ZookeeperJobLock.java:70)
at 
org.apache.kylin.job.impl.threadpool.DefaultScheduler.init(DefaultScheduler.java:208)
at org.apache.kylin.rest.service.JobService$1.run(JobService.java:116)
at java.lang.Thread.run(Thread.java:745)

This exception will make kylin job engine does not work. And I found it occured 
because in the kylin/WEB-INF/lib contains the curator-client-2.7.1.jar which 
make some conflicts. In general, the HBase and Hadoop cluster always contain 
their own curator-client jar files. So there is no need to include the  
curator-client jar file in kylin/WEB-INF/lib.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (KYLIN-2700) Should allow user to override Kafka conf in cube level

2017-06-30 Thread qiumingming (JIRA)
qiumingming created KYLIN-2700:
--

 Summary: Should allow user to override Kafka conf in cube level
 Key: KYLIN-2700
 URL: https://issues.apache.org/jira/browse/KYLIN-2700
 Project: Kylin
  Issue Type: Improvement
Reporter: qiumingming


Currently, user can not override Kafka conf in cube level.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


I encountered a problem while querying data with kylin's Restful Api

2017-06-30 Thread 华梦真
Hi ,
I used kylin's Restful Api like below:


curl -X POST --user ADMIN:KYLIN  -H 
"Content-Type:application/json;charset=utf-8" -d '{ "sql":"select 
sum(a.price),a.PART_DT,a.seller_country,a.seller_id from  KYLIN_SALES  a inner 
join KYLIN_COUNTRY  b on a.seller_country = b.country where a.PART_DT< 
'2012-08-01'  group by a.PART_DT,a.seller_country,a.seller_id  limit 2 
","project":"test_01" }' http://172.16.71.220:7070/kylin/api/query




Then i got an error like this:
{"url":"http://172.16.71.220:7070/kylin/api/query","exception":"Error while 
executing SQL \"select sum(a.price),a.PART_DT,a.seller_country,a.seller_id from 
 KYLIN_SALES  a inner join KYLIN_COUNTRY  b on a.seller_country = b.country 
where a.PART_DT< 2012-08-01  group by a.PART_DT,a.seller_country,a.seller_id  
limit 2\": From line 1, column 147 to line 1, column 167: Cannot apply '<' to 
arguments of type ' < '. Supported form(s): ' < 
'"}




Then i tried to solve the problem:
curl -X POST --user ADMIN:KYLIN  -H 
"Content-Type:application/json;charset=utf-8" -d '{ "sql":"select 
sum(a.price),a.PART_DT,a.seller_country,a.seller_id from  KYLIN_SALES  a inner 
join KYLIN_COUNTRY  b on a.seller_country = b.country where a.PART_DT< 
\'2012-08-01\'  group by a.PART_DT,a.seller_country,a.seller_id  limit 2 
","project":"test_01" }' http://172.16.71.220:7070/kylin/api/query
However,I still failed.There was no response,and the log had nothing about it.


It seemed that  single quotation marks can not be recognized.And I have no idea 
to solve this problem.


Look forward to your reply.Thanks.




 

Re: 问下kylin可以用连接池连接jdbc么?

2017-06-30 Thread lichaojacobs
可以看一下我这个项目,自己手动封装了一个jdbc pool,使用起来也很方便

https://github.com/lichaojacobs/kylin-jdbc-pool
  

--
View this message in context: 
http://apache-kylin.74782.x6.nabble.com/kylin-jdbc-tp5195p8322.html
Sent from the Apache Kylin mailing list archive at Nabble.com.


Review Request 60420: KYLIN-2684 Failed to build cube with spark engine

2017-06-30 Thread pengjianhua

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60420/
---

Review request for kylin, Dayue Gao, Dong Li, hongbin ma, and Wang Xiaoyu.


Bugs: KYLIN-2684
https://issues.apache.org/jira/browse/KYLIN-2684


Repository: kylin


Description
---

Failed to build cube with spark engine at "#7 Step Name: Build Cube with Spark".

The error log is as following:

Exception in thread "main" java.lang.RuntimeException: error execute 
org.apache.kylin.engine.spark.SparkCubingByLayer
at 
org.apache.kylin.common.util.AbstractApplication.execute(AbstractApplication.java:42)
at org.apache.kylin.common.util.SparkEntry.main(SparkEntry.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: com.esotericsoftware.kryo.KryoException: 
java.lang.IllegalArgumentException: Class is not registered: Object
Note: To register this class use: kryo.register(Object.class);
Serialization trace:
cuboidTreeLock (org.apache.kylin.cube.model.CubeDesc)
at 
com.esotericsoftware.kryo.serializers.FieldSerializer$ObjectField.write(FieldSerializer.java:585)
at 
com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:213)
at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:568)
at 
org.apache.spark.serializer.KryoSerializationStream.writeObject(KryoSerializer.scala:194)
at 
org.apache.spark.broadcast.TorrentBroadcast$.blockifyObject(TorrentBroadcast.scala:203)
at 
org.apache.spark.broadcast.TorrentBroadcast.writeBlocks(TorrentBroadcast.scala:102)
at org.apache.spark.broadcast.TorrentBroadcast.(TorrentBroadcast.scala:85)
at 
org.apache.spark.broadcast.TorrentBroadcastFactory.newBroadcast(TorrentBroadcastFactory.scala:34)
at 
org.apache.spark.broadcast.BroadcastManager.newBroadcast(BroadcastManager.scala:63)
at org.apache.spark.SparkContext.broadcast(SparkContext.scala:1326)
at 
org.apache.spark.api.java.JavaSparkContext.broadcast(JavaSparkContext.scala:639)
at 
org.apache.kylin.engine.spark.SparkCubingByLayer.execute(SparkCubingByLayer.java:166)
at 
org.apache.kylin.common.util.AbstractApplication.execute(AbstractApplication.java:37)
... 10 more
Caused by: java.lang.IllegalArgumentException: Class is not registered: Object
Note: To register this class use: kryo.register(Object.class);
at com.esotericsoftware.kryo.Kryo.getRegistration(Kryo.java:442)
at 
com.esotericsoftware.kryo.util.DefaultClassResolver.writeClass(DefaultClassResolver.java:79)
at com.esotericsoftware.kryo.Kryo.writeClass(Kryo.java:472)
at 
com.esotericsoftware.kryo.serializers.FieldSerializer$ObjectField.write(FieldSerializer.java:561)
... 22 more


Change 'private Object cuboidTreeLock = new Object();' to 'private byte[] 
cuboidTreeLock = new byte[0];' in CubeDesc.java to solve this problem.


Diffs
-

  core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java 82d0b1b24 


Diff: https://reviews.apache.org/r/60420/diff/1/


Testing
---


Thanks,

pengjianhua



Review Request 60456: KYLIN-2688 When the model has a ready cube, should not allow user to edit model JSON in web.

2017-06-30 Thread pengjianhua

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60456/
---

Review request for kylin, Dayue Gao, Dong Li, hongbin ma, and Wang Xiaoyu.


Bugs: KYLIN-2688
https://issues.apache.org/jira/browse/KYLIN-2688


Repository: kylin


Description
---

When the model has a ready cube?user can not edit model and prompt “This model 
is still used by xxxCube”?but user can edit model JSON in the web?It should be 
kept consistent?


Diffs
-

  webapp/app/js/controllers/models.js fd218459d 
  webapp/app/partials/models/models_tree.html c7b55a31e 


Diff: https://reviews.apache.org/r/60456/diff/1/


Testing
---


Thanks,

pengjianhua



kylin when case

2017-06-30 Thread snail_wjk
在kylin2.0.0中我使用如下语句会报错,但是在kylin1.6.0中就可以执行成功。
select "MAIN_ORDER_VIEW"."CHANNEL_ID" as "c0" from "MAIN_ORDER_VIEW" as
"MAIN_ORDER_VIEW" group by "MAIN_ORDER_VIEW"."CHANNEL_ID" order by *CASE
WHEN "MAIN_ORDER_VIEW"."CHANNEL_ID" IS NULL THEN 1 ELSE 0 END*,
"MAIN_ORDER_VIEW"."CHANNEL_ID" ASC

如果我修改为如下语句在kylin2.0.0中执行成功,我想知道这个是什么原因,不支持when case?
select "MAIN_ORDER_VIEW"."CHANNEL_ID" as "c0" from "MAIN_ORDER_VIEW" as
"MAIN_ORDER_VIEW" group by "MAIN_ORDER_VIEW"."CHANNEL_ID" order by 1,
"MAIN_ORDER_VIEW"."CHANNEL_ID" ASC

--
View this message in context: 
http://apache-kylin.74782.x6.nabble.com/kylin-when-case-tp8305.html
Sent from the Apache Kylin mailing list archive at Nabble.com.


[jira] [Created] (KYLIN-2701) Unclosed PreparedStatement in QueryService#getPrepareOnlySqlResponse

2017-06-30 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-2701:
-

 Summary: Unclosed PreparedStatement in 
QueryService#getPrepareOnlySqlResponse
 Key: KYLIN-2701
 URL: https://issues.apache.org/jira/browse/KYLIN-2701
 Project: Kylin
  Issue Type: Bug
Reporter: Ted Yu
Priority: Minor


{code}
try {
conn.prepareStatement(correctedSql);
throw new IllegalStateException("Should have thrown 
OnlyPrepareEarlyAbortException");
{code}
The return value of prepareStatement() may leak if there is no exception from 
the call.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (KYLIN-2702) Ineffective null check in DataModelDesc#initComputedColumns()

2017-06-30 Thread Ted Yu (JIRA)
Ted Yu created KYLIN-2702:
-

 Summary: Ineffective null check in 
DataModelDesc#initComputedColumns()
 Key: KYLIN-2702
 URL: https://issues.apache.org/jira/browse/KYLIN-2702
 Project: Kylin
  Issue Type: Bug
Reporter: Ted Yu
Priority: Minor


{code}
private void initComputedColumns(Map ccInfoMap) {
if (ccInfoMap == null) {
logger.error("cc info map is null");
}
...
CCInfo other = ccInfoMap.get(thisCCName);
{code}
Subsequent access to ccInfoMap may produce NPE.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: [jira] [Created] (KYLIN-2701) Unclosed PreparedStatement inQueryService#getPrepareOnlySqlResponse

2017-06-30 Thread limix
??

 
---Original---
From: "Ted Yu (JIRA)"
Date: 2017/7/1 01:41:08
To: "dev";
Subject: [jira] [Created] (KYLIN-2701) Unclosed PreparedStatement 
inQueryService#getPrepareOnlySqlResponse


Ted Yu created KYLIN-2701:
-

 Summary: Unclosed PreparedStatement in 
QueryService#getPrepareOnlySqlResponse
 Key: KYLIN-2701
 URL: https://issues.apache.org/jira/browse/KYLIN-2701
 Project: Kylin
  Issue Type: Bug
Reporter: Ted Yu
Priority: Minor


{code}
try {
conn.prepareStatement(correctedSql);
throw new IllegalStateException("Should have thrown 
OnlyPrepareEarlyAbortException");
{code}
The return value of prepareStatement() may leak if there is no exception from 
the call.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)