AppStatus master state
As a user I'd like to set a status/attributes of an app in case of an infrastructure failure.
This is easiest to demonstrate with yarn. When YARN's application master is running we know number of instances and could potentially return some related info within AppInstanceStatus.
╔═════════════════════════════════════════════╤═══════════╤═════════════════════════════╗
║ App Id / Instance Id │Unit Status│No. of Instances / Attributes║
╠═════════════════════════════════════════════╪═══════════╪═════════════════════════════╣
║foostream:log:application_1475483559671_0005 │ deployed │ 1 ║
╟─────────────────────────────────────────────┼───────────┼─────────────────────────────╢
║foostream:log-0 │ deployed │ ║
╟─────────────────────────────────────────────┼───────────┼─────────────────────────────╢
║foostream:time:application_1475483559671_0005│ deployed │ 1 ║
╟─────────────────────────────────────────────┼───────────┼─────────────────────────────╢
║foostream:time-0 │ deployed │ ║
╚═════════════════════════════════════════════╧═══════════╧═════════════════════════════╝
Trouble comes when whole application on YARN fails or is killed. We're left with no info as only way to add something to a shell would be to add one fake instance order to pass some error messages via its attributes. Adding fake instances is naturally wrong.
╔═════════════════════════════════════════════╤═══════════╤═════════════════════════════╗
║ App Id / Instance Id │Unit Status│No. of Instances / Attributes║
╠═════════════════════════════════════════════╪═══════════╪═════════════════════════════╣
║foostream:log:application_1475483559671_0005 │ unknown │ 0 ║
╟─────────────────────────────────────────────┼───────────┼─────────────────────────────╢
║foostream:time:application_1475483559671_0005│ unknown │ 0 ║
╚═════════════════════════════════════════════╧═══════════╧═════════════════════════════╝
Internally within yarn deployer I already know if app failed or was killed by a user and I even get a diagnostic message. This is something I'd like to reflect back to a call for AppDeployer.status(id).
See 47366256ca37af49e416ee553e2bbf19e6316f58
Looks like that commit allows to pass info about failure state, but not any extra info as those attributes, afaik, are only shown on instance level.
Yes, attributes are per instance only (as of now)