incubator-accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Fuchs <adam.p.fu...@ugov.gov>
Subject Re: Definition of Column Qualifier in User Manual
Date Thu, 23 Feb 2012 16:55:14 GMT
When we don't have an entry for an element of the key or the value we
typically use the empty string (or zero-length byte array). This is
technically different from null, but it seems to work well for all the use
cases we've encountered so far. Here are some examples:

    Mutation m = new Mutation("david");
    m.put("age","","23, no, really");

    Mutation m = new Mutation("david");
    m.put("age","23, honest", "");

    byte[] empty = new byte[0];
    Mutation m = new Mutation(new Text("david"));
    m.put("age","23, honest",new Value(empty));

The first example uses a zero-length column qualifier and populates the
value. The second and third examples result in exactly the same entries in
Accumulo, with a populated column qualifier and a zero-length value.

Cheers,
Adam


On Wed, Feb 22, 2012 at 10:17 PM, David Medinets
<david.medinets@gmail.com>wrote:

> Perhaps I've overlooked it, but I don't see a definition of Column
> Qualifier in the User Manual. Is there a best practice recommendation
> when the data is simply row,column,value (i.e., david,age,23). Can the
> qualifier or value be null?
>

Mime
View raw message