Friday 30 June 2017

HOW TO RUN SBT (Simple Build Tool)




1) Create directory
manju@ubuntu:$mkdir sparksample

2) Change the directory
manju@ubuntu:$cd sparksample/

3) Create one more directory
 manju@ubuntu:$mkdir src

4) In src create main(in same directory  or  same folder)
manju@ubuntu:$mkdir src/main

5) In src create on more directory
 manju@ubuntu:$mkdir src/main/scala

6) By using vi editor  create one sbt doc
   manju@ubuntu:$vi sparksample.sbt

7) After create .sbt file give sbt
   manju@ubuntu:$sbt
   manju@ubuntu:$compile
   manju@ubuntu:$package
   manju@ubuntu:$exit

8) Give ls command
 manju@ubuntu:$sparksample $ls


project sparksample.sbt src target word count.spark

  manju@ubuntu:$cd target/
  manju@ubuntu:l$s
  manju@ubuntu:$cd scala 2.11/
  manju@ubuntu:$ls
  manju@ubuntu:$ spark-submit -- class Helloword sparksample-2.11-1.0 jar



object name-hello word
jar name-helloword sparksample-2.11-1.0.jar








1 comment:

  1. Thank you, so much useful. Truly it's work 100%.

    ReplyDelete