hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1545800 - in /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase: client/HTablePool.java ipc/RpcClient.java util/PoolMap.java
Date Tue, 26 Nov 2013 19:55:51 GMT
Author: apurtell
Date: Tue Nov 26 19:55:50 2013
New Revision: 1545800

URL: http://svn.apache.org/r1545800
Log:
[JDK8] Erasure of PoolMap#remove(K,V) conflicts with superclass method

Modified:
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java?rev=1545800&r1=1545799&r2=1545800&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java
(original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTablePool.java
Tue Nov 26 19:55:50 2013
@@ -260,7 +260,7 @@ public class HTablePool implements Close
     String tableName = Bytes.toString(table.getTableName());
     if (tables.size(tableName) >= maxSize) {
       // release table instance since we're not reusing it
-      this.tables.remove(tableName, table);
+      this.tables.removeValue(tableName, table);
       this.tableFactory.releaseHTableInterface(table);
       return;
     }

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java?rev=1545800&r1=1545799&r2=1545800&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java (original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClient.java Tue
Nov 26 19:55:50 2013
@@ -967,7 +967,7 @@ public class RpcClient {
       // release the resources
       // first thing to do;take the connection out of the connection list
       synchronized (connections) {
-        connections.remove(remoteId, this);
+        connections.removeValue(remoteId, this);
       }
 
       // close the streams and therefore the socket

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java?rev=1545800&r1=1545799&r2=1545800&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java (original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/util/PoolMap.java Tue Nov
26 19:55:50 2013
@@ -88,12 +88,20 @@ public class PoolMap<K, V> implements Ma
   public V remove(Object key) {
     Pool<V> pool = pools.remove(key);
     if (pool != null) {
-      remove((K) key, pool.get());
+      removeValue((K) key, pool.get());
     }
     return null;
   }
 
+  /**
+   * @deprecated Will be removed for Java 8, use {@link #removeValue} instead
+   */
+  @Deprecated
   public boolean remove(K key, V value) {
+    return removeValue(key, value);
+  }
+
+  public boolean removeValue(K key, V value) {
     Pool<V> pool = pools.get(key);
     boolean res = false;
     if (pool != null) {



Mime
View raw message