Support Questions

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

zeppelin - how to remove results cache from notebook

avatar
Expert Contributor

Dear Experts,

I created a quite complex zeppelin notebook and accidentally returned a rather big result set for one of the queries (that I had to abort).

Now when I reopen the notebook in the browser, zeppelin takes ages and breaks after a while (I assume my browsers buffers are running over ...)

Any Idea on how I can clear/reset the zeppelin result sets without accessing/entering the notebook?

Any other idea on how I can bring back my notebook?

Thanks and br,

Rainer

1 ACCEPTED SOLUTION

avatar

Zeppelin stores all displayable information in a JSON format file named "note.json" (default), located under the home directory, usually /user/zeppelin/notebook. This JSON file includes source code, markup, and output results. Easiest thing to do is:

  • ssh into the machine where zeppelin service is running
  • cd to the notebook directory (cd /user/zeppelin/notebook)
  • cd to the specific notebook sub-directory; each notebook is in separate sub-dir (cd 2A94M5J1Z)
  • edit the note.json file and remove the unwanted results

If you use a good editor (like TextMate or vim) that has JSON plugin to format the contents, you can easily locate the results section and rip it out. Make sure you don't break the integrity of the JSON file itself; you just want to eliminate the inner JSON contents where the superfluous result is stored. Here is an example of a results field from note.json:

      "result": {
        "code": "SUCCESS",
        "type": "HTML",
        "msg": "\u003ch2\u003eWelcome to Zeppelin.\u003c/h2\u003e\n\u003ch5\u003eThis is a live tutorial, you can run the code yourself. (Shift-Enter to Run)\u003c/h5\u003e\n"
      },

View solution in original post

6 REPLIES 6

avatar

Zeppelin stores all displayable information in a JSON format file named "note.json" (default), located under the home directory, usually /user/zeppelin/notebook. This JSON file includes source code, markup, and output results. Easiest thing to do is:

  • ssh into the machine where zeppelin service is running
  • cd to the notebook directory (cd /user/zeppelin/notebook)
  • cd to the specific notebook sub-directory; each notebook is in separate sub-dir (cd 2A94M5J1Z)
  • edit the note.json file and remove the unwanted results

If you use a good editor (like TextMate or vim) that has JSON plugin to format the contents, you can easily locate the results section and rip it out. Make sure you don't break the integrity of the JSON file itself; you just want to eliminate the inner JSON contents where the superfluous result is stored. Here is an example of a results field from note.json:

      "result": {
        "code": "SUCCESS",
        "type": "HTML",
        "msg": "\u003ch2\u003eWelcome to Zeppelin.\u003c/h2\u003e\n\u003ch5\u003eThis is a live tutorial, you can run the code yourself. (Shift-Enter to Run)\u003c/h5\u003e\n"
      },

avatar
Expert Contributor

Worked like a charm 🙂 Thanks for your support!

avatar
Master Mentor

Rainer, next time instead of closing the question, hit accept. That's a best practice when you receive a satisfactory answer. I accepted the answer on your behalf but we would rather you accept answers going forward. Thanks

avatar
Expert Contributor

Will do, thanks ... me constantly improving 🙂

avatar
New Contributor

Thanks, resolve my problem.

avatar
New Contributor

Resolved my issue after modifying the JSON file and restarting zeppelin. Thanks for the help