that should be it. What happens each component gets the properties of

component-level union global-level

that is, everything that is global, extended with anything that is at the
component level. If a component overrides the global value, that override
is picked up

It's essentially a form of prototype-based programming, except only of
properties, not methods:
http://en.wikipedia.org/wiki/Prototype-based_programming

On 11 November 2014 01:30, hsy...@gmail.com <hsy...@gmail.com> wrote:

> Thanks Ted, but back to my first question, how can you define component
> level property? in appConfig.json?
>
> I tried to define like this :
>
>
> {
>   "schema": "http://example.org/specification/v2.0.0";,
>   "metadata": {
>   },
>   "global": {
>     "application.def": "app-package-0.1.zip",
>     "java_home": "/usr/lib/jvm/java-7-oracle/",
>     "package_list": "files/app.tgz",
>     "agent.conf": "/user/siyuan/agent/conf/agent.ini",
>
>     "site.global.app_user": "siyuan",
>     "site.global.app_root":
> "${AGENT_WORK_ROOT}/app/install/kafka_2.10-0.8.1.1",
>     "site.global.app_install_dir": "${AGENT_WORK_ROOT}/app/install",
>     "site.global.pid_file": "${AGENT_WORK_ROOT}/app/run/app.pid",
>
>   },
>   "components": {
>     "COMPONENT1": {
>       *"mykey": "myvalue"*
>     },
>     "slider-appmaster": {
>       "jvm.heapsize": "256M"
>     }
>   }
> }
>
> Is it able to make the component1 read the value for *mykey* ?
>
>
> Best,
> Siyuan
>
> On Mon, Nov 10, 2014 at 4:15 PM, Ted Yu <yuzhih...@gmail.com> wrote:
>
> > To my knowledge, there is no direct support for this.
> >
> > You can create different components, each with corresponding properties.
> >
> > Cheers
> >
> > On Mon, Nov 10, 2014 at 4:13 PM, hsy...@gmail.com <hsy...@gmail.com>
> > wrote:
> >
> > > If I want to have several instances of some component. But I want to
> set
> > > some of the properties to different value for different instances. How
> > can
> > > I do it?
> > >
> > > Thanks!
> > >
> > > Best,
> > > Siyuan
> > >
> > > On Mon, Nov 10, 2014 at 1:26 PM, hsy...@gmail.com <hsy...@gmail.com>
> > > wrote:
> > >
> > > > Hi guys,
> > > >
> > > > Is there an example of component configuration? Is there a way to
> give
> > > > different value to same property for different instances?
> > > >
> > > > Siyuan
> > > >
> > >
> >
>

-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Reply via email to