You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/26 10:01:09 UTC

[GitHub] [spark] gaborgsomogyi commented on a change in pull request #21339: [SPARK-24287][Core] Spark -packages option should support classifier, no-transitive, and custom conf

gaborgsomogyi commented on a change in pull request #21339: [SPARK-24287][Core] Spark -packages option should support classifier, no-transitive, and custom conf
URL: https://github.com/apache/spark/pull/21339#discussion_r269021756
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
 ##########
 @@ -1000,33 +1001,81 @@ private[spark] object SparkSubmitUtils {
     "tags_", "unsafe_")
 
   /**
-   * Represents a Maven Coordinate
-   * @param groupId the groupId of the coordinate
-   * @param artifactId the artifactId of the coordinate
-   * @param version the version of the coordinate
+   * Represents a Artifact Coordinate to resolve
+   * @param groupId the groupId of the artifact
+   * @param artifactId the artifactId of the artifact
+   * @param version the version of the artifact
+   * @param extraParams the extra params to resolve the artifact
    */
-  private[deploy] case class MavenCoordinate(groupId: String, artifactId: String, version: String) {
-    override def toString: String = s"$groupId:$artifactId:$version"
+  private[deploy] case class MavenCoordinate(groupId: String, artifactId: String, version: String,
+    extraParams: Map[String, String] = Map()) {
+
+    def params: String = if (extraParams.isEmpty) {
+        ""
+      } else {
+        "?" + extraParams.map{ case (k, v) => (k + "=" + v) }.mkString(":")
+      }
+
+    override def toString: String = s"$groupId:$artifactId:$version$params"
   }
 
   /**
-   * Extracts maven coordinates from a comma-delimited string. Coordinates should be provided
-   * in the format `groupId:artifactId:version` or `groupId/artifactId:version`.
-   * @param coordinates Comma-delimited string of maven coordinates
-   * @return Sequence of Maven coordinates
+   * Extracts artifact coordinates from a comma-delimited string. Coordinates should be provided
+   * in the format `groupId:artifactId:version?param1=value1\&param2\&value2:..` or
 
 Review comment:
   +1 on this, I would do something like `groupId:artifcatId:version:classifier`. Having classifier as a param is weird.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org