Giter Site home page Giter Site logo

Comments (12)

erikerlandson avatar erikerlandson commented on May 28, 2024

Looks like it is not finding the companion object TDigest$. I've never tried it that way, but it may be a consequence of how spark loads jar files.

Out of curiosity, does this work for you:

spark-shell --packages "org.isarnproject::isarn-sketches-spark:0.3.1-sp2.3-py3.6"

from isarn-sketches-spark.

erikerlandson avatar erikerlandson commented on May 28, 2024

Also: import org.isarnproject.sketches._

from isarn-sketches-spark.

richardxy avatar richardxy commented on May 28, 2024

Thanks. I tried what you asked for

$spark-shell --packages "org.isarnproject:isarn-sketches-spark:0.3.1-sp2.3-py3.6"

Exception in thread "main" java.lang.RuntimeException: [unresolved dependency: org.isarnproject#isarn-sketches-spark;0.3.1-sp2.3-py3.6: not found]

from isarn-sketches-spark.

richardxy avatar richardxy commented on May 28, 2024

What's your recommended way of loading the package?

from isarn-sketches-spark.

erikerlandson avatar erikerlandson commented on May 28, 2024

you need two colons after org.isarnproject

from isarn-sketches-spark.

richardxy avatar richardxy commented on May 28, 2024

$ spark-shell --packages "org.isarnproject::isarn-sketches-spark:0.3.1-sp2.3-py3.6"
Exception in thread "main" java.lang.IllegalArgumentException: requirement failed: Provided Maven Coordinates must be in the form 'groupId:artifactId:version'. The coordinate provided is: org.isarnproject::isarn-sketches-spark:0.3.1-sp2.3-py3.6
at scala.Predef$.require(Predef.scala:224)
at org.apache.spark.deploy.SparkSubmitUtils$$anonfun$extractMavenCoordinates$1.apply(SparkSubmit.scala:1000)
at org.apache.spark.deploy.SparkSubmitUtils$$anonfun$extractMavenCoordinates$1.apply(SparkSubmit.scala:998)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)
at org.apache.spark.deploy.SparkSubmitUtils$.extractMavenCoordinates(SparkSubmit.scala:998)
at org.apache.spark.deploy.SparkSubmitUtils$.resolveMavenCoordinates(SparkSubmit.scala:1220)
at org.apache.spark.deploy.DependencyUtils$.resolveMavenDependencies(DependencyUtils.scala:49)
at org.apache.spark.deploy.SparkSubmit$.prepareSubmitEnvironment(SparkSubmit.scala:350)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:170)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:136)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

from isarn-sketches-spark.

erikerlandson avatar erikerlandson commented on May 28, 2024

Oh, right it wants the scala version explicit.

spark-shell --packages "org.isarnproject:isarn-sketches-spark_2.11:0.3.1-sp2.3-py3.6"

I do think you'll also want: import org.isarnproject.sketches._

from isarn-sketches-spark.

richardxy avatar richardxy commented on May 28, 2024

Thanks. But...

scala> import org.isarnproject.sketches._
import org.isarnproject.sketches._

scala> val udaf = tdigestUDAF[Double]
:26: error: not found: value tdigestUDAF
val udaf = tdigestUDAF[Double]

from isarn-sketches-spark.

erikerlandson avatar erikerlandson commented on May 28, 2024

ah, I meant "in addition to the other imports you already had"

from isarn-sketches-spark.

richardxy avatar richardxy commented on May 28, 2024

Got it. Thank you!

from isarn-sketches-spark.

erikerlandson avatar erikerlandson commented on May 28, 2024

I think originally, you might have just been missing the import org.isarnproject.sketches._, although I'm not sure if the jar file would have included all the right dependencies.

For maven style packages, the "intended" way is to use --packages ..., but if you got the full set of jar files for all deps, then --jars ought to work too

from isarn-sketches-spark.

richardxy avatar richardxy commented on May 28, 2024

I'll follow your suggestion of importing packages. I didn't know what's the right package name to use in the first place. Now I know. Thanks!

from isarn-sketches-spark.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.