You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Hongtao He (JIRA)" <ji...@apache.org> on 2017/08/15 18:34:00 UTC
[jira] [Updated] (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 ]
Hongtao He updated KYLIN-2789:
------------------------------
Description:
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"){
{color:red} cube.last_build_time = cube.segments[i].last_build_time;
break;{color}
}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;
}
}
}
}
was:
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"){
{color:red} cube.last_build_time = cube.segments[i].last_build_time;
break;{color}
}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;
}
}
}
}
> 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
> Affects Versions: v1.6.0
> Reporter: Hongtao He
> Assignee: Zhong,Jason
> Priority: Minor
> Labels: cube.last_build_time, cube.segments
> Fix For: v1.6.0
>
> Attachments: cubeListModel.js.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"){
> {color:red} cube.last_build_time = cube.segments[i].last_build_time;
> break;{color}
> }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)