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 E701E200BAA for ; Thu, 13 Oct 2016 06:53:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E5B96160AF5; Thu, 13 Oct 2016 04:53:22 +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 41F8C160ACA for ; Thu, 13 Oct 2016 06:53:22 +0200 (CEST) Received: (qmail 23341 invoked by uid 500); 13 Oct 2016 04:53:21 -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 23314 invoked by uid 99); 13 Oct 2016 04:53:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2016 04:53:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E98802C4C73 for ; Thu, 13 Oct 2016 04:53:20 +0000 (UTC) Date: Thu, 13 Oct 2016 04:53:20 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-16816) HMaster.move() should throw exception if region to move is not online MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 13 Oct 2016 04:53:23 -0000 [ https://issues.apache.org/jira/browse/HBASE-16816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15570842#comment-15570842 ] Ted Yu commented on HBASE-16816: -------------------------------- Do the above tests pass with patch locally ? > HMaster.move() should throw exception if region to move is not online > --------------------------------------------------------------------- > > Key: HBASE-16816 > URL: https://issues.apache.org/jira/browse/HBASE-16816 > Project: HBase > Issue Type: Bug > Components: Admin > Affects Versions: 1.1.2 > Reporter: Allan Yang > Assignee: Allan Yang > Priority: Minor > Fix For: 1.4.0 > > Attachments: HBASE-16816-branch-1-v2.patch, HBASE-16816-branch-1-v3.patch, HBASE-16816-branch-1.patch > > > The move region function in HMaster only checks whether the region to move exists > {code} > if (regionState == null) { > throw new UnknownRegionException(Bytes.toStringBinary(encodedRegionName)); > } > {code} > It will not return anything if the region is split or in transition which is not movable. So the caller has no way to know if the move region operation is failed. > It is a problem for "region_move.rb". It only gives up moving a region if a exception is thrown.Otherwise, it will wait until a timeout and retry. Without a exception, it have no idea the region is not movable. > {code} > begin > admin.move(Bytes.toBytes(r.getEncodedName()), Bytes.toBytes(newServer)) > rescue java.lang.reflect.UndeclaredThrowableException, > org.apache.hadoop.hbase.UnknownRegionException => e > $LOG.info("Exception moving " + r.getEncodedName() + > "; split/moved? Continuing: " + e) > return > end > # Wait till its up on new server before moving on > maxWaitInSeconds = admin.getConfiguration.getInt("hbase.move.wait.max", 60) > maxWait = Time.now + maxWaitInSeconds > while Time.now < maxWait > same = isSameServer(admin, r, original) > break unless same > sleep 0.1 > end > end > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)