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 551E9200B6F for ; Wed, 10 Aug 2016 00:51:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 53973160AAD; Tue, 9 Aug 2016 22:51:16 +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 98718160AA5 for ; Wed, 10 Aug 2016 00:51:15 +0200 (CEST) Received: (qmail 82244 invoked by uid 500); 9 Aug 2016 22:51:14 -0000 Mailing-List: contact commits-help@helix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@helix.apache.org Delivered-To: mailing list commits@helix.apache.org Received: (qmail 82235 invoked by uid 99); 9 Aug 2016 22:51:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2016 22:51:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 239D5CA0E9 for ; Tue, 9 Aug 2016 22:51:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.452 X-Spam-Level: X-Spam-Status: No, score=-4.452 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.432] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id HNDScv7aZYYJ for ; Tue, 9 Aug 2016 22:51:13 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id E9F865F2F2 for ; Tue, 9 Aug 2016 22:51:02 +0000 (UTC) Received: (qmail 68304 invoked by uid 99); 9 Aug 2016 22:44:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2016 22:44:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7FE8F2C02A3 for ; Tue, 9 Aug 2016 22:44:20 +0000 (UTC) Date: Tue, 9 Aug 2016 22:44:20 +0000 (UTC) From: "Lei Xia (JIRA)" To: commits@helix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (HELIX-631) AutoRebalanceStrategy does not work correctly all the time MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 09 Aug 2016 22:51:16 -0000 [ https://issues.apache.org/jira/browse/HELIX-631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lei Xia reassigned HELIX-631: ----------------------------- Assignee: Lei Xia > AutoRebalanceStrategy does not work correctly all the time > ---------------------------------------------------------- > > Key: HELIX-631 > URL: https://issues.apache.org/jira/browse/HELIX-631 > Project: Apache Helix > Issue Type: Bug > Reporter: Subbu > Assignee: Lei Xia > > I have 16 partitions, 3 replicas each, and 4 instances to distribute these on. The auto-rebalancer assigns only 2 replicas for one of the partitions. > Here is the code snippet to reproduce the problem > {code} > final String resourceName = "something"; > final List instanceNames = null; // Initialize to 4 unique strings > final int nReplicas = 3; > List partitions = new ArrayList<>(nPartitions); > for (int i = 0; i < nPartitions; i++) { > partitions.add(Integer.toString(i)); > } > LinkedHashMap states = new LinkedHashMap<>(2); > states.put("OFFLINE", 0); > states.put("ONLINE", nReplicas); > AutoRebalanceStrategy strategy = new AutoRebalanceStrategy(resourceName, partitions, states); > ZNRecord znRecord = strategy.computePartitionAssignment(instanceNames, new HashMap>(0), instanceNames); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)