Pregunta

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?

¿Fue útil?

Solución

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);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top