[2/2] git commit: HBASE-11995 Use Connection and ConnectionFactory where possible (Solomon Duskis)

2014-09-26 Thread enis
HBASE-11995 Use Connection and ConnectionFactory where possible (Solomon Duskis)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/669bc49b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/669bc49b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/669bc49b

Branch: refs/heads/branch-1
Commit: 669bc49b47da323a5703406dca90f6dce7acebbd
Parents: e5840e9
Author: Enis Soztutar 
Authored: Fri Sep 26 11:49:37 2014 -0700
Committer: Enis Soztutar 
Committed: Fri Sep 26 12:00:24 2014 -0700

--
 .../apache/hadoop/hbase/MetaTableAccessor.java  | 230 +--
 .../hadoop/hbase/client/ConnectionAdapter.java  |   2 +-
 .../apache/hadoop/hbase/client/HBaseAdmin.java  |   2 +-
 .../org/apache/hadoop/hbase/client/HTable.java  |   4 +-
 .../apache/hadoop/hbase/client/Registry.java|   4 +-
 .../hadoop/hbase/client/ZooKeeperRegistry.java  |   4 +-
 .../hbase/client/TestClientNoCluster.java   |  10 +-
 .../SnapshotOfRegionAssignmentFromMeta.java |  14 +-
 .../balancer/FavoredNodeAssignmentHelper.java   |   8 +-
 .../master/snapshot/RestoreSnapshotHandler.java |   4 +-
 .../regionserver/ReplicationSink.java   |   8 +-
 .../hbase/snapshot/RestoreSnapshotHelper.java   |   8 +-
 .../hadoop/hbase/util/MultiHConnection.java |   3 +-
 .../hadoop/hbase/HBaseTestingUtility.java   |   5 +-
 .../hadoop/hbase/PerformanceEvaluation.java |  42 ++--
 .../hadoop/hbase/TestMetaTableAccessor.java |  61 ++---
 .../hadoop/hbase/client/TestClientTimeouts.java |   4 +-
 .../hadoop/hbase/client/TestFromClientSide.java |   2 +-
 .../org/apache/hadoop/hbase/client/TestHCM.java |  42 ++--
 .../TestMasterOperationsForRegionReplicas.java  |  15 +-
 .../security/access/TestAccessController.java   |   6 +-
 .../apache/hadoop/hbase/util/TestHBaseFsck.java |   4 +-
 .../hadoop/hbase/util/TestMergeTable.java   |   9 +-
 23 files changed, 247 insertions(+), 244 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/669bc49b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
index d7c2233..d3dfa99 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
@@ -24,9 +24,9 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HConnection;
 import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.client.Put;
