Package org.apache.hadoop.hbase.client.ConnectionManager

Examples of org.apache.hadoop.hbase.client.ConnectionManager.HConnectionImplementation


   */
  public static HConnection getSpiedConnection(final Configuration conf)
  throws IOException {
    HConnectionKey connectionKey = new HConnectionKey(conf);
    synchronized (ConnectionManager.CONNECTION_INSTANCES) {
      HConnectionImplementation connection =
          ConnectionManager.CONNECTION_INSTANCES.get(connectionKey);
      if (connection == null) {
        connection = Mockito.spy(new HConnectionImplementation(conf, true));
        ConnectionManager.CONNECTION_INSTANCES.put(connectionKey, connection);
      }
      return connection;
    }
  }
View Full Code Here


  public static ClusterConnection getSpiedClusterConnection(final Configuration conf)
  throws IOException {
    HConnectionKey connectionKey = new HConnectionKey(conf);
    synchronized (ConnectionManager.CONNECTION_INSTANCES) {
      HConnectionImplementation connection =
          ConnectionManager.CONNECTION_INSTANCES.get(connectionKey);
      if (connection == null) {
        connection = Mockito.spy(new HConnectionImplementation(conf, true));
        ConnectionManager.CONNECTION_INSTANCES.put(connectionKey, connection);
      }
      return connection;
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.client.ConnectionManager.HConnectionImplementation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.