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 2018/11/21 10:36:04 UTC

[GitHub] imay commented on a change in pull request #333: Add distributor which allocate task to be fairly

imay commented on a change in pull request #333: Add distributor which allocate task to be fairly
URL: https://github.com/apache/incubator-doris/pull/333#discussion_r235330412
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/load/routineload/RoutineLoadTaskInfo.java
 ##########
 @@ -0,0 +1,72 @@
+// 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.routineload;
+
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+
+/**
+ * Routine load task info is the task info include the only id (signature).
+ * For the kafka type of task info, it also include partitions which will be obtained data in this task.
+ * The routine load task info and routine load task are the same thing logically.
+ * Differently, routine load task is a agent task include backendId which will execute this task.
+ */
+public class RoutineLoadTaskInfo {
+
+    private long signature;
+
+    private long createTimeMs;
+    private long loadStartTimeMs;
+
+    private ReentrantReadWriteLock lock;
+
+    public RoutineLoadTaskInfo(long signature) {
+        this.signature = signature;
+        this.lock = new ReentrantReadWriteLock(true);
 
 Review comment:
   Does this simple class need a lock? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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