You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Shaofeng SHI (JIRA)" <ji...@apache.org> on 2017/08/16 01:41:01 UTC

[jira] [Assigned] (KYLIN-2789) Cube's last build time is wrong

     [ https://issues.apache.org/jira/browse/KYLIN-2789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shaofeng SHI reassigned KYLIN-2789:
-----------------------------------

         Assignee: Zhixiong Chen  (was: Zhong,Jason)
    Fix Version/s:     (was: v1.6.0)

> Cube's last build time is wrong
> -------------------------------
>
>                 Key: KYLIN-2789
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2789
>             Project: Kylin
>          Issue Type: Bug
>          Components: REST Service, Web 
>    Affects Versions: v1.6.0
>            Reporter: Hongtao He
>            Assignee: Zhixiong Chen
>            Priority: Minor
>              Labels: cube.last_build_time, cube.segments
>         Attachments: cubeListModel.js
>
>
> Firstly, we create a segment in a cube, then we can get the attributes of this segment,such as
>  { "date_range_start " : 2017-08-02 00:00:00,
> "date_range_end" : 2017-08-03 00:00:00,
> "last_build_time": 2017-08-16 01:00:00
> }
> Secondly, we create another segment in this cube, which has an earlier data range,such as
>  { "date_range_start " : 2017-08-01 00:00:00,
> "date_range_end" : 2017-08-02 00:00:00,
> "last_build_time": 2017-08-16 02:00:00
> }
> Under these circumstances, the Cube's last creation time should be 2017-08-16 02:00:00, not 2017-08-16 01:00:00.However, we get the opposite answer  in kylin 1.6.0.
> the realization of cube's last build time is  :
>  if(cube.name){
>                     if (cube.segments && cube.segments.length > 0) {
>                         for(var i= cube.segments.length-1;i>=0;i--){
>                             if(cube.segments[i].status==="READY"){
>                                cube.last_build_time = cube.segments[i].last_build_time;
>                                 break;
>                             }else if(i===0){
>                                 cube.last_build_time = undefined;
>                             }
>                         }
>                     } else {
>                         cube.last_build_time = undefined;
>                     }
>                 }
> (the code is in kylin/webapp/app/js/model/cubeListModel.js)
> The last build time may come from any segment,I changed the code to the following:
> if(cube.name){
>                     cube.last_build_time = undefined;
>                     if (cube.segments && cube.segments.length > 0) {
>                         for(var i= cube.segments.length-1;i>=0;i--){
>                             if(cube.segments[i].status==="READY"){
>                                if(cube.last_build_time===undefined || cube.last_build_time<cube.segments[i].last_build_time)                            
>                                       cube.last_build_time = cube.segments[i].last_build_time;
>                             }
>                         }
>                     }
>                 }



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