@InterfaceAudience.Private public class AsyncClientExample extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
Modifier and Type | Field and Description |
---|---|
private static int |
DEFAULT_NUM_OPS
The default number of operations.
|
private static byte[] |
FAMILY
The name of the column family.
|
private AtomicReference<CompletableFuture<AsyncConnection>> |
future |
private static org.slf4j.Logger |
LOG |
private static byte[] |
QUAL
For the example we're just using one qualifier.
|
private static int |
THREAD_POOL_SIZE
The size for thread pool.
|
Constructor and Description |
---|
AsyncClientExample() |
Modifier and Type | Method and Description |
---|---|
private CompletableFuture<Void> |
closeConn() |
private CompletableFuture<AsyncConnection> |
getConn() |
private byte[] |
getKey(int i) |
static void |
main(String[] args) |
int |
run(String[] args) |
private static final org.slf4j.Logger LOG
private static final int THREAD_POOL_SIZE
private static final int DEFAULT_NUM_OPS
private static final byte[] FAMILY
private static final byte[] QUAL
private final AtomicReference<CompletableFuture<AsyncConnection>> future
public AsyncClientExample()
private CompletableFuture<AsyncConnection> getConn()
private CompletableFuture<Void> closeConn()
private byte[] getKey(int i)
public int run(String[] args) throws Exception
run
in interface org.apache.hadoop.util.Tool
Exception
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.