I'm trying to store some location (latitude,longitude) values in HBase. I
decided to add a column each time I have a new value from my HashMap of key
and value pairs. My HashMap is like following:
*{lat:43.7719802, lon:-79.5008048}* *(A sample JSon representation of
Hashmap)*
And here is my code:
HTable table = new HTable(hBaseConfig, TableName);
for (Map.Entry<String, String> entry : Columns.entrySet()) {
Append a = new Append(rowKey);
a.add(Bytes.toBytes("a"),
Bytes.toBytes(entry.getKey()), Bytes.toBytes(entry.getValue()));
table.append(a);
}
But When I want to retrieve values, They are stored redundant. I mean they
are glued together in one cell mutiple times for each value, like this:
-79.5008048-79.5008048-79.5008048
I'm using HBase 0.94.15-cdh4.7.0 library in my code.
Does anybody know a clue for solving this problem?
​Thanks