From dev-return-27834-archive-asf-public=cust-asf.ponee.io@geode.apache.org Fri Jan 26 19:19:56 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 404AA180657 for ; Fri, 26 Jan 2018 19:19:56 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 29C46160C3E; Fri, 26 Jan 2018 18:19:56 +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 72017160C2E for ; Fri, 26 Jan 2018 19:19:55 +0100 (CET) Received: (qmail 30737 invoked by uid 500); 26 Jan 2018 18:19:54 -0000 Mailing-List: contact dev-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list dev@geode.apache.org Received: (qmail 30723 invoked by uid 99); 26 Jan 2018 18:19:53 -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; Fri, 26 Jan 2018 18:19:53 +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 52D77181640 for ; Fri, 26 Jan 2018 18:19:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.28 X-Spam-Level: * X-Spam-Status: No, score=1.28 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pivotal-io.20150623.gappssmtp.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 OkdT4izGyvCx for ; Fri, 26 Jan 2018 18:19:49 +0000 (UTC) Received: from mail-qt0-f179.google.com (mail-qt0-f179.google.com [209.85.216.179]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 2813460D78 for ; Fri, 26 Jan 2018 18:19:49 +0000 (UTC) Received: by mail-qt0-f179.google.com with SMTP id l20so3481024qtj.11 for ; Fri, 26 Jan 2018 10:19:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=4WftGGTJGjvzNgAWw2OuShwynFAydTfDCwvUX2D4vnE=; b=PSb0d+wR1eNV+zvj0AggsOz7uD9ygXoLvlwVowMLlXMfhgIlY/hXgBEyy0j31O1qOO PCj6MD9eq237CQjvK+MxXxiUH5600hen1pw9Uxfv96Tl6pAvBdvazaedHpIqdpJis+6z 1rmUy40/AhSyToXfhS5M3ngbhzsGvQKHZDMNrRrhS691bhromwduZV4zwZilRuzxQceL ihp99LfjVP/bpSEAAUm+4CkcYdqIGkEJH6EAyGEu07qYNvnVDsskjxu6R6Q8tnTLhiw1 xmkaDbRP+VnIIPRSYp0aI7NFh4/v1Vdo6XB/fB4Vmo+I1ms6V3kefMq1DIvf9kaTrOfF o07A== 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=4WftGGTJGjvzNgAWw2OuShwynFAydTfDCwvUX2D4vnE=; b=U9zsgNux0eaCDLRZ0qXeUKKiIq2GLc+4/o3+uy2VexdSLVLhvIip3/tXd+AQLuGrea zMDO35FQEQ8O9rQXbonpA3XyRiw+l+qzjpMEqQj6obyI4Q/JS4TXJL6Xx0EeREMl+YWG Jd4LjIUd9Cmgt5Yx60VSUQYjTCLeW57JysUIVW0it7C65XhG2KDe9baRO4GR9bTybq6k /YknYa5IiipgnGNJzZMTlFQwOX0dt0rsco9Vp+r9iIMIc+vAeFvT3ObfQjdggYeXLYZy GF/P+lnHllBPInHxzrmZo4EQJZyM0KNtsCLl6bhSnwZLCTvyYYbNC6clYQnnXo/hL72/ yBLg== X-Gm-Message-State: AKwxytf1qW2TR8CqsDnpUlMorF7jxnt96lfXm2XguQZw33KUeRPyoklx 06zLrcHasVKr7METpMnP4144rINOTT3b4DI0QNJx31lV X-Google-Smtp-Source: AH8x227ExOxyI9PhcOiQS5Wyt3MJnJjHSZLdSU02HgRsiCafok98zP+kn150A0aMe9sXFW45+azOgo04ewzfhmxhXkQ= X-Received: by 10.55.42.230 with SMTP id q99mr21309522qkq.85.1516990788566; Fri, 26 Jan 2018 10:19:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.95.81 with HTTP; Fri, 26 Jan 2018 10:19:28 -0800 (PST) In-Reply-To: References: From: Anilkumar Gingade Date: Fri, 26 Jan 2018 10:19:28 -0800 Message-ID: Subject: Re: [PROPOSAL]: Adding declarable support in Gfsh command To: dev@geode.apache.org Content-Type: multipart/alternative; boundary="001a1147baba14a4300563b1f102" --001a1147baba14a4300563b1f102 Content-Type: text/plain; charset="UTF-8" +1 Currently passing properties is supported with AsyncEventListener with "-listener-param" option, we need make it consistent across the call-backs. -Anil. On Fri, Jan 26, 2018 at 8:43 AM, Jens Deppe wrote: > This also avoids the other option of implementing this by having associated > 'params' options for each option which can take a Declarable, thus reducing > the proliferation of options - in particular for 'create region'. > > i.e. --cache-listener AND --cache-listener-params. > > Further, this json parameter would not allow for arbitrary json but would > be restricted to a simple key/value mapping so that there would be a direct > translation to Declarable parameters in the cache.xml. > > --Jens > > On Fri, Jan 26, 2018 at 8:07 AM, Jinmei Liao wrote: > > > Currently, when you want to specify a call-back in gfsh command option, > you > > can only pass in the class name, e.g.: > > > > create region --name=regionA --type=PARTITION > --cache-loader=my.CacheLoader > > > > But these callbacks all implements Declarable (CacheLoader, CacheWriter, > > CacheListener, CustomExpiry etc.), i.e they can initialized with extra > > properties that can be set when they are declared in cache.xml, but > > currently, our gfsh command doesn't support that. > > > > We are proposing to add the support to configure Declarables in gfsh > > commands by adding json strings at the end of the class name. like this: > > > > create region --name=regionA --type=PARTITION > > --cache-loader=my.CacheLoader?{"key":"value,"key2":"value2"} > > > > (of course, if you don't need to configure your Declarable, you can still > > only specify a className as before). > > > > Comments/thoughts? > > > > -- > > Cheers > > > > Jinmei > > > --001a1147baba14a4300563b1f102--