org.apache.accumulo.core.client.impl
public class MultiTableBatchWriterImpl extends Object implements MultiTableBatchWriter
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_CACHE_TIME |
static TimeUnit |
DEFAULT_CACHE_TIME_UNIT |
Constructor and Description |
---|
MultiTableBatchWriterImpl(Instance instance,
Credentials credentials,
BatchWriterConfig config) |
MultiTableBatchWriterImpl(Instance instance,
Credentials credentials,
BatchWriterConfig config,
long cacheTime,
TimeUnit cacheTimeUnit) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Flush and release all resources.
|
protected void |
finalize()
Warning: do not rely upon finalize to close this class.
|
void |
flush()
Send mutations for all tables to accumulo.
|
BatchWriter |
getBatchWriter(String tableName)
Returns a BatchWriter for a particular table.
|
boolean |
isClosed()
Returns true if this batch writer has been closed.
|
public static final long DEFAULT_CACHE_TIME
public static final TimeUnit DEFAULT_CACHE_TIME_UNIT
public MultiTableBatchWriterImpl(Instance instance, Credentials credentials, BatchWriterConfig config)
public MultiTableBatchWriterImpl(Instance instance, Credentials credentials, BatchWriterConfig config, long cacheTime, TimeUnit cacheTimeUnit)
public boolean isClosed()
MultiTableBatchWriter
isClosed
in interface MultiTableBatchWriter
public void close() throws MutationsRejectedException
MultiTableBatchWriter
close
in interface MultiTableBatchWriter
MutationsRejectedException
- when queued mutations are unable to be insertedprotected void finalize()
public BatchWriter getBatchWriter(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException
MultiTableBatchWriter
getBatchWriter
in interface MultiTableBatchWriter
tableName
- the name of a table whose batch writer you wish to retrieveAccumuloException
- when a general exception occurs with accumuloAccumuloSecurityException
- when the user is not allowed to insert data into that tableTableNotFoundException
- when the table does not existpublic void flush() throws MutationsRejectedException
MultiTableBatchWriter
flush
in interface MultiTableBatchWriter
MutationsRejectedException
- when queued mutations are unable to be insertedCopyright © 2011–2016 The Apache Software Foundation. All rights reserved.