HBase filtered scan problem

2011-05-10 Thread Stefan Comanita
Hi all, 

I want to do a scan on a number of rows, each row having multiple columns, and 
I want to filter out some of this columns based on their values per example, if 
I have the following rows:

plainRow:col:value1 column=T:19, timestamp=19, 
value= 
  
plainRow:col:value1 column=T:2, timestamp=2, 
value=U  
  
plainRow:col:value1 column=T:3, timestamp=3, 
value=U  
  
plainRow:col:value1 column=T:4, timestamp=4, value=

and

secondRow:col:value1 column=T:1, timestamp=1, 
value= 
  
secondRow:col:value1 column=T:2, timestamp=2, 
value=  
  
secondRow:col:value1 column=T:3, timestamp=3, 
value=U 
  
secondRow:col:value1 column=T:4, timestamp=4, value=


and I want to select all the rows but just with the columns that don't have the 
value "U", something like:

plainRow:col:value1 column=T:19, timestamp=19, 
value= 
  
plainRow:col:value1 column=T:4, timestamp=4, value=
secondRow:col:value1 column=T:1, timestamp=1, 
value= 
  
secondRow:col:value1 column=T:2, timestamp=2, 
value=   
 secondRow:col:value1 column=T:4, timestamp=4, value=

and to achieve this, i try the following:

Scan scan = new Scan();
    
scan.setStartRow(stringToBytes(rowIdentifier));
scan.setStopRow(stringToBytes(rowIdentifier + Constants.MAX_CHAR));
scan.addFamily(Constants.TERM_VECT_COLUMN_FAMILY);

if(includeFilter) {
    Filter filter = new ValueFilter(CompareOp.EQUAL, 
    new BinaryComparator(stringToBytes("U")));    
    scan.setFilter(filter);
}

and if i execute this scan I get the rows with the columns having the value 
"U", which is correct, but when i set CompareOp.NOT_EQUAL and i expect to get 
the other columns it doesnt work the way i want, it give me back all the rows, 
including the one which have the value "U", the same happens when i use: 
Filter filter = new ValueFilter(CompareOp.EQUAL, new 
BinaryComparator(stringToBytes(""))); 

I mention that the columns have the values "U" and "" (empty string), and that 
i also saw the same behaivior with the RegexComparator and SubstringComparator.

Any idea would be very much appreciated, sorry for the long mail, thank you.

Stefan Comanita

decompressing the data stroed in a compressed HBase table

2011-01-13 Thread Stefan Comanita
Hi, 

we are storing data in HBase (which in turn writes to HDFS) to a table that has 
LZO compression enabled, my questions the following: if we have some data 
stored in that table, and for any reason we decide to abandon the idea of 
compressing data how can we uncompress the already compressed data ? Altering 
the table by removing the compression will do any good ? reading the table and 
writing to a new uncompressed table ? doing a map-reduce job and uncompressing 
the data ?! are there any suggested techniques for this scenario ?

Thank you.

Comanita Stefan 



  

disabling the WAL from the config file

2011-01-05 Thread Stefan Comanita
Hi,

I am kinda new to the underlying part of HBase and I have a 
question which seems trivial to me but i wasn't able to find an answer 
for it, so here it goes: "how do I disable the Write Ahead Wall (WAL) 
from the config file ?" i know about the setWriteToWAL(boolean) but i 
would like to do it from a config file.

Setting one or all of the
 parameters hbase.regionserver.logroll.period, 
hbase.regionserver.optionallogflushinterva, 
hbase.regionserver.flushlogentries to 0 will do the trick ?

Thank
 you.

Comanita Stefan