Github user dbtsai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/490#discussion_r13624385
  
    --- Diff: 
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala ---
    @@ -95,15 +96,18 @@ trait ClientBase extends Logging {
     
         // If we have requested more then the clusters max for a single 
resource then exit.
         if (args.executorMemory > maxMem) {
    -      logError("Required executor memory (%d MB), is above the max 
threshold (%d MB) of this cluster.".
    -        format(args.executorMemory, maxMem))
    -      System.exit(1)
    +      val errorMessage =
    +        "Required executor memory (%d MB), is above the max threshold (%d 
MB) of this cluster.".
    +        format(args.executorMemory, maxMem)
    +      logError(errorMessage)
    +      throw new IllegalArgumentException(errorMessage)
         }
         val amMem = args.amMemory + YarnAllocationHandler.MEMORY_OVERHEAD
         if (amMem > maxMem) {
    -      logError("Required AM memory (%d) is above the max threshold (%d) of 
this cluster".
    -        format(args.amMemory, maxMem))
    -      System.exit(1)
    +      val errorMessage ="Required AM memory (%d) is above the max 
threshold (%d) of this cluster".
    --- End diff --
    
    Please add a space after =


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to