|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.accumulo.examples.simple.client.RandomBatchWriter
public class RandomBatchWriter
Simple example for writing random data to Accumulo. See docs/examples/README.batch for instructions. The rows of the entries will be randomly generated numbers between a specified min and max (prefixed by "row_"). The column families will be "foo" and column qualifiers will be "1". The values will be random byte arrays of a specified size.
| Constructor Summary | |
|---|---|
RandomBatchWriter()
|
|
| Method Summary | |
|---|---|
static Mutation |
createMutation(long rowid,
int dataSize,
ColumnVisibility visibility)
Creates a mutation on a specified row with column family "foo", column qualifier "1", specified visibility, and a random value of specified size. |
static byte[] |
createValue(long rowid,
int dataSize)
Creates a random byte array of specified size using the specified seed. |
static void |
main(String[] args)
Writes a specified number of entries to Accumulo using a BatchWriter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomBatchWriter()
| Method Detail |
|---|
public static byte[] createValue(long rowid,
int dataSize)
rowid - the seed to use for the random number generatordataSize - the size of the array
public static Mutation createMutation(long rowid,
int dataSize,
ColumnVisibility visibility)
rowid - the row of the mutationdataSize - the size of the random valuevisibility - the visibility of the entry to insert
public static void main(String[] args)
throws AccumuloException,
AccumuloSecurityException,
TableNotFoundException
BatchWriter.
AccumuloException
AccumuloSecurityException
TableNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||