@InterfaceAudience.Private public class ThriftConnection extends Object implements Connection
| Modifier and Type | Class and Description |
|---|---|
static class |
ThriftConnection.DefaultThriftClientBuilder
the default thrift client builder.
|
static class |
ThriftConnection.DelayRetryHandler |
static class |
ThriftConnection.HTTPThriftClientBuilder
the default thrift http client builder.
|
| Constructor and Description |
|---|
ThriftConnection(org.apache.hadoop.conf.Configuration conf,
ExecutorService pool,
User user) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(String why,
Throwable e) |
void |
clearRegionLocationCache() |
void |
close() |
Admin |
getAdmin()
Get a ThriftAdmin, ThriftAdmin is NOT thread safe
|
BufferedMutator |
getBufferedMutator(BufferedMutatorParams params) |
BufferedMutator |
getBufferedMutator(TableName tableName) |
ThriftClientBuilder |
getClientBuilder() |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
int |
getConnectTimeout() |
String |
getHost() |
org.apache.http.client.HttpClient |
getHttpClient() |
int |
getOperationTimeout() |
int |
getPort() |
RegionLocator |
getRegionLocator(TableName tableName) |
TableBuilder |
getTableBuilder(TableName tableName,
ExecutorService pool)
Get a TableBuider to build ThriftTable, ThriftTable is NOT thread safe
|
boolean |
isAborted() |
boolean |
isClosed() |
boolean |
isCompact() |
boolean |
isFramed() |
void |
setHttpClient(org.apache.http.client.HttpClient httpClient) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHbck, getHbck, getTable, getTablepublic ThriftConnection(org.apache.hadoop.conf.Configuration conf,
ExecutorService pool,
User user)
throws IOException
IOExceptionpublic void setHttpClient(org.apache.http.client.HttpClient httpClient)
public org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration in interface Connectionpublic String getHost()
public int getPort()
public boolean isFramed()
public boolean isCompact()
public int getOperationTimeout()
public int getConnectTimeout()
public ThriftClientBuilder getClientBuilder()
public Admin getAdmin() throws IOException
getAdmin in interface ConnectionIOException - IOExceptionpublic org.apache.http.client.HttpClient getHttpClient()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ConnectionIOExceptionpublic boolean isClosed()
isClosed in interface Connectionpublic TableBuilder getTableBuilder(TableName tableName, ExecutorService pool)
getTableBuilder in interface ConnectionIOException - IOExceptionpublic BufferedMutator getBufferedMutator(TableName tableName) throws IOException
getBufferedMutator in interface ConnectionIOExceptionpublic BufferedMutator getBufferedMutator(BufferedMutatorParams params) throws IOException
getBufferedMutator in interface ConnectionIOExceptionpublic RegionLocator getRegionLocator(TableName tableName) throws IOException
getRegionLocator in interface ConnectionIOExceptionpublic void clearRegionLocationCache()
clearRegionLocationCache in interface ConnectionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.