Package org.apache.hadoop.hbase.client
Class HConnectionTestingUtility
java.lang.Object
org.apache.hadoop.hbase.client.HConnectionTestingUtility
Connection testing utility.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.hbase.client.ConnectiongetMockedConnection(org.apache.hadoop.conf.Configuration conf) Get a MockedConnectionthat goes with the passedconfconfiguration instance.
-
Constructor Details
-
HConnectionTestingUtility
public HConnectionTestingUtility()
-
-
Method Details
-
getMockedConnection
public static org.apache.hadoop.hbase.client.Connection getMockedConnection(org.apache.hadoop.conf.Configuration conf) throws IOException Get a MockedConnectionthat goes with the passedconfconfiguration instance. Minimally the mock will return <code>conf</conf> whenConnection.getConfiguration()is invoked. Be sure to shutdown the connection when done by callingConnection.close()else it will stick around; this is probably not what you want.- Parameters:
conf- configuration- Returns:
- ConnectionImplementation object for
conf - Throws:
IOException
-