Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@locus.apache.org Received: (qmail 53321 invoked from network); 31 Mar 2008 21:48:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Mar 2008 21:48:47 -0000 Received: (qmail 71830 invoked by uid 500); 31 Mar 2008 21:48:47 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 71804 invoked by uid 500); 31 Mar 2008 21:48:47 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 71791 invoked by uid 99); 31 Mar 2008 21:48:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 14:48:47 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 21:48:14 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BD9F2234C0B0 for ; Mon, 31 Mar 2008 14:46:24 -0700 (PDT) Message-ID: <509728145.1206999984775.JavaMail.jira@brutus> Date: Mon, 31 Mar 2008 14:46:24 -0700 (PDT) From: "stack (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Updated: (HBASE-548) Tool to online single region In-Reply-To: <2129401576.1206596844244.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] stack updated HBASE-548: ------------------------ Attachment: 548-0.1.patch Patch to add 'tool' method. M src/java/org/apache/hadoop/hbase/util/MetaUtils.java (changeOnlineStatus): Added. > Tool to online single region > ---------------------------- > > Key: HBASE-548 > URL: https://issues.apache.org/jira/browse/HBASE-548 > Project: Hadoop HBase > Issue Type: New Feature > Affects Versions: 0.2.0, 0.1.1, 0.1.0 > Reporter: stack > Priority: Minor > Fix For: 0.2.0, 0.1.1 > > Attachments: 548-0.1.patch > > > A sequence of events put a region offline in the middle of an online table. I was unable to get the region backon by running 'enable table'. Here is a little bit of code that I ran to bring the region back online and get the table running again. This issue is about adding it to hbase tools (A new package named 'tools'?). > {code} > public static void main(String[] args) throws IOException { > HBaseConfiguration c = new HBaseConfiguration(); > c.set("hbase.master", args[0]); > HTable t = new HTable(c, new Text(".META.")); > Text row = new Text(args[1]); > byte [] cell = t.get(row, new Text("info:regioninfo")); > HRegionInfo info = Writables.getHRegionInfo(cell); > LOG.info(info); > long id = t.startUpdate(row); > info.setOffline(false); > t.put(id, COL_REGIONINFO, Writables.getBytes(info)); > t.delete(id, COL_SERVER); > t.delete(id, COL_STARTCODE); > t.commit(id); > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.