public class BalanceBooks extends Object implements Closeable
You can run the BalanceBooks application with the following command:
./bin/tephra run org.apache.tephra.examples.BalanceBooks [num clients] [num iterations]where
[num clients]
is the number of concurrent client threads to use, and
[num iterations]
is the number of "transfer" operations to perform per client thread.
Constructor and Description |
---|
BalanceBooks(int totalClients,
int iterations) |
BalanceBooks(int totalClients,
int iterations,
org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Frees up the underlying resources common to all clients.
|
protected void |
createTableIfNotExists(org.apache.hadoop.conf.Configuration conf,
byte[] tableName,
byte[][] columnFamilies) |
void |
init()
Sets up common resources required by all clients.
|
static void |
main(String[] args) |
void |
run()
Runs all clients and waits for them to complete.
|
boolean |
verify()
Validates the current state of the data stored at the end of the test.
|
public BalanceBooks(int totalClients, int iterations)
public BalanceBooks(int totalClients, int iterations, org.apache.hadoop.conf.Configuration conf)
public void init() throws IOException
IOException
public void run() throws IOException, InterruptedException
IOException
InterruptedException
public boolean verify()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
protected void createTableIfNotExists(org.apache.hadoop.conf.Configuration conf, byte[] tableName, byte[][] columnFamilies) throws IOException
IOException
public static void main(String[] args)
Copyright © 2018 The Apache Software Foundation. All rights reserved.