You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Dong Li (JIRA)" <ji...@apache.org> on 2016/05/11 09:07:12 UTC

[jira] [Commented] (KYLIN-1678) MetaData clean just clean FINISHED and DISCARD jobs,but job correct status is SUCCEED

    [ https://issues.apache.org/jira/browse/KYLIN-1678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15279826#comment-15279826 ] 

Dong Li commented on KYLIN-1678:
--------------------------------

Hello Folin,
Thanks for the patch. Here're some comments:
1. Please use "git format-patch" to generate the patch. In this way your contributor info will be included.
2. ExecutableOutputPO.status is always assigned from enum value of org.apache.kylin.job.execution.ExecutableState.
So you only need to check equal with ExecutableState.SUCCEED and ExecutableState.DISCARDED, and not need to check with JobStatusEnum.

> MetaData clean just clean FINISHED and DISCARD jobs,but job correct status is SUCCEED
> -------------------------------------------------------------------------------------
>
>                 Key: KYLIN-1678
>                 URL: https://issues.apache.org/jira/browse/KYLIN-1678
>             Project: Kylin
>          Issue Type: Bug
>          Components: Metadata
>    Affects Versions: v1.5.0, v1.3.0
>            Reporter: ChenFolin
>            Assignee: Shaofeng SHI
>         Attachments: KYLIN-1678.patch
>
>
> MetadataCleanupJob can not clean jobs.
> for (ExecutablePO executable : allExecutable) {
>             long lastModified = executable.getLastModified();
>             ExecutableOutputPO output = executableDao.getJobOutput(executable.getUuid());
>             if (System.currentTimeMillis() - lastModified > TIME_THREADSHOLD_FOR_JOB && (output.getStatus().equals(JobStatusEnum.FINISHED.toString()) || output.getStatus().equals(JobStatusEnum.DISCARDED.toString()))) {
>                 toDeleteResource.add(ResourceStore.EXECUTE_PATH_ROOT + "/" + executable.getUuid());
>                 toDeleteResource.add(ResourceStore.EXECUTE_OUTPUT_ROOT + "/" + executable.getUuid());
>                 for (ExecutablePO task : executable.getTasks()) {
>                     toDeleteResource.add(ResourceStore.EXECUTE_PATH_ROOT + "/" + task.getUuid());
>                     toDeleteResource.add(ResourceStore.EXECUTE_OUTPUT_ROOT + "/" + task.getUuid());
>                 }
>             }
>         }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)