geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Reich <nre...@pivotal.io>
Subject Re: [PROPOSAL]: Adding declarable support in Gfsh command
Date Fri, 26 Jan 2018 18:24:37 GMT
This would solve the problem of specifying the parameters for a Declarable,
but if you provided support for any valid json, you could cover other
situations as well, including those with more complicated and possibly
nested configuration. If we would ever support such scenarios in the
future, I assume that we would want a generic solution that would cover all
configuration. Is this something that we anticipate needing and if so, how
would the current proposal cover such situations?

On Fri, Jan 26, 2018 at 8:43 AM, Jens Deppe <jdeppe@pivotal.io> 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 <jiliao@pivotal.io> 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
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message