public class MultiThreadedClientExample
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
Connection
and Table
in a
multi-threaded environment. Each table is a light weight object
that is created and thrown away. Connections are heavy weight objects
that hold on to zookeeper connections, async processes, and other state.
Usage: bin/hbase org.apache.hadoop.hbase.client.example.MultiThreadedClientExample testTableName 500000
The table should already be created before running the command. This example expects one column family named d.
This is meant to show different operations that are likely to be done in a real world application. These operations are:
Modifier and Type | Class and Description |
---|---|
static class |
MultiThreadedClientExample.ReadExampleCallable
Class to show how to scan some rows starting at a random location.
|
static class |
MultiThreadedClientExample.SingleWriteExampleCallable
Class to show how to send a single put.
|
static class |
MultiThreadedClientExample.WriteExampleCallable
Class that will show how to send batches of puts at the same time.
|
Constructor and Description |
---|
MultiThreadedClientExample() |
public MultiThreadedClientExample() throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.