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 9384F10B5E for ; Thu, 20 Feb 2014 01:03:29 +0000 (UTC) Received: (qmail 40929 invoked by uid 500); 20 Feb 2014 01:03:21 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 40875 invoked by uid 500); 20 Feb 2014 01:03:20 -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 40864 invoked by uid 99); 20 Feb 2014 01:03:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Feb 2014 01:03:20 +0000 Date: Thu, 20 Feb 2014 01:03:20 +0000 (UTC) From: "Andrew Purtell (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-10571) TTL of zero should be rejected 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-10571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13906403#comment-13906403 ] Andrew Purtell commented on HBASE-10571: ---------------------------------------- bq. Looking at HColumnDescriptor, it's a bit of a mess. We check some of the parameters, but not all, and on top of that only in a constructor that marked deprecated in favor of using setters, which in turn do no validation. This is my point. The scope of the issue is bigger than just TTL. > TTL of zero should be rejected > ------------------------------ > > Key: HBASE-10571 > URL: https://issues.apache.org/jira/browse/HBASE-10571 > Project: HBase > Issue Type: Bug > Components: Admin > Affects Versions: 0.94.16, 0.96.1.1 > Reporter: Jeremy Carroll > > If a table schema has been modified to provide a default TTL, or a TTL on a column of 0, then HBase basically becomes a very costly way to send your data to /dev/null. > I'm proposing that we reject outright any attempt to set a TTL on a default table schema, or column of a value of zero. I cannot think of a use case where individuals would want to delete their keys as soon as they are written to the memstore. In addition, this will protect against any bugs in code, or documentation errors which would result in irrecoverable data loss. > Example: > hbase(main):001:0> create 'test_table', { NAME => 'd', TTL => 0 } > 0 row(s) in 1.7880 seconds > hbase(main):003:0> put 'test_table', 'row1', 'd', '1' > 0 row(s) in 0.1300 seconds > hbase(main):004:0> scan 'test_table' > ROW COLUMN+CELL > 0 row(s) in 0.0320 seconds -- This message was sent by Atlassian JIRA (v6.1.5#6160)