public interface AccumuloClient
Accumulo.newClient()
and when finished a call to build() will return the AccumuloClient object. For example:
Accumulo.newClient().forInstance(instanceName, zookeepers)
.usingPassword(user, password).withZkTimeout(1234).build();
Modifier and Type | Interface and Description |
---|---|
static interface |
AccumuloClient.AccumuloClientFactory
Builds AccumuloClient
|
static interface |
AccumuloClient.AuthenticationArgs
Build methods for authentication
|
static interface |
AccumuloClient.ClientInfoFactory
Builds ClientInfo after all options have been specified
|
static interface |
AccumuloClient.ClientInfoOptions |
static interface |
AccumuloClient.ConnectionOptions
Build methods for connection options
|
static interface |
AccumuloClient.FromOptions |
static interface |
AccumuloClient.InstanceArgs
Builder method for setting Accumulo instance and zookeepers
|
static interface |
AccumuloClient.PropertyOptions
Builder methods for creating AccumuloClient using properties
|
static interface |
AccumuloClient.SaslOptions
Build methods for SASL
|
static interface |
AccumuloClient.SslOptions
Build methods for SSL/TLS
|
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
|
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.
|
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.
|
Scanner |
createScanner(String tableName,
Authorizations authorizations)
Factory method to create a Scanner connected to Accumulo.
|
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 AccumuloClient
|
BatchScanner createBatchScanner(String tableName, Authorizations authorizations, int numQueryThreads) throws TableNotFoundException
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 existBatchScanner createBatchScanner(String tableName, Authorizations authorizations) throws TableNotFoundException
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 existBatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, BatchWriterConfig config) throws TableNotFoundException
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 AccumuloClient was created. If no
config was set during AccumuloClient creation, BatchWriterConfig defaults will be
used.TableNotFoundException
BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads) throws TableNotFoundException
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 foundBatchWriter createBatchWriter(String tableName, BatchWriterConfig config) throws TableNotFoundException
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 AccumuloClient was created. If no config
was set during AccumuloClient creation, BatchWriterConfig defaults will be used.TableNotFoundException
BatchWriter createBatchWriter(String tableName) throws TableNotFoundException
tableName
- the name of the table to insert data intoTableNotFoundException
- if table not foundMultiTableBatchWriter createMultiTableBatchWriter(BatchWriterConfig config)
config
- configuration used to create multi-table batch writer. This config will take
precedence. Any unset values will merged with config set when the AccumuloClient was
created. If no config was set during AccumuloClient creation, BatchWriterConfig
defaults will be used.MultiTableBatchWriter createMultiTableBatchWriter()
Scanner createScanner(String tableName, Authorizations authorizations) throws TableNotFoundException
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
ConditionalWriter createConditionalWriter(String tableName, ConditionalWriterConfig config) throws TableNotFoundException
tableName
- the name of the table to query data fromconfig
- configuration used to create conditional writerTableNotFoundException
- when the specified table doesn't existString whoami()
String getInstanceID()
TableOperations tableOperations()
NamespaceOperations namespaceOperations()
SecurityOperations securityOperations()
InstanceOperations instanceOperations()
ReplicationOperations replicationOperations()
ClientInfo info()
ClientInfo
which contains information about client connection to AccumuloAccumuloClient changeUser(String principal, AuthenticationToken token) throws AccumuloSecurityException, AccumuloException
principal
- Principal/usernametoken
- Authentication tokenAccumuloClient
for new userAccumuloSecurityException
AccumuloException
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.