If you set SPARK_HOME, please check that path first. If not, please show
your interpreter settings.

Thanks,

On Wed, Jul 5, 2017 at 4:55 PM, CHALLA <bizcha...@gmail.com> wrote:

> code being executed
> import sys.process._
>
> val sqlContext = new org.apache.spark.sql.SQLContext(sc)
>
> val bankText = sc.textFile("D:\Softs\zeppelin-0.7.2-bin-all\Bank\
> bank-full.csv")
>
> case class Bank(age:Integer, job:String, marital : String, education :
> String, balance : Integer)
>
> // split each line, filter out header (starts with "age"), and map it into
> Bank case class
> val bank = bankText.map(s=>s.split(";")).filter(s=>s(0)!="\"age\"").map(
>     s=>Bank(s(0).toInt,
>             s(1).replaceAll("\"", ""),
>             s(2).replaceAll("\"", ""),
>             s(3).replaceAll("\"", ""),
>             s(5).replaceAll("\"", "").toInt
>         )
> )
>
> // convert to DataFrame and create temporal table
> bank.toDF().registerTempTable("bank")
> ================================================
>
> error is as below
>
> java.lang.NullPointerException
> at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:38)
> at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:33)
> at 
> org.apache.zeppelin.spark.SparkInterpreter.createSparkContext_2(SparkInterpreter.java:391)
>
> at 
> org.apache.zeppelin.spark.SparkInterpreter.createSparkContext(SparkInterpreter.java:380)
>
> at 
> org.apache.zeppelin.spark.SparkInterpreter.getSparkContext(SparkInterpreter.java:146)
>
> at org.apache.zeppelin.spark.SparkInterpreter.open(SparkInterpreter.java:828)
>
> at 
> org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:70)
>
> at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$
> InterpretJob.jobRun(RemoteInterpreterServer.java:491)
> at org.apache.zeppelin.scheduler.Job.run(Job.java:175)
> at org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139)
>
> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> at java.util.concurrent.FutureTask.run(Unknown Source)
> at java.util.concurrent.ScheduledThreadPoolExecutor$
> ScheduledFutureTask.access$201(Unknown Source)
> at java.util.concurrent.ScheduledThreadPoolExecutor$
> ScheduledFutureTask.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> ==========================================================
> Please help
>
>
>
>


-- 
이종열, Jongyoul Lee, 李宗烈
http://madeng.net

Reply via email to