Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 226E4200BC3 for ; Fri, 18 Nov 2016 17:48:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2127F160B1C; Fri, 18 Nov 2016 16:48:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 71E3C160B04 for ; Fri, 18 Nov 2016 17:48:00 +0100 (CET) Received: (qmail 96648 invoked by uid 500); 18 Nov 2016 16:47:59 -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 96618 invoked by uid 99); 18 Nov 2016 16:47:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2016 16:47:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 344082C4C70 for ; Fri, 18 Nov 2016 16:47:59 +0000 (UTC) Date: Fri, 18 Nov 2016 16:47:59 +0000 (UTC) From: "Mikhail Zvagelsky (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-16935) Java API method Admin.deleteColumn(table, columnFamily) doesn't delete family's StoreFile from file system. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 18 Nov 2016 16:48:01 -0000 [ https://issues.apache.org/jira/browse/HBASE-16935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mikhail Zvagelsky updated HBASE-16935: -------------------------------------- Issue Type: New Feature (was: Bug) > Java API method Admin.deleteColumn(table, columnFamily) doesn't delete family's StoreFile from file system. > ----------------------------------------------------------------------------------------------------------- > > Key: HBASE-16935 > URL: https://issues.apache.org/jira/browse/HBASE-16935 > Project: HBase > Issue Type: New Feature > Components: Admin > Affects Versions: 1.2.3 > Reporter: Mikhail Zvagelsky > Priority: Trivial > Attachments: Selection_008.png > > > The method deleteColumn(TableName tableName, byte[] columnName) of the class org.apache.hadoop.hbase.client.Admin shoud delete specified column family from specified table. (Despite of its name the method removes the family, not a column - view the [issue| https://issues.apache.org/jira/browse/HBASE-1989].) > This method changes the table's schema, but it doesn't delete column family's Store File from a file system. To be precise - I run this code: > {code:|borderStyle=solid} > import java.io.IOException; > import org.apache.hadoop.conf.Configuration; > import org.apache.hadoop.hbase.HBaseConfiguration; > import org.apache.hadoop.hbase.HColumnDescriptor; > import org.apache.hadoop.hbase.HTableDescriptor; > import org.apache.hadoop.hbase.TableName; > import org.apache.hadoop.hbase.client.*; > import org.apache.hadoop.hbase.util.Bytes; > public class ToHBaseIssueTracker { > public static void main(String[] args) throws IOException { > TableName tableName = TableName.valueOf("test_table"); > HTableDescriptor desc = new HTableDescriptor(tableName); > desc.addFamily(new HColumnDescriptor("cf1")); > desc.addFamily(new HColumnDescriptor("cf2")); > Configuration conf = HBaseConfiguration.create(); > Connection connection = ConnectionFactory.createConnection(conf); > Admin admin = connection.getAdmin(); > admin.createTable(desc); > HTable table = new HTable(conf, "test_table"); > for (int i = 0; i < 4; i++) { > Put put = new Put(Bytes.toBytes(i)); // Use i as row key. > put.addColumn(Bytes.toBytes("cf1"), Bytes.toBytes("a"), Bytes.toBytes("value")); > put.addColumn(Bytes.toBytes("cf2"), Bytes.toBytes("a"), Bytes.toBytes("value")); > table.put(put); > } > admin.deleteColumn(tableName, Bytes.toBytes("cf2")); > admin.majorCompact(tableName); > admin.close(); > } > } > {code} > Then I see that the store file for the "cf2" family persists in file system. > I observe this effect in standalone hbase installation and in pseudo-distributed mode. -- This message was sent by Atlassian JIRA (v6.3.4#6332)