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 2020/10/02 21:53:45 UTC

[GitHub] [spark] ankits commented on a change in pull request #29874: [SPARK-32998] Add ability to override default remote repos with inter…

ankits commented on a change in pull request #29874:
URL: https://github.com/apache/spark/pull/29874#discussion_r499065894



##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala
##########
@@ -61,7 +61,8 @@ private[hive] object IsolatedClientLoader extends Logging {
     val files = if (resolvedVersions.contains((resolvedVersion, hadoopVersion))) {
       resolvedVersions((resolvedVersion, hadoopVersion))
     } else {
-      val remoteRepos = sparkConf.get(SQLConf.ADDITIONAL_REMOTE_REPOSITORIES)
+      val remoteRepos = sys.env.getOrElse(
+        "DEFAULT_ARTIFACT_REPOSITORY", sparkConf.get(SQLConf.ADDITIONAL_REMOTE_REPOSITORIES))

Review comment:
       @xkrogen During my testing of your suggested changes, the test still tries to download the artifact from `SQLConf.ADDITIONAL_REMOTE_REPOSITORIES` which points to `https://maven-central.storage-download.googleapis.com/maven2/`. I still need the change in `SQLConf.scala` to overwrite the maven repo. 
   
   ```   val ADDITIONAL_REMOTE_REPOSITORIES =
       buildConf("spark.sql.maven.additionalRemoteRepositories")
         .doc("A comma-delimited string config of the optional additional remote Maven mirror " +
           "repositories. This is only used for downloading Hive jars in IsolatedClientLoader " +
           "if the default Maven Central repo is unreachable.")
         .version("3.0.0")
         .stringConf
         .createWithDefault(
           sys.env.getOrElse(
             "DEFAULT_ARTIFACT_REPOSITORY",
             "https://maven-central.storage-download.googleapis.com/maven2/"))```
   
   Let me know your thoughts on this. 




----------------------------------------------------------------
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



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