Thanks Steve for the detailed update. To make sure I understood you correctly -
1. The REST API ** can be used today ** by setting slider.feature.ws.insecure=true. This will enable update verbs like PUT and DELETE, not just GET 2. Your recommendation is to use the slider jar as library instead of #1 Is my understanding correct? Thanks, On Wed, Nov 4, 2015 at 10:56 AM, Steve Loughran <[email protected]> wrote: > > On 4 Nov 2015, at 01:53, Manoj Samel <[email protected]<mailto: > [email protected]>> wrote: > > Thanks Gour, > > Is there a plan to provide REST APIs in near future ? > > In use cases where configurations need to be built on fly and components be > added / removed on demand, the file /command line based approach does not > scales well. > > Thanks, > > > That'll be SLIDER-151, "Implement full slider API in REST and switch > client to it" > > All the code for this exists. Except that POST/PUT support in the slider > AM is disabled for security reasons. > > To ensure that only the kerberos-authenticated user can talk to slider, > all HTTP requests must go through the YARN RM Proxy, which does the check > and proxies access, also doing some HTML cleanup to prevent malicious > scripts & things. > > We can't go through the proxy; see YARN-2031, YARN-2084. Someone needs to > fix those bits of YARN. > > I've got a patch for a bit of it, but see it has aged. If someone could > bring that up to sync with trunk we could try to get that in to Hadoop 2.8 > (more specifically: if people other than I write these patches, I can > commit it myself). > > > 1. You can enable the REST API by changing the HTTP filters to not > redirect HTTP requests sent to the ws/ bits of the REST API, which you can > do with by setting "slider.feature.ws.insecure" to "true" (I've done this > for testing). > > 2. The API is documented at : > http://slider.incubator.apache.org/docs/api/slider_REST_api_v2.html > > 3. The read-side of the REST model works everywhere today; we define the > various JSON structures in the slider JAR. > > Before rushing to turn on a back door the current UK government would be > proud of, know that we do have is secure API client designed to work with > both Slider's existing IPC protocol and the REST API. : > org.apache.slider.api.SliderApplicationApi > > > There's an RPC client ( SliderApplicationIpcClient) and REST client > (SliderApplicationApiRestClient); the test TestStandaloneREST shows how > they are interchangeable from a client perspective, they both present the > same rest model and operations. > > If you can put the slider JAR on your classpath, and deal with classpath > version pain (JAX-RS has proven the troublespot), then you can load > slider.jar in your app and use it as a library, rather than a command line > tool. This is how the Apache Ambari integration works. > > >
