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 A3E2C8381 for ; Tue, 16 Aug 2011 18:36:51 +0000 (UTC) Received: (qmail 74943 invoked by uid 500); 16 Aug 2011 18:36:51 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 74894 invoked by uid 500); 16 Aug 2011 18:36:50 -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 74886 invoked by uid 99); 16 Aug 2011 18:36:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 18:36:50 +0000 X-ASF-Spam-Status: No, hits=-2001.1 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 18:36:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4764ABFCAA for ; Tue, 16 Aug 2011 18:36:27 +0000 (UTC) Date: Tue, 16 Aug 2011 18:36:27 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: <210660050.42203.1313519787288.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1368323545.14765.1312725867159.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4175) Fix FSUtils.createTableDescriptor() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-4175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085892#comment-13085892 ] stack commented on HBASE-4175: ------------------------------ Patch looks generally good to me. You might fix some javadoc if you make another patch version and add doc'ing of the new boolean return. In future, you might add override that doesn't take the boolean which defaults to 'false' then you would have had less code to change. Good stuff Ram. > Fix FSUtils.createTableDescriptor() > ----------------------------------- > > Key: HBASE-4175 > URL: https://issues.apache.org/jira/browse/HBASE-4175 > Project: HBase > Issue Type: Bug > Affects Versions: 0.92.0 > Reporter: Ted Yu > Assignee: ramkrishna.s.vasudevan > Attachments: HBASE-4175.patch, HBASE-4175_1.patch > > > Currently createTableDescriptor() doesn't return anything. > The caller wouldn't know whether the descriptor is created or not. See exception handling: > {code} > } catch(IOException ioe) { > LOG.info("IOException while trying to create tableInfo in HDFS", ioe); > } > {code} > We should return a boolean. > If the table descriptor exists already, maybe we should deserialize from hdfs and compare with htableDescriptor argument. If they differ, I am not sure what the proper action would be. > Maybe we can add a boolean argument, force, to createTableDescriptor(). When force is true, existing table descriptor would be overwritten. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira