Package org.apache.accumulo.core.client
Class Connector
- java.lang.Object
-
- org.apache.accumulo.core.client.Connector
-
- Direct Known Subclasses:
ConnectorImpl
@Deprecated public abstract class Connector extends Object
Deprecated.since 2.0.0. UseAccumuloClient
for writing new code. Connector is available for existing code. Usefrom(AccumuloClient)
as a bridge between the two.Connector connects to an Accumulo instance and allows the user to request readers and writers for the instance as well as various objects that permit administrative operations. The Connector enforces security on the client side by forcing all API calls to be accompanied by user credentials.
-
-
Constructor Summary
Constructors Constructor Description Connector()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description abstract BatchDeleter
createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, long maxMemory, long maxLatency, int maxWriteThreads)
Deprecated.since 1.5.0; UsecreateBatchDeleter(String, Authorizations, int, BatchWriterConfig)
instead.abstract BatchDeleter
createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, BatchWriterConfig config)
Deprecated.Factory method to create BatchDeleterabstract BatchScanner
createBatchScanner(String tableName, Authorizations authorizations, int numQueryThreads)
Deprecated.Factory method to create a BatchScanner connected to Accumulo.abstract BatchWriter
createBatchWriter(String tableName, long maxMemory, long maxLatency, int maxWriteThreads)
Deprecated.since 1.5.0; UsecreateBatchWriter(String, BatchWriterConfig)
instead.abstract BatchWriter
createBatchWriter(String tableName, BatchWriterConfig config)
Deprecated.Factory method to create a BatchWriter connected to Accumulo.abstract ConditionalWriter
createConditionalWriter(String tableName, ConditionalWriterConfig config)
Deprecated.Factory method to create a ConditionalWriter connected to Accumulo.abstract MultiTableBatchWriter
createMultiTableBatchWriter(long maxMemory, long maxLatency, int maxWriteThreads)
Deprecated.since 1.5.0; UsecreateMultiTableBatchWriter(BatchWriterConfig)
instead.abstract MultiTableBatchWriter
createMultiTableBatchWriter(BatchWriterConfig config)
Deprecated.Factory method to create a Multi-Table BatchWriter connected to Accumulo.abstract Scanner
createScanner(String tableName, Authorizations authorizations)
Deprecated.Factory method to create a Scanner connected to Accumulo.static Connector
from(AccumuloClient client)
Deprecated.Creates a Connector from an AccumuloClient.abstract Instance
getInstance()
Deprecated.Accessor method for internal instance object.abstract InstanceOperations
instanceOperations()
Deprecated.Retrieves an InstanceOperations object to modify instance configuration.abstract NamespaceOperations
namespaceOperations()
Deprecated.Retrieves a NamespaceOperations object to perform namespace functions, such as create and delete.abstract ReplicationOperations
replicationOperations()
Deprecated.Retrieves a ReplicationOperations object to manage replication configuration.abstract SecurityOperations
securityOperations()
Deprecated.Retrieves a SecurityOperations object to perform user security operations, such as creating users.abstract TableOperations
tableOperations()
Deprecated.Retrieves a TableOperations object to perform table functions, such as create and delete.abstract String
whoami()
Deprecated.Get the current user for this connector
-
-
-
Method Detail
-
createBatchScanner
public abstract BatchScanner createBatchScanner(String tableName, Authorizations authorizations, int numQueryThreads) throws TableNotFoundException
Deprecated.Factory method to create a BatchScanner connected to Accumulo.- Parameters:
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 querying- Returns:
- BatchScanner object for configuring and querying
- Throws:
TableNotFoundException
- when the specified table doesn't exist
-
createBatchDeleter
@Deprecated public abstract BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, long maxMemory, long maxLatency, int maxWriteThreads) throws TableNotFoundException
Deprecated.since 1.5.0; UsecreateBatchDeleter(String, Authorizations, int, BatchWriterConfig)
instead.Factory method to create a BatchDeleter connected to Accumulo.- Parameters:
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 servers- Returns:
- BatchDeleter object for configuring and deleting
- Throws:
TableNotFoundException
- when the specified table doesn't exist
-
createBatchDeleter
public abstract BatchDeleter createBatchDeleter(String tableName, Authorizations authorizations, int numQueryThreads, BatchWriterConfig config) throws TableNotFoundException
Deprecated.Factory method to create BatchDeleter- Parameters:
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.- Returns:
- BatchDeleter object for configuring and deleting
- Throws:
TableNotFoundException
- Since:
- 1.5.0
-
createBatchWriter
@Deprecated public abstract BatchWriter createBatchWriter(String tableName, long maxMemory, long maxLatency, int maxWriteThreads) throws TableNotFoundException
Deprecated.since 1.5.0; UsecreateBatchWriter(String, BatchWriterConfig)
instead.Factory method to create a BatchWriter connected to Accumulo.- Parameters:
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 servers- Returns:
- BatchWriter object for configuring and writing data to
- Throws:
TableNotFoundException
- when the specified table doesn't exist
-
createBatchWriter
public abstract BatchWriter createBatchWriter(String tableName, BatchWriterConfig config) throws TableNotFoundException
Deprecated.Factory method to create a BatchWriter connected to Accumulo.- Parameters:
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.- Returns:
- BatchWriter object for configuring and writing data to
- Throws:
TableNotFoundException
- Since:
- 1.5.0
-
createMultiTableBatchWriter
@Deprecated public abstract MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency, int maxWriteThreads)
Deprecated.since 1.5.0; UsecreateMultiTableBatchWriter(BatchWriterConfig)
instead.Factory method to create a Multi-Table BatchWriter connected to Accumulo. Multi-table batch writers can queue data for multiple tables, which is good for ingesting data into multiple tables from the same source- Parameters:
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 servers- Returns:
- MultiTableBatchWriter object for configuring and writing data to
-
createMultiTableBatchWriter
public abstract MultiTableBatchWriter createMultiTableBatchWriter(BatchWriterConfig config)
Deprecated.Factory method to create a Multi-Table BatchWriter connected to Accumulo. Multi-table batch writers can queue data for multiple tables. Also data for multiple tables can be sent to a server in a single batch. Its an efficient way to ingest data into multiple tables from a single process.- Parameters:
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.- Returns:
- MultiTableBatchWriter object for configuring and writing data to
- Since:
- 1.5.0
-
createScanner
public abstract Scanner createScanner(String tableName, Authorizations authorizations) throws TableNotFoundException
Deprecated.Factory method to create a Scanner connected to Accumulo.- Parameters:
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.- Returns:
- Scanner object for configuring and querying data with
- Throws:
TableNotFoundException
- when the specified table doesn't exist
-
createConditionalWriter
public abstract ConditionalWriter createConditionalWriter(String tableName, ConditionalWriterConfig config) throws TableNotFoundException
Deprecated.Factory method to create a ConditionalWriter connected to Accumulo.- Parameters:
tableName
- the name of the table to query data fromconfig
- configuration used to create conditional writer- Returns:
- ConditionalWriter object for writing ConditionalMutations
- Throws:
TableNotFoundException
- when the specified table doesn't exist- Since:
- 1.6.0
-
getInstance
public abstract Instance getInstance()
Deprecated.Accessor method for internal instance object.- Returns:
- the internal instance object
-
whoami
public abstract String whoami()
Deprecated.Get the current user for this connector- Returns:
- the user name
-
tableOperations
public abstract TableOperations tableOperations()
Deprecated.Retrieves a TableOperations object to perform table functions, such as create and delete.- Returns:
- an object to manipulate tables
-
namespaceOperations
public abstract NamespaceOperations namespaceOperations()
Deprecated.Retrieves a NamespaceOperations object to perform namespace functions, such as create and delete.- Returns:
- an object to manipulate namespaces
-
securityOperations
public abstract SecurityOperations securityOperations()
Deprecated.Retrieves a SecurityOperations object to perform user security operations, such as creating users.- Returns:
- an object to modify users and permissions
-
instanceOperations
public abstract InstanceOperations instanceOperations()
Deprecated.Retrieves an InstanceOperations object to modify instance configuration.- Returns:
- an object to modify instance configuration
-
replicationOperations
public abstract ReplicationOperations replicationOperations()
Deprecated.Retrieves a ReplicationOperations object to manage replication configuration.- Returns:
- an object to modify replication configuration
- Since:
- 1.7.0
-
from
public static Connector from(AccumuloClient client) throws AccumuloSecurityException, AccumuloException
Deprecated.Creates a Connector from an AccumuloClient. This Connector will no longer work after the AccumuloClient is closed. Also anything derived from the Connector (like a Scanner for example) is unlikely to work after the AccumuloClient is closed.- Throws:
AccumuloSecurityException
AccumuloException
- Since:
- 2.0
-
-