Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C74B4FA36 for ; Tue, 6 Aug 2013 09:57:33 +0000 (UTC) Received: (qmail 35778 invoked by uid 500); 6 Aug 2013 09:57:29 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 35730 invoked by uid 500); 6 Aug 2013 09:57:28 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 35549 invoked by uid 99); 6 Aug 2013 09:57:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Aug 2013 09:57:24 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of liushaohui@xiaomi.com designates 58.68.235.87 as permitted sender) Received: from [58.68.235.87] (HELO mx1.mxmail.xiaomi.com) (58.68.235.87) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Aug 2013 09:57:17 +0000 Received: from mail.xiaomi.com (unknown [114.255.3.132]) by mx1.mxmail.xiaomi.com (Postfix) with ESMTP id 4396380B3D for ; Tue, 6 Aug 2013 17:56:55 +0800 (CST) Received: from [10.237.101.11] (10.237.101.11) by EX-CAS1.xiaomi.net (10.237.8.100) with Microsoft SMTP Server id 14.3.123.3; Tue, 6 Aug 2013 17:54:02 +0800 Message-ID: <5200C86A.8080908@xiaomi.com> Date: Tue, 6 Aug 2013 17:56:58 +0800 From: liushaohui User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Subject: Re: how to clean all data in hbase table without truncate References: <51FF8C63.6010609@xiaomi.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.237.101.11] X-Virus-Checked: Checked by ClamAV on apache.org Thanks, Jean-Marc. There is truncate_preserve in HBASE-5525. But it drops the acls info. I will try to impl truncate_preserver_acl by add a new api in hmaster. HBASE-8332 discussed this problem, too. But no implement. On 08/05/2013 08:03 PM, Jean-Marc Spaggiari wrote: > truncate_preserve (from shell) will still do the disable, but it will not > drop the regions split. Can you try and see if it keep he ACLs too? If not, > might be a good idea to do something like "truncate_preserve_acl" too... > > JM > > 2013/8/5 liushaohui > >> hi all: >> >> In our shared secure hbase cluster, users often wants to clean all >> tested data in their tables. Currently, hbase supports the >> >> truncate method , but its impl is based on disable table-> delete table -> >> create table. >> >> There are two drawbacks in this impl. >> >> 1, Region split info. Truncate creates a new table with just a region. It >> loses the region split info, which is not suitable for pre-split tables. >> >> 2, Table ACLs. In the deletion of table, the tables' acls will be deleted >> too. So every truncate need to be operated by hbase admin. >> >> >> Is there any other effective method to clean all data of a table? >> >> What about implement a real truncate method in hmaster which keeps region >> split info and table acls? >> >> Thanks >> >> >> - liushaohui >> >> >> >> >>