public class AccumuloClientImpl extends Connector implements AccumuloClient
Modifier and Type | Class and Description |
---|---|
static class |
AccumuloClientImpl.AccumuloClientBuilderImpl |
AccumuloClient.AccumuloClientFactory, AccumuloClient.AuthenticationArgs, AccumuloClient.ClientInfoFactory, AccumuloClient.ClientInfoOptions, AccumuloClient.ConnectionOptions, AccumuloClient.FromOptions, AccumuloClient.InstanceArgs, AccumuloClient.PropertyOptions, AccumuloClient.SaslOptions, AccumuloClient.SslOptions
Constructor and Description |
---|
AccumuloClientImpl(ClientContext context) |
Modifier and Type | Method and Description |
---|---|
AccumuloClient |
changeUser(String principal,
AuthenticationToken token)
Change user
|
BatchDeleter |
createBatchDeleter(String tableName,
Authorizations authorizations,
int numQueryThreads)
Factory method to create BatchDeleter.
|
BatchDeleter |
createBatchDeleter(String tableName,
Authorizations authorizations,
int numQueryThreads,
BatchWriterConfig config)
Factory method to create BatchDeleter
|
BatchDeleter |
createBatchDeleter(String tableName,
Authorizations authorizations,
int numQueryThreads,
long maxMemory,
long maxLatency,
int maxWriteThreads)
Deprecated.
|
BatchScanner |
createBatchScanner(String tableName,
Authorizations authorizations)
Factory method to create a BatchScanner connected to Accumulo.
|
BatchScanner |
createBatchScanner(String tableName,
Authorizations authorizations,
int numQueryThreads)
Factory method to create a BatchScanner connected to Accumulo.
|
BatchWriter |
createBatchWriter(String tableName)
Factory method to create a BatchWriter.
|
BatchWriter |
createBatchWriter(String tableName,
BatchWriterConfig config)
Factory method to create a BatchWriter connected to Accumulo.
|
BatchWriter |
createBatchWriter(String tableName,
long maxMemory,
long maxLatency,
int maxWriteThreads)
Deprecated.
|
ConditionalWriter |
createConditionalWriter(String tableName,
ConditionalWriterConfig config)
Factory method to create a ConditionalWriter connected to Accumulo.
|
MultiTableBatchWriter |
createMultiTableBatchWriter()
Factory method to create a Multi-Table BatchWriter.
|
MultiTableBatchWriter |
createMultiTableBatchWriter(BatchWriterConfig config)
Factory method to create a Multi-Table BatchWriter connected to Accumulo.
|
MultiTableBatchWriter |
createMultiTableBatchWriter(long maxMemory,
long maxLatency,
int maxWriteThreads)
Deprecated.
|
Scanner |
createScanner(String tableName,
Authorizations authorizations)
Factory method to create a Scanner connected to Accumulo.
|
Instance |
getInstance()
Deprecated.
|
String |
getInstanceID()
Returns a unique string that identifies this instance of accumulo.
|
ClientInfo |
info() |
InstanceOperations |
instanceOperations()
Retrieves an InstanceOperations object to modify instance configuration.
|
NamespaceOperations |
namespaceOperations()
Retrieves a NamespaceOperations object to perform namespace functions, such as create and
delete.
|
ReplicationOperations |
replicationOperations()
Retrieves a ReplicationOperations object to manage replication configuration.
|
SecurityOperations |
securityOperations()
Retrieves a SecurityOperations object to perform user security operations, such as creating
users.
|
TableOperations |
tableOperations()
Retrieves a TableOperations object to perform table functions, such as create and delete.
|
String |
whoami()
Get the current user for this connector
|
public AccumuloClientImpl(ClientContext context) throws AccumuloSecurityException, AccumuloException
@Deprecated public Instance getInstance()
Connector
getInstance
in class Connector
public BatchScanner createBatchScanner(String tableName, Authorizations authorizations, int numQueryThreads) throws TableNotFoundException
Connector
createBatchScanner
in interface AccumuloClient
createBatchScanner
in class Connector
tableName
- the name of the table to queryauthorizations
- A set of authorization labels that will be checked against the column visibility of
each key in order to filter data. The authorizations passed in must be a subset of the
accumulo user's set of authorizations. If the accumulo user has authorizations (A1,
A2) and authorizations (A2, A3) are passed, then an exception will be thrown.numQueryThreads
- the number of concurrent threads to spawn for queryingTableNotFoundException
- when the specified table doesn't existpublic BatchScanner createBatchScanner(String tableName, Authorizations authorizations) throws TableNotFoundException
AccumuloClient
createBatchScanner
in interface AccumuloClient
tableName
- the name of the table to queryauthorizations
- A set of authorization labels that will be checked against the column visibility of
each key in order to filter data. The authorizations passed in must be a subset of the
accumulo user's set of authorizations. If the accumulo user has authorizations (A1,
A2) and authorizations (A2, A3) are passed, then an exception will be thrown.TableNotFoundException
- when the specified table doesn't exist@Deprecated public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, long maxMemory, long maxLatency, int maxWriteThreads) throws TableNotFoundException
Connector
createBatchDeleter
in class Connector
tableName
- the name of the table to query and delete fromauthorizations
- A set of authorization labels that will be checked against the column visibility of
each key in order to filter data. The authorizations passed in must be a subset of the
accumulo user's set of authorizations. If the accumulo user has authorizations (A1,
A2) and authorizations (A2, A3) are passed, then an exception will be thrown.numQueryThreads
- the number of concurrent threads to spawn for queryingmaxMemory
- size in bytes of the maximum memory to batch before writingmaxLatency
- size in milliseconds; set to 0 or Long.MAX_VALUE to allow the maximum time to hold a
batch before writingmaxWriteThreads
- the maximum number of threads to use for writing data to the tablet serversTableNotFoundException
- when the specified table doesn't existpublic BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, BatchWriterConfig config) throws TableNotFoundException
Connector
createBatchDeleter
in interface AccumuloClient
createBatchDeleter
in class Connector
tableName
- the name of the table to query and delete fromauthorizations
- A set of authorization labels that will be checked against the column visibility of
each key in order to filter data. The authorizations passed in must be a subset of the
accumulo user's set of authorizations. If the accumulo user has authorizations (A1,
A2) and authorizations (A2, A3) are passed, then an exception will be thrown.numQueryThreads
- the number of concurrent threads to spawn for queryingconfig
- configuration used to create batch writer. This config takes precedence. Any unset
values will be merged with config set when the Connector was created. If no config was
set during Connector creation, BatchWriterConfig defaults will be used.TableNotFoundException
public BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads) throws TableNotFoundException
AccumuloClient
createBatchDeleter
in interface AccumuloClient
tableName
- the name of the table to query and delete fromauthorizations
- A set of authorization labels that will be checked against the column visibility of
each key in order to filter data. The authorizations passed in must be a subset of the
accumulo user's set of authorizations. If the accumulo user has authorizations (A1,
A2) and authorizations (A2, A3) are passed, then an exception will be thrown.numQueryThreads
- the number of concurrent threads to spawn for queryingTableNotFoundException
- if table not found@Deprecated public BatchWriter createBatchWriter(String tableName, long maxMemory, long maxLatency, int maxWriteThreads) throws TableNotFoundException
Connector
createBatchWriter
in class Connector
tableName
- the name of the table to insert data intomaxMemory
- size in bytes of the maximum memory to batch before writingmaxLatency
- time in milliseconds; set to 0 or Long.MAX_VALUE to allow the maximum time to hold a
batch before writingmaxWriteThreads
- the maximum number of threads to use for writing data to the tablet serversTableNotFoundException
- when the specified table doesn't existpublic BatchWriter createBatchWriter(String tableName, BatchWriterConfig config) throws TableNotFoundException
Connector
createBatchWriter
in interface AccumuloClient
createBatchWriter
in class Connector
tableName
- the name of the table to insert data intoconfig
- configuration used to create batch writer. This config will take precedence. Any unset
values will merged with config set when the Connector was created. If no config was
set during Connector creation, BatchWriterConfig defaults will be used.TableNotFoundException
public BatchWriter createBatchWriter(String tableName) throws TableNotFoundException
AccumuloClient
createBatchWriter
in interface AccumuloClient
tableName
- the name of the table to insert data intoTableNotFoundException
- if table not found@Deprecated public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency, int maxWriteThreads)
Connector
createMultiTableBatchWriter
in class Connector
maxMemory
- size in bytes of the maximum memory to batch before writingmaxLatency
- size in milliseconds; set to 0 or Long.MAX_VALUE to allow the maximum time to hold a
batch before writingmaxWriteThreads
- the maximum number of threads to use for writing data to the tablet serverspublic MultiTableBatchWriter createMultiTableBatchWriter(BatchWriterConfig config)
Connector
createMultiTableBatchWriter
in interface AccumuloClient
createMultiTableBatchWriter
in class Connector
config
- configuration used to create multi-table batch writer. This config will take
precedence. Any unset values will merged with config set when the Connector was
created. If no config was set during Connector creation, BatchWriterConfig defaults
will be used.public MultiTableBatchWriter createMultiTableBatchWriter()
AccumuloClient
createMultiTableBatchWriter
in interface AccumuloClient
public ConditionalWriter createConditionalWriter(String tableName, ConditionalWriterConfig config) throws TableNotFoundException
Connector
createConditionalWriter
in interface AccumuloClient
createConditionalWriter
in class Connector
tableName
- the name of the table to query data fromconfig
- configuration used to create conditional writerTableNotFoundException
- when the specified table doesn't existpublic Scanner createScanner(String tableName, Authorizations authorizations) throws TableNotFoundException
Connector
createScanner
in interface AccumuloClient
createScanner
in class Connector
tableName
- the name of the table to query data fromauthorizations
- A set of authorization labels that will be checked against the column visibility of
each key in order to filter data. The authorizations passed in must be a subset of the
accumulo user's set of authorizations. If the accumulo user has authorizations (A1,
A2) and authorizations (A2, A3) are passed, then an exception will be thrown.TableNotFoundException
- when the specified table doesn't existIsolatedScanner
public String whoami()
Connector
whoami
in interface AccumuloClient
whoami
in class Connector
public String getInstanceID()
AccumuloClient
getInstanceID
in interface AccumuloClient
public TableOperations tableOperations()
Connector
tableOperations
in interface AccumuloClient
tableOperations
in class Connector
public NamespaceOperations namespaceOperations()
Connector
namespaceOperations
in interface AccumuloClient
namespaceOperations
in class Connector
public SecurityOperations securityOperations()
Connector
securityOperations
in interface AccumuloClient
securityOperations
in class Connector
public InstanceOperations instanceOperations()
Connector
instanceOperations
in interface AccumuloClient
instanceOperations
in class Connector
public ReplicationOperations replicationOperations()
Connector
replicationOperations
in interface AccumuloClient
replicationOperations
in class Connector
public ClientInfo info()
info
in interface AccumuloClient
ClientInfo
which contains information about client connection to Accumulopublic AccumuloClient changeUser(String principal, AuthenticationToken token) throws AccumuloSecurityException, AccumuloException
AccumuloClient
changeUser
in interface AccumuloClient
principal
- Principal/usernametoken
- Authentication tokenAccumuloClient
for new userAccumuloSecurityException
AccumuloException
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.