@InterfaceAudience.Private public class MultiHConnection extends Object
| Constructor and Description | 
|---|
MultiHConnection(org.apache.hadoop.conf.Configuration conf,
                int noOfConnections)
Create multiple HConnection instances and initialize a thread pool executor 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
close()
Close the open connections and shutdown the batchpool 
 | 
<R> void | 
processBatchCallback(List<? extends Row> actions,
                    TableName tableName,
                    Object[] results,
                    Batch.Callback<R> callback)
Randomly pick a connection and process the batch of actions for a given table 
 | 
public MultiHConnection(org.apache.hadoop.conf.Configuration conf,
                int noOfConnections)
                 throws IOException
conf - configurationnoOfConnections - total no of HConnections to createIOExceptionpublic void close()
public <R> void processBatchCallback(List<? extends Row> actions, TableName tableName, Object[] results, Batch.Callback<R> callback) throws IOException
actions - the actionstableName - table nameresults - the results arraycallback - IOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.