see  :

http://note.youdao.com/noteshare?id=df34c64dcf3cf801a9c085be0c3f5f21&sub=7BB3043221BA44E4BAF5760339280480


kylin 1.6 问题记录:
版本:apache-kylin-1.6.0-hbase1.x-bin


select
cast(SUM(pv) as double) as pv,
cast( count(distinct user_id) as double) as user_id
from olap.olap_log_accs_page_di
inner join DIM.DIM_LOG_USER_LOCATION on
DIM.DIM_LOG_USER_LOCATION.user_city_code=olap.olap_log_accs_page_di.location

inner join DIM.DIM_PUBLIC_DATE_INFO on
DIM.DIM_PUBLIC_DATE_INFO."DATE"=olap.olap_log_accs_page_di."DATE"
where
DIM.DIM_PUBLIC_DATE_INFO."DATE" >=20170117
and DIM.DIM_PUBLIC_DATE_INFO."DATE" <=20170215
and DIM.DIM_LOG_USER_LOCATION.user_region_name in ('华东')
group by
DIM.DIM_LOG_USER_LOCATION.user_country_name,DIM.DIM_LOG_USER_LOCATION.user_province_name,DIM.DIM_LOG_USER_LOCATION.user_region_name

order by DIM.DIM_LOG_USER_LOCATION.user_province_name ASC

上面这个sql执行OK,符合预期。
但是 如果 仅仅把 in ('华东') 改成 in ('华东','华南') 则 sql执行就会报错。


错误信息如下所示:


查看 kylin.log日志, 详细的异常信息 :
http://note.youdao.com/noteshare?id=a1c257599774c4bccb0c6763923359d5&sub=11C6AA36AC894EDD9006DDAE17B16747
2017-02-16 15:32:51,080 WARN [kylin-coproc--pool3-t5578]
ipc.CoprocessorRpcChannel:58 : Call failed on IOException
java.net.SocketTimeoutException: callTimeout=60000, callDuration=114625:
row ' ' on table 'KYLIN_F2H6NPOLR7' at
region=KYLIN_F2H6NPOLR7,,1487168742102.433e266be82448c5380610e9e7704658.,
hostname=jx-db-hbase03.22lll.com,16020,1480406440673, seqNum=2
at
org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:159)
at
org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel.callExecService(RegionCoprocessorRpcChannel.java:95)
at
org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel.callMethod(CoprocessorRpcChannel.java:56)
at
org.apache.kylin.storage.hbase.cube.v2.coprocessor.endpoint.generated.CubeVisitProtos$CubeVisitService$Stub.visitCube(CubeVisitProtos.java:4178)

Caused by: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
at
org.apache.kylin.storage.hbase.cube.v2.HBaseReadonlyStore$1$1.next(HBaseReadonlyStore.java:131)



根据kylin.log 异常,我的的判断定位,kylin源码中:HBaseReadonlyStore

麻烦帮忙排查,顺便咨询一下,这个源码中 cell啥情况下会为空?




附上该sql其他情况下:
如果 把sql 中 in ('华东') 改成 in ('华东','华南') 后 ,同时 select sum,count(distinct) 两个指标
只出现一个 指标, 也不会报错。

补充说明:在kylin 1.5.4.1 版本,该诡异现象 也存在。


附上 cube_desc 详细信息:

