[jira] [Updated] (HBASE-5761) [Thrift2] TDelete.deleteType defaults to TDeleteType.DELETE_COLUMNS, but the docs suggest otherwise

2012-04-10 Thread Wouter Bolsterlee (Updated) (JIRA)

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

Wouter Bolsterlee updated HBASE-5761:
-

Description: 
It seems to me there is an inconsistency (or error) in the Thrift2 {{TDelete}} 
struct and its documentation. The docs for the {{TDelete}} struct state:

{quote}
If no timestamp is specified the most recent version will be deleted.  To 
delete all previous versions, specify the DELETE_COLUMNS TDeleteType.
{quote}

...which implies that the default is {{TDeleteType.DELETE_COLUMN}} (singular), 
not {{TDeleteType.DELETE_COLUMNS}} (plural).

However, the {{deleteType}} field in the {{TDelete}} struct defaults to the 
value {{1}}, which is {{TDeleteType.DELETE_COLUMNS}} (plural) in 
{{/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift}}. The field 
is currently (r1239241) defined as follows:

{{4: optional TDeleteType deleteType = 1,}}

I'd suggest that the default for this optional field is changed to 
{{TDeleteType.DELETE_COLUMN}} (singular). The line above from the {{TDelete}} 
struct would then become:

{{4: optional TDeleteType deleteType = 0,}}

Since this change just involves changing a {{1}} into a {{0}}, I'll leave the 
trivial patch to someone who can also commit it in one go. Thanks in advance. :)

  was:
It seems to me there is an inconsistency (or error) in the Thrift2 {{TDelete}} 
struct and its documentation. The docs for the {{TDelete}} struct state:

{quote}
If no timestamp is specified the most recent version will be deleted.  To 
delete all previous versions, specify the DELETE_COLUMNS TDeleteType.
{quote}

...which implies that the default is {{TDeleteType.DELETE_COLUMN}} (singular), 
not {{TDeleteType.DELETE_COLUMNS}} (plural).

However, the {{deleteType}} field in the {{TDelete}} struct defaults to the 
value {{1}}, which is {{TDeleteType.DELETE_COLUMNS}} (plural) in 
{{/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift}}. The field 
is currently (r1239241) defined as follows:

{{  4: optional TDeleteType deleteType = 1,}}

I'd suggest that the default for this optional field is changed to 
{{TDeleteType.DELETE_COLUMN}} (singular). The line above from the {{TDelete}} 
struct would then become:

{{  4: optional TDeleteType deleteType = 0,}}

Since this change just involves changing a {{1}} into a {{0}}, I'll leave the 
trivial patch to someone who can also commit it in one go. Thanks in advance. :)


 [Thrift2] TDelete.deleteType defaults to TDeleteType.DELETE_COLUMNS, but the 
 docs suggest otherwise
 ---

 Key: HBASE-5761
 URL: https://issues.apache.org/jira/browse/HBASE-5761
 Project: HBase
  Issue Type: Bug
Reporter: Wouter Bolsterlee

 It seems to me there is an inconsistency (or error) in the Thrift2 
 {{TDelete}} struct and its documentation. The docs for the {{TDelete}} struct 
 state:
 {quote}
 If no timestamp is specified the most recent version will be deleted.  To 
 delete all previous versions, specify the DELETE_COLUMNS TDeleteType.
 {quote}
 ...which implies that the default is {{TDeleteType.DELETE_COLUMN}} 
 (singular), not {{TDeleteType.DELETE_COLUMNS}} (plural).
 However, the {{deleteType}} field in the {{TDelete}} struct defaults to the 
 value {{1}}, which is {{TDeleteType.DELETE_COLUMNS}} (plural) in 
 {{/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift}}. The 
 field is currently (r1239241) defined as follows:
 {{4: optional TDeleteType deleteType = 1,}}
 I'd suggest that the default for this optional field is changed to 
 {{TDeleteType.DELETE_COLUMN}} (singular). The line above from the {{TDelete}} 
 struct would then become:
 {{4: optional TDeleteType deleteType = 0,}}
 Since this change just involves changing a {{1}} into a {{0}}, I'll leave the 
 trivial patch to someone who can also commit it in one go. Thanks in advance. 
 :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HBASE-5694) getRowsWithColumnsTs function Thrift service incorrectly handles time range

2012-04-02 Thread Wouter Bolsterlee (Updated) (JIRA)

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

Wouter Bolsterlee updated HBASE-5694:
-

Status: Open  (was: Patch Available)

 getRowsWithColumnsTs function Thrift service incorrectly handles time range
 ---

 Key: HBASE-5694
 URL: https://issues.apache.org/jira/browse/HBASE-5694
 Project: HBase
  Issue Type: Bug
  Components: thrift
Affects Versions: 0.92.1
Reporter: Wouter Bolsterlee
 Fix For: 0.92.2

 Attachments: HBASE-5694.patch


 The getRowsWithColumnsTs() method in the Thrift interface only applies the 
 timestamp if columns are explicitly specified. However, this method also 
 allows for columns to be unspecified (this is even used internally to 
 implement e.g. getRows()). The cause of the bug is a minor scoping issue: the 
 time range is set inside a wrong if statement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HBASE-5694) getRowsWithColumnsTs() in Thrift service handles timestamps incorrectly

2012-04-02 Thread Wouter Bolsterlee (Updated) (JIRA)

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

Wouter Bolsterlee updated HBASE-5694:
-

Attachment: HBASE-5694-trunk-20120402.patch

Patch against SVN trunk as of today. It's a one-liner that moves the 
setTimeRange() call outside the if (columns != null) block.

 getRowsWithColumnsTs() in Thrift service handles timestamps incorrectly
 ---

 Key: HBASE-5694
 URL: https://issues.apache.org/jira/browse/HBASE-5694
 Project: HBase
  Issue Type: Bug
  Components: thrift
Affects Versions: 0.92.1
Reporter: Wouter Bolsterlee
 Fix For: 0.92.2

 Attachments: HBASE-5694-trunk-20120402.patch, HBASE-5694.patch


 The getRowsWithColumnsTs() method in the Thrift interface only applies the 
 timestamp if columns are explicitly specified. However, this method also 
 allows for columns to be unspecified (this is even used internally to 
 implement e.g. getRows()). The cause of the bug is a minor scoping issue: the 
 time range is set inside a wrong if statement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HBASE-5694) getRowsWithColumnsTs() in Thrift service handles timestamps incorrectly

2012-04-02 Thread Wouter Bolsterlee (Updated) (JIRA)

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

Wouter Bolsterlee updated HBASE-5694:
-

Summary: getRowsWithColumnsTs() in Thrift service handles timestamps 
incorrectly  (was: getRowsWithColumnsTs function Thrift service incorrectly 
handles time range)

 getRowsWithColumnsTs() in Thrift service handles timestamps incorrectly
 ---

 Key: HBASE-5694
 URL: https://issues.apache.org/jira/browse/HBASE-5694
 Project: HBase
  Issue Type: Bug
  Components: thrift
Affects Versions: 0.92.1
Reporter: Wouter Bolsterlee
 Fix For: 0.92.2

 Attachments: HBASE-5694-trunk-20120402.patch, HBASE-5694.patch


 The getRowsWithColumnsTs() method in the Thrift interface only applies the 
 timestamp if columns are explicitly specified. However, this method also 
 allows for columns to be unspecified (this is even used internally to 
 implement e.g. getRows()). The cause of the bug is a minor scoping issue: the 
 time range is set inside a wrong if statement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HBASE-5694) getRowsWithColumnsTs function Thrift service incorrectly handles time range

2012-04-01 Thread Wouter Bolsterlee (Updated) (JIRA)

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

Wouter Bolsterlee updated HBASE-5694:
-

Status: Patch Available  (was: Open)

Trivial patch to fix the reported issue.

 getRowsWithColumnsTs function Thrift service incorrectly handles time range
 ---

 Key: HBASE-5694
 URL: https://issues.apache.org/jira/browse/HBASE-5694
 Project: HBase
  Issue Type: Bug
  Components: thrift
Affects Versions: 0.92.1
Reporter: Wouter Bolsterlee
 Fix For: 0.92.2


 The getRowsWithColumnsTs() method in the Thrift interface only applies the 
 timestamp if columns are explicitly specified. However, this method also 
 allows for columns to be unspecified (this is even used internally to 
 implement e.g. getRows()). The cause of the bug is a minor scoping issue: the 
 time range is set inside a wrong if statement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HBASE-5694) getRowsWithColumnsTs function Thrift service incorrectly handles time range

2012-04-01 Thread Wouter Bolsterlee (Updated) (JIRA)

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

Wouter Bolsterlee updated HBASE-5694:
-

Attachment: HBASE-5694.patch

Okay, here's the patch. For some reason it works in Firefox, but not in 
Epiphany.

Explanation for the patch: set time range regardless of column specification, 
making the time range actually work when no columns are specified.

 getRowsWithColumnsTs function Thrift service incorrectly handles time range
 ---

 Key: HBASE-5694
 URL: https://issues.apache.org/jira/browse/HBASE-5694
 Project: HBase
  Issue Type: Bug
  Components: thrift
Affects Versions: 0.92.1
Reporter: Wouter Bolsterlee
 Fix For: 0.92.2

 Attachments: HBASE-5694.patch


 The getRowsWithColumnsTs() method in the Thrift interface only applies the 
 timestamp if columns are explicitly specified. However, this method also 
 allows for columns to be unspecified (this is even used internally to 
 implement e.g. getRows()). The cause of the bug is a minor scoping issue: the 
 time range is set inside a wrong if statement.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira