[jira] [Created] (HBASE-10909) Abstract out ZooKeeper usage in HBase

2014-04-04 Thread Mikhail Antonov (JIRA)
Mikhail Antonov created HBASE-10909:
---

 Summary: Abstract out ZooKeeper usage in HBase
 Key: HBASE-10909
 URL: https://issues.apache.org/jira/browse/HBASE-10909
 Project: HBase
  Issue Type: Umbrella
  Components: Zookeeper
Reporter: Mikhail Antonov
Assignee: Mikhail Antonov






--
This message was sent by Atlassian JIRA
(v6.2#6252)


Scan with SingleColumnValueFilterfilter giving wrong output

2014-04-04 Thread ashish singhi
Hi all.

I am using,
HBase Version - 0.94.11
Hadoop Version - 2.1.0

I am trying to get columns having the specified value. So for that I am using 
org.apache.hadoop.hbase.filter.SingleColumnValueFilter class.
But when I try to scan table to find columns with column value 'value2', I 
think I am not getting proper output.

Can someone please tell me where I am wrong ?

I have a simple hbase table with records.
hbase(main):014:0> scan 'testTable'
ROW  COLUMN+CELL
row1column=colFammily1:col1, 
timestamp=1396586048561, value=value1
row2column=colFammily1:col1, 
timestamp=1396586054526, value=value2
row2column=colFammily1:col2, 
timestamp=1396585985022, value=testValue
row3column=colFammily1:col1, 
timestamp=1396586060989, value=value3
row4column=colFammily1:col1, 
timestamp=1396586066037, value=value4
row5column=colFammily1:col1, 
timestamp=1396586071842, value=value5
row6column=colFammily1:col3, 
timestamp=1396590405939, value=value1
6 row(s) in 0.0320 seconds

First: When I executed scan command with column value 'value1' I got the proper 
output.
hbase(main):023:0> scan 'testTable', {FILTER => 
org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hbase.util.Bytes.toBytes('col1'),
 
org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL'),org.apache.hadoop.hbase.util.Bytes.toBytes('value1'))}
ROW  COLUMN+CELL
row1column=colFammily1:col1, 
timestamp=1396586048561, value=value1
row6column=colFammily1:col3, 
timestamp=1396590405939, value=value1
2 row(s) in 0.0160 seconds

Second: When I tried same command with column value 'value2' the output seems 
to be incorrect.
hbase(main):025:0> scan 'testTable', {FILTER => 
org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hbase.util.Bytes.toBytes('col1'),
 
org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL'),org.apache.hadoop.hbase.util.Bytes.toBytes('value2'))}
ROW  COLUMN+CELL
row2column=colFammily1:col1, 
timestamp=1396586054526, value=value2
row2column=colFammily1:col2, 
timestamp=1396585985022, value=testValue
row6column=colFammily1:col3, 
timestamp=1396590405939, value=value1
2 row(s) in 0.0100 seconds

I am not able to understand why I am getting row2 with col2 and row6 in the 
output where in their column values are not 'value2'.

Regards,
Ashish


Re: Scan with SingleColumnValueFilterfilter giving wrong output

2014-04-04 Thread ramkrishna vasudevan
Hi Ashish

I think the behaviour is fine.  There is a property called filterIfMissing
in Single Columnvalue filter.  If you don't need a row which does not have
the given column and value in your query, then you should set that to true.
See SingleColumnValueFilter.setFilterIfMissing.
In your first result row6 should not be the result (strictly if you want
only value1 with col1). You can see that it has col3 in the result.

In your second result too row6 falls under the same category.
If a row has more than one cell and if we have found the matching cell, the
following cells of that row will also be included in the result.  I hope
the same behavior is there in 0.94.11 also. (should be).

Regards
Ram



On Fri, Apr 4, 2014 at 2:37 PM, ashish singhi wrote:

> Hi all.
>
> I am using,
> HBase Version - 0.94.11
> Hadoop Version - 2.1.0
>
> I am trying to get columns having the specified value. So for that I am
> using org.apache.hadoop.hbase.filter.SingleColumnValueFilter class.
> But when I try to scan table to find columns with column value 'value2', I
> think I am not getting proper output.
>
> Can someone please tell me where I am wrong ?
>
> I have a simple hbase table with records.
> hbase(main):014:0> scan 'testTable'
> ROW  COLUMN+CELL
> row1
>  column=colFammily1:col1, timestamp=1396586048561, value=value1
> row2
>  column=colFammily1:col1, timestamp=1396586054526, value=value2
> row2
>  column=colFammily1:col2, timestamp=1396585985022, value=testValue
> row3
>  column=colFammily1:col1, timestamp=1396586060989, value=value3
> row4
>  column=colFammily1:col1, timestamp=1396586066037, value=value4
> row5
>  column=colFammily1:col1, timestamp=1396586071842, value=value5
> row6
>  column=colFammily1:col3, timestamp=1396590405939, value=value1
> 6 row(s) in 0.0320 seconds
>
> First: When I executed scan command with column value 'value1' I got the
> proper output.
> hbase(main):023:0> scan 'testTable', {FILTER =>
> org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hbase.util.Bytes.toBytes('col1'),
> org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL'),org.apache.hadoop.hbase.util.Bytes.toBytes('value1'))}
> ROW  COLUMN+CELL
> row1
>  column=colFammily1:col1, timestamp=1396586048561, value=value1
> row6
>  column=colFammily1:col3, timestamp=1396590405939, value=value1
> 2 row(s) in 0.0160 seconds
>
> Second: When I tried same command with column value 'value2' the output
> seems to be incorrect.
> hbase(main):025:0> scan 'testTable', {FILTER =>
> org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hbase.util.Bytes.toBytes('col1'),
> org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL'),org.apache.hadoop.hbase.util.Bytes.toBytes('value2'))}
> ROW  COLUMN+CELL
> row2
>  column=colFammily1:col1, timestamp=1396586054526, value=value2
> row2
>  column=colFammily1:col2, timestamp=1396585985022, value=testValue
> row6
>  column=colFammily1:col3, timestamp=1396590405939, value=value1
> 2 row(s) in 0.0100 seconds
>
> I am not able to understand why I am getting row2 with col2 and row6 in
> the output where in their column values are not 'value2'.
>
> Regards,
> Ashish
>


RE: Scan with SingleColumnValueFilterfilter giving wrong output

2014-04-04 Thread ashish singhi
Hi Ram.

Thanks for your time and explanation.
I tried by setting true to SingleColumnValueFilter.setFilterIfMissing as you 
mentioned.

It worked for column value 'value2' in output I got only row2 with col1. 
But for column value 'value1' also I am getting one row i.e., row1 with col1. 
As you said " In your first result row6 should not be the result (strictly if 
you want only value1 with col1). You can see that it has col3 in the result."

But I want is to find all the columns in the table having mentioned column 
value. Can someone please tell me how to get it ?

-Original Message-
From: ramkrishna vasudevan [mailto:ramkrishna.s.vasude...@gmail.com] 
Sent: 04 April 2014 15:20
To: dev@hbase.apache.org
Subject: Re: Scan with SingleColumnValueFilterfilter giving wrong output

Hi Ashish

I think the behaviour is fine.  There is a property called filterIfMissing in 
Single Columnvalue filter.  If you don't need a row which does not have the 
given column and value in your query, then you should set that to true.
See SingleColumnValueFilter.setFilterIfMissing.
In your first result row6 should not be the result (strictly if you want only 
value1 with col1). You can see that it has col3 in the result.

In your second result too row6 falls under the same category.
If a row has more than one cell and if we have found the matching cell, the 
following cells of that row will also be included in the result.  I hope the 
same behavior is there in 0.94.11 also. (should be).

Regards
Ram



On Fri, Apr 4, 2014 at 2:37 PM, ashish singhi wrote:

> Hi all.
>
> I am using,
> HBase Version - 0.94.11
> Hadoop Version - 2.1.0
>
> I am trying to get columns having the specified value. So for that I 
> am using org.apache.hadoop.hbase.filter.SingleColumnValueFilter class.
> But when I try to scan table to find columns with column value 
> 'value2', I think I am not getting proper output.
>
> Can someone please tell me where I am wrong ?
>
> I have a simple hbase table with records.
> hbase(main):014:0> scan 'testTable'
> ROW  COLUMN+CELL
> row1
>  column=colFammily1:col1, timestamp=1396586048561, value=value1
> row2
>  column=colFammily1:col1, timestamp=1396586054526, value=value2
> row2
>  column=colFammily1:col2, timestamp=1396585985022, value=testValue
> row3
>  column=colFammily1:col1, timestamp=1396586060989, value=value3
> row4
>  column=colFammily1:col1, timestamp=1396586066037, value=value4
> row5
>  column=colFammily1:col1, timestamp=1396586071842, value=value5
> row6
>  column=colFammily1:col3, timestamp=1396590405939, value=value1
> 6 row(s) in 0.0320 seconds
>
> First: When I executed scan command with column value 'value1' I got 
> the proper output.
> hbase(main):023:0> scan 'testTable', {FILTER => 
> org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.
> hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hbase
> .util.Bytes.toBytes('col1'), 
> org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL'),org.apache.hadoop.hbase.util.Bytes.toBytes('value1'))}
> ROW  COLUMN+CELL
> row1
>  column=colFammily1:col1, timestamp=1396586048561, value=value1
> row6
>  column=colFammily1:col3, timestamp=1396590405939, value=value1
> 2 row(s) in 0.0160 seconds
>
> Second: When I tried same command with column value 'value2' the 
> output seems to be incorrect.
> hbase(main):025:0> scan 'testTable', {FILTER => 
> org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.
> hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hbase
> .util.Bytes.toBytes('col1'), 
> org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL'),org.apache.hadoop.hbase.util.Bytes.toBytes('value2'))}
> ROW  COLUMN+CELL
> row2
>  column=colFammily1:col1, timestamp=1396586054526, value=value2
> row2
>  column=colFammily1:col2, timestamp=1396585985022, value=testValue
> row6
>  column=colFammily1:col3, timestamp=1396590405939, value=value1
> 2 row(s) in 0.0100 seconds
>
> I am not able to understand why I am getting row2 with col2 and row6 
> in the output where in their column values are not 'value2'.
>
> Regards,
> Ashish
>


Re: Scan with SingleColumnValueFilterfilter giving wrong output

2014-04-04 Thread ramkrishna vasudevan
>>But for column value 'value1' also I am getting one row i.e., row1 with
col1
You should get only one row ie. row1 with col1.
Do you still get row6 for value1 even after setting filterIfMissing as true?

Regards
Ram


On Fri, Apr 4, 2014 at 3:50 PM, ashish singhi wrote:

> Hi Ram.
>
> Thanks for your time and explanation.
> I tried by setting true to SingleColumnValueFilter.setFilterIfMissing as
> you mentioned.
>
> It worked for column value 'value2' in output I got only row2 with col1.
> But for column value 'value1' also I am getting one row i.e., row1 with
> col1. As you said " In your first result row6 should not be the result
> (strictly if you want only value1 with col1). You can see that it has col3
> in the result."
>
> But I want is to find all the columns in the table having mentioned column
> value. Can someone please tell me how to get it ?
>
> -Original Message-
> From: ramkrishna vasudevan [mailto:ramkrishna.s.vasude...@gmail.com]
> Sent: 04 April 2014 15:20
> To: dev@hbase.apache.org
> Subject: Re: Scan with SingleColumnValueFilterfilter giving wrong output
>
> Hi Ashish
>
> I think the behaviour is fine.  There is a property called filterIfMissing
> in Single Columnvalue filter.  If you don't need a row which does not have
> the given column and value in your query, then you should set that to true.
> See SingleColumnValueFilter.setFilterIfMissing.
> In your first result row6 should not be the result (strictly if you want
> only value1 with col1). You can see that it has col3 in the result.
>
> In your second result too row6 falls under the same category.
> If a row has more than one cell and if we have found the matching cell,
> the following cells of that row will also be included in the result.  I
> hope the same behavior is there in 0.94.11 also. (should be).
>
> Regards
> Ram
>
>
>
> On Fri, Apr 4, 2014 at 2:37 PM, ashish singhi  >wrote:
>
> > Hi all.
> >
> > I am using,
> > HBase Version - 0.94.11
> > Hadoop Version - 2.1.0
> >
> > I am trying to get columns having the specified value. So for that I
> > am using org.apache.hadoop.hbase.filter.SingleColumnValueFilter class.
> > But when I try to scan table to find columns with column value
> > 'value2', I think I am not getting proper output.
> >
> > Can someone please tell me where I am wrong ?
> >
> > I have a simple hbase table with records.
> > hbase(main):014:0> scan 'testTable'
> > ROW  COLUMN+CELL
> > row1
> >  column=colFammily1:col1, timestamp=1396586048561, value=value1
> > row2
> >  column=colFammily1:col1, timestamp=1396586054526, value=value2
> > row2
> >  column=colFammily1:col2, timestamp=1396585985022, value=testValue
> > row3
> >  column=colFammily1:col1, timestamp=1396586060989, value=value3
> > row4
> >  column=colFammily1:col1, timestamp=1396586066037, value=value4
> > row5
> >  column=colFammily1:col1, timestamp=1396586071842, value=value5
> > row6
> >  column=colFammily1:col3, timestamp=1396590405939, value=value1
> > 6 row(s) in 0.0320 seconds
> >
> > First: When I executed scan command with column value 'value1' I got
> > the proper output.
> > hbase(main):023:0> scan 'testTable', {FILTER =>
> > org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.
> > hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hbase
> > .util.Bytes.toBytes('col1'),
> >
> org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL'),org.apache.hadoop.hbase.util.Bytes.toBytes('value1'))}
> > ROW  COLUMN+CELL
> > row1
> >  column=colFammily1:col1, timestamp=1396586048561, value=value1
> > row6
> >  column=colFammily1:col3, timestamp=1396590405939, value=value1
> > 2 row(s) in 0.0160 seconds
> >
> > Second: When I tried same command with column value 'value2' the
> > output seems to be incorrect.
> > hbase(main):025:0> scan 'testTable', {FILTER =>
> > org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.
> > hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hbase
> > .util.Bytes.toBytes('col1'),
> >
> org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL'),org.apache.hadoop.hbase.util.Bytes.toBytes('value2'))}
> > ROW  COLUMN+CELL
> > row2
> >  column=colFammily1:col1, timestamp=1396586054526, value=value2
> > row2
> >  column=colFammily1:col2, timestamp=1396585985022, value=testValue
> > row6
> >  column=colFammily1:col3, timestamp=1396590405939, value=value1
> > 2 row(s) in 0.0100 seconds
> >
> > I am not able to understand why I am getting row2 with col2 and row6
> > in the output where in their column values are not 'value2'.
> >
> > Regards,
> > Ashish
> >
>


RE: Scan with SingleColumnValueFilterfilter giving wrong output

2014-04-04 Thread ashish singhi
>> Do you still get row6 for value1 even after setting filterIfMissing as true?
No.

Do we something like multi value column value filter ?

-Original Message-
From: ramkrishna vasudevan [mailto:ramkrishna.s.vasude...@gmail.com] 
Sent: 04 April 2014 16:05
To: dev@hbase.apache.org
Subject: Re: Scan with SingleColumnValueFilterfilter giving wrong output

>>But for column value 'value1' also I am getting one row i.e., row1 
>>with
col1
You should get only one row ie. row1 with col1.
Do you still get row6 for value1 even after setting filterIfMissing as true?

Regards
Ram


On Fri, Apr 4, 2014 at 3:50 PM, ashish singhi wrote:

> Hi Ram.
>
> Thanks for your time and explanation.
> I tried by setting true to SingleColumnValueFilter.setFilterIfMissing 
> as you mentioned.
>
> It worked for column value 'value2' in output I got only row2 with col1.
> But for column value 'value1' also I am getting one row i.e., row1 
> with col1. As you said " In your first result row6 should not be the 
> result (strictly if you want only value1 with col1). You can see that 
> it has col3 in the result."
>
> But I want is to find all the columns in the table having mentioned 
> column value. Can someone please tell me how to get it ?
>
> -Original Message-
> From: ramkrishna vasudevan [mailto:ramkrishna.s.vasude...@gmail.com]
> Sent: 04 April 2014 15:20
> To: dev@hbase.apache.org
> Subject: Re: Scan with SingleColumnValueFilterfilter giving wrong 
> output
>
> Hi Ashish
>
> I think the behaviour is fine.  There is a property called 
> filterIfMissing in Single Columnvalue filter.  If you don't need a row 
> which does not have the given column and value in your query, then you should 
> set that to true.
> See SingleColumnValueFilter.setFilterIfMissing.
> In your first result row6 should not be the result (strictly if you 
> want only value1 with col1). You can see that it has col3 in the result.
>
> In your second result too row6 falls under the same category.
> If a row has more than one cell and if we have found the matching 
> cell, the following cells of that row will also be included in the 
> result.  I hope the same behavior is there in 0.94.11 also. (should be).
>
> Regards
> Ram
>
>
>
> On Fri, Apr 4, 2014 at 2:37 PM, ashish singhi 
>  >wrote:
>
> > Hi all.
> >
> > I am using,
> > HBase Version - 0.94.11
> > Hadoop Version - 2.1.0
> >
> > I am trying to get columns having the specified value. So for that I 
> > am using org.apache.hadoop.hbase.filter.SingleColumnValueFilter class.
> > But when I try to scan table to find columns with column value 
> > 'value2', I think I am not getting proper output.
> >
> > Can someone please tell me where I am wrong ?
> >
> > I have a simple hbase table with records.
> > hbase(main):014:0> scan 'testTable'
> > ROW  COLUMN+CELL
> > row1
> >  column=colFammily1:col1, timestamp=1396586048561, value=value1
> > row2
> >  column=colFammily1:col1, timestamp=1396586054526, value=value2
> > row2
> >  column=colFammily1:col2, timestamp=1396585985022, value=testValue
> > row3
> >  column=colFammily1:col1, timestamp=1396586060989, value=value3
> > row4
> >  column=colFammily1:col1, timestamp=1396586066037, value=value4
> > row5
> >  column=colFammily1:col1, timestamp=1396586071842, value=value5
> > row6
> >  column=colFammily1:col3, timestamp=1396590405939, value=value1
> > 6 row(s) in 0.0320 seconds
> >
> > First: When I executed scan command with column value 'value1' I got 
> > the proper output.
> > hbase(main):023:0> scan 'testTable', {FILTER => 
> > org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.
> > hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hba
> > se
> > .util.Bytes.toBytes('col1'),
> >
> org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL
> '),org.apache.hadoop.hbase.util.Bytes.toBytes('value1'))}
> > ROW  COLUMN+CELL
> > row1
> >  column=colFammily1:col1, timestamp=1396586048561, value=value1
> > row6
> >  column=colFammily1:col3, timestamp=1396590405939, value=value1
> > 2 row(s) in 0.0160 seconds
> >
> > Second: When I tried same command with column value 'value2' the 
> > output seems to be incorrect.
> > hbase(main):025:0> scan 'testTable', {FILTER => 
> > org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.
> > hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hba
> > se
> > .util.Bytes.toBytes('col1'),
> >
> org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL
> '),org.apache.hadoop.hbase.util.Bytes.toBytes('value2'))}
> > ROW  COLUMN+CELL
> > row2
> >  column=colFammily1:col1, timestamp=1396586054526, value=value2
> > row2
> >  column=colFammily1:col2, timestamp=1396585985022, value=testValue
> > row6
> >  column=colFammily1:col3, timestamp=1396590405939, value=value1
> > 2 row(s) in 0.0100 seconds
> >
> > I 

Re: Scan with SingleColumnValueFilterfilter giving wrong output

2014-04-04 Thread ramkrishna vasudevan
There is something called Valuefilter.  Check its usage and see if it suits
you.

Regards
Ram


On Fri, Apr 4, 2014 at 4:17 PM, ashish singhi wrote:

> >> Do you still get row6 for value1 even after setting filterIfMissing as
> true?
> No.
>
> Do we something like multi value column value filter ?
>
> -Original Message-
> From: ramkrishna vasudevan [mailto:ramkrishna.s.vasude...@gmail.com]
> Sent: 04 April 2014 16:05
> To: dev@hbase.apache.org
> Subject: Re: Scan with SingleColumnValueFilterfilter giving wrong output
>
> >>But for column value 'value1' also I am getting one row i.e., row1
> >>with
> col1
> You should get only one row ie. row1 with col1.
> Do you still get row6 for value1 even after setting filterIfMissing as
> true?
>
> Regards
> Ram
>
>
> On Fri, Apr 4, 2014 at 3:50 PM, ashish singhi  >wrote:
>
> > Hi Ram.
> >
> > Thanks for your time and explanation.
> > I tried by setting true to SingleColumnValueFilter.setFilterIfMissing
> > as you mentioned.
> >
> > It worked for column value 'value2' in output I got only row2 with col1.
> > But for column value 'value1' also I am getting one row i.e., row1
> > with col1. As you said " In your first result row6 should not be the
> > result (strictly if you want only value1 with col1). You can see that
> > it has col3 in the result."
> >
> > But I want is to find all the columns in the table having mentioned
> > column value. Can someone please tell me how to get it ?
> >
> > -Original Message-
> > From: ramkrishna vasudevan [mailto:ramkrishna.s.vasude...@gmail.com]
> > Sent: 04 April 2014 15:20
> > To: dev@hbase.apache.org
> > Subject: Re: Scan with SingleColumnValueFilterfilter giving wrong
> > output
> >
> > Hi Ashish
> >
> > I think the behaviour is fine.  There is a property called
> > filterIfMissing in Single Columnvalue filter.  If you don't need a row
> > which does not have the given column and value in your query, then you
> should set that to true.
> > See SingleColumnValueFilter.setFilterIfMissing.
> > In your first result row6 should not be the result (strictly if you
> > want only value1 with col1). You can see that it has col3 in the result.
> >
> > In your second result too row6 falls under the same category.
> > If a row has more than one cell and if we have found the matching
> > cell, the following cells of that row will also be included in the
> > result.  I hope the same behavior is there in 0.94.11 also. (should be).
> >
> > Regards
> > Ram
> >
> >
> >
> > On Fri, Apr 4, 2014 at 2:37 PM, ashish singhi
> >  > >wrote:
> >
> > > Hi all.
> > >
> > > I am using,
> > > HBase Version - 0.94.11
> > > Hadoop Version - 2.1.0
> > >
> > > I am trying to get columns having the specified value. So for that I
> > > am using org.apache.hadoop.hbase.filter.SingleColumnValueFilter class.
> > > But when I try to scan table to find columns with column value
> > > 'value2', I think I am not getting proper output.
> > >
> > > Can someone please tell me where I am wrong ?
> > >
> > > I have a simple hbase table with records.
> > > hbase(main):014:0> scan 'testTable'
> > > ROW  COLUMN+CELL
> > > row1
> > >  column=colFammily1:col1, timestamp=1396586048561, value=value1
> > > row2
> > >  column=colFammily1:col1, timestamp=1396586054526, value=value2
> > > row2
> > >  column=colFammily1:col2, timestamp=1396585985022, value=testValue
> > > row3
> > >  column=colFammily1:col1, timestamp=1396586060989, value=value3
> > > row4
> > >  column=colFammily1:col1, timestamp=1396586066037, value=value4
> > > row5
> > >  column=colFammily1:col1, timestamp=1396586071842, value=value5
> > > row6
> > >  column=colFammily1:col3, timestamp=1396590405939, value=value1
> > > 6 row(s) in 0.0320 seconds
> > >
> > > First: When I executed scan command with column value 'value1' I got
> > > the proper output.
> > > hbase(main):023:0> scan 'testTable', {FILTER =>
> > > org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.
> > > hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hba
> > > se
> > > .util.Bytes.toBytes('col1'),
> > >
> > org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL
> > '),org.apache.hadoop.hbase.util.Bytes.toBytes('value1'))}
> > > ROW  COLUMN+CELL
> > > row1
> > >  column=colFammily1:col1, timestamp=1396586048561, value=value1
> > > row6
> > >  column=colFammily1:col3, timestamp=1396590405939, value=value1
> > > 2 row(s) in 0.0160 seconds
> > >
> > > Second: When I tried same command with column value 'value2' the
> > > output seems to be incorrect.
> > > hbase(main):025:0> scan 'testTable', {FILTER =>
> > > org.apache.hadoop.hbase.filter.SingleColumnValueFilter.new(org.apache.
> > > hadoop.hbase.util.Bytes.toBytes('colFammily1'),org.apache.hadoop.hba
> > > se
> > > .util.Bytes.toBytes('col1'),
> > >
> > org.apache.hadoop.hbase.filter.CompareFilter::CompareOp.valueOf('EQUAL
> > '),org.apache.hadoop

Re: [VOTE] The 4th HBase 0.98.1 release candidate (RC3) is available for download

2014-04-04 Thread Fabien LE GALLO
Oh ok I just saw the announcement of 0.96.2 a few posts back. I just
couldn't find it on apache mirrors.
Sorry about that.


On Fri, Apr 4, 2014 at 10:19 AM, Fabien LE GALLO wrote:

> What about 0.96.2 ? According to JIRA, it was supposed to be released
> yesterday.
> I want to apply HBASE-10850 patch to a stable release but it cannot be
> applied to 0.96.1.
>
>
>
> On Fri, Apr 4, 2014 at 8:30 AM, Andrew Purtell wrote:
>
>> (cc dev@)
>>
>>
>> On Fri, Apr 4, 2014 at 8:29 AM, Andrew Purtell 
>> wrote:
>>
>> > Thank you, the release of 0.98.1 will happen on time unless there is a
>> new
>> > development.
>> >
>> >
>> > On Fri, Apr 4, 2014 at 4:23 AM, ramkrishna vasudevan <
>> > ramkrishna.s.vasude...@gmail.com> wrote:
>> >
>> >> +1 on getting this RC3 out as the release and targetting the bug for
>> >> 0.98.2.
>> >>
>> >> Regards
>> >> Ram
>> >>
>> >>
>> >> On Fri, Apr 4, 2014 at 7:49 AM, Anoop John 
>> wrote:
>> >>
>> >> > >Phoenix 4.0 has no release it can currently run on
>> >> > >Can't we get these additional bugs in 0.98.2 - it's one month away
>> >> >
>> >> > I was thinking that for Phoenix 4.0 *release* the 98.1 is needed..
>> >>  Thats
>> >> > why was in favor of correcting the bug in 98.1 itself..  Ya 98.2 can
>> >> come
>> >> > out in a month time and at that time 4.0 can upgrade to that..
>>  Sounds
>> >> > good.. I am ready to again cast my +1 for this RC.
>> >> >
>> >> >
>> >> > >@Anoop - would you mind verifying whether or not
>> >> > the TestSCVFWithMiniCluster written as a Phoenix query returns the
>> >> correct
>> >> > results?
>> >> >
>> >> > I will check this James..  I think it might be there.  Any way, even
>> if
>> >> the
>> >> > bug is there, there can be a work around solution in Phoenix filter
>> code
>> >> > which I can try out  (If you would like to get)
>> >> >
>> >> > -Anoop-
>> >> >
>> >> > On Fri, Apr 4, 2014 at 1:23 AM, Ted Yu  wrote:
>> >> >
>> >> > > That is a feasible option.
>> >> > >
>> >> > > I have changed Fix Version of HBASE-10850 to 0.98.2
>> >> > >
>> >> > > Cheers
>> >> > >
>> >> > >
>> >> > > On Thu, Apr 3, 2014 at 12:16 PM, lars hofhansl 
>> >> wrote:
>> >> > >
>> >> > > > To be fair, Phoenix should not have relied on an unreleased
>> >> dependency.
>> >> > > (I
>> >> > > > know there are corporate timing issues, but they really should
>> not
>> >> > force
>> >> > > us
>> >> > > > into situations like these).
>> >> > > >
>> >> > > > As far as I understand the issue, it not just a performance but
>> can
>> >> > lead
>> >> > > > to incorrect results.
>> >> > > >
>> >> > > > Then again, this issue has existed in all of 0.96 and 0.98 so far
>> >> > (over 5
>> >> > > > months).
>> >> > > >
>> >> > > > So, I'd be in favor of releasing 0.98.1 now, and doing 0.98.2
>> soon,
>> >> in
>> >> > 14
>> >> > > > or 20 days (that would also pull back some of the time lost in
>> the
>> >> > > 0.98.1RC
>> >> > > > cycle).
>> >> > > >
>> >> > > > -- Lars
>> >> > > >
>> >> > > >
>> >> > > >
>> >> > > > 
>> >> > > >  From: James Taylor 
>> >> > > > To: "u...@hbase.apache.org" 
>> >> > > > Cc: "dev@hbase.apache.org" 
>> >> > > > Sent: Thursday, April 3, 2014 8:57 AM
>> >> > > > Subject: Re: [VOTE] The 4th HBase 0.98.1 release candidate (RC3)
>> is
>> >> > > > available for download
>> >> > > >
>> >> > > >
>> >> > > > I implore you to stick with releasing RC3. Phoenix 4.0 has no
>> >> release
>> >> > it
>> >> > > > can currently run on. Phoenix doesn't use
>> SingleColumnValueFilter,
>> >> so
>> >> > it
>> >> > > > seems that HBASE-10850 has no impact wrt Phoenix. Can't we get
>> these
>> >> > > > additional bugs in 0.98.2 - it's one month away [1]?
>> >> > > >
>> >> > > > James
>> >> > > >
>> >> > > > [1] http://en.wikipedia.org/wiki/The_Mythical_Man-Month
>> >> > > >
>> >> > > >
>> >> > > >
>> >> > > > On Thu, Apr 3, 2014 at 3:34 AM, ramkrishna vasudevan <
>> >> > > > ramkrishna.s.vasude...@gmail.com> wrote:
>> >> > > >
>> >> > > > > Will target HBASE-10899 also then by that time.
>> >> > > > >
>> >> > > > > Regards
>> >> > > > > Ram
>> >> > > > >
>> >> > > > >
>> >> > > > > On Thu, Apr 3, 2014 at 3:47 PM, Ted Yu 
>> >> wrote:
>> >> > > > >
>> >> > > > > > Understood, Andy.
>> >> > > > > >
>> >> > > > > > I have integrated fix for HBASE-10850 to 0.98
>> >> > > > > >
>> >> > > > > > Cheers
>> >> > > > > >
>> >> > > > > >
>> >> > > > > > On Thu, Apr 3, 2014 at 3:00 AM, Andrew Purtell <
>> >> > > > andrew.purt...@gmail.com
>> >> > > > > > >wrote:
>> >> > > > > >
>> >> > > > > > > I will sink this RC and roll a new one tomorrow.
>> >> > > > > > >
>> >> > > > > > > However, I may very well release the next RC even if I am
>> the
>> >> > only
>> >> > > +1
>> >> > > > > > vote
>> >> > > > > > > and testing it causes your workstation to catch fire. So
>> >> please
>> >> > > take
>> >> > > > > the
>> >> > > > > > > time to commit whatever you feel is needed to the 0.98
>> branch
>> >> or
>> >> > > file
>> >> > > > > > > blockers against 0.98.1 in the next 24

Re: [VOTE] The 4th HBase 0.98.1 release candidate (RC3) is available for download

2014-04-04 Thread Fabien LE GALLO
What about 0.96.2 ? According to JIRA, it was supposed to be released
yesterday.
I want to apply HBASE-10850 patch to a stable release but it cannot be
applied to 0.96.1.



On Fri, Apr 4, 2014 at 8:30 AM, Andrew Purtell  wrote:

> (cc dev@)
>
>
> On Fri, Apr 4, 2014 at 8:29 AM, Andrew Purtell 
> wrote:
>
> > Thank you, the release of 0.98.1 will happen on time unless there is a
> new
> > development.
> >
> >
> > On Fri, Apr 4, 2014 at 4:23 AM, ramkrishna vasudevan <
> > ramkrishna.s.vasude...@gmail.com> wrote:
> >
> >> +1 on getting this RC3 out as the release and targetting the bug for
> >> 0.98.2.
> >>
> >> Regards
> >> Ram
> >>
> >>
> >> On Fri, Apr 4, 2014 at 7:49 AM, Anoop John 
> wrote:
> >>
> >> > >Phoenix 4.0 has no release it can currently run on
> >> > >Can't we get these additional bugs in 0.98.2 - it's one month away
> >> >
> >> > I was thinking that for Phoenix 4.0 *release* the 98.1 is needed..
> >>  Thats
> >> > why was in favor of correcting the bug in 98.1 itself..  Ya 98.2 can
> >> come
> >> > out in a month time and at that time 4.0 can upgrade to that..  Sounds
> >> > good.. I am ready to again cast my +1 for this RC.
> >> >
> >> >
> >> > >@Anoop - would you mind verifying whether or not
> >> > the TestSCVFWithMiniCluster written as a Phoenix query returns the
> >> correct
> >> > results?
> >> >
> >> > I will check this James..  I think it might be there.  Any way, even
> if
> >> the
> >> > bug is there, there can be a work around solution in Phoenix filter
> code
> >> > which I can try out  (If you would like to get)
> >> >
> >> > -Anoop-
> >> >
> >> > On Fri, Apr 4, 2014 at 1:23 AM, Ted Yu  wrote:
> >> >
> >> > > That is a feasible option.
> >> > >
> >> > > I have changed Fix Version of HBASE-10850 to 0.98.2
> >> > >
> >> > > Cheers
> >> > >
> >> > >
> >> > > On Thu, Apr 3, 2014 at 12:16 PM, lars hofhansl 
> >> wrote:
> >> > >
> >> > > > To be fair, Phoenix should not have relied on an unreleased
> >> dependency.
> >> > > (I
> >> > > > know there are corporate timing issues, but they really should not
> >> > force
> >> > > us
> >> > > > into situations like these).
> >> > > >
> >> > > > As far as I understand the issue, it not just a performance but
> can
> >> > lead
> >> > > > to incorrect results.
> >> > > >
> >> > > > Then again, this issue has existed in all of 0.96 and 0.98 so far
> >> > (over 5
> >> > > > months).
> >> > > >
> >> > > > So, I'd be in favor of releasing 0.98.1 now, and doing 0.98.2
> soon,
> >> in
> >> > 14
> >> > > > or 20 days (that would also pull back some of the time lost in the
> >> > > 0.98.1RC
> >> > > > cycle).
> >> > > >
> >> > > > -- Lars
> >> > > >
> >> > > >
> >> > > >
> >> > > > 
> >> > > >  From: James Taylor 
> >> > > > To: "u...@hbase.apache.org" 
> >> > > > Cc: "dev@hbase.apache.org" 
> >> > > > Sent: Thursday, April 3, 2014 8:57 AM
> >> > > > Subject: Re: [VOTE] The 4th HBase 0.98.1 release candidate (RC3)
> is
> >> > > > available for download
> >> > > >
> >> > > >
> >> > > > I implore you to stick with releasing RC3. Phoenix 4.0 has no
> >> release
> >> > it
> >> > > > can currently run on. Phoenix doesn't use SingleColumnValueFilter,
> >> so
> >> > it
> >> > > > seems that HBASE-10850 has no impact wrt Phoenix. Can't we get
> these
> >> > > > additional bugs in 0.98.2 - it's one month away [1]?
> >> > > >
> >> > > > James
> >> > > >
> >> > > > [1] http://en.wikipedia.org/wiki/The_Mythical_Man-Month
> >> > > >
> >> > > >
> >> > > >
> >> > > > On Thu, Apr 3, 2014 at 3:34 AM, ramkrishna vasudevan <
> >> > > > ramkrishna.s.vasude...@gmail.com> wrote:
> >> > > >
> >> > > > > Will target HBASE-10899 also then by that time.
> >> > > > >
> >> > > > > Regards
> >> > > > > Ram
> >> > > > >
> >> > > > >
> >> > > > > On Thu, Apr 3, 2014 at 3:47 PM, Ted Yu 
> >> wrote:
> >> > > > >
> >> > > > > > Understood, Andy.
> >> > > > > >
> >> > > > > > I have integrated fix for HBASE-10850 to 0.98
> >> > > > > >
> >> > > > > > Cheers
> >> > > > > >
> >> > > > > >
> >> > > > > > On Thu, Apr 3, 2014 at 3:00 AM, Andrew Purtell <
> >> > > > andrew.purt...@gmail.com
> >> > > > > > >wrote:
> >> > > > > >
> >> > > > > > > I will sink this RC and roll a new one tomorrow.
> >> > > > > > >
> >> > > > > > > However, I may very well release the next RC even if I am
> the
> >> > only
> >> > > +1
> >> > > > > > vote
> >> > > > > > > and testing it causes your workstation to catch fire. So
> >> please
> >> > > take
> >> > > > > the
> >> > > > > > > time to commit whatever you feel is needed to the 0.98
> branch
> >> or
> >> > > file
> >> > > > > > > blockers against 0.98.1 in the next 24 hours. This is it for
> >> > > 0.98.1.
> >> > > > > > >  0.98.2 will happen a mere 30 days from the 0.98.1 release.
> >> > > > > > >
> >> > > > > > > > On Apr 3, 2014, at 11:21 AM, Ted Yu 
> >> > wrote:
> >> > > > > > > >
> >> > > > > > > > I agree with Anoop's assessment.
> >> > > > > > > >
> >> > > > > > > > Cheers
> >> > > > > > > >
> >> > > > > > > >> On 

[jira] [Created] (HBASE-10910) [89-fb] Change get(List) to batchGet(List)

2014-04-04 Thread Adela Maznikar (JIRA)
Adela Maznikar created HBASE-10910:
--

 Summary: [89-fb] Change get(List) to batchGet(List)
 Key: HBASE-10910
 URL: https://issues.apache.org/jira/browse/HBASE-10910
 Project: HBase
  Issue Type: Improvement
  Components: Client
Affects Versions: 0.89-fb
Reporter: Adela Maznikar
 Fix For: 0.89-fb


batchGet(List) is more performant since it splits the list of Gets on 
regionserver level, and get(List) does that on region level. 
If we have a list of gets for regions on a same regionserver, get(List) 
will do #regions rpc calls and batchGet(List) will do just one rpc call. 

Changing HTable.get(List) to internally call HTable.batchGet(List)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (HBASE-10911) ServerShutdownHandler#toString shows meaningless message

2014-04-04 Thread Jimmy Xiang (JIRA)
Jimmy Xiang created HBASE-10911:
---

 Summary: ServerShutdownHandler#toString shows meaningless message
 Key: HBASE-10911
 URL: https://issues.apache.org/jira/browse/HBASE-10911
 Project: HBase
  Issue Type: Improvement
  Components: master
Reporter: Jimmy Xiang
Assignee: Jimmy Xiang
Priority: Minor


SSH#toString returns the master server name, which is not so interesting. It's 
better to show the dead server's name instead.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (HBASE-10912) setUp / tearDown in TestSCVFWithMiniCluster should be done once per run

2014-04-04 Thread Ted Yu (JIRA)
Ted Yu created HBASE-10912:
--

 Summary: setUp / tearDown in TestSCVFWithMiniCluster should be 
done once per run
 Key: HBASE-10912
 URL: https://issues.apache.org/jira/browse/HBASE-10912
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
Priority: Minor


setUp / tearDown should be annotated with @BeforeClass and @AfterClass, 
respectively.

On my Mac, the runtime for this test went from 19 seconds to 9 seconds:
{code}
Running org.apache.hadoop.hbase.regionserver.TestSCVFWithMiniCluster
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.302 sec
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Reopened] (HBASE-10886) add htrace-zipkin to the runtime dependencies again

2014-04-04 Thread stack (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-10886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stack reopened HBASE-10886:
---


> add htrace-zipkin to the runtime dependencies again
> ---
>
> Key: HBASE-10886
> URL: https://issues.apache.org/jira/browse/HBASE-10886
> Project: HBase
>  Issue Type: Improvement
>  Components: build, documentation
>Reporter: Masatake Iwasaki
>Assignee: Masatake Iwasaki
>Priority: Minor
> Fix For: 0.99.0
>
> Attachments: HBASE-10886-0.patch, HBASE-10886-1.patch
>
>
> Once htrace-zipkin was removed from depencencies in HBASE-9700. Because all 
> of the depencencies of htrace-zipkin is bundled with HBase now, it is good to 
> add it for the ease of use.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (HBASE-10913) Print exception of why a copy failed during ExportSnapshot

2014-04-04 Thread Harsh J (JIRA)
Harsh J created HBASE-10913:
---

 Summary: Print exception of why a copy failed during ExportSnapshot
 Key: HBASE-10913
 URL: https://issues.apache.org/jira/browse/HBASE-10913
 Project: HBase
  Issue Type: Bug
  Components: snapshots
Affects Versions: 0.96.0
Reporter: Harsh J
Assignee: Harsh J
Priority: Minor


Currently we print a vague "Failed to copy the snapshot directory from X to Y" 
whenever X pre-exists on Y. Users have to figure this out by themselves.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (HBASE-10914) Improve the snapshot directory local copy during ExportSnapshot

2014-04-04 Thread Harsh J (JIRA)
Harsh J created HBASE-10914:
---

 Summary: Improve the snapshot directory local copy during 
ExportSnapshot
 Key: HBASE-10914
 URL: https://issues.apache.org/jira/browse/HBASE-10914
 Project: HBase
  Issue Type: Bug
  Components: snapshots
Affects Versions: 0.96.0
Reporter: Harsh J
Priority: Minor


For tables with a lot of regions, the ExportSnapshot appears to "hang" without 
progress cause it copies the .snapshot directory (which has tiny, 
reference/reference-like files I assume) and does not report its state. Would 
be good if it dumped its state for like say, every 50 files it copies.

This operation is also sequential, so takes a lot of time, and can be improved 
to do 5-10 threads at a time in parallel perhaps, since the actual writes are 
tiny (i.e. data transfer is no concern) and its mostly just NN interaction 
that's needed here.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (HBASE-10913) Print exception of why a copy failed during ExportSnapshot

2014-04-04 Thread Harsh J (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-10913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Harsh J resolved HBASE-10913.
-

Resolution: Duplicate

A day too lateā€¦ :-)

Resolving as dupe of HBASE-10622

> Print exception of why a copy failed during ExportSnapshot
> --
>
> Key: HBASE-10913
> URL: https://issues.apache.org/jira/browse/HBASE-10913
> Project: HBase
>  Issue Type: Bug
>  Components: snapshots
>Affects Versions: 0.96.0
>Reporter: Harsh J
>Assignee: Harsh J
>Priority: Minor
>
> Currently we print a vague "Failed to copy the snapshot directory from X to 
> Y" whenever X pre-exists on Y. Users have to figure this out by themselves.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


blockcache 101

2014-04-04 Thread Stack
Nick:

+ You measure 99th percentile.  Did you take measure of average/mean
response times doing your blockcache comparison?  (Our LarsHofhansl had it
that that on average reads out of bucket cache were a good bit slower).  Or
is this a TODO?
+ We should just remove slabcache because bucket cache is consistently
better and why have two means of doing same thing?  Or, do you need more
proof bucketcache subsumes slabcache?

Thanks boss,
St.Ack


Re: blockcache 101

2014-04-04 Thread Stack
Pardon, my questions are around Nick's blog on blockcache in case folks are
confused: http://www.n10k.com/blog/blockcache-101/
St.Ack


On Fri, Apr 4, 2014 at 9:22 PM, Stack  wrote:

> Nick:
>
> + You measure 99th percentile.  Did you take measure of average/mean
> response times doing your blockcache comparison?  (Our LarsHofhansl had it
> that that on average reads out of bucket cache were a good bit slower).  Or
> is this a TODO?
> + We should just remove slabcache because bucket cache is consistently
> better and why have two means of doing same thing?  Or, do you need more
> proof bucketcache subsumes slabcache?
>
> Thanks boss,
> St.Ack
>
>