Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/5144#discussion_r28017323
--- Diff: core/src/main/scala/org/apache/spark/deploy/rest/RestClient.scala
---
@@ -219,14 +221,20 @@ private[deploy] class StandaloneRestClient extends
Logging {
/** Return the base URL for communicating with the server, including the
protocol version. */
private def getBaseUrl(master: String): String = {
- val masterUrl = master.stripPrefix("spark://").stripSuffix("/")
+ val masterUrl = if (master.startsWith("spark://")) {
+ master.stripPrefix("spark://").stripSuffix("/")
+ } else {
+ master.stripPrefix("mesos://").stripSuffix("/")
+ }
+
s"http://$masterUrl/$PROTOCOL_VERSION/submissions"
}
/** Throw an exception if this is not standalone mode. */
private def validateMaster(master: String): Unit = {
- if (!master.startsWith("spark://")) {
- throw new IllegalArgumentException("This REST client is only
supported in standalone mode.")
+ if (!master.startsWith("spark://") && !master.startsWith("mesos://")) {
+ throw new IllegalArgumentException(
+ "This REST client is only supported in standalone or Mesos mode.")
--- End diff --
same here, this should be implemented in the subclass
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]