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 80BE5200D4F for ; Wed, 6 Dec 2017 18:32:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7F19A160C0A; Wed, 6 Dec 2017 17:32:04 +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 C48A1160BF3 for ; Wed, 6 Dec 2017 18:32:03 +0100 (CET) Received: (qmail 87283 invoked by uid 500); 6 Dec 2017 17:32:02 -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 87272 invoked by uid 99); 6 Dec 2017 17:32:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2017 17:32:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1A2911A0423 for ; Wed, 6 Dec 2017 17:32:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Xuwea6_7zmjx for ; Wed, 6 Dec 2017 17:32:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D4EFB5F256 for ; Wed, 6 Dec 2017 17:32:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 586DBE0248 for ; Wed, 6 Dec 2017 17:32:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0C8F7255BF for ; Wed, 6 Dec 2017 17:32:00 +0000 (UTC) Date: Wed, 6 Dec 2017 17:32:00 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-19433) ChangeSplitPolicyAction modifies an immutable HTableDescriptor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 06 Dec 2017 17:32:04 -0000 [ https://issues.apache.org/jira/browse/HBASE-19433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16280550#comment-16280550 ] Ted Yu commented on HBASE-19433: -------------------------------- bq. You try to run an IT with CM Yes, I did. bq. wanna pull this out and write a quick unit test {code} String chosenPolicy = possiblePolicies[random.nextInt(possiblePolicies.length)]; {code} The action chooses random policy - which may be the same as the current one. I thought about adding test for ChangeSplitPolicyAction but haven't come up with plan on how not to change the randomness. bq. we don't have any other instances of this in other Policies? The only other occurrence I found is in IntegrationTestMTTR which is addressed in patch v2. > ChangeSplitPolicyAction modifies an immutable HTableDescriptor > -------------------------------------------------------------- > > Key: HBASE-19433 > URL: https://issues.apache.org/jira/browse/HBASE-19433 > Project: HBase > Issue Type: Bug > Components: integration tests > Reporter: Josh Elser > Assignee: Ted Yu > Priority: Critical > Fix For: 2.0.0-beta-1 > > Attachments: 19433.v1.txt, 19433.v2.txt > > > {noformat} > 2017-12-01 23:18:51,433 WARN [ChaosMonkeyThread] policies.Policy: Exception occurred during performing action: java.lang.UnsupportedOperationException: HTableDescriptor is read-only > at org.apache.hadoop.hbase.client.ImmutableHTableDescriptor.getDelegateeForModification(ImmutableHTableDescriptor.java:59) > at org.apache.hadoop.hbase.HTableDescriptor.setRegionSplitPolicyClassName(HTableDescriptor.java:333) > at org.apache.hadoop.hbase.chaos.actions.ChangeSplitPolicyAction.perform(ChangeSplitPolicyAction.java:54) > at org.apache.hadoop.hbase.chaos.policies.PeriodicRandomActionPolicy.runOneIteration(PeriodicRandomActionPolicy.java:59) > at org.apache.hadoop.hbase.chaos.policies.PeriodicPolicy.run(PeriodicPolicy.java:41) > at java.lang.Thread.run(Thread.java:745) > {noformat} > Found during some internal testing. Need to make sure this Action, in addition to the other, don't fall into the trap of modifying the TableDescriptor obtained from Admin. > [~tedyu], want to take a stab at it? -- This message was sent by Atlassian JIRA (v6.4.14#64029)