Thanks for you response, I've already read what you suggested, but I'm still 
confused: Why I didn't met this situation in Kylin 1.5.4? I got the same time 
with my local time when I did sql query in Kylin1.5.4 by WEB GUI, but 8 hours 
earlier than my local time in kylin1.6.0 when used new streaming cube.


Besides, as you mentioned, the property "kylin.rest.timezone" will be used to 
display the operation times on Web GUI. Why cube's last build time and create 
time are same to my local time, but segments' start time and end time are 8 
hours earlier than my local time? Aren't both of them are operation times on 
Web GUI?(Also about new streaming cube in Kylin 1.6.0)



在2016年12月9日 22:46, ShaoFeng Shi<shaofeng...@apache.org>写道:

Hi guys, sorry for the late response, just back from a travel.

I think this is expected. The property "kylin.rest.timezone" will be used
to display the operation times on Web GUI, like last build time, etc. But
it is just for Kylin's Web GUI, not affect the query result.

In Cube, all the times has no timezone (it equals to GMT0); GMT0 time is
also called UTC or Epoch time; Java's System.currentTimeMillis() value is
UTC, which is used in streaming scenarios very often.

You mentioned that the result is 8 hours earlier than your expectation,
because you're comparing it with your local time which is GMT+8. If you
adding the timezone diff, they're matched.

In this post Julian has a good sharing about timestamp in Calciate and
JDBC, suggest to check if you haven't:
http://apache-kylin.74782.x6.nabble.com/JDBC-query-result-Date-column-get-wrong-value-td5370.html







在 2016年12月8日 下午10:38,Luke Han <luke...@gmail.com>写道:

> Hi all,
>     Would you mind to discuss in English? There are people coming from all
> of the world and they would like to know what you are talking about,
> especially about some issue or problem.
>
>     Please help to try using English which will help a lot for record and
> search.
>
>     Thank you very much.
>
> Luke with my VP hat.
>
>
> Best Regards!
> ---------------------
>
> Luke Han
>
> 2016-12-08 13:57 GMT+08:00 汪胜 <sky...@163.com>:
>
> > 对于SQL查询记录早了8小时的问题,我使用了JDBC和Kylin WEB两种方式进行测试,结果都是查询记录早了8小时。
> > 这说明Kylin服务端从HBase中扫描记录时,读取的记录就已经比实际时间早了8小时。所以,可能是Kylin服务端在处理kafka数据的时候,
> > 对于时间的处理有些问题。
> >
> >
> >
> >
> >
> > 在2016年12月8日 12:36, Jian Zhong<zhongj...@apache.org>写道:
> >
> > So, you can get right result you want for non-streaming cube?
> >
> > Did you query on Kylin UI or use jdbc driver?
> >
> > 2016-12-08 12:32 GMT+08:00 仇同心 <qiutong...@jd.com>:
> >
> > > streaming cube
> > >
> > > -----邮件原件-----
> > > 发件人: Jian Zhong [mailto:zhongj...@apache.org]
> > > 发送时间: 2016年12月8日 12:32
> > > 收件人: dev@kylin.apache.org
> > > 主题: Re: 答复: 回复:答复: Kylin1.6.0流式Cube查询时间错误
> > >
> > > this only happens in streaming cube or all cubes?
> > >
> > > 2016-12-08 11:28 GMT+08:00 Billy Liu <billy...@apache.org>:
> > >
> > > > here here some threads about getting the right Date from Kylin
> > > > http://apache-kylin.74782.x6.nabble.com/JDBC-query-result-
> > > > Date-column-get-wrong-value-td5370.html
> > > >
> > > > 在 2016年12月8日 上午11:09,仇同心 <qiutong...@jd.com>写道:
> > > >
> > > > > 是的,构建好的segment进行SQL查询的时候,发现这些查询记录的时间也都是早了8小时
> > > > >
> > > > >
> > > > >
> > > > > -----邮件原件-----
> > > > > 发件人: 汪胜 [mailto:sky...@163.com]
> > > > > 发送时间: 2016年12月8日 11:06
> > > > > 收件人: dev
> > > > > 主题: 回复:答复: Kylin1.6.0流式Cube查询时间错误
> > > > >
> > > > >     我在查看前端页面代码的时候,发现传到前端的start time和end time都是timestamp的形式,
> > > > > 我自己对这些timestamp进行转换的时候,发现时间是正确。因此我觉得有可能是前端在转换这些timestamp的时候,
> > > > > 没有考虑到配置文件的时区问题,但是我还没有进行验证。
> > > > >     除此之外,我在对构建好的segment进行SQL查询的时候,发现这些查询记录的时间也都是早了8小时,
> 不知道你有没有碰到这个问题?
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 在2016年12月8日 10:57, 仇同心<qiutong...@jd.com>写道:
> > > > >
> > > > > 我也遇到了一样的问题,cube的Last Build Time 是正确的:2016-12-08 10:48:37 GMT+8
> > > > >
> > > > > 但是segment的时间早8个小时:
> > > > > Start Time: 2016-12-08 02:44:00
> > > > > End Time: 2016-12-08 02:45:00
> > > > >
> > > > > 请问这个问题是kylin哪里造成的?
> > > > >
> > > > >
> > > > > 发件人: 汪胜 [mailto:sky...@163.com]
> > > > > 发送时间: 2016年12月6日 21:17
> > > > > 收件人: dev
> > > > > 主题: Re: Kylin1.6.0流式Cube查询时间错误
> > > > >
> > > > > 你好,
> > > > > 非常感谢您的回答,但是我仍然有两个地方不太理解,望指教:
> > > > >
> > > > > 1 如果kylin.properties改的是页面上显示的时间,那么为什么在web页面的“Storage”
> > > > 标签下显示的每个segment的start
> > > > > time和end time则比电脑早了8个小时,但是cube的创建时间和最后一次修改时间显示却是正确的。
> > > > > 我在HBase中查看对应cube的JSON数据,在这里面每个segment的起始和结束时间的timestam
> p,用mysql的from_
> > > > > unixtime函数转换之后与电脑上的时间是一致的,这是否是前端页面解析的问题?
> > > > > --------------------------------------------------
> > > > > [cid:56910fa5$1$158d4477d62$Coremail$skyyws$163.com]
> > > > > ---------------------------------------------------------------
> > > > > [cid:1deff3e1$2$158d4477d63$Coremail$skyyws$163.com]
> > > > > ------------------------------------------------------------------
> > > > > [cid:6448603e$3$158d4477d63$Coremail$skyyws$163.com]
> > > > >
> > > > > 2
> > > > > 您说的流式Cube用脚本启动之后,应该手动加上8小时,是否是指:Kylin服务端在处理kafka的数据时,
> 时间会比电脑上的时间少8小时?
> > > > > (
> > > > > 我在对流式Cube进行SQL查询时,发现Kylin服务端返回的每一列的时间都比电脑上的晚了8小时)
> > > > >
> > > > > [cid:d96b8d1$4$158d4477d63$Coremail$skyyws$163.com]
> > > > > 这个数据是通过IDEA远程调试得到的来自Kylin服务器的数据,是Kylin通过查询HBase之后返回的。
> > > > > 每一列数据的时间都比电脑上的实际时间晚了8小时。
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 在2016年12月6日 20:30, Mario Copperfield <xwhfcen...@gmail.com<mailto:
> x
> > > > > whfcen...@gmail.com>> 写道:
> > > > > > kylin.properties改的应该是页面上显示的时间,流式Cube用脚本启动了话和页面上的时间是不一致的,
> 应该手动加上8小时
> > > > >
> > > > > On 6 Dec 2016, 19:40 +0800, 汪胜
> > > > > <sky...@163.com<mailto:sky...@163.com>>,
> > > > > wrote:
> > > > > > 你好,
> > > > > > 我在安装了Kylin1.6.0之后,根据官网的教程,成功地构建了流式cube。但在进行SQL查询的时候,
> > > > 发现所有的“MINUTE_START”
> > > > > 列的时间比实际时间少了8个小时,而且在WEB页面上,每个流式segment的起始和结束时间也少了8个小时,
> > > > > 但是cube的创建时间和最后一次修改时间都是正确的,请问可能是什么原因呢?
> > > > > > 注:我在kylin.properties文件中将timezone改为了GMT+8
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>



-- 
Best regards,

Shaofeng Shi 史少锋

Reply via email to