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 41FD4200BC3 for ; Fri, 14 Oct 2016 00:11:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 40B81160AE4; Thu, 13 Oct 2016 22:11: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 9310B160AF8 for ; Fri, 14 Oct 2016 00:11:21 +0200 (CEST) Received: (qmail 61231 invoked by uid 500); 13 Oct 2016 22:11:20 -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 61206 invoked by uid 99); 13 Oct 2016 22:11:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2016 22:11:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8317F2C4C75 for ; Thu, 13 Oct 2016 22:11:20 +0000 (UTC) Date: Thu, 13 Oct 2016 22:11:20 +0000 (UTC) From: "Hudson (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 22:11:22 -0000 [ https://issues.apache.org/jira/browse/HBASE-16816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15573358#comment-15573358 ] Hudson commented on HBASE-16816: -------------------------------- FAILURE: Integrated in Jenkins build HBase-1.4 #468 (See [https://builds.apache.org/job/HBase-1.4/468/]) HBASE-16816 HMaster.move() should throw exception if region to move is (tedyu: rev 57d3e9e7562b3e7410293d1462075758b1793f88) * (edit) hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestWarmupRegion.java * (edit) hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java > 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)