@@ -135,65 +135,65 @@ public class MetaTableAccessor {
* @return List of {@link org.apache.hadoop.hbase.client.Result}
* @throws IOException
*/
-  public static List fullScanOfMeta(HConnection hConnection)
+  public static List fullScanOfMeta(Connection connection)
   throws IOException {
 CollectAllVisitor v = new CollectAllVisitor();
-fullScan(hConnection, v, null);
+fullScan(connection, v, null);
 return v.getResults();
   }
 
   /**
* Performs a full scan of hbase:meta.
-   * @param hConnection connection we're using
+   * @param connection connection we're using
* @param visitor Visitor invoked against each row.
* @throws IOException
*/
-  public static void fullScan(HConnection hConnection,
+  public static void fullScan(Connection connection,
   final Visitor visitor)
   throws IOException {
-fullScan(hConnection, visitor, null);
+fullScan(connection, visitor, null);
   }
 
   /**
* Performs a full scan of hbase:meta.
-   * @param hConnection connection we're using
+   * @param connection connection we're using
* @return List of {@link Result}
* @throws IOException
*/
-  public static List fullScan(HConnection hConnection)
+  public static List fullScan(Connection connection)
 throws IOException {
 CollectAllVisitor v = new CollectAllVisitor();
-fullScan(hConnection, v, null);
+fullScan(connection, v, null);
 return v.getResults();
   }
 
   /**
* Callers should call close on the returned {@link HTable} instance.
-   * @param hConnection connection we're using to access table
+   * @param connection connection we're using to access table
* @param tableName Table to get an {@link 
org.apache.hadoop.hbase.client.HTable} against.
  

[2/2] git commit: HBASE-11995 Use Connection and ConnectionFactory where possible (Solomon Duskis)

2014-09-26 Thread enis
HBASE-11995 Use Connection and ConnectionFactory where possible (Solomon Duskis)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3beb168b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3beb168b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3beb168b

Branch: refs/heads/master
Commit: 3beb168b4fbf7628b40f0cf6030674338e9ea61b
Parents: 88cd708
Author: Enis Soztutar 
Authored: Fri Sep 26 11:49:37 2014 -0700
Committer: Enis Soztutar 
Committed: Fri Sep 26 11:49:37 2014 -0700

--
 .../apache/hadoop/hbase/MetaTableAccessor.java  | 230 +--
 .../hadoop/hbase/client/ConnectionAdapter.java  |   2 +-
 .../apache/hadoop/hbase/client/HBaseAdmin.java  |   2 +-
 .../org/apache/hadoop/hbase/client/HTable.java  |   4 +-
 .../apache/hadoop/hbase/client/Registry.java|   2 +-
 .../hadoop/hbase/client/ZooKeeperRegistry.java  |   2 +-
 .../hbase/client/TestClientNoCluster.java   |   8 +-
 .../SnapshotOfRegionAssignmentFromMeta.java |  14 +-
 .../balancer/FavoredNodeAssignmentHelper.java   |   8 +-
 .../master/snapshot/RestoreSnapshotHandler.java |   4 +-
 .../regionserver/ReplicationSink.java   |   8 +-
 .../hbase/snapshot/RestoreSnapshotHelper.java   |   9 +-
 .../hadoop/hbase/util/MultiHConnection.java |   3 +-
 .../hadoop/hbase/HBaseTestingUtility.java   |   5 +-
 .../hadoop/hbase/PerformanceEvaluation.java |  42 ++--
 .../hadoop/hbase/TestMetaTableAccessor.java |  58 ++---
 .../hadoop/hbase/client/TestClientTimeouts.java |   4 +-
 .../hadoop/hbase/client/TestFromClientSide.java |   2 +-
 .../org/apache/hadoop/hbase/client/TestHCM.java |  42 ++--
 .../TestMasterOperationsForRegionReplicas.java  |  15 +-
 .../TestRegionReplicaReplicationEndpoint.java   |   6 +-
 ...egionReplicaReplicationEndpointNoMaster.java |   8 +-
 .../security/access/TestAccessController.java   |   6 +-
 .../apache/hadoop/hbase/util/TestHBaseFsck.java |   4 +-
 .../hadoop/hbase/util/TestMergeTable.java   |   9 +-
 25 files changed, 250 insertions(+), 247 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/3beb168b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
--
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
index 1a9d0a0..5c01d93 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java
@@ -24,9 +24,9 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.client.Delete;
 import org.apache.hadoop.hbase.client.Get;
-import org.apache.hadoop.hbase.client.HConnection;
 import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.client.Mutation;
 import org.apache.hadoop.hbase.client.Put;
@@ -133,65 +133,65 @@ public class MetaTableAccessor {
* @return List of {@link org.apache.hadoop.hbase.client.Result}
* @throws IOException
*/
-  public static List fullScanOfMeta(HConnection hConnection)
+  public static List fullScanOfMeta(Connection connection)
   throws IOException {
 CollectAllVisitor v = new CollectAllVisitor();
-fullScan(hConnection, v, null);
+fullScan(connection, v, null);
 return v.getResults();
   }
 
   /**
* Performs a full scan of hbase:meta.
-   * @param hConnection connection we're using
+   * @param connection connection we're using
* @param visitor Visitor invoked against each row.
* @throws IOException
*/
-  public static void fullScan(HConnection hConnection,
+  public static void fullScan(Connection connection,
   final Visitor visitor)
   throws IOException {
-fullScan(hConnection, visitor, null);
+fullScan(connection, visitor, null);
   }
 
   /**
* Performs a full scan of hbase:meta.
-   * @param hConnection connection we're using
+   * @param connection connection we're using
* @return List of {@link Result}
* @throws IOException
*/
-  public static List fullScan(HConnection hConnection)
+  public static List fullScan(Connection connection)
 throws IOException {
 CollectAllVisitor v = new CollectAllVisitor();
-fullScan(hConnection, v, null);
+fullScan(connection, v, null);
 return v.getResults();
   }
 
   /**
* Callers should call close on the returned {@link HTable} instance.
-   * @param hConnection connection we're using to access table
+   * @param connection connection we're using