Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
import org.apache.hadoop.hbase.replication.master.ReplicationLogCleaner;
import org.apache.hadoop.hbase.replication.master.ReplicationPeerConfigUpgrader;
import org.apache.hadoop.hbase.replication.regionserver.ReplicationStatus;
import org.apache.hadoop.hbase.rsgroup.RSGroupInfoManager;
import org.apache.hadoop.hbase.security.AccessDeniedException;
import org.apache.hadoop.hbase.security.SecurityConstants;
import org.apache.hadoop.hbase.security.UserProvider;
Expand Down Expand Up @@ -350,6 +351,8 @@ public void run() {
// manager of assignment nodes in zookeeper
private AssignmentManager assignmentManager;

private RSGroupInfoManager rsGroupInfoManager;

// manager of replication
private ReplicationPeerManager replicationPeerManager;

Expand Down Expand Up @@ -772,6 +775,8 @@ protected void initializeZKBasedSystemTrackers()
this.splitOrMergeTracker = new SplitOrMergeTracker(zooKeeper, conf, this);
this.splitOrMergeTracker.start();

this.rsGroupInfoManager = RSGroupInfoManager.create(this);

this.replicationPeerManager = ReplicationPeerManager.create(zooKeeper, conf);

this.drainingServerTracker = new DrainingServerTracker(zooKeeper, this, this.serverManager);
Expand Down Expand Up @@ -3751,4 +3756,9 @@ public Map<String, ReplicationStatus> getWalGroupsReplicationStatus() {
public HbckChore getHbckChore() {
return this.hbckChore;
}

@Override
public RSGroupInfoManager getRSRSGroupInfoManager() {
return rsGroupInfoManager;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@
package org.apache.hadoop.hbase.master;

import com.google.protobuf.Service;

import java.io.IOException;
import java.util.List;

import org.apache.hadoop.hbase.Server;
import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.TableDescriptors;
Expand Down Expand Up @@ -51,6 +49,7 @@
import org.apache.hadoop.hbase.replication.ReplicationPeerConfig;
import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
import org.apache.hadoop.hbase.replication.SyncReplicationState;
import org.apache.hadoop.hbase.rsgroup.RSGroupInfoManager;
import org.apache.hadoop.hbase.security.access.AccessChecker;
import org.apache.hadoop.hbase.security.access.ZKPermissionWatcher;
import org.apache.yetus.audience.InterfaceAudience;
Expand Down Expand Up @@ -537,4 +536,8 @@ default SplitWALManager getSplitWALManager(){
*/
List<RegionPlan> executeRegionPlansWithThrottling(List<RegionPlan> plans);

/**
* @return the {@link RSGroupInfoManager}
*/
RSGroupInfoManager getRSRSGroupInfoManager();
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void start(CoprocessorEnvironment env) throws IOException {
}

master = ((HasMasterServices) env).getMasterServices();
groupInfoManager = RSGroupInfoManagerImpl.getInstance(master);
groupInfoManager = master.getRSRSGroupInfoManager();
groupAdminServer = new RSGroupAdminServer(master, groupInfoManager);
Class<?> clazz =
master.getConfiguration().getClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.List;
import java.util.Set;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.master.MasterServices;
import org.apache.hadoop.hbase.net.Address;
import org.apache.yetus.audience.InterfaceAudience;

Expand Down Expand Up @@ -87,4 +88,8 @@ Set<Address> moveServers(Set<Address> servers, String srcGroup, String dstGroup)
*/
@Deprecated
RSGroupInfo getRSGroupForTable(TableName tableName) throws IOException;

static RSGroupInfoManager create(MasterServices master) throws IOException {
return RSGroupInfoManagerImpl.getInstance(master);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import org.apache.hadoop.hbase.replication.ReplicationPeerConfig;
import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
import org.apache.hadoop.hbase.replication.SyncReplicationState;
import org.apache.hadoop.hbase.rsgroup.RSGroupInfoManager;
import org.apache.hadoop.hbase.security.access.AccessChecker;
import org.apache.hadoop.hbase.security.access.ZKPermissionWatcher;
import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
Expand Down Expand Up @@ -490,4 +491,9 @@ public List<RegionPlan> executeRegionPlansWithThrottling(List<RegionPlan> plans)
public AsyncClusterConnection getAsyncClusterConnection() {
return null;
}

@Override
public RSGroupInfoManager getRSRSGroupInfoManager() {
return null;
}
}