mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Minor tweaks to the tutorial notebook to support Spark 1.3.0
Also a couple of minor grammar tweaks in the first paragraph.
This commit is contained in:
parent
b6768c6de7
commit
9d6c3780b1
1 changed files with 71 additions and 31 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"paragraphs": [
|
||||
{
|
||||
"text": "%md\n## Welcome to Zeppelin.\n##### This is a live tutorial, you can run codes by yourself. (Shift-Enter to Run)",
|
||||
"text": "%md\n## Welcome to Zeppelin.\n##### This is a live tutorial, you can run the code yourself. (Shift-Enter to Run)",
|
||||
"config": {
|
||||
"colWidth": 12.0,
|
||||
"graph": {
|
||||
|
|
@ -10,7 +10,8 @@
|
|||
"optionOpen": false,
|
||||
"keys": [],
|
||||
"values": [],
|
||||
"groups": []
|
||||
"groups": [],
|
||||
"scatter": {}
|
||||
},
|
||||
"editorHide": false
|
||||
},
|
||||
|
|
@ -23,11 +24,11 @@
|
|||
"result": {
|
||||
"code": "SUCCESS",
|
||||
"type": "HTML",
|
||||
"msg": "\u003ch2\u003eWelcome to Zeppelin.\u003c/h2\u003e\n\u003ch5\u003eThis is a live tutorial, you can run codes by yourself. (Shift-Enter to Run)\u003c/h5\u003e\n"
|
||||
"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"
|
||||
},
|
||||
"dateCreated": "Feb 13, 2015 11:16:21 PM",
|
||||
"dateStarted": "Feb 13, 2015 11:23:27 PM",
|
||||
"dateFinished": "Feb 13, 2015 11:23:27 PM",
|
||||
"dateStarted": "Apr 1, 2015 9:11:09 PM",
|
||||
"dateFinished": "Apr 1, 2015 9:11:10 PM",
|
||||
"status": "FINISHED",
|
||||
"progressUpdateIntervalMs": 500
|
||||
},
|
||||
|
|
@ -42,7 +43,8 @@
|
|||
"optionOpen": false,
|
||||
"keys": [],
|
||||
"values": [],
|
||||
"groups": []
|
||||
"groups": [],
|
||||
"scatter": {}
|
||||
},
|
||||
"title": true
|
||||
},
|
||||
|
|
@ -55,17 +57,17 @@
|
|||
"result": {
|
||||
"code": "SUCCESS",
|
||||
"type": "TEXT",
|
||||
"msg": "import sys.process._\nwarning: there were 1 feature warning(s); re-run with -feature for details\nres49: Int \u003d 0\nwarning: there were 1 feature warning(s); re-run with -feature for details\nres50: Int \u003d 1\nwarning: there were 1 feature warning(s); re-run with -feature for details\nres51: Int \u003d 1\nwarning: there were 1 feature warning(s); re-run with -feature for details\nres52: Int \u003d 0\n"
|
||||
"msg": "import sys.process._\nwarning: there were 1 feature warning(s); re-run with -feature for details\nres1: Int \u003d 0\nwarning: there were 1 feature warning(s); re-run with -feature for details\nres2: Int \u003d 0\nwarning: there were 1 feature warning(s); re-run with -feature for details\nres3: Int \u003d 0\nwarning: there were 1 feature warning(s); re-run with -feature for details\nres4: Int \u003d 0\n"
|
||||
},
|
||||
"dateCreated": "Dec 4, 2014 10:28:55 AM",
|
||||
"dateStarted": "Feb 13, 2015 11:22:01 PM",
|
||||
"dateFinished": "Feb 13, 2015 11:22:09 PM",
|
||||
"dateStarted": "Apr 1, 2015 9:11:12 PM",
|
||||
"dateFinished": "Apr 1, 2015 9:11:22 PM",
|
||||
"status": "FINISHED",
|
||||
"progressUpdateIntervalMs": 500
|
||||
},
|
||||
{
|
||||
"title": "Load data into table",
|
||||
"text": "val zeppelinHome \u003d (\"pwd\" !!).replace(\"\\n\", \"\")\nval bankText \u003d sc.textFile(s\"$zeppelinHome/data/bank-full.csv\")\n\ncase class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)\n\nval bank \u003d bankText.map(s \u003d\u003e s.split(\";\")).filter(s \u003d\u003e s(0) !\u003d \"\\\"age\\\"\").map(\n s \u003d\u003e Bank(s(0).toInt, \n s(1).replaceAll(\"\\\"\", \"\"),\n s(2).replaceAll(\"\\\"\", \"\"),\n s(3).replaceAll(\"\\\"\", \"\"),\n s(5).replaceAll(\"\\\"\", \"\").toInt\n )\n)\nbank.registerTempTable(\"bank\")",
|
||||
"text": "import sys.process._\n// sc is an existing SparkContext.\nval sqlContext \u003d new org.apache.spark.sql.SQLContext(sc)\n\n\nval zeppelinHome \u003d (\"pwd\" !!).replace(\"\\n\", \"\")\nval bankText \u003d sc.textFile(s\"$zeppelinHome/data/bank-full.csv\")\n\ncase class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)\n\nval bank \u003d bankText.map(s \u003d\u003e s.split(\";\")).filter(s \u003d\u003e s(0) !\u003d \"\\\"age\\\"\").map(\n s \u003d\u003e Bank(s(0).toInt, \n s(1).replaceAll(\"\\\"\", \"\"),\n s(2).replaceAll(\"\\\"\", \"\"),\n s(3).replaceAll(\"\\\"\", \"\"),\n s(5).replaceAll(\"\\\"\", \"\").toInt\n )\n).toDF()\nbank.registerTempTable(\"bank\")\n\n",
|
||||
"config": {
|
||||
"colWidth": 12.0,
|
||||
"graph": {
|
||||
|
|
@ -74,7 +76,8 @@
|
|||
"optionOpen": false,
|
||||
"keys": [],
|
||||
"values": [],
|
||||
"groups": []
|
||||
"groups": [],
|
||||
"scatter": {}
|
||||
},
|
||||
"title": true
|
||||
},
|
||||
|
|
@ -87,11 +90,11 @@
|
|||
"result": {
|
||||
"code": "SUCCESS",
|
||||
"type": "TEXT",
|
||||
"msg": "warning: there were 1 feature warning(s); re-run with -feature for details\nzeppelinHome: String \u003d /Users/swkim/Documents/zeppelin\nbankText: org.apache.spark.rdd.RDD[String] \u003d /Users/swkim/Documents/zeppelin/data/bank-full.csv MappedRDD[147] at textFile at \u003cconsole\u003e:24\ndefined class Bank\nbank: org.apache.spark.rdd.RDD[Bank] \u003d MappedRDD[150] at map at \u003cconsole\u003e:29\n"
|
||||
"msg": "import sys.process._\nsqlContext: org.apache.spark.sql.SQLContext \u003d org.apache.spark.sql.SQLContext@2c91e2d6\nwarning: there were 1 feature warning(s); re-run with -feature for details\nzeppelinHome: String \u003d /home/langley/lab/incubator-zeppelin\nbankText: org.apache.spark.rdd.RDD[String] \u003d /home/langley/lab/incubator-zeppelin/data/bank-full.csv MapPartitionsRDD[1] at textFile at \u003cconsole\u003e:31\ndefined class Bank\nbank: org.apache.spark.sql.DataFrame \u003d [age: int, job: string, marital: string, education: string, balance: int]\n"
|
||||
},
|
||||
"dateCreated": "Feb 10, 2015 1:52:59 AM",
|
||||
"dateStarted": "Feb 13, 2015 11:15:38 PM",
|
||||
"dateFinished": "Feb 13, 2015 11:15:42 PM",
|
||||
"dateStarted": "Apr 1, 2015 9:11:28 PM",
|
||||
"dateFinished": "Apr 1, 2015 9:11:39 PM",
|
||||
"status": "FINISHED",
|
||||
"progressUpdateIntervalMs": 500
|
||||
},
|
||||
|
|
@ -117,7 +120,19 @@
|
|||
"aggr": "sum"
|
||||
}
|
||||
],
|
||||
"groups": []
|
||||
"groups": [],
|
||||
"scatter": {
|
||||
"xAxis": {
|
||||
"name": "age",
|
||||
"index": 0.0,
|
||||
"aggr": "sum"
|
||||
},
|
||||
"yAxis": {
|
||||
"name": "value",
|
||||
"index": 1.0,
|
||||
"aggr": "sum"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
|
|
@ -132,8 +147,8 @@
|
|||
"msg": "age\tvalue\n18\t12\n19\t35\n20\t50\n21\t79\n22\t129\n23\t202\n24\t302\n25\t527\n26\t805\n27\t909\n28\t1038\n29\t1185\n"
|
||||
},
|
||||
"dateCreated": "Feb 10, 2015 1:53:02 AM",
|
||||
"dateStarted": "Feb 13, 2015 11:15:45 PM",
|
||||
"dateFinished": "Feb 13, 2015 11:15:47 PM",
|
||||
"dateStarted": "Apr 1, 2015 9:11:43 PM",
|
||||
"dateFinished": "Apr 1, 2015 9:11:45 PM",
|
||||
"status": "FINISHED",
|
||||
"progressUpdateIntervalMs": 500
|
||||
},
|
||||
|
|
@ -159,12 +174,24 @@
|
|||
"aggr": "sum"
|
||||
}
|
||||
],
|
||||
"groups": []
|
||||
"groups": [],
|
||||
"scatter": {
|
||||
"xAxis": {
|
||||
"name": "age",
|
||||
"index": 0.0,
|
||||
"aggr": "sum"
|
||||
},
|
||||
"yAxis": {
|
||||
"name": "value",
|
||||
"index": 1.0,
|
||||
"aggr": "sum"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"params": {
|
||||
"maxAge": "30"
|
||||
"maxAge": "35"
|
||||
},
|
||||
"forms": {
|
||||
"maxAge": {
|
||||
|
|
@ -179,11 +206,11 @@
|
|||
"result": {
|
||||
"code": "SUCCESS",
|
||||
"type": "TABLE",
|
||||
"msg": "age\tvalue\n18\t12\n19\t35\n20\t50\n21\t79\n22\t129\n23\t202\n24\t302\n25\t527\n26\t805\n27\t909\n28\t1038\n29\t1185\n"
|
||||
"msg": "age\tvalue\n18\t12\n19\t35\n20\t50\n21\t79\n22\t129\n23\t202\n24\t302\n25\t527\n26\t805\n27\t909\n28\t1038\n29\t1185\n30\t1757\n31\t1996\n32\t2085\n33\t1972\n34\t1930\n"
|
||||
},
|
||||
"dateCreated": "Feb 12, 2015 2:54:04 PM",
|
||||
"dateStarted": "Feb 13, 2015 11:15:49 PM",
|
||||
"dateFinished": "Feb 13, 2015 11:15:51 PM",
|
||||
"dateStarted": "Apr 1, 2015 9:12:03 PM",
|
||||
"dateFinished": "Apr 1, 2015 9:12:03 PM",
|
||||
"status": "FINISHED",
|
||||
"progressUpdateIntervalMs": 500
|
||||
},
|
||||
|
|
@ -209,7 +236,19 @@
|
|||
"aggr": "sum"
|
||||
}
|
||||
],
|
||||
"groups": []
|
||||
"groups": [],
|
||||
"scatter": {
|
||||
"xAxis": {
|
||||
"name": "age",
|
||||
"index": 0.0,
|
||||
"aggr": "sum"
|
||||
},
|
||||
"yAxis": {
|
||||
"name": "value",
|
||||
"index": 1.0,
|
||||
"aggr": "sum"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
|
|
@ -243,8 +282,8 @@
|
|||
"msg": "age\tvalue\n18\t12\n19\t35\n20\t47\n21\t74\n22\t120\n23\t175\n24\t248\n25\t423\n26\t615\n27\t658\n28\t697\n29\t683\n30\t1012\n31\t1017\n32\t941\n33\t746\n34\t650\n35\t631\n36\t538\n37\t453\n38\t394\n39\t346\n40\t257\n41\t241\n42\t218\n43\t183\n44\t170\n45\t146\n46\t130\n47\t100\n48\t124\n49\t101\n50\t76\n51\t72\n52\t62\n53\t71\n54\t55\n55\t54\n56\t45\n57\t38\n58\t35\n59\t36\n60\t27\n61\t5\n63\t2\n66\t5\n67\t3\n68\t4\n69\t2\n70\t1\n71\t1\n72\t5\n73\t2\n77\t1\n83\t2\n86\t1\n"
|
||||
},
|
||||
"dateCreated": "Feb 13, 2015 11:04:22 PM",
|
||||
"dateStarted": "Feb 13, 2015 11:15:51 PM",
|
||||
"dateFinished": "Feb 13, 2015 11:15:53 PM",
|
||||
"dateStarted": "Apr 1, 2015 9:12:10 PM",
|
||||
"dateFinished": "Apr 1, 2015 9:12:10 PM",
|
||||
"status": "FINISHED",
|
||||
"progressUpdateIntervalMs": 500
|
||||
},
|
||||
|
|
@ -258,7 +297,8 @@
|
|||
"optionOpen": false,
|
||||
"keys": [],
|
||||
"values": [],
|
||||
"groups": []
|
||||
"groups": [],
|
||||
"scatter": {}
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
|
|
@ -273,8 +313,8 @@
|
|||
"msg": "\u003ch2\u003eCongratulations, it\u0027s done.\u003c/h2\u003e\n\u003ch5\u003eYou can create your own notebook in \u0027Notebook\u0027 menu. Good luck!\u003c/h5\u003e\n"
|
||||
},
|
||||
"dateCreated": "Feb 13, 2015 11:04:28 PM",
|
||||
"dateStarted": "Feb 13, 2015 11:23:16 PM",
|
||||
"dateFinished": "Feb 13, 2015 11:23:16 PM",
|
||||
"dateStarted": "Apr 1, 2015 9:12:18 PM",
|
||||
"dateFinished": "Apr 1, 2015 9:12:18 PM",
|
||||
"status": "FINISHED",
|
||||
"progressUpdateIntervalMs": 500
|
||||
},
|
||||
|
|
@ -284,9 +324,9 @@
|
|||
"params": {},
|
||||
"forms": {}
|
||||
},
|
||||
"jobName": "paragraph_1423836471379_293523076",
|
||||
"id": "20150213-230751_1038476812",
|
||||
"dateCreated": "Feb 13, 2015 11:07:51 PM",
|
||||
"jobName": "paragraph_1427420818407_872443482",
|
||||
"id": "20150326-214658_12335843",
|
||||
"dateCreated": "Mar 26, 2015 9:46:58 PM",
|
||||
"status": "READY",
|
||||
"progressUpdateIntervalMs": 500
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue