Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DBAB17F80 for ; Mon, 30 Mar 2015 21:50:00 +0000 (UTC) Received: (qmail 57087 invoked by uid 500); 30 Mar 2015 21:49:53 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 57039 invoked by uid 500); 30 Mar 2015 21:49:53 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 57027 invoked by uid 99); 30 Mar 2015 21:49:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2015 21:49:53 +0000 Date: Mon, 30 Mar 2015 21:49:53 +0000 (UTC) From: "Enis Soztutar (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-5761) [Thrift2] TDelete.deleteType defaults to TDeleteType.DELETE_COLUMNS, but the docs suggest otherwise MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-5761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14387485#comment-14387485 ] Enis Soztutar commented on HBASE-5761: -------------------------------------- Agreed with changing the documentation rather than default behavior. [~uws] mind putting up a patch? > [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 > Components: documentation > Reporter: Wouter Bolsterlee > Priority: Trivial > Labels: beginner > Fix For: 2.0.0, 1.1.0, 1.0.2 > > > 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 was sent by Atlassian JIRA (v6.3.4#6332)