hi
i use recent ver of trunk - and i'm realy know what it implicates (:)).
first - sugesion :
there are group of methods "getRow" and group "getScanner" - both
get as param array of collumns
but in "getRow" methods we have to put it without ":" at the end of
column family name, and for "getScanner" the colon is necessary.
i think that it will be good to make it identical.
and the problem :
there is table : "allusers_counters" with columnfamilies :
"pageSize:", "childrenCount:", "data:"
conf = new HBaseConfiguration();
conf.set("hbase.master", "localhost:60000");
HConnection connection = HConnectionManager.getConnection(conf);
HTable htable = new HTable(conf, "allusers_counters");
BatchUpdate batch = new BatchUpdate("123456".getBytes());
batch.put("pageSize", "10".getBytes());
batch.put("childrenCount", "0".getBytes());
htable.commit(batch);
System.out.println(" data inserted ");
byte[][] cols = new byte[][]{ "pageSize".getBytes() };
<----------------- there the colon is useless
RowResult row = htable.getRow("123456".getBytes(), cols);
System.out.println(" row = " +
row.get("pageSize".getBytes()).toString());
// <----------------------------- STEP 1
cols = new byte[][]{ "pageSize:".getBytes() };
<--------------------------- there the colon is necessary
Scanner scanner = htable.getScanner(cols,
"123456".getBytes());
System.out.println(" ----- " + scanner.iterator().hasNext());
// <-------------------------------- STEP 2
getRow - STEP 1 - returns value of cell
getScanner - STEP 2 - returns the iterator, which tell me that there
are no rows in this table.
there something work wrong, or i make something wrong...
Best regards - Acure