Reputation: 2431
I am trying to write a yarn application and was hoping to get some suggestions on a few design questions I had in mind. I have gone through the simpler sample apps like distributed shell and some variations of it so I am familiar with the basic API. What I would like to do is create an application that has a web interface which user can interact with and potentially provide some kind of tasks (nature of tasks is irrelevant). Based on that work, the UI requests containers to do the processing.
The ideal arrangement that comes to my mind is that my application master provides this web UI and no containers are allocated until someone comes to the AM website and requests some work. At this point, AM should be able to register new containers and allocate work to them.
I would appreciate any suggestions
Upvotes: 1
Views: 1050
Reputation: 1026
Take a look at Apache Twill. Apache Twill is an abstraction over Apache Hadoop YARN that reduces the complexity of developing distributed applications. Containers can be launched executing long-running processes (servers).
The Changing IP of your container serving the Web UI can be addressed by Apache Curator. Services can be registered in the ZooKeeper using Apache Curator's Service Discovery mechanism.
Upvotes: 0
Reputation: 45
In regards to question (1) You can run your AM in the unmanaged mode. This will allow you to run the AM outside of the YARN cluster on a dedicated machine whose IP address you have more control over.
Upvotes: 0