{ "uuid": "f30d538b-5345-4f77-b8e3-b20ebae8cb8e", "last_modified":
1487147245924, "version": "1.6.0", "name":
"olap_log_accs_page_di_cube_0215", "model_name":
"olap_log_accs_page_di_cube_0215", "description":
"olap_log_accs_page_di_cube_0215", "null_string": null, "dimensions": [ {
"name": "YEAR", "table": "DIM.DIM_PUBLIC_DATE_INFO", "column": "YEAR",
"derived": null }, { "name": "QUARTER", "table":
"DIM.DIM_PUBLIC_DATE_INFO", "column": "QUARTER_CN", "derived": null }, {
"name": "MONTH", "table": "DIM.DIM_PUBLIC_DATE_INFO", "column": "MONTH_CN",
"derived": null }, { "name": "DATE", "table": "DIM.DIM_PUBLIC_DATE_INFO",
"column": "DATE", "derived": null }, { "name": "PROVINCE", "table":
"DIM.DIM_PUBLIC_CITY_INFO", "column": "PROVINCE_NAME", "derived": null }, {
"name": "CITY", "table": "DIM.DIM_PUBLIC_CITY_INFO", "column": "CITY_NAME",
"derived": null }, { "name": "USER_COUNTRY", "table":
"DIM.DIM_LOG_USER_LOCATION", "column": "USER_COUNTRY_NAME", "derived": null
}, { "name": "USER_REGION", "table": "DIM.DIM_LOG_USER_LOCATION", "column":
"USER_REGION_NAME", "derived": null }, { "name": "USER_PROVINCE", "table":
"DIM.DIM_LOG_USER_LOCATION", "column": "USER_PROVINCE_NAME", "derived":
null }, { "name": "USER_CITY", "table": "DIM.DIM_LOG_USER_LOCATION",
"column": "USER_CITY_NAME", "derived": null }, { "name": "USER_TYPE",
"table": "DIM.DIM_LOG_USER_TYPE", "column": "TYPE_NAME", "derived": null },
{ "name": "IS_LOGIN", "table": "DIM.DIM_LOG_IS_LOGIN", "column":
"LOGIN_NAME", "derived": null }, { "name": "IS_REGISTER", "table":
"DIM.DIM_LOG_IS_REGISTER", "column": "REGISTER_NAME", "derived": null }, {
"name": "BROWSER", "table": "DIM.DIM_LOG_BROWSER", "column":
"BROWSER_NAME", "derived": null }, { "name": "APP_VERSION", "table":
"DIM.DIM_LOG_APP_VERSION", "column": "VERSION_NAME", "derived": null } ],
"measures": [ { "name": "_COUNT_", "function": { "expression": "COUNT",
"parameter": { "type": "constant", "value": "1", "next_parameter": null },
"returntype": "bigint" }, "dependent_measure_ref": null }, { "name": "PV",
"function": { "expression": "SUM", "parameter": { "type": "column",
"value": "PV", "next_parameter": null }, "returntype": "bigint" },
"dependent_measure_ref": null }, { "name": "UV", "function": {
"expression": "COUNT_DISTINCT", "parameter": { "type": "column", "value":
"USER_ID", "next_parameter": null }, "returntype": "bitmap" },
"dependent_measure_ref": null }, { "name": "OUT_SESSION", "function": {
"expression": "SUM", "parameter": { "type": "column", "value":
"IS_OUT_SESSION", "next_parameter": null }, "returntype": "bigint" },
"dependent_measure_ref": null } ], "dictionaries": [], "rowkey": {
"rowkey_columns": [ { "column": "YEAR", "encoding": "dict", "isShardBy":
false }, { "column": "QUARTER_CN", "encoding": "dict", "isShardBy": false
}, { "column": "MONTH_CN", "encoding": "dict", "isShardBy": false }, {
"column": "DATE", "encoding": "dict", "isShardBy": false }, { "column":
"PROVINCE_NAME", "encoding": "dict", "isShardBy": false }, { "column":
"CITY_NAME", "encoding": "dict", "isShardBy": false }, { "column":
"USER_COUNTRY_NAME", "encoding": "dict", "isShardBy": false }, { "column":
"USER_REGION_NAME", "encoding": "dict", "isShardBy": false }, { "column":
"USER_PROVINCE_NAME", "encoding": "dict", "isShardBy": false }, { "column":
"USER_CITY_NAME", "encoding": "dict", "isShardBy": false }, { "column":
"TYPE_NAME", "encoding": "dict", "isShardBy": false }, { "column":
"LOGIN_NAME", "encoding": "dict", "isShardBy": false }, { "column":
"REGISTER_NAME", "encoding": "dict", "isShardBy": false }, { "column":
"BROWSER_NAME", "encoding": "dict", "isShardBy": false }, { "column":
"VERSION_NAME", "encoding": "dict", "isShardBy": false } ] },
"hbase_mapping": { "column_family": [ { "name": "F1", "columns": [ {
"qualifier": "M", "measure_refs": [ "_COUNT_", "PV", "OUT_SESSION" ] } ] },
{ "name": "F2", "columns": [ { "qualifier": "M", "measure_refs": [ "UV" ] }
] } ] }, "aggregation_groups": [ { "includes": [ "YEAR", "QUARTER_CN",
"MONTH_CN", "DATE", "PROVINCE_NAME", "CITY_NAME", "USER_COUNTRY_NAME",
"USER_REGION_NAME", "USER_PROVINCE_NAME", "USER_CITY_NAME", "TYPE_NAME",
"LOGIN_NAME", "REGISTER_NAME", "BROWSER_NAME", "VERSION_NAME" ],
"select_rule": { "hierarchy_dims": [ [ "YEAR", "QUARTER_CN", "MONTH_CN",
"DATE" ], [ "PROVINCE_NAME", "CITY_NAME" ], [ "USER_COUNTRY_NAME",
"USER_REGION_NAME", "USER_PROVINCE_NAME", "USER_CITY_NAME" ] ],
"mandatory_dims": [], "joint_dims": [] } } ], "signature":
"odaKh4hY+Mb4uRggEJJanQ==", "notify_list": [], "status_need_notify": [
"ERROR", "DISCARDED", "SUCCEED" ], "partition_date_start": 1485907200000,
"partition_date_end": 3153600000000, "auto_merge_time_ranges": [ 604800000,
2419200000 ], "retention_range": 0, "engine_type": 2, "storage_type": 2,
"override_kylin_properties": { "kylin.cube.aggrgroup.max.combination":
"16384" } }






-- 
祝身体健康,万事如意 ^_^

Reply via email to