You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/04/29 10:41:21 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #1076: Add new scheduler of load in fe

imay commented on a change in pull request #1076: Add new scheduler of load in fe
URL: https://github.com/apache/incubator-doris/pull/1076#discussion_r279296846
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/load/loadv2/LoadLoadingTask.java
 ##########
 @@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.doris.load.loadv2;
+
+import org.apache.doris.analysis.BrokerDesc;
+import org.apache.doris.catalog.Catalog;
+import org.apache.doris.catalog.Database;
+import org.apache.doris.catalog.OlapTable;
+import org.apache.doris.common.Status;
+import org.apache.doris.common.UserException;
+import org.apache.doris.common.util.LogBuilder;
+import org.apache.doris.common.util.LogKey;
+import org.apache.doris.load.BrokerFileGroup;
+import org.apache.doris.qe.Coordinator;
+import org.apache.doris.qe.QeProcessorImpl;
+import org.apache.doris.task.MasterTask;
+import org.apache.doris.thrift.TBrokerFileStatus;
+import org.apache.doris.thrift.TQueryType;
+import org.apache.doris.thrift.TUniqueId;
+import org.apache.doris.transaction.TabletCommitInfo;
+
+import com.google.common.collect.Maps;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+public class LoadLoadingTask extends MasterTask {
+    private static final Logger LOG = LogManager.getLogger(LoadLoadingTask.class);
+
+    private final Database db;
+    private final OlapTable table;
+    private final BrokerDesc brokerDesc;
+    private final List<BrokerFileGroup> fileGroups;
+    private final long jobDeadlineMs;
+    private final long execMemLimit;
+    private final long txnId;
+    private final LoadTaskCallback callback;
+    private boolean isFinished = false;
+
+    private LoadingTaskPlanner planner;
+
+    private LoadLoadingTaskAttachment attachment;
+    private String errMsg;
+
+    public LoadLoadingTask(Database db, OlapTable table,
+                           BrokerDesc brokerDesc, List<BrokerFileGroup> fileGroups,
+                           long jobDeadlineMs, long execMemLimit, long txnId, LoadTaskCallback callback) {
+        this.signature = Catalog.getInstance().getNextId();
+        this.db = db;
+        this.table = table;
+        this.brokerDesc = brokerDesc;
+        this.fileGroups = fileGroups;
+        this.jobDeadlineMs = jobDeadlineMs;
+        this.execMemLimit = execMemLimit;
+        this.txnId = txnId;
+        this.callback = callback;
+    }
+
+    public void init(List<List<TBrokerFileStatus>> fileStatusList, int fileNum) throws UserException {
 
 Review comment:
   caller should hold the db.lock

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org