You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/02/07 19:13:05 UTC

[GitHub] aashudwivedi commented on a change in pull request #14020: Fix jar path and add missing ones for spark jobs

aashudwivedi commented on a change in pull request #14020: Fix jar path and add missing ones for spark jobs
URL: https://github.com/apache/incubator-mxnet/pull/14020#discussion_r254829086
 
 

 ##########
 File path: scala-package/spark/src/test/scala/org/apache/mxnet/spark/SharedSparkContext.scala
 ##########
 @@ -80,14 +80,18 @@ trait SharedSparkContext extends FunSuite with BeforeAndAfterEach with BeforeAnd
     System.getProperty("user.dir")
   }
 
-  private def getJarFilePath(root: String): String = {
-    val jarFiles = new File(s"$root/target/").listFiles(new FileFilter {
+  private def findJars(root: String): Array[File] = {
+    val excludedSuffixes = List("bundle", "src", "javadoc", "sources")
+    new File(root).listFiles(new FileFilter {
       override def accept(pathname: File) = {
         pathname.getAbsolutePath.endsWith(".jar") &&
-          !pathname.getAbsolutePath.contains("bundle") &&
-          !pathname.getAbsolutePath.contains("src")
+          excludedSuffixes.map(!pathname.getAbsolutePath.contains(_)).forall(identity)
 
 Review comment:
   Done.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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