Skip to content
  • Andrew Or's avatar
    1390e56f
    [SPARK-5388] Provide a stable application submission gateway for standalone cluster mode · 1390e56f
    Andrew Or authored
    The goal is to provide a stable, REST-based application submission gateway that is not inherently based on Akka, which is unstable across versions. This PR targets standalone cluster mode, but is implemented in a general enough manner that can be potentially extended to other modes in the future. Client mode is currently not included in the changes here because there are many more Akka messages exchanged there.
    
    As of the changes here, the Master will advertise two ports, 7077 and 6066. We need to keep around the old one (7077) for client mode and older versions of Spark submit. However, all new versions of Spark submit will use the REST gateway (6066).
    
    By the way this includes ~700 lines of tests and ~200 lines of license.
    
    Author: Andrew Or <andrew@databricks.com>
    
    Closes #4216 from andrewor14/rest and squashes the following commits:
    
    8d7ce07 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    6f0c597 [Andrew Or] Use nullable fields for integer and boolean values
    dfe4bd7 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    b9e2a08 [Andrew Or] Minor comments
    02b5cea [Andrew Or] Fix tests
    d2b1ef8 [Andrew Or] Comment changes + minor code refactoring across the board
    9c82a36 [Andrew Or] Minor comment and wording updates
    b4695e7 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    c9a8ad7 [Andrew Or] Do not include appResource and mainClass as properties
    6fc7670 [Andrew Or] Report REST server response back to the user
    40e6095 [Andrew Or] Pass submit parameters through system properties
    cbd670b [Andrew Or] Include unknown fields, if any, in server response
    9fee16f [Andrew Or] Include server protocol version on mismatch
    09f873a [Andrew Or] Fix style
    8188e61 [Andrew Or] Upgrade Jackson from 2.3.0 to 2.4.4
    37538e0 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    9165ae8 [Andrew Or] Fall back to Akka if endpoint was not REST
    252d53c [Andrew Or] Clean up server error handling behavior further
    c643f64 [Andrew Or] Fix style
    bbbd329 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    792e112 [Andrew Or] Use specific HTTP response codes on error
    f98660b [Andrew Or] Version the protocol and include it in REST URL
    721819f [Andrew Or] Provide more REST-like interface for submit/kill/status
    581f7bf [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    9e0d1af [Andrew Or] Move some classes around to reduce number of files (minor)
    42e5de4 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    1f1c03f [Andrew Or] Use Jackson's DefaultScalaModule to simplify messages
    9229433 [Andrew Or] Reduce duplicate naming in REST field
    ade28fd [Andrew Or] Clean up REST response output in Spark submit
    b2fef8b [Andrew Or] Abstract the success field to the general response
    6c57b4b [Andrew Or] Increase timeout in end-to-end tests
    bf696ff [Andrew Or] Add checks for enabling REST when using kill/status
    7ee6737 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    e2f7f5f [Andrew Or] Provide more safeguard against missing fields
    9581df7 [Andrew Or] Clean up uses of exceptions
    914fdff [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    e2104e6 [Andrew Or] stable -> rest
    3db7379 [Andrew Or] Fix comments and name fields for better error messages
    8d43486 [Andrew Or] Replace SubmitRestProtocolAction with class name
    df90e8b [Andrew Or] Use Jackson for JSON de/serialization
    d7a1f9f [Andrew Or] Fix local cluster tests
    efa5e18 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    e42c131 [Andrew Or] Add end-to-end tests for standalone REST protocol
    837475b [Andrew Or] Show the REST port on the Master UI
    d8d3717 [Andrew Or] Use a daemon thread pool for REST server
    6568ca5 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    77774ba [Andrew Or] Minor fixes
    206cae4 [Andrew Or] Refactor and add tests for the REST protocol
    63c05b3 [Andrew Or] Remove MASTER as a field (minor)
    9e21b72 [Andrew Or] Action -> SparkSubmitAction (minor)
    51c5ca6 [Andrew Or] Distinguish client and server side Spark versions
    b44e103 [Andrew Or] Implement status requests + fix validation behavior
    120ab9d [Andrew Or] Support kill and request driver status through SparkSubmit
    544de1d [Andrew Or] Major clean ups in code and comments
    e958cae [Andrew Or] Supported nested values in messages
    484bd21 [Andrew Or] Specify an ordering for fields in SubmitDriverRequestMessage
    6ff088d [Andrew Or] Rename classes to generalize REST protocol
    af9d9cb [Andrew Or] Integrate REST protocol in standalone mode
    53e7c0e [Andrew Or] Initial client, server, and all the messages
    1390e56f
    [SPARK-5388] Provide a stable application submission gateway for standalone cluster mode
    Andrew Or authored
    The goal is to provide a stable, REST-based application submission gateway that is not inherently based on Akka, which is unstable across versions. This PR targets standalone cluster mode, but is implemented in a general enough manner that can be potentially extended to other modes in the future. Client mode is currently not included in the changes here because there are many more Akka messages exchanged there.
    
    As of the changes here, the Master will advertise two ports, 7077 and 6066. We need to keep around the old one (7077) for client mode and older versions of Spark submit. However, all new versions of Spark submit will use the REST gateway (6066).
    
    By the way this includes ~700 lines of tests and ~200 lines of license.
    
    Author: Andrew Or <andrew@databricks.com>
    
    Closes #4216 from andrewor14/rest and squashes the following commits:
    
    8d7ce07 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    6f0c597 [Andrew Or] Use nullable fields for integer and boolean values
    dfe4bd7 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    b9e2a08 [Andrew Or] Minor comments
    02b5cea [Andrew Or] Fix tests
    d2b1ef8 [Andrew Or] Comment changes + minor code refactoring across the board
    9c82a36 [Andrew Or] Minor comment and wording updates
    b4695e7 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    c9a8ad7 [Andrew Or] Do not include appResource and mainClass as properties
    6fc7670 [Andrew Or] Report REST server response back to the user
    40e6095 [Andrew Or] Pass submit parameters through system properties
    cbd670b [Andrew Or] Include unknown fields, if any, in server response
    9fee16f [Andrew Or] Include server protocol version on mismatch
    09f873a [Andrew Or] Fix style
    8188e61 [Andrew Or] Upgrade Jackson from 2.3.0 to 2.4.4
    37538e0 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    9165ae8 [Andrew Or] Fall back to Akka if endpoint was not REST
    252d53c [Andrew Or] Clean up server error handling behavior further
    c643f64 [Andrew Or] Fix style
    bbbd329 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    792e112 [Andrew Or] Use specific HTTP response codes on error
    f98660b [Andrew Or] Version the protocol and include it in REST URL
    721819f [Andrew Or] Provide more REST-like interface for submit/kill/status
    581f7bf [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    9e0d1af [Andrew Or] Move some classes around to reduce number of files (minor)
    42e5de4 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    1f1c03f [Andrew Or] Use Jackson's DefaultScalaModule to simplify messages
    9229433 [Andrew Or] Reduce duplicate naming in REST field
    ade28fd [Andrew Or] Clean up REST response output in Spark submit
    b2fef8b [Andrew Or] Abstract the success field to the general response
    6c57b4b [Andrew Or] Increase timeout in end-to-end tests
    bf696ff [Andrew Or] Add checks for enabling REST when using kill/status
    7ee6737 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    e2f7f5f [Andrew Or] Provide more safeguard against missing fields
    9581df7 [Andrew Or] Clean up uses of exceptions
    914fdff [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    e2104e6 [Andrew Or] stable -> rest
    3db7379 [Andrew Or] Fix comments and name fields for better error messages
    8d43486 [Andrew Or] Replace SubmitRestProtocolAction with class name
    df90e8b [Andrew Or] Use Jackson for JSON de/serialization
    d7a1f9f [Andrew Or] Fix local cluster tests
    efa5e18 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    e42c131 [Andrew Or] Add end-to-end tests for standalone REST protocol
    837475b [Andrew Or] Show the REST port on the Master UI
    d8d3717 [Andrew Or] Use a daemon thread pool for REST server
    6568ca5 [Andrew Or] Merge branch 'master' of github.com:apache/spark into rest
    77774ba [Andrew Or] Minor fixes
    206cae4 [Andrew Or] Refactor and add tests for the REST protocol
    63c05b3 [Andrew Or] Remove MASTER as a field (minor)
    9e21b72 [Andrew Or] Action -> SparkSubmitAction (minor)
    51c5ca6 [Andrew Or] Distinguish client and server side Spark versions
    b44e103 [Andrew Or] Implement status requests + fix validation behavior
    120ab9d [Andrew Or] Support kill and request driver status through SparkSubmit
    544de1d [Andrew Or] Major clean ups in code and comments
    e958cae [Andrew Or] Supported nested values in messages
    484bd21 [Andrew Or] Specify an ordering for fields in SubmitDriverRequestMessage
    6ff088d [Andrew Or] Rename classes to generalize REST protocol
    af9d9cb [Andrew Or] Integrate REST protocol in standalone mode
    53e7c0e [Andrew Or] Initial client, server, and all the messages
Loading