I have spend some time writing an app to load random data into HBASE
and record the performance from proof of concept type work.

My table definition:
 //create 'webdata',  {NAME => 'image'},{NAME => 'anchor'},{NAME => 'raw_data'}


hbase(main):003:0> scan 'webdata' ,{ LIMIT => 1 }
ROW                          COLUMN+CELL
 http://www.Eleni.com/Achlam column=anchor:Alverta Angstrom
cathodegraph , timestamp=1259967232947, value=xkot
 ydeae                       qtlx
 http://www.Eleni.com/Achlam column=anchor:Polypoda abidingly ,
timestamp=1259967232947, value=fsenekwe
 ydeae
 http://www.Eleni.com/Achlam column=anchor:antimetropic Lecuona
ovariotomize , timestamp=1259967232947, value=
 ydeae                       bq
 http://www.Eleni.com/Achlam column=anchor:delightsomeness Egyptiac
archaism , timestamp=1259967232947, value=
 ydeae                       http://www.mhtwhf.com/ppmgwhblg
 http://www.Eleni.com/Achlam column=anchor:disrump Darach
unzealousness , timestamp=1259967232947, value=http:
 ydeae                       //www.qso.com/mridqddt
 http://www.Eleni.com/Achlam column=anchor:endoradiosonde Ursel ,
timestamp=1259967232947, value=http://www.sb
 ydeae                       j.com/vplwkd
 http://www.Eleni.com/Achlam column=anchor:gaw ,
timestamp=1259967232947, value=http://www.cpl.com/teaok

I wrote a Java scanner

-----------------------------------------
  public static void main (String [] args) throws IOException {
    HBaseConfiguration h = new HBaseConfiguration();
    HTable table = new HTable("webdata");
    Scan s = new Scan();
    s.addFamily( Bytes.toBytes("anchor") );
    ResultScanner scanner = table.getScanner(s);

    int rowCount=0;
    try {
      for (Result rr:scanner){
        rowCount++;
        KeyValue [] kvs  = rr.raw();
        for (KeyValue kv : kvs){
          System.out.println("col:"+new String(kv.getColumn()) );
          System.out.println("fam:"+new String(kv.getFamily()) );
          System.out.println("val:"+new String(kv.getValue()) );
        }//end kv
      } //end rr

----------------------------------------------

which returns as a first row correctly.
As does
s.addColumn( Bytes.toBytes("anchor") ); (without  s.addFamily(
Bytes.toBytes("anchor") ); )

----------------------------------------------
col:anchor:Alverta Angstrom cathodegraph
fam:anchor
val:xkotqtlx
--------------------------------------------
Now i am trying other scanner addColumn methods with no results:

    s.addColumn( Bytes.toBytes("anchor"), Bytes.toBytes("anchor")  );
    s.addColumn( Bytes.toBytes("anchor"),
Bytes.toBytes("anchor:Alverta Angstrom cathodegraph")  );
    s.addColumn( Bytes.toBytes("anchor"), Bytes.toBytes("Alverta
Angstrom cathodegraph")  );

Any hints?
Thank you

Reply via email to