Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Trouble Importing JSON for INTRO TO MACHINE LEARNING WITH APACHE SPARK AND APACHE ZEPPELIN

avatar
Contributor

Hi there:

I am a newbie to this Hadoop/Big Data world.

I am trying to do the tutorial titled INTRO TO MACHINE LEARNING WITH APACHE SPARK AND APACHE ZEPPELIN located at: http://hortonworks.com/hadoop-tutorial/intro-machine-learning-apache-spark-apache-zeppelin

However when I try to import the json located at https://raw.githubusercontent.com/hortonworks-gallery/zeppelin-notebooks/hdp-2.5/2BYWFW95E/note.json, nothing happens.

BTW I am using HDP Sandbox 2.4. Is it because the JSON is meant for Sandbox 2.5? If so, where can I find the file for 2.4?

Any help will be much appreciated.

Thanks

Anindya

1 ACCEPTED SOLUTION

avatar

Hi Anindya, generally all the tutorials and corresponding labs are for the latest sandbox, currently HDP 2.5.

Two options:

1. Download the latest sandbox HDP 2.5

2. Use a similar notebook in the main Zeppelin notebook list: Lab 201: Intro to Machine Learning with Spark

You can find other Zeppelin notebooks here: https://github.com/hortonworks-gallery/zeppelin-notebooks/tree/master

And in the future each version of Sandbox will have a corresponding branch. E.g. there's HDP 2.5 branch now, so there won't be compatibility issues down the road with newer versions of Zeppelin on older Sandboxes.

View solution in original post

5 REPLIES 5

avatar
Super Guru
@Anindya Chattopadhyay

Could be a connectivity issue from your VM. Did you go over the following?

http://hortonworks.com/hadoop-tutorial/learning-the-ropes-of-the-hortonworks-sandbox/

To make your tutorial work and go to next step, just copy and paste the JSON using a choose a JSON here button instead.

avatar

Hi Anindya, generally all the tutorials and corresponding labs are for the latest sandbox, currently HDP 2.5.

Two options:

1. Download the latest sandbox HDP 2.5

2. Use a similar notebook in the main Zeppelin notebook list: Lab 201: Intro to Machine Learning with Spark

You can find other Zeppelin notebooks here: https://github.com/hortonworks-gallery/zeppelin-notebooks/tree/master

And in the future each version of Sandbox will have a corresponding branch. E.g. there's HDP 2.5 branch now, so there won't be compatibility issues down the road with newer versions of Zeppelin on older Sandboxes.

avatar
Contributor

@mqureshi, thanks for the info. Yes I did try that tutorial and also I could import other json. The problem was with that json.

@Robert Hryniewicz, thanks for the link. Yes I could successfully import Lab 201 using HDP 2.4. So my hunch is the other json is probably corrupted one.

Thanks a lot.

Anindya

avatar
Expert Contributor

@Anindya Chattopadhyay, @Robert Hryniewicz

I tried to import the json from https://github.com/hortonworks-gallery/zeppelin-notebooks/tree/master but nothing is happening. Can you please let me know how you imported the json for HDP 2.4 or the link which I can use to import.

Thanks in advance!!!

avatar
Expert Contributor

@Anindya Chattopadhyay @Robert Hryniewicz

I am getting the below error when trying to import note.json (https://raw.githubusercontent.com/hortonworks-gallery/zeppelin-notebooks/master/2B4TWGC8M/note.json) in HDP 2.4 .

ERROR [2017-04-14 20:29:51,306] ({qtp1690716179-13} NotebookServer.java[onMessage]:207) - Can't handle message com.google.gson.JsonSyntaxException: 2015-10-25T02:32:33+0000 at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:81) at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:66) at com.google.gson.internal.bind.DateTypeAdapter.read(DateTypeAdapter.java:41) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.Gson.fromJson(Gson.java:791) at org.apache.zeppelin.notebook.Notebook.importNote(Notebook.java:195) at org.apache.zeppelin.socket.NotebookServer.importNote(NotebookServer.java:599) at org.apache.zeppelin.socket.NotebookServer.onMessage(NotebookServer.java:157) at org.apache.zeppelin.socket.NotebookSocket.onWebSocketText(NotebookSocket.java:56) at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextMessage(JettyListenerEventDriver.java:128) at org.eclipse.jetty.websocket.common.message.SimpleTextMessage.messageComplete(SimpleTextMessage.java:69) at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:65) at org.eclipse.jetty.websocket.common.events.JettyListenerEventDriver.onTextFrame(JettyListenerEventDriver.java:122) at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:161) at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:309) at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:214) at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220) at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:258) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:632) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:480) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) Caused by: java.text.ParseException: Unparseable date: "2015-10-25T02:32:33+0000" at java.text.DateFormat.parse(DateFormat.java:366) at com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate(DateTypeAdapter.java:79) ... 29 more

ZEPPELIN-1028 and ZEPPELIN-1129 both seems to be related.

Appreciate your help..