Re: Fw: Basic question on using one's own classes in the Scala app

2016-06-06 Thread Marco Mistroni
HI Ashok this is not really a spark-related question so i would not use this mailing list. Anyway, my 2 cents here as outlined by earlier replies, if the class you are referencing is in a different jar, at compile time you will need to add that dependency to your build.sbt, I'd personally

Fw: Basic question on using one's own classes in the Scala app

2016-06-06 Thread Ashok Kumar
Anyone can help me with this please On Sunday, 5 June 2016, 11:06, Ashok Kumar wrote: Hi all, Appreciate any advice on this. It is about scala I have created a very basic Utilities.scala that contains a test class and method. I intend to add my own classes and

Re: Basic question on using one's own classes in the Scala app

2016-06-05 Thread Ashok Kumar
Thank you. I added this as dependency libraryDependencies += "com.databricks" % "apps.twitter_classifier" % "1.0.0" That number at the end I chose arbitrary? Is that correct  Also in my TwitterAnalyzer.scala I added this linw import com.databricks.apps.twitter_classifier._ Now I am getting this

Re: Basic question on using one's own classes in the Scala app

2016-06-05 Thread Jacek Laskowski
On Sun, Jun 5, 2016 at 9:01 PM, Ashok Kumar wrote: > Now I have added this > > libraryDependencies += "com.databricks" % "apps.twitter_classifier" > > However, I am getting an error > > > error: No implicit for Append.Value[Seq[sbt.ModuleID], >

Re: Basic question on using one's own classes in the Scala app

2016-06-05 Thread Ashok Kumar
Hello for 1, I read the doc as libraryDependencies += groupID % artifactID % revision jar tvf utilities-assembly-0.1-SNAPSHOT.jar|grep CheckpointDirectory com/databricks/apps/twitter_classifier/getCheckpointDirectory.class getCheckpointDirectory.class Now I have added this libraryDependencies

Re: Basic question on using one's own classes in the Scala app

2016-06-05 Thread Ted Yu
For #1, please find examples on the net e.g. http://www.scala-sbt.org/0.13/docs/Scala-Files-Example.html For #2, import . getCheckpointDirectory Cheers On Sun, Jun 5, 2016 at 8:36 AM, Ashok Kumar wrote: > Thank you sir. > > At compile time can I do something similar to

Re: Basic question on using one's own classes in the Scala app

2016-06-05 Thread Ashok Kumar
Thank you sir. At compile time can I do something similar to libraryDependencies += "org.apache.spark" %% "spark-core" % "1.5.1" I have these name := "scala" version := "1.0" scalaVersion := "2.10.4" And if I look at jar file i have jar tvf utilities-assembly-0.1-SNAPSHOT.jar|grep Check  1180

Re: Basic question on using one's own classes in the Scala app

2016-06-05 Thread Ted Yu
At compilation time, you need to declare the dependence on getCheckpointDirectory. At runtime, you can use '--jars utilities-assembly-0.1-SNAPSHOT.jar' to pass the jar. Cheers On Sun, Jun 5, 2016 at 3:06 AM, Ashok Kumar wrote: > Hi all, > > Appreciate any advice

Basic question on using one's own classes in the Scala app

2016-06-05 Thread Ashok Kumar
Hi all, Appreciate any advice on this. It is about scala I have created a very basic Utilities.scala that contains a test class and method. I intend to add my own classes and methods as I expand and make references to these classes and methods in my other apps class getCheckpointDirectory {  def