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 CF098200C5B for ; Thu, 27 Apr 2017 21:45:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CD8FC160BA7; Thu, 27 Apr 2017 19:45:35 +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 ECA57160B9E for ; Thu, 27 Apr 2017 21:45:34 +0200 (CEST) Received: (qmail 31737 invoked by uid 500); 27 Apr 2017 19:45:34 -0000 Mailing-List: contact blur-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: blur-user@incubator.apache.org Delivered-To: mailing list blur-user@incubator.apache.org Received: (qmail 31725 invoked by uid 99); 27 Apr 2017 19:45:33 -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; Thu, 27 Apr 2017 19:45:33 +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 6F72D1AF9A4 for ; Thu, 27 Apr 2017 19:45:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.896 X-Spam-Level: X-Spam-Status: No, score=-2.896 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id iM-muciyFRIM for ; Thu, 27 Apr 2017 19:45:29 +0000 (UTC) Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 5A5065FC54 for ; Thu, 27 Apr 2017 19:45:29 +0000 (UTC) Received: by mail-pf0-f182.google.com with SMTP id c198so36233847pfc.1 for ; Thu, 27 Apr 2017 12:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=HCqf2K89/D5kpTmJCz7SSDwg9xLXYM+L1DzhZ2giG8k=; b=V5k1MFcLn81eNu0TCAs916p4kHgvpF/rqJIwbdX2SMNYKjTZ1DcOZBnlI4C5XJHiiq rhzTbdM6+xuGwZ/NDYKP4wnnQcWyVOMgjC6YBUuU5o8fFcQacrXGcVP+1/h6739Phmfh VqH/SlnCtZth96IEiUQc8QIrDbFquIaCndiOg0/KS+q0Ap58qJJEv2LxLX9UgpxYg9am WKnGNkA8vqUFZtMBS0AWCWQtLeLbA+Avuz5zWqdb+aySnxjVwsVn/jOhEgirBjZPQeBr e7bjaBBgmalBgF93HSrYdmj20eS5QMdw7ZJeUmQLuknOy6rOSA3iHBqnBkMU5tNY9agC w0Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=HCqf2K89/D5kpTmJCz7SSDwg9xLXYM+L1DzhZ2giG8k=; b=m4gxK68/UCYRukauOp5Z5JdMNfyMvhM20dQ3dX4mstJ3Lo3gzQ6WCK2IzNa8XBphUB +qWk5LoLlv+ekWsnGv6Zr320PKBmNnGCur485M2/Z7kloqWCfHjhvaCJvnJzLP4ECIFF W1NE0NVYo139q6mDYLg+EOtOrCpeXGclrF3IpNnmbYEfBm+RwZPlEbet/DTfzdtTVKQp S+lDvWpkaA/RnZQNsYFcGeh8ibDq6YAahRxnmXhtbQl89GDoVZIG6K7cRL2b9r32yFNj D5wEx4fQyBt6DFOH8Aupzg4U5kw3drhMoPpgeBLrhm//G8v7s9Ute9mpNciWBB08eMkJ Jtqg== X-Gm-Message-State: AN3rC/5JPWBxuFrK+9dYWeZGE7aIUEr/GbJJzaXFKVV5WgAqxrTz5ysJ rhAnbZweqn8NnmwM5GFNsY6zx9UDH+DF X-Received: by 10.98.223.213 with SMTP id d82mr7899860pfl.222.1493322327635; Thu, 27 Apr 2017 12:45:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.189.12 with HTTP; Thu, 27 Apr 2017 12:45:27 -0700 (PDT) In-Reply-To: References: From: Tim Williams Date: Thu, 27 Apr 2017 15:45:27 -0400 Message-ID: Subject: Re: Shard Server addition/removal To: "blur-user@incubator.apache.org" Content-Type: text/plain; charset=UTF-8 archived-at: Thu, 27 Apr 2017 19:45:36 -0000 Have you looked in /contrib for the block placement stuff? Maybe it provides some ideas? https://git1-us-west.apache.org/repos/asf?p=incubator-blur.git;a=tree;f=contrib/blur-block-placement-policy;h=743a50d6431f4f8cecbb0f55d75baf187da7f755;hb=HEAD Thanks, --tim On Wed, Apr 26, 2017 at 9:40 AM, Ravikumar Govindarajan wrote: >> >> In case of HDFS or MAPRF can we dynamically assign >> shards to shardservers based on the data locality (using block locations)? > > > I was exploring the reverse option. Blur will suggest the set of > hadoop-datanodes to replicate while writing index files. > > Blur will also explicitly control bootstrapping a new datanode & > load-balancing it, as well as removing a datanode from cluster.. > > Such fine control is possible by customizing BlockPlacementPolicy API... > > Have started exploring it. Changes look big. Will keep the group posted on > progress > > On Fri, Apr 21, 2017 at 10:42 PM, rahul challapalli < > challapallirahul@gmail.com> wrote: > >> Its been a while since I looked at the code, but I believe a shard server >> has a list of shards which it can serve. Now maintaining this static >> mapping (or tight coupling) between shard servers and shards is a design >> decision which makes complete sense for clusters where nodes do not share a >> distributed file system. In case of HDFS or MAPRF can we dynamically assign >> shards to shardservers based on the data locality (using block locations)? >> Obviously this hasn't been well thought out as a lot of components would be >> affected. Just dumping a few thoughts from my brain. >> >> - Rahul >> >> On Fri, Apr 21, 2017 at 9:44 AM, Ravikumar Govindarajan < >> ravikumar.govindarajan@gmail.com> wrote: >> >> > We have been facing lot of slowdown in production, whenever a >> shard-server >> > is added or removed... >> > >> > Shards which were locally served via short-circuit suddenly becomes fully >> > remote & at scale, this melts down. >> > >> > Block cache is kind of reactive cache & takes a lot of time to settle >> down >> > (at-least for us!!) >> > >> > Have been thinking of handling this locality issue for some time now.. >> > >> > 1. For every shard, Blur can map a primary server & a secondary server in >> > ZooKeeper >> > 2. File-writes can use the favored nodes hint of Hadoop & write to both >> > these servers [https://issues.apache.org/jira/browse/HDFS-2576] >> > 3. When a machine goes down, instead of randomly assigning shards to >> > different shard-servers, Blur can decide to allocate shards to designated >> > secondary servers. >> > >> > Adding a new machine is another problem, where it will immediately start >> > serving shards from remote machines. It must need data copies of all >> > primary shards it is supposed serve from local disk.. >> > >> > hadoop has something called BlockPlacementPolicy that can be hacked into. >> > [ >> > http://hadoopblog.blogspot.in/2009/09/hdfs-block-replica- >> > placement-in-your.html >> > ] >> > >> > When booting a new machine, lets say we increase replication-factor from >> 3 >> > to 4, for shards that will be hosted by new machine (setrep command from >> > hdfs console) >> > >> > Now hadoop will call our CustomBlockPlacementPolicy class to arrange >> extra >> > replication, where we can sneak in the new IP.. >> > >> > Once all shards to be hosted by this new machine are replicated, we can >> > close these shards, update the mappings in ZK & open them. Data will be >> > served locally >> > >> > Similarly, when restoring replication-factor from 4 to 3, our >> > CustomBlockPlacementPolicy class can hook up to ZK, find out which node >> to >> > delete the data & proceed... >> > >> > Do let know your thoughts on this... >> > >>