Question

I've tried reading through the documentation and doing some searches, but I'm not quite clear on this. When storing data in Accumulo, are you required to provide the Column family and qualifier as part of the key? What if I just want to provide a unique RowID as my key? Would I just pass along null as my family and qualifier in a Mutation object?

Was it helpful?

Solution

You may pass an empty byte array as the column family or qualifier, as in the following. This uses an empty value as well.

byte[] EMPTY_BYTES = new byte[0];
Mutation m = new Mutation("rowID");
m.put(EMPTY_BYTES, EMPTY_BYTES, EMPTY_BYTES);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top