public class ThreadPoolConnector
extends org.apache.accumulo.core.client.Connector
| Constructor and Description |
|---|
ThreadPoolConnector(org.apache.accumulo.core.client.Connector wrapped,
int maxThreads) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
allocateNumThreads(int numQueryThreads)
Allocate the number of threads from the pool.
|
org.apache.accumulo.core.client.BatchDeleter |
createBatchDeleter(String tableName,
org.apache.accumulo.core.security.Authorizations authorizations,
int numQueryThreads,
long maxMemory,
long maxLatency,
int maxWriteThreads) |
org.apache.accumulo.core.client.BatchScanner |
createBatchScanner(String tableName,
org.apache.accumulo.core.security.Authorizations authorizations,
int numQueryThreads)
On creation of a batchscanner, if there are > 0 threads available in the pool, return a BatchScanner.
|
org.apache.accumulo.core.client.BatchWriter |
createBatchWriter(String tableName,
long maxMemory,
long maxLatency,
int maxWriteThreads) |
org.apache.accumulo.core.client.MultiTableBatchWriter |
createMultiTableBatchWriter(long maxMemory,
long maxLatency,
int maxWriteThreads) |
org.apache.accumulo.core.client.Scanner |
createScanner(String tableName,
org.apache.accumulo.core.security.Authorizations authorizations) |
org.apache.accumulo.core.client.Instance |
getInstance() |
int |
getMaxThreads()
Get the maximum number of threads allowed
|
int |
getNumAvailable()
Get the number of threads left in the pool
|
int |
getUsedThreads()
Get the current number of threads being used
|
org.apache.accumulo.core.client.admin.InstanceOperations |
instanceOperations() |
protected void |
releaseResources(ThreadedResource tr)
Release the number of threads.
|
org.apache.accumulo.core.client.admin.SecurityOperations |
securityOperations() |
org.apache.accumulo.core.client.admin.TableOperations |
tableOperations() |
String |
whoami() |
public ThreadPoolConnector(org.apache.accumulo.core.client.Connector wrapped,
int maxThreads)
wrapped - Accumulo Connector to wrapmaxThreads - Maximum Threads allowed to create. Must be > 0protected int allocateNumThreads(int numQueryThreads)
numQueryThreads - Number of threads to allocate. Must be > 0protected void releaseResources(ThreadedResource tr)
tr - The threaded resource to releasepublic org.apache.accumulo.core.client.BatchScanner createBatchScanner(String tableName, org.apache.accumulo.core.security.Authorizations authorizations, int numQueryThreads) throws org.apache.accumulo.core.client.TableNotFoundException
BatchScannerWithScanners, a BatchScanner backed by Scanners.createBatchScanner in class org.apache.accumulo.core.client.Connectororg.apache.accumulo.core.client.TableNotFoundExceptionpublic org.apache.accumulo.core.client.BatchDeleter createBatchDeleter(String tableName, org.apache.accumulo.core.security.Authorizations authorizations, int numQueryThreads, long maxMemory, long maxLatency, int maxWriteThreads) throws org.apache.accumulo.core.client.TableNotFoundException
createBatchDeleter in class org.apache.accumulo.core.client.Connectororg.apache.accumulo.core.client.TableNotFoundExceptionpublic org.apache.accumulo.core.client.BatchWriter createBatchWriter(String tableName, long maxMemory, long maxLatency, int maxWriteThreads) throws org.apache.accumulo.core.client.TableNotFoundException
createBatchWriter in class org.apache.accumulo.core.client.Connectororg.apache.accumulo.core.client.TableNotFoundExceptionpublic org.apache.accumulo.core.client.MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory,
long maxLatency,
int maxWriteThreads)
createMultiTableBatchWriter in class org.apache.accumulo.core.client.Connectorpublic org.apache.accumulo.core.client.Scanner createScanner(String tableName, org.apache.accumulo.core.security.Authorizations authorizations) throws org.apache.accumulo.core.client.TableNotFoundException
createScanner in class org.apache.accumulo.core.client.Connectororg.apache.accumulo.core.client.TableNotFoundExceptionpublic org.apache.accumulo.core.client.Instance getInstance()
getInstance in class org.apache.accumulo.core.client.Connectorpublic String whoami()
whoami in class org.apache.accumulo.core.client.Connectorpublic org.apache.accumulo.core.client.admin.TableOperations tableOperations()
tableOperations in class org.apache.accumulo.core.client.Connectorpublic org.apache.accumulo.core.client.admin.SecurityOperations securityOperations()
securityOperations in class org.apache.accumulo.core.client.Connectorpublic org.apache.accumulo.core.client.admin.InstanceOperations instanceOperations()
instanceOperations in class org.apache.accumulo.core.client.Connectorpublic int getMaxThreads()
public int getUsedThreads()
public int getNumAvailable()
Copyright © 2014 Calrissian. All rights reserved.