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 4C6B6200CDD for ; Mon, 7 Aug 2017 14:29:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4AA23163B1B; Mon, 7 Aug 2017 12:29:46 +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 68FC0163B18 for ; Mon, 7 Aug 2017 14:29:45 +0200 (CEST) Received: (qmail 12756 invoked by uid 500); 7 Aug 2017 12:29:44 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 12744 invoked by uid 99); 7 Aug 2017 12:29:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Aug 2017 12:29:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A140518070B for ; Mon, 7 Aug 2017 12:29:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.45 X-Spam-Level: X-Spam-Status: No, score=0.45 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_INFOUSMEBIZ=0.75, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id xzpm1nGmQ1QA for ; Mon, 7 Aug 2017 12:29:36 +0000 (UTC) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com [209.85.223.181]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 8DF505FB57 for ; Mon, 7 Aug 2017 12:29:36 +0000 (UTC) Received: by mail-io0-f181.google.com with SMTP id g35so1996100ioi.3 for ; Mon, 07 Aug 2017 05:29:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=UlpP+SmyzZpXmyMM0/7LppGMpEKLkcQU5dNvGPb4Z/k=; b=Gd1zz6FyunHpfiFLRhKiqRXKMhmJcWRQNj3LMa6Fgt5v512sucwx/zHSnCiDhvAglT qbDyTcRgsjcOzu2V5xk6TFUvzXe0yVd5nGYyMXp2+BUBTCpjIX/BMFxE3ykVdSHdzRDp biEJovXckgVEawvqueebZp57V/9TBjVSwUNteaqAYzn1DXJGDJawBmRiKbkNxGRKW9pz VMe+ATgZA43L+DCTrTVApZYD1msMmwBvW4b0Po6BOhs40Ly2S94ULZeBTqMnDDFNHM5K wARmQCHK1pkfOgFSolppaAUIAsrYlAzz7gxgw0K3X5G5W15eyPGDdBvbI3cPtRdEuoXv SBgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=UlpP+SmyzZpXmyMM0/7LppGMpEKLkcQU5dNvGPb4Z/k=; b=n4p2PduxSYaMrKXzxFpfnWJ3cT8tD5TusPcFCCnxIaYA0DCc54iBoNGi0okBxlGEPb pu5BncnGbAoqtRbD9644IEngJTwJjLNXaftGPwjirroaI4rxtnSK+EdvWlZQ5dhdmKaQ jIycaNb1PdnG/637Y5kXpLLCKPE0m7F7HuiYFxDUvGGPWmgcaDNWgVkP+cyrq67k3z23 6awphUXqgNjJ+2IF+iQxVFql821EpOBMBzJJbf9Xob1UnwWLWYS/H3CH2TMyN7J95AH4 lpYwtVIKvNO4/gOatF42X1PMRohT1Y0ZVw/RPmvI0/chh/x43v5wB24nfxmze+2zelcZ 1Dnw== X-Gm-Message-State: AHYfb5is9VpPYh3rviV09O6MG/JLpsmnM/bPjSQ0W+jXNgx3YlL4UE4+ CR4JCe45lfT0s8sYKvNxrw33cNcxhOkX X-Received: by 10.107.142.74 with SMTP id q71mr314319iod.77.1502108969608; Mon, 07 Aug 2017 05:29:29 -0700 (PDT) MIME-Version: 1.0 Sender: ismaelj@gmail.com Received: by 10.79.140.22 with HTTP; Mon, 7 Aug 2017 05:28:48 -0700 (PDT) In-Reply-To: References: <2418351484309552@web28j.yandex.ru> <161231485182708@web30o.yandex.ru> <2868901485257412@web17m.yandex.ru> <392271485944180@web29o.yandex.ru> <1497288987.733762.1006895272.4C41145A@webmail.messagingengine.com> From: Ismael Juma Date: Mon, 7 Aug 2017 13:28:48 +0100 X-Google-Sender-Auth: -ofpVPfQC2i1cfWfmFLhWaZdN7E Message-ID: Subject: Re: [DISCUSS] KIP-113: Support replicas movement between log directories To: dev@kafka.apache.org Content-Type: multipart/alternative; boundary="94eb2c05c52a8c2afb055628ff1f" archived-at: Mon, 07 Aug 2017 12:29:46 -0000 --94eb2c05c52a8c2afb055628ff1f Content-Type: text/plain; charset="UTF-8" Hi Dong, Thanks for the explanation. Comments inline. On Fri, Aug 4, 2017 at 6:47 PM, Dong Lin wrote: > 1. Yes it has been considered. Here are the reasons why we don't do it > through controller. > > - There can be use-cases where we only want to rebalance the load of log > directories on a given broker. It seems unnecessary to go through > controller in this case. > Even though this is true, not sure how common it will be. - If controller is responsible for sending ChangeReplicaDirRequest, and if > the user-specified log directory is either invalid or offline, then > controller probably needs a way to tell user that the partition > reassignment has failed. We currently don't have a way to do this since > kafka-reassign-partition.sh simply creates the reassignment znode without > waiting for response. I am not sure that is a good solution to this. > Since the JSON is provided by the user, we would ideally validate its contents before storing it. Why are the log directories different than the other information in the JSON? - If controller is responsible for sending ChangeReplicaDirRequest, the > controller logic would be more complicated because controller needs to > first send ChangeReplicaRequest so that the broker memorize the partition > -> log directory mapping, send LeaderAndIsrRequest, and keep sending > ChangeReplicaDirRequest (just in case broker restarted) until replica is > created. Note that the last step needs repeat and timeout as the proposed > in the KIP-113. > > Overall I think this adds quite a bit complexity to controller and we > probably want to do this only if there is strong clear of doing so. > Currently in KIP-113 the kafka-reassign-partitions.sh is responsible for > sending ChangeReplicaDirRequest with repeat and provides error to user if > it either fails or timeout. It seems to be much simpler and user shouldn't > care whether it is done through controller. > If I understand correctly, the logic is the same in both cases, it's just a question of where it lives. The advantage of placing it in the Controller is that the whole reassignment logic is in one place (instead of split between the tool and the Controller). That seems easier to reason about. Also, how do you think things would work in the context of KIP-179? Would the tool still invoke these requests or would it be done by the broker receiving the alterTopics/reassignPartitions protocol call? And thanks for the suggestion. I will add this to the Rejected Alternative > Section in the KIP-113. > > 2) I think user needs to be able to specify different log directories for > the replicas of the same partition in order to rebalance load across log > directories of all brokers. I am not sure I understand the question. Can > you explain a bit more why "that the log directory has to be the same for > all replicas of a given partition"? I think I misunderstood the schema. The KIP has the following example: "partitions" : [ { "topic" : str, "partition" : int, "replicas" : [int], "log_dirs" : [str] <-- NEW. A log directory can be either "any", or a valid absolute path that begins with '/'. This is an optional filed. It is treated as an array of "any" if this field is not explicitly specified in the json file. }, ... ] Is it right that `log_dirs` is an array in the same order as `replicas`? That's a bit obscure and we should document it more clearly. Did we discard the option of a more readable schema (i.e. a JSON object mapping a replica id to a log dir) due to efficiency concerns? It would be good to include that in the KIP. Thanks, Ismael --94eb2c05c52a8c2afb055628ff1f--