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

ASF GitHub Bot commented on KYLIN-5293:
---------------------------------------

Mukvin commented on code in PR #2017:
URL: https://github.com/apache/kylin/pull/2017#discussion_r1022241375


##########
kylin-spark-project/kylin-spark-engine/src/main/java/org/apache/kylin/engine/spark/job/NSparkCubingJob.java:
##########
@@ -158,4 +158,19 @@ public void cleanupAfterJobDiscard(String segmentName, 
String segmentIdentifier)
             logger.warn("Delete resource file failed after job be discarded, 
due to", e);
         }
     }
+
+    public void cleanupJobTempAfterJobDiscard() {
+        PathManager.deleteJobTempPath(getConfig(), 
getParam(MetadataConstants.P_PROJECT_NAME),
+                getParam(MetadataConstants.P_JOB_ID));
+    }
+
+    public void cleanupSegmentAfterJobDiscard(String segmentName, String 
segmentIdentifier) {
+        try {
+            CubeManager cubeManager = CubeManager.getInstance(getConfig());
+            CubeInstance cube = 
cubeManager.getCube(getParam(MetadataConstants.P_CUBE_NAME));
+            PathManager.deleteSegmentParquetStoragePath(cube, segmentName, 
segmentIdentifier);

Review Comment:
   How can I get the notice that segments were deleted success?
   Adding a piece of extra log information may be good that the progress is in 
this place.





> NLP occured when discard job
> ----------------------------
>
>                 Key: KYLIN-5293
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5293
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v4.0.1
>            Reporter: Liu Zhao
>            Priority: Major
>         Attachments: image-2022-11-14-14-19-46-242.png, 
> image-2022-11-14-14-19-53-813.png
>
>
> Segment not yet generated when discard job.
>  !image-2022-11-14-14-19-46-242.png! 
>  !image-2022-11-14-14-19-53-813.png! 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to