Skip to content

Commit

Permalink
Provide default values for null application report entries
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewor14 committed Sep 17, 2014
1 parent a0ad1e9 commit 547487c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,12 @@ private[spark] trait ClientBase extends Logging {

if (logApplicationReport) {
logInfo(s"Application report from ResourceManager for app ${appId.getId} (state: $state)")
val clientToken = Option(getClientToken(report)).getOrElse("N/A")
val appDiagnostics = Option(report.getDiagnostics).getOrElse("N/A")
val details = "\n" +
s"\t full application identifier: $appId\n" +
s"\t clientToken: ${getClientToken(report)}\n" +
s"\t appDiagnostics: ${report.getDiagnostics}\n" +
s"\t clientToken: $clientToken\n" +
s"\t appDiagnostics: $appDiagnostics\n" +
s"\t appMasterHost: ${report.getHost}\n" +
s"\t appQueue: ${report.getQueue}\n" +
s"\t appMasterRpcPort: ${report.getRpcPort}\n" +
Expand Down

0 comments on commit 547487c

Please sign in to comment.