How about starting with an in-memory implementation, which is the easiest to do and is useful for testing.
We can have one for testing, but a file-system based impl should exist from the beginning.
Here's more ellaboration about the per-application data. There should be three objects to record: RMApp, RMAppAttempt and RMContainer. .....
Tx for the detailed analysis, Zhijie Shen!
In addition, HistoryStorage APIs may involve a lot of I/O operations such that the response of an API will be long. Therefore, it is likely to be good to make the API non-blocking.
Are we moving aggregated log management(i.e deletion after expiry) responsibility to AHS?
Right now its not clear what needs to be done for log aggregation?
Sorry for misunderstanding your previous question. IMHO, in the recent future, we're not moving the aggregated log management, but duplicate it, which Both AHS and JHS can serve the same aggregated logs. However, AHS and JHS see the same logs from different point of views. AHS simply considers them as container logs, no matter what application it is, while JHS know they are the MR job logs. Vinod Kumar Vavilapalli, would you please confirm it?
That's an interesting point about JHS knowing that they are MR job logs. But we don't do anything special today. I'm thinking of just pull out log-handling and use it in both AHS and JHS for the time being.
>>>ResourceManager will push the data to HistoryStorage after an application finishes in a separate thread.
Is it per application or only one thread in RM?
I foresee a single thread.
Isn't it be a good idea that as soon as application starts we send the information to AHS and let AHS write all the data published by RM for that application. In that case it would be very less overhead for RM.
Like I mentioned in my proposal, this could be one implementation of HistoryStorage.
What about in the cases where RM restart or crashes in those cases RM has to republish all the running applications to AHS or just forget about the previous running apps?
This was covered. In the first cut, we'll make best efforts. Losing an app's data in such a corner case is bearable.
(Thinking out loud) Are we decided on who all can write to HistoryStorage?
I thought this was clear. Only RM. No per-framework data or data from AMs to AHS directly. Yet, at the least.
I think History storage should be written by AHS not RM in that case RM will have less load and will be better to scale.
This is an implementation detail. Details on the impl whether the RM writes files directly or pushes to AHS. Let's do the APIs first.
Overall, I repeat that we should separate the design for per-framework data. Fundamentally because the AHS is a shared service. It needs a radically different design from my initial thoughts. Will file a separate JIRA and post my thoughts there.