From d9be8a40a8da29a11e42d1106268c0e38f2c8b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=B0=9A=E6=B3=89?= Date: Fri, 26 Nov 2021 23:16:59 +0800 Subject: [PATCH] HBASE-26417 Remove NoopReplicationQueueStorage (#3882) Signed-off-by: Duo Zhang --- .../NoopReplicationQueueStorage.java | 140 ------------------ 1 file changed, 140 deletions(-) delete mode 100644 hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/NoopReplicationQueueStorage.java diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/NoopReplicationQueueStorage.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/NoopReplicationQueueStorage.java deleted file mode 100644 index 4ad41fc69838..000000000000 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/NoopReplicationQueueStorage.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * 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.hadoop.hbase.replication.regionserver; - -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.SortedSet; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.hbase.ServerName; -import org.apache.hadoop.hbase.replication.ReplicationException; -import org.apache.hadoop.hbase.replication.ReplicationQueueStorage; -import org.apache.hadoop.hbase.util.Pair; -import org.apache.yetus.audience.InterfaceAudience; - -/** - * Noop queue storage -- does nothing. - */ -@InterfaceAudience.Private -class NoopReplicationQueueStorage implements ReplicationQueueStorage { - NoopReplicationQueueStorage() {} - - @Override - public void removeQueue(ServerName serverName, String queueId) throws ReplicationException {} - - @Override - public void addWAL(ServerName serverName, String queueId, String fileName) - throws ReplicationException {} - - @Override - public void removeWAL(ServerName serverName, String queueId, String fileName) - throws ReplicationException { } - - @Override - public void setWALPosition(ServerName serverName, String queueId, String fileName, long position, - Map lastSeqIds) throws ReplicationException {} - - @Override - public long getLastSequenceId(String encodedRegionName, String peerId) - throws ReplicationException { - return 0; - } - - @Override - public void setLastSequenceIds(String peerId, Map lastSeqIds) - throws ReplicationException {} - - @Override - public void removeLastSequenceIds(String peerId) throws ReplicationException {} - - @Override - public void removeLastSequenceIds(String peerId, List encodedRegionNames) - throws ReplicationException {} - - @Override - public long getWALPosition(ServerName serverName, String queueId, String fileName) - throws ReplicationException { - return 0; - } - - @Override - public List getWALsInQueue(ServerName serverName, String queueId) - throws ReplicationException { - return Collections.EMPTY_LIST; - } - - @Override - public List getAllQueues(ServerName serverName) throws ReplicationException { - return Collections.EMPTY_LIST; - } - - @Override - public Pair> claimQueue(ServerName sourceServerName, String queueId, - ServerName destServerName) throws ReplicationException { - return null; - } - - @Override - public void removeReplicatorIfQueueIsEmpty(ServerName serverName) - throws ReplicationException {} - - @Override - public List getListOfReplicators() throws ReplicationException { - return Collections.EMPTY_LIST; - } - - @Override - public Set getAllWALs() throws ReplicationException { - return Collections.EMPTY_SET; - } - - @Override - public void addPeerToHFileRefs(String peerId) throws ReplicationException {} - - @Override - public void removePeerFromHFileRefs(String peerId) throws ReplicationException {} - - @Override - public void addHFileRefs(String peerId, List> pairs) - throws ReplicationException {} - - @Override - public void removeHFileRefs(String peerId, List files) throws ReplicationException {} - - @Override - public List getAllPeersFromHFileRefsQueue() throws ReplicationException { - return Collections.EMPTY_LIST; - } - - @Override - public List getReplicableHFiles(String peerId) throws ReplicationException { - return Collections.EMPTY_LIST; - } - - @Override - public Set getAllHFileRefs() throws ReplicationException { - return Collections.EMPTY_SET; - } - - @Override - public String getRsNode(ServerName serverName) { - return null; - } -}