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:43:12 UTC

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

EmmyMiao87 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_r279313684
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/load/loadv2/LoadManager.java
 ##########
 @@ -0,0 +1,104 @@
+/*
+ * 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.LoadStmt;
+import org.apache.doris.catalog.Catalog;
+import org.apache.doris.catalog.Database;
+import org.apache.doris.common.Config;
+import org.apache.doris.common.DdlException;
+import org.apache.doris.task.MasterTaskExecutor;
+
+import com.google.common.collect.Maps;
+
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.stream.Collectors;
+
+/*
+This class contains all of broker and mini load job(v2).
+ */
+public class LoadManager {
+    private Map<Long, LoadJob> idToLoadJob = Maps.newConcurrentMap();
+    private MasterTaskExecutor pendingTaskExecutor =
+            new MasterTaskExecutor(Config.load_pending_thread_num_high_priority);
+    private MasterTaskExecutor loadingTaskExecutor = new MasterTaskExecutor(10);
+
+    private ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true);
 
 Review comment:
   To protect the atomicity of (idToLoadJob, dbIdToLabelToLoadJobs)

----------------------------------------------------------------
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