You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@slider.apache.org by "hsy541@gmail.com" <hs...@gmail.com> on 2014/10/31 02:15:06 UTC

2 questions

Hi all,

I have 2 questions,
1. Is there a way to extend the REST API(add some customized api)?
2. Is there a way to add/remove component/component instance at the runtime?

Thanks!

Best,
Siyuan

Re: 2 questions

Posted by Steve Loughran <st...@hortonworks.com>.
On 31 October 2014 22:22, hsy541@gmail.com <hs...@gmail.com> wrote:

> Hi Steve,
> Thanks!
> But I'm confused when I looked at the code.
> What is RegistryRestResources? Looks like you can register your own REST
> API through this?  Is there an example of doing so?
>

read only .. they are things that the registry serves up for anything to
GET. We had something that took POST operations but it wouldn't get through


> The limit of YARN web server you were talking about is on the WebApp class?
>
>
no,

https://issues.apache.org/jira/browse/YARN-2031:

org.apache.hadoop.yarn.server.webproxy.amfilter.AmIpFilter redirects all
requests that dont come from the YARN proxy to go via the YARN proxy; it
sends a 302 "use get", not 307 "use the same verb"

The RMProxy doesn't support any verbs other than GET


https://issues.apache.org/jira/browse/YARN-2086



> So you can actually start an fully functional embedded jetty server in the
> AM and set the tracking url to this {amhost:port}?
>
>
oh, yes, that we do. Look in the SliderAppMaster to see where we set it up

-- 
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.

Re: 2 questions

Posted by "hsy541@gmail.com" <hs...@gmail.com>.
Hi Steve,
Thanks!
But I'm confused when I looked at the code.
What is RegistryRestResources? Looks like you can register your own REST
API through this?  Is there an example of doing so?

The limit of YARN web server you were talking about is on the WebApp class?

So you can actually start an fully functional embedded jetty server in the
AM and set the tracking url to this {amhost:port}?

Best,
Siyuan

On Fri, Oct 31, 2014 at 2:59 PM, Steve Loughran <st...@hortonworks.com>
wrote:

> On 31 October 2014 01:15, hsy541@gmail.com <hs...@gmail.com> wrote:
>
> > Hi all,
> >
> > I have 2 questions,
> > 1. Is there a way to extend the REST API(add some customized api)?
> >
>
> in the app master? Not really no. In fact, REST and YARN don't go together
> too well: you can't do anything in the web UI other than GET.
>
>
> > 2. Is there a way to add/remove component/component instance at the
> > runtime?
> >
> >
> do you mean dynamically adding components to resources.json? Certainly you
> can add them after an application instance has been set up. The flex
> command does this; what it is really doing is editing the resources.json
> file for that instance, then, if the cluster is running, send it a message
> saying "reread your specification"
>
> --
> 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.
>

Re: 2 questions

Posted by Steve Loughran <st...@hortonworks.com>.
On 31 October 2014 01:15, hsy541@gmail.com <hs...@gmail.com> wrote:

> Hi all,
>
> I have 2 questions,
> 1. Is there a way to extend the REST API(add some customized api)?
>

in the app master? Not really no. In fact, REST and YARN don't go together
too well: you can't do anything in the web UI other than GET.


> 2. Is there a way to add/remove component/component instance at the
> runtime?
>
>
do you mean dynamically adding components to resources.json? Certainly you
can add them after an application instance has been set up. The flex
command does this; what it is really doing is editing the resources.json
file for that instance, then, if the cluster is running, send it a message
saying "reread your specification"

-- 
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.