hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeffr...@apache.org
Subject svn commit: r1524596 - in /hbase/branches/0.96: 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/coprocessor/ hbase-server/src/test/java/or...
Date Wed, 18 Sep 2013 22:31:07 GMT
Author: jeffreyz
Date: Wed Sep 18 22:31:07 2013
New Revision: 1524596

URL: http://svn.apache.org/r1524596
Log:
HBASE-9551: HBaseTestingUtility#createPreSplitLoadTestTable double close HBaseAdmin

Modified:
    hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1524596&r1=1524595&r2=1524596&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
(original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
Wed Sep 18 22:31:07 2013
@@ -2377,9 +2377,10 @@ public class HBaseAdmin implements Abort
   }
 
   @Override
-  public void close() throws IOException {
+  public synchronized void close() throws IOException {
     if (cleanupConnectionOnClose && this.connection != null) {
       this.connection.close();
+      this.connection = null;
     }
   }
 

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1524596&r1=1524595&r2=1524596&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
(original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Wed Sep 18 22:31:07 2013
@@ -3031,7 +3031,6 @@ public class HBaseTestingUtility extends
           totalNumberOfRegions);
 
       admin.createTable(desc, splits);
-      admin.close();
     } catch (MasterNotRunningException e) {
       LOG.error("Master not running", e);
       throw new IOException(e);

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java?rev=1524596&r1=1524595&r2=1524596&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java
(original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpoint.java
Wed Sep 18 22:31:07 2013
@@ -287,7 +287,6 @@ public class TestCoprocessorEndpoint {
     TestRpcServiceProtos.TestProtobufRpcProto.BlockingInterface service =
         TestRpcServiceProtos.TestProtobufRpcProto.newBlockingStub(admin.coprocessorService());
     assertEquals("hello", service.echo(null, request).getMessage());
-    admin.close();
   }
 
   @Test
@@ -320,8 +319,6 @@ public class TestCoprocessorEndpoint {
       service.error(null, TestProtos.EmptyRequestProto.getDefaultInstance());
       fail("Should have thrown an exception");
     } catch (ServiceException e) {
-    } finally {
-      admin.close();
     }
   }
 

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java?rev=1524596&r1=1524595&r2=1524596&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
(original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java
Wed Sep 18 22:31:07 2013
@@ -123,7 +123,6 @@ public class TestExportSnapshot {
     TEST_UTIL.deleteTable(tableName);
     SnapshotTestingUtils.deleteAllSnapshots(TEST_UTIL.getHBaseAdmin());
     SnapshotTestingUtils.deleteArchiveDirectory(TEST_UTIL);
-    admin.close();
   }
 
   /**



Mime
View raw message