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/27 06:26:47 UTC

[GitHub] kangpinghuang commented on a change in pull request #336: First commit of new tablet repair framework

kangpinghuang commented on a change in pull request #336: First commit of new tablet repair framework
URL: https://github.com/apache/incubator-doris/pull/336#discussion_r236532972
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/clone/TabletChecker.java
 ##########
 @@ -0,0 +1,185 @@
+// 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.clone;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.HashBasedTable;
+import com.google.common.collect.Sets;
+
+import org.apache.doris.catalog.Catalog;
+import org.apache.doris.catalog.Database;
+import org.apache.doris.catalog.MaterializedIndex;
+import org.apache.doris.catalog.OlapTable;
+import org.apache.doris.catalog.Partition;
+import org.apache.doris.catalog.Table;
+import org.apache.doris.catalog.Tablet;
+import org.apache.doris.catalog.Tablet.TabletStatus;
+import org.apache.doris.common.Pair;
+import org.apache.doris.common.util.Daemon;
+import org.apache.doris.system.SystemInfoService;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.List;
+import java.util.Set;
+
+/*
+ * This checker is responsible for checking all unhealthy tablets.
+ * It does not responsible for any scheduler of tablet repairing or balance
+ */
+public class TabletChecker extends Daemon {
+    private static final Logger LOG = LogManager.getLogger(TabletChecker.class);
+
+    private static final long INTERVAL_MS = 60 * 1000L; // 1min
+
+    private Catalog catalog;
+    private SystemInfoService infoService;
+    private TabletScheduler tabletScheduler;
+
+    // db id -> (tbl id -> partition id)
+    // priority of replicas of partitions in this table will be set to VERY_HIGH if not healthy
+    private com.google.common.collect.Table<Long, Long, Set<Long>> prios = HashBasedTable.create();
 
 Review comment:
   I think the abbreviation 'prios' is not a good name.

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