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

    https://github.com/apache/spark/pull/3238#discussion_r20329191
  
    --- Diff: 
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala ---
    @@ -223,6 +224,29 @@ private[spark] trait ClientBase extends Logging {
             }
           }
         }
    +
    +    /**
    +     * Do the same for datanucleus jars, if they exist in spark home. Find 
all datanucleus-* jars,
    +     * copy them to the remote fs, and add them to the class path.
    +     */
    +    val sparkHomeOpt = 
sparkConf.getOption("spark.home").orElse(sys.env.get("SPARK_HOME"))
    +    for (sparkHome <- sparkHomeOpt) {
    +      val libs = sparkHome + Path.SEPARATOR + "lib"
    +      val jars = new File(libs).listFiles(new FilenameFilter() {
    +        override def accept(dir: File, name: String) = 
name.startsWith("datanucleus-")
    +      })
    +      // copy to remote and add to classpath
    +      jars.foreach { jar =>
    --- End diff --
    
    Hmm... this feels a little sub-optimal to me. For all others jars, the user 
has the option of either uploading them, or making them available on HDFS to 
avoid the cost of uploading them as part of every job. Perhaps the same should 
be done here?
    
    Also, I don't expect you to know the answer to this question, but why 
aren't these jars included in the assembly jar when the Hive profile is 
enabled? That seems like it would be the best solution for everybody and would 
make this change unnecessary...


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

Reply via email to