hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1504690 - in /hbase/trunk: hbase-client/src/main/java/org/apache/hadoop/hbase/client/ hbase-server/src/test/java/org/apache/hadoop/hbase/ hbase-server/src/test/java/org/apache/hadoop/hbase/replication/
Date Thu, 18 Jul 2013 22:22:56 GMT
Author: jdcryans
Date: Thu Jul 18 22:22:56 2013
New Revision: 1504690

URL: http://svn.apache.org/r1504690
Log:
REVERT of HBASE-8983

Modified:
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationDisableInactivePeer.java

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1504690&r1=1504689&r2=1504690&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
(original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
Thu Jul 18 22:22:56 2013
@@ -318,31 +318,19 @@ public class HConnectionManager {
   }
 
   /**
-   * Delete information for all connections. Close or not the connection, depending on the
-   *  staleConnection boolean and the ref count. By default, you should use it with
-   *  staleConnection to true.
+   * Delete information for all connections.
    */
-  public static void deleteAllConnections(boolean staleConnection) {
+  public static void deleteAllConnections() {
     synchronized (CONNECTION_INSTANCES) {
       Set<HConnectionKey> connectionKeys = new HashSet<HConnectionKey>();
       connectionKeys.addAll(CONNECTION_INSTANCES.keySet());
       for (HConnectionKey connectionKey : connectionKeys) {
-        deleteConnection(connectionKey, staleConnection);
+        deleteConnection(connectionKey, false);
       }
       CONNECTION_INSTANCES.clear();
     }
   }
 
-  /**
-   * Delete information for all connections..
-   * @deprecated kept for backward compatibility, but the behavior is broken. HBASE-8983
-   */
-  @Deprecated
-  public static void deleteAllConnections() {
-    deleteAllConnections(false);
-  }
-
-
   private static void deleteConnection(HConnection connection, boolean staleConnection) {
     synchronized (CONNECTION_INSTANCES) {
       for (Entry<HConnectionKey, HConnectionImplementation> e: CONNECTION_INSTANCES.entrySet())
{

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java?rev=1504690&r1=1504689&r2=1504690&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java (original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/MiniHBaseCluster.java Thu
Jul 18 22:22:56 2013
@@ -507,7 +507,7 @@ public class MiniHBaseCluster extends HB
     if (this.hbaseCluster != null) {
       this.hbaseCluster.shutdown();
     }
-    HConnectionManager.deleteAllConnections(true);
+    HConnectionManager.deleteAllConnections();
   }
 
   @Override

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationDisableInactivePeer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationDisableInactivePeer.java?rev=1504690&r1=1504689&r2=1504690&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationDisableInactivePeer.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/TestReplicationDisableInactivePeer.java
Thu Jul 18 22:22:56 2013
@@ -28,8 +28,6 @@ import org.apache.hadoop.hbase.util.Byte
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import java.util.Map;
-
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.fail;
 
@@ -51,7 +49,7 @@ public class TestReplicationDisableInact
 
     // enabling and shutdown the peer
     admin.enablePeer("2");
-    utility2.getHBaseCluster().getMaster().shutdown();
+    utility2.shutdownMiniHBaseCluster();
 
     byte[] rowkey = Bytes.toBytes("disable inactive peer");
     Put put = new Put(rowkey);



Mime
View raw message