From 3e72cb73ae46bd7a341288d12f06e1e42487d254 Mon Sep 17 00:00:00 2001 From: Jingyun Tian Date: Fri, 25 Jan 2019 11:22:56 +0800 Subject: [PATCH] HBASE-21729 Extract ProcedureCoordinatorRpcs and ProcedureMemberRpcs from CoordinatedStateManager --- .../hadoop/hbase/CoordinatedStateManager.java | 16 ---------------- .../ZkCoordinatedStateManager.java | 18 ------------------ 2 files changed, 34 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/CoordinatedStateManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/CoordinatedStateManager.java index ab146e71d18..1f351c52da2 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/CoordinatedStateManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/CoordinatedStateManager.java @@ -19,12 +19,7 @@ package org.apache.hadoop.hbase; import org.apache.hadoop.hbase.coordination.SplitLogManagerCoordination; import org.apache.hadoop.hbase.coordination.SplitLogWorkerCoordination; -import org.apache.hadoop.hbase.procedure.ProcedureCoordinatorRpcs; -import org.apache.hadoop.hbase.procedure.ProcedureMemberRpcs; import org.apache.yetus.audience.InterfaceAudience; -import org.apache.zookeeper.KeeperException; - -import java.io.IOException; /** * Implementations of this interface will keep and return to clients @@ -47,15 +42,4 @@ public interface CoordinatedStateManager { * Method to retrieve coordination for split log manager */ SplitLogManagerCoordination getSplitLogManagerCoordination(); - /** - * Method to retrieve {@link org.apache.hadoop.hbase.procedure.ProcedureCoordinatorRpcs} - */ - ProcedureCoordinatorRpcs getProcedureCoordinatorRpcs(String procType, String coordNode) - throws IOException; - - /** - * Method to retrieve {@link org.apache.hadoop.hbase.procedure.ProcedureMemberRpcs} - */ - ProcedureMemberRpcs getProcedureMemberRpcs(String procType) throws KeeperException; - } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkCoordinatedStateManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkCoordinatedStateManager.java index 91b617fa11e..ba73d53258b 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkCoordinatedStateManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/coordination/ZkCoordinatedStateManager.java @@ -17,18 +17,11 @@ */ package org.apache.hadoop.hbase.coordination; -import java.io.IOException; - import org.apache.hadoop.hbase.CoordinatedStateManager; import org.apache.hadoop.hbase.HBaseInterfaceAudience; import org.apache.hadoop.hbase.Server; import org.apache.hadoop.hbase.zookeeper.ZKWatcher; import org.apache.yetus.audience.InterfaceAudience; -import org.apache.hadoop.hbase.procedure.ProcedureCoordinatorRpcs; -import org.apache.hadoop.hbase.procedure.ProcedureMemberRpcs; -import org.apache.hadoop.hbase.procedure.ZKProcedureCoordinator; -import org.apache.hadoop.hbase.procedure.ZKProcedureMemberRpcs; -import org.apache.zookeeper.KeeperException; /** * ZooKeeper-based implementation of {@link org.apache.hadoop.hbase.CoordinatedStateManager}. @@ -55,15 +48,4 @@ public class ZkCoordinatedStateManager implements CoordinatedStateManager { public SplitLogManagerCoordination getSplitLogManagerCoordination() { return splitLogManagerCoordination; } - - @Override - public ProcedureCoordinatorRpcs getProcedureCoordinatorRpcs(String procType, String coordNode) - throws IOException { - return new ZKProcedureCoordinator(watcher, procType, coordNode); - } - - @Override - public ProcedureMemberRpcs getProcedureMemberRpcs(String procType) throws KeeperException { - return new ZKProcedureMemberRpcs(watcher, procType); - } }