[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-10-28 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---
Status: Open  (was: Patch Available)

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
  Components: Filters
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt, 
 10965-v6.txt, 10965-v7.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
 {code}
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 {code}
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 Another limitation is that we cannot optimize FilterList#filterRow() through 
 short circuit when FilterList#hasFilterRow() turns false.
 See 
 https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). For FilterBase-derived classes, if 
 filterRow() is implemented and not inherited from FilterBase, it is 
 equivalent to having hasFilterRow() return true.
 With precise detection of presence of Filter#filterRow(), the following code 
 from HRegion is no longer needed while backward compatibility is kept.
 {code}
   return filter != null  (!filter.hasFilterRow())
filter.filterRow();
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-05-06 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Description: 
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

Downside to purely depending on hasFilterRow() telling us whether custom filter 
overrides filterRow(List) or filterRow() is that the check below may be 
rendered ineffective:
{code}
  if (nextKv == KV_LIMIT) {
if (this.filter != null  filter.hasFilterRow()) {
  throw new IncompatibleFilterException(
Filter whose hasFilterRow() returns true is incompatible with 
scan with limit!);
}
{code}
When user forgets to override hasFilterRow(), the above check becomes not 
useful.

Another limitation is that we cannot optimize FilterList#filterRow() through 
short circuit when FilterList#hasFilterRow() turns false.
See 
https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). For FilterBase-derived classes, if 
filterRow() is implemented and not inherited from FilterBase, it is equivalent 
to having hasFilterRow() return true.

Henceforth, 
{code}
  return filter != null  (!filter.hasFilterRow())
   filter.filterRow();
{code}

  was:
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

Downside to purely depending on hasFilterRow() telling us whether custom filter 
overrides filterRow(List) or filterRow() is that the check below may be 
rendered ineffective:
{code}
  if (nextKv == KV_LIMIT) {
if (this.filter != null  filter.hasFilterRow()) {
  throw new IncompatibleFilterException(
Filter whose hasFilterRow() returns true is incompatible with 
scan with limit!);
}
{code}
When user forgets to override hasFilterRow(), the above check becomes not 
useful.

Another limitation is that we cannot optimize FilterList#filterRow() through 
short circuit when FilterList#hasFilterRow() turns false.
See 
https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). If filterRow() is implemented and 
not inherited from FilterBase, it is equivalent to having hasFilterRow() return 
true.


 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
  Components: Filters
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt, 
 10965-v6.txt, 10965-v7.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
 {code}
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 {code}
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 Another limitation is that we cannot optimize FilterList#filterRow() through 
 short circuit when FilterList#hasFilterRow() turns false.
 See 
 https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). For FilterBase-derived classes, if 
 filterRow() is implemented and not inherited from FilterBase, it is 
 equivalent to having hasFilterRow() return true.
 Henceforth, 
 {code}
   return filter != null  (!filter.hasFilterRow())
filter.filterRow();

[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-05-06 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Description: 
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

Downside to purely depending on hasFilterRow() telling us whether custom filter 
overrides filterRow(List) or filterRow() is that the check below may be 
rendered ineffective:
{code}
  if (nextKv == KV_LIMIT) {
if (this.filter != null  filter.hasFilterRow()) {
  throw new IncompatibleFilterException(
Filter whose hasFilterRow() returns true is incompatible with 
scan with limit!);
}
{code}
When user forgets to override hasFilterRow(), the above check becomes not 
useful.

Another limitation is that we cannot optimize FilterList#filterRow() through 
short circuit when FilterList#hasFilterRow() turns false.
See 
https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). For FilterBase-derived classes, if 
filterRow() is implemented and not inherited from FilterBase, it is equivalent 
to having hasFilterRow() return true.

With precise detection of presence of Filter#filterRow(), the following code 
from HRegion is no longer needed while backward compatibility is kept.
{code}
  return filter != null  (!filter.hasFilterRow())
   filter.filterRow();
{code}

  was:
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

Downside to purely depending on hasFilterRow() telling us whether custom filter 
overrides filterRow(List) or filterRow() is that the check below may be 
rendered ineffective:
{code}
  if (nextKv == KV_LIMIT) {
if (this.filter != null  filter.hasFilterRow()) {
  throw new IncompatibleFilterException(
Filter whose hasFilterRow() returns true is incompatible with 
scan with limit!);
}
{code}
When user forgets to override hasFilterRow(), the above check becomes not 
useful.

Another limitation is that we cannot optimize FilterList#filterRow() through 
short circuit when FilterList#hasFilterRow() turns false.
See 
https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). For FilterBase-derived classes, if 
filterRow() is implemented and not inherited from FilterBase, it is equivalent 
to having hasFilterRow() return true.

Henceforth, 
{code}
  return filter != null  (!filter.hasFilterRow())
   filter.filterRow();
{code}


 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
  Components: Filters
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt, 
 10965-v6.txt, 10965-v7.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
 {code}
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 {code}
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 Another limitation is that we cannot optimize FilterList#filterRow() through 
 short circuit when FilterList#hasFilterRow() turns false.
 See 
 https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden 

[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-05-03 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Attachment: 10965-v7.txt

Patch v7 adds test where a user filter extends Filter directly.

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
  Components: Filters
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt, 
 10965-v6.txt, 10965-v7.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
 {code}
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 {code}
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 Another limitation is that we cannot optimize FilterList#filterRow() through 
 short circuit when FilterList#hasFilterRow() turns false.
 See 
 https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-05-02 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Attachment: 10965-v6.txt

Patch v6 distinguishes the user filters which directly override Filter class 
from those which extend FilterBase.

FilterUtil class is added which contain two helper methods.

All \*Filter\* tests pass.

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
  Components: Filters
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt, 
 10965-v5.txt, 10965-v6.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
 {code}
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 {code}
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 Another limitation is that we cannot optimize FilterList#filterRow() through 
 short circuit when FilterList#hasFilterRow() turns false.
 See 
 https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-05-02 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Attachment: (was: 10965-v5.txt)

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
  Components: Filters
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt, 
 10965-v6.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
 {code}
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 {code}
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 Another limitation is that we cannot optimize FilterList#filterRow() through 
 short circuit when FilterList#hasFilterRow() turns false.
 See 
 https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-05-01 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Description: 
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

Downside to purely depending on hasFilterRow() telling us whether custom filter 
overrides filterRow(List) or filterRow() is that the check below may be 
rendered ineffective:
{code}
  if (nextKv == KV_LIMIT) {
if (this.filter != null  filter.hasFilterRow()) {
  throw new IncompatibleFilterException(
Filter whose hasFilterRow() returns true is incompatible with 
scan with limit!);
}
{code}
When user forgets to override hasFilterRow(), the above check becomes not 
useful.

Another limitation is that we cannot optimize FilterList#filterRow() through 
short circuit when FilterList#hasFilterRow() turns false.
See 
https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). If filterRow() is implemented and 
not inherited from FilterBase, it is equivalent to having hasFilterRow() return 
true.

  was:
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

Downside to purely depending on hasFilterRow() telling us whether custom filter 
overrides filterRow(List) or filterRow() is that the check below may be 
rendered ineffective:
{code}
  if (nextKv == KV_LIMIT) {
if (this.filter != null  filter.hasFilterRow()) {
  throw new IncompatibleFilterException(
Filter whose hasFilterRow() returns true is incompatible with 
scan with limit!);
}
{code}
When user forgets to override hasFilterRow(), the above check becomes not 
useful.

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). If filterRow() is implemented and 
not inherited from FilterBase, it is equivalent to having hasFilterRow() return 
true.


 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
  Components: Filters
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
 {code}
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 {code}
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 Another limitation is that we cannot optimize FilterList#filterRow() through 
 short circuit when FilterList#hasFilterRow() turns false.
 See 
 https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-05-01 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Attachment: 10965-v5.txt

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
  Components: Filters
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt, 
 10965-v5.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
 {code}
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 {code}
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 Another limitation is that we cannot optimize FilterList#filterRow() through 
 short circuit when FilterList#hasFilterRow() turns false.
 See 
 https://issues.apache.org/jira/browse/HBASE-11093?focusedCommentId=13985149page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13985149
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-26 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Component/s: Filters

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
  Components: Filters
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
 {code}
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 {code}
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-16 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Description: 
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

Downside to purely depending on hasFilterRow() telling us whether custom filter 
overrides filterRow(List) or filterRow() is that the check below may be 
rendered ineffective:
{code}
  if (nextKv == KV_LIMIT) {
if (this.filter != null  filter.hasFilterRow()) {
  throw new IncompatibleFilterException(
Filter whose hasFilterRow() returns true is incompatible with 
scan with limit!);
}
{code}
When user forgets to override hasFilterRow(), the above check becomes not 
useful.

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). If filterRow() is implemented and 
not inherited from FilterBase, it is equivalent to having hasFilterRow() return 
true.

  was:
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

Downside to purely depending on hasFilterRow() telling us whether custom filter 
overrides filterRow(List) or filterRow() is that the check below may be 
rendered ineffective:
  if (nextKv == KV_LIMIT) {
if (this.filter != null  filter.hasFilterRow()) {
  throw new IncompatibleFilterException(
Filter whose hasFilterRow() returns true is incompatible with 
scan with limit!);
}
When user forgets to override hasFilterRow(), the above check becomes not 
useful.

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). If filterRow() is implemented and 
not inherited from FilterBase, it is equivalent to having hasFilterRow() return 
true.


 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
 {code}
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 {code}
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-16 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Description: 
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

Downside to purely depending on hasFilterRow() telling us whether custom filter 
overrides filterRow(List) or filterRow() is that the check below may be 
rendered ineffective:
  if (nextKv == KV_LIMIT) {
if (this.filter != null  filter.hasFilterRow()) {
  throw new IncompatibleFilterException(
Filter whose hasFilterRow() returns true is incompatible with 
scan with limit!);
}
When user forgets to override hasFilterRow(), the above check becomes not 
useful.

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). If filterRow() is implemented and 
not inherited from FilterBase, it is equivalent to having hasFilterRow() return 
true.

  was:
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). If filterRow() is implemented and 
not inherited from FilterBase, it is equivalent to having hasFilterRow() return 
true.


 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 Downside to purely depending on hasFilterRow() telling us whether custom 
 filter overrides filterRow(List) or filterRow() is that the check below may 
 be rendered ineffective:
   if (nextKv == KV_LIMIT) {
 if (this.filter != null  filter.hasFilterRow()) {
   throw new IncompatibleFilterException(
 Filter whose hasFilterRow() returns true is incompatible 
 with scan with limit!);
 }
 When user forgets to override hasFilterRow(), the above check becomes not 
 useful.
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-12 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Description: 
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow(). If filterRow() is implemented and 
not inherited from FilterBase, it is equivalent to having hasFilterRow() return 
true.

  was:
There is potential inconsistency between the return value of 
Filter#hasFilterRow() and presence of Filter#filterRow().

Filters may override Filter#filterRow() while leaving return value of 
Filter#hasFilterRow() being false (inherited from FilterBase).

This JIRA aims to remove the inconsistency by automatically detecting the 
presence of overridden Filter#filterRow().


 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-12 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Attachment: 10965-v3.txt

Patch v3 addresses Anoop's comment on FilterList#hasFilterRow()

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-12 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Attachment: 10965-v4.txt

Patch v4 is based on patch v3 and has the following additional change:
{code}
-  if ((isEmptyRow || ret == FilterWrapper.FilterRowRetCode.EXCLUDE) || 
filterRow()) {
+  if ((isEmptyRow || ret == FilterWrapper.FilterRowRetCode.EXCLUDE)) {
{code}
The above is feasible because detection of presence of filterRow() is much more 
reliable now. We don't need to call filterRow twice.

All \*Filter\* tests pass.

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt, 10965-v3.txt, 10965-v4.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow(). If filterRow() is implemented and 
 not inherited from FilterBase, it is equivalent to having hasFilterRow() 
 return true.



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-11 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Status: Patch Available  (was: Open)

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow().



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-11 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Attachment: 10965-v1.txt

Patch v1 uses reflection to detect overridden Filter#filterRow().

I can put isMethodImplemented() in a utility class once the approach passes 
review.

\*Filter\* tests pass.

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow().



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-11 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Attachment: 10965-v1.txt

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow().



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-11 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Attachment: (was: 10965-v1.txt)

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow().



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


[jira] [Updated] (HBASE-10965) Automate detection of presence of Filter#filterRow()

2014-04-11 Thread Ted Yu (JIRA)

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

Ted Yu updated HBASE-10965:
---

Attachment: 10965-v2.txt

Patch v2 adds javadoc for isFilterMethodImplemented().

 Automate detection of presence of Filter#filterRow()
 

 Key: HBASE-10965
 URL: https://issues.apache.org/jira/browse/HBASE-10965
 Project: HBase
  Issue Type: Task
Reporter: Ted Yu
Assignee: Ted Yu
 Attachments: 10965-v1.txt, 10965-v2.txt


 There is potential inconsistency between the return value of 
 Filter#hasFilterRow() and presence of Filter#filterRow().
 Filters may override Filter#filterRow() while leaving return value of 
 Filter#hasFilterRow() being false (inherited from FilterBase).
 This JIRA aims to remove the inconsistency by automatically detecting the 
 presence of overridden Filter#filterRow().



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