imay commented on a change in pull request #246: Colocate Join (#245) URL: https://github.com/apache/incubator-doris/pull/246#discussion_r234484747
########## File path: fe/src/main/java/org/apache/doris/clone/ColocateTableBalancer.java ########## @@ -0,0 +1,573 @@ +// 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.collect.HashBasedTable; +import com.google.common.collect.Sets; +import org.apache.doris.catalog.Catalog; +import org.apache.doris.catalog.ColocateTableIndex; +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.Replica; +import org.apache.doris.catalog.Tablet; +import org.apache.doris.common.Config; +import org.apache.doris.common.util.Daemon; +import org.apache.doris.persist.ColocatePersistInfo; +import org.apache.doris.persist.ReplicaPersistInfo; +import org.apache.doris.system.Backend; +import org.apache.doris.system.SystemInfoService; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * when backend remove, down, and add, balance colocate tablets + * some work delegate to {@link CloneChecker} + * CloneChecker don't handle colocate tablets + */ +public class ColocateTableBalancer extends Daemon { Review comment: This class' logic is more complicated, Can you add some UT and more comment for this class? And I think you can split check logic and meta edit. And I need more time to ingest this class' work ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org For additional commands, e-mail: dev-h...@doris.apache.org