morningman commented on a change in pull request #1444: Modify insert 
operation's behavior when all partitions have no data to load
URL: https://github.com/apache/incubator-doris/pull/1444#discussion_r301100307
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/load/loadv2/InsertLoadJob.java
 ##########
 @@ -46,14 +50,20 @@ public InsertLoadJob() {
         this.jobType = EtlJobType.INSERT;
     }
 
-    public InsertLoadJob(String label, long dbId, long tableId, long 
createTimestamp) {
+    public InsertLoadJob(String label, long dbId, long tableId, long 
createTimestamp, String failMsg) {
         super(dbId, label);
         this.tableId = tableId;
         this.createTimestamp = createTimestamp;
         this.loadStartTimestamp = createTimestamp;
         this.finishTimestamp = System.currentTimeMillis();
-        this.state = JobState.FINISHED;
-        this.progress = 100;
+        if (Strings.isNullOrEmpty(failMsg)) {
+            this.state = JobState.FINISHED;
+            this.progress = 100;
+        } else {
+            this.state = JobState.CANCELLED;
+            this.failMsg = new FailMsg(CancelType.ETL_RUN_FAIL, failMsg);
 
 Review comment:
   OK

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to