Created
September 15, 2016 05:35
-
-
Save randerzander/9c2eee67abc3534390b2b1b0d13d48c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"paragraphs": [ | |
{ | |
"title": "Page Setup", | |
"text": "%angular\n\u003cscript src\u003d\"https://cdn.plot.ly/plotly-latest.min.js\"\u003e\u003c/script\u003e\n\u003cdiv id\u003d\"dummy\" vars\u003d\"data,dataSchema\"\u003e\u003c/div\u003e\n\u003cscript type\u003d\"text/javascript\"\u003e\n var div \u003d $(\u0027#dummy\u0027);\n //Given an element in the note \u0026 list of values to fetch from Spark\n //window.angularVars.myVal will be current value of backend Spark val of same name\n function hoist(element, varNames){\n window.angularVars \u003d {};\n var scope \u003d angular.element(element.parent(\u0027.ng-scope\u0027)).scope().compiledScope;\n $.each(varNames, function(i, v){\n window[v+\u0027-watcher\u0027] \u003d scope.$watch(v, function(newVal, oldVal){\n console.log(\u0027Setting \u0027 + v + \u0027 to:\\n\u0027);\n console.log(newVal);\n window.angularVars[v] \u003d newVal;\n });\n });\n }\n hoist(div, div.attr(\u0027vars\u0027).split(\u0027,\u0027));\n\u003c/script\u003e", | |
"dateUpdated": "Sep 15, 2016 1:25:20 AM", | |
"config": { | |
"colWidth": 12.0, | |
"editorMode": "ace/mode/scala", | |
"editorHide": true, | |
"title": true, | |
"graph": { | |
"mode": "table", | |
"height": 300.0, | |
"optionOpen": false, | |
"keys": [], | |
"values": [], | |
"groups": [], | |
"scatter": {}, | |
"map": { | |
"baseMapType": "Streets", | |
"isOnline": true, | |
"pinCols": [] | |
} | |
}, | |
"enabled": true | |
}, | |
"settings": { | |
"params": {}, | |
"forms": {} | |
}, | |
"apps": [], | |
"jobName": "paragraph_1473916762532_-1206165572", | |
"id": "20160911-235522_489884786", | |
"result": { | |
"code": "SUCCESS", | |
"type": "ANGULAR", | |
"msg": "\u003cscript src\u003d\"https://cdn.plot.ly/plotly-latest.min.js\"\u003e\u003c/script\u003e\n\u003cdiv id\u003d\"dummy\" vars\u003d\"data,dataSchema\"\u003e\u003c/div\u003e\n\u003cscript type\u003d\"text/javascript\"\u003e\n var div \u003d $(\u0027#dummy\u0027);\n //Given an element in the note \u0026 list of values to fetch from Spark\n //window.angularVars.myVal will be current value of backend Spark val of same name\n function hoist(element, varNames){\n window.angularVars \u003d {};\n var scope \u003d angular.element(element.parent(\u0027.ng-scope\u0027)).scope().compiledScope;\n $.each(varNames, function(i, v){\n window[v+\u0027-watcher\u0027] \u003d scope.$watch(v, function(newVal, oldVal){\n console.log(\u0027Setting \u0027 + v + \u0027 to:\\n\u0027);\n console.log(newVal);\n window.angularVars[v] \u003d newVal;\n });\n });\n }\n hoist(div, div.attr(\u0027vars\u0027).split(\u0027,\u0027));\n\u003c/script\u003e" | |
}, | |
"dateCreated": "Sep 15, 2016 1:19:22 AM", | |
"status": "READY", | |
"errorMessage": "", | |
"progressUpdateIntervalMs": 500 | |
}, | |
{ | |
"title": "Get Data", | |
"text": "%sh\nURL\u003dftp://ita.ee.lbl.gov/traces/NASA_access_log_Jul95.gz\nTARGET\u003dlogs.gz\nif [ ! -f $TARGET ]; then\n echo \"Downloading logs..\"\n wget -nv $URL -O $TARGET\nfi\necho \"Logs saved to $TARGET..\"", | |
"dateUpdated": "Sep 15, 2016 1:33:50 AM", | |
"config": { | |
"colWidth": 12.0, | |
"editorMode": "ace/mode/sh", | |
"editorHide": false, | |
"title": true, | |
"graph": { | |
"mode": "table", | |
"height": 300.0, | |
"optionOpen": false, | |
"keys": [], | |
"values": [], | |
"groups": [], | |
"scatter": {}, | |
"map": { | |
"baseMapType": "Streets", | |
"isOnline": true, | |
"pinCols": [] | |
} | |
}, | |
"enabled": true | |
}, | |
"settings": { | |
"params": {}, | |
"forms": {} | |
}, | |
"apps": [], | |
"jobName": "paragraph_1473916762541_-1209628312", | |
"id": "20160911-235542_40757740", | |
"result": { | |
"code": "SUCCESS", | |
"type": "TEXT", | |
"msg": "Logs saved to logs.gz..\n" | |
}, | |
"dateCreated": "Sep 15, 2016 1:19:22 AM", | |
"status": "READY", | |
"errorMessage": "", | |
"progressUpdateIntervalMs": 500 | |
}, | |
{ | |
"title": "Parse from Logs to Rows \u0026 Columns", | |
"text": "%spark\ncase class Log(Source: String, ts: String, Verb: String, URL: String, Protocol: String, Code: String, Size: Int)\n\n/*\nSample Data:\n199.72.81.55 - - [01/Jul/1995:00:00:01 -0400] \"GET /history/apollo/ HTTP/1.0\" 200 6245\n199.120.110.21 - - [01/Jul/1995:00:00:09 -0400] \"GET /shuttle/missions/sts-73/mission-sts-73.html HTTP/1.0\" 200 4085\nburger.letters.com - - [01/Jul/1995:00:00:11 -0400] \"GET /shuttle/countdown/liftoff.html HTTP/1.0\" 304 0\nknuth.mtsu.edu - - [22/Jul/1995:01:49:32 -0400] \"GET /images/\"\u003eindex of /images HTTP/1.0\" 404 -\n*/\nsc.textFile(\"logs.gz\").filter(_.split(\"\\\\s\").size \u003e\u003d 10).map(x \u003d\u003e {\n val req \u003d x.split(\"\\\"\").slice(1, x.split(\"\\\"\").size-1).mkString(\"\\\"\").split(\"\\\\s\")\n val ts \u003d x.split(\"\\\\[\")(1).split(\"\\\\]\")(0).split(\" \")(0)\n val postReq \u003d x.split(\"\\\"\").last.trim.split(\"\\\\s\")\n Log(x.split(\" \")(0), ts, req.head, req.slice(1, req.size-1).mkString(\" \"), req.last, postReq(0), if (postReq.size \u003e 1) postReq(1).replace(\"-\", \"0\").toInt else 0)\n}).toDF().createOrReplaceTempView(\"weblogs_raw\")\n\nsqlContext.sql(\"\"\"\ncreate table if not exists weblogs stored as parquet as\nselect source, from_unixtime(unix_timestamp(ts, \u0027dd/MMMM/yyyy:HH:mm:ss\u0027)) as datetime, verb, url, protocol, code, size from weblogs_raw\n\"\"\")\nsqlContext.cacheTable(\"weblogs\")\nsqlContext.sql(\"select count(*) from weblogs\").collect()", | |
"dateUpdated": "Sep 15, 2016 1:26:09 AM", | |
"config": { | |
"colWidth": 12.0, | |
"editorMode": "ace/mode/scala", | |
"editorHide": false, | |
"title": true, | |
"graph": { | |
"mode": "table", | |
"height": 300.0, | |
"optionOpen": false, | |
"keys": [], | |
"values": [], | |
"groups": [], | |
"scatter": {}, | |
"map": { | |
"baseMapType": "Streets", | |
"isOnline": true, | |
"pinCols": [] | |
} | |
}, | |
"enabled": true | |
}, | |
"settings": { | |
"params": {}, | |
"forms": {} | |
}, | |
"apps": [], | |
"jobName": "paragraph_1473916762543_-1208858815", | |
"id": "20160912-004031_1162211691", | |
"result": { | |
"code": "SUCCESS", | |
"type": "TEXT", | |
"msg": "\ndefined class Log\n\nres115: org.apache.spark.sql.DataFrame \u003d []\n\nres117: Array[org.apache.spark.sql.Row] \u003d Array([1888790])\n" | |
}, | |
"dateCreated": "Sep 15, 2016 1:19:22 AM", | |
"status": "READY", | |
"errorMessage": "", | |
"progressUpdateIntervalMs": 500 | |
}, | |
{ | |
"text": "%spark\n//Query for populating Plotly graph\nval query \u003d \"\"\"\nselect\n concat(date_format(datetime, \u0027yyyy-MM-dd HH\u0027), \u0027:00:00\u0027) as time,\n count(*) as activity\nfrom weblogs\ngroup by concat(date_format(datetime, \u0027yyyy-MM-dd HH\u0027), \u0027:00:00\u0027)\norder by time asc\n\"\"\"\nval data \u003d sqlContext.sql(query)\nz.angularBind(\"data\", data.collect())\nz.angularBind(\"dataSchema\", data.schema)\nz.run(\"20160912-040323_647948317\")\n\n//Convenient wrapper around table display syntax: https://zeppelin.apache.org/docs/0.7.0-SNAPSHOT/displaysystem/basicdisplaysystem.html#table\ndef printQueryResultsAsTable(query: String) : Unit \u003d {\n val df \u003d sqlContext.sql(query.replace(\"?\", \"\"))\n println(\"%table \" + df.columns.mkString(\"\\t\"))\n println(df.map(x \u003d\u003e x.mkString(\"\\t\")).collect().mkString(\"\\n\")) \n}\n\n//Create variables to hold query texts\nvar logQuery \u003d \"\"\nvar sourceQuery \u003d \"\"\nvar areaQuery \u003d \"\"\nvar codeQuery \u003d \"\"\n\n//Helper for resetting query texts to default\ndef resetQueries() : Unit \u003d {\n logQuery \u003d \"select * from weblogs ?WHERE limit 50\"\n sourceQuery \u003d \"select source, count(*) as count from weblogs ?WHERE group by source order by count desc limit 50\"\n codeQuery \u003d \"select code, count(*) as count from weblogs ?WHERE group by code\"\n areaQuery \u003d \"\"\"\n select\n split(regexp_replace(url, \u0027http\\:\\/\\/\u0027, \u0027\u0027), \u0027/\u0027)[1] as area,\n count(*) as count\n from weblogs\n ?WHERE\n group by split(regexp_replace(url, \u0027http\\:\\/\\/\u0027, \u0027\u0027), \u0027/\u0027)[1]\n order by count desc limit 50\n \"\"\"\n}\nresetQueries()\n\n//Init the Angular variable \"bounds\"\nz.angularBind(\"bounds\", \"\")\n//Init the callback listening for changes to \"bounds\"\nz.angularWatch(\"bounds\", (oldVal, newVal) \u003d\u003e {\n val t1 \u003d newVal.asInstanceOf[String].split(\"\\\\|\")(0)\n val t2 \u003d newVal.asInstanceOf[String].split(\"\\\\|\")(1)\n \n resetQueries()\n //If bounds are valid dates, add set the where filter.. otherwise remove it\n val where \u003d if (t1.equals(\"NaN\") || t2.equals(\"NaN\")) \"\" else \"where unix_timestamp(datetime) \u003e\u003d \" + t1 + \" and unix_timestamp(datetime) \u003c\u003d \" + t2 \n logQuery \u003d logQuery.replace(\"?WHERE\", where)\n sourceQuery \u003d sourceQuery.replace(\"?WHERE\", where)\n areaQuery \u003d areaQuery.replace(\"?WHERE\", where)\n codeQuery \u003d codeQuery.replace(\"?WHERE\", where)\n})", | |
"dateUpdated": "Sep 15, 2016 1:26:47 AM", | |
"config": { | |
"colWidth": 12.0, | |
"editorMode": "ace/mode/scala", | |
"editorHide": false, | |
"graph": { | |
"mode": "table", | |
"height": 300.0, | |
"optionOpen": false, | |
"keys": [ | |
{ | |
"name": "day", | |
"index": 0.0, | |
"aggr": "sum" | |
} | |
], | |
"values": [ | |
{ | |
"name": "hour", | |
"index": 1.0, | |
"aggr": "sum" | |
} | |
], | |
"groups": [], | |
"scatter": { | |
"xAxis": { | |
"name": "day", | |
"index": 0.0, | |
"aggr": "sum" | |
}, | |
"yAxis": { | |
"name": "hour", | |
"index": 1.0, | |
"aggr": "sum" | |
} | |
}, | |
"map": { | |
"baseMapType": "Streets", | |
"isOnline": true, | |
"pinCols": [] | |
} | |
}, | |
"enabled": true | |
}, | |
"settings": { | |
"params": {}, | |
"forms": {} | |
}, | |
"apps": [], | |
"jobName": "paragraph_1473916762543_-1208858815", | |
"id": "20160912-004714_1690408133", | |
"result": { | |
"code": "SUCCESS", | |
"type": "TEXT", | |
"msg": "\n\n\n\n\n\n\n\n\nquery: String \u003d\n\"\nselect\n concat(date_format(datetime, \u0027yyyy-MM-dd HH\u0027), \u0027:00:00\u0027) as time,\n count(*) as activity\nfrom weblogs\ngroup by concat(date_format(datetime, \u0027yyyy-MM-dd HH\u0027), \u0027:00:00\u0027)\norder by time asc\n\"\n\ndata: org.apache.spark.sql.DataFrame \u003d [time: string, activity: bigint]\n\nprintQueryResultsAsTable: (query: String)Unit\n\nlogQuery: String \u003d \"\"\n\nsourceQuery: String \u003d \"\"\n\nareaQuery: String \u003d \"\"\n\ncodeQuery: String \u003d \"\"\n\nresetQueries: ()Unit\n" | |
}, | |
"dateCreated": "Sep 15, 2016 1:19:22 AM", | |
"status": "READY", | |
"errorMessage": "", | |
"progressUpdateIntervalMs": 500 | |
}, | |
{ | |
"title": "Graph View", | |
"text": "%angular\n\u003cdiv id\u003d\"chart\" data\u003d\"data\" yAxes\u003d\"Requests\" title\u003d\"Web Activity\"\nrefresh\u003d\"20160914-221415_1942638313,20160914-225103_297917127,20160914-221501_1892040487,20160912-040402_885019782\"\u003e\u003c/div\u003e\n\u003cinput id\u003d\"bounds\" type\u003d\"text\" class\u003d\"hide\" ng-model\u003d\"bounds\"\u003e\u003c/input\u003e\n\u003ccenter\u003e\n \u003ch5 id\u003d\"t1\"\u003eLeft Bound: \u003c/h5\u003e\u003ch5 id\u003d\"t2\"\u003eRight Bound: \u003c/h5\u003e\n \u003cbutton id\u003d\"btnRefresh\" type\u003d\"submit\" class\u003d\"btn btn-primary\" ng-click\u003d\"\"\u003eRun Queries\u003c/button\u003e\n\u003c/center\u003e\n\u003cscript type\u003d\"text/javascript\"\u003e\nvar div \u003d $(\u0027#chart\u0027);\nvar bounds \u003d $(\u0027#bounds\u0027);\n\n//Get list of paragraphs to refresh on button click\n$.each(div.attr(\u0027refresh\u0027).split(\u0027,\u0027), function(i, v){\n $(\u0027#btnRefresh\u0027).attr(\u0027ng-click\u0027, $(\u0027#btnRefresh\u0027).attr(\u0027ng-click\u0027) + \"z.runParagraph(\u0027\"+v+\"\u0027);\");\n});\n\nvar data \u003d window.angularVars[div.attr(\u0027data\u0027)];\nvar schema \u003d window.angularVars[div.attr(\u0027data\u0027)+\u0027Schema\u0027];\n\n//Convert query results into Plotly traces: https://plot.ly/javascript/multiple-axes/#multiple-yaxes\nvar traces \u003d [];\n$.each(schema.fields.slice(1), function(i, field){ //Setup trace metadata\n var trace \u003d {x: [], y: [], name: field.name, type: \u0027scatter\u0027, yaxis: \u0027y\u0027};\n traces.push(trace);\n});\n\n//Load query results into trace arrays\n$.each(data, function(i,row){\n //First value is a date\n var date \u003d new Date(row.values[0]);\n $.each(row.values.slice(1), function(v, cell){\n traces[v].x.push(date);\n traces[v].y.push(cell);\n });\n});\n\n//Setup axis labels\nvar layout \u003d { title: div.attr(\u0027title\u0027), legend: {orientation: \u0027h\u0027}};\n$.each(div.attr(\u0027yAxes\u0027).split(\u0027,\u0027), function(i, v){\n var axis \u003d {title: v};\n var key \u003d \u0027yaxis\u0027;\n if (i \u003e 0){\n key +\u003d i+1;\n axis.side \u003d \u0027right\u0027;\n axis.overlaying \u003d \u0027y\u0027;\n axis.position \u003d 1-.04*(i-1);\n }\n layout[key] \u003d axis;\n});\n\n//Hide some of Plotly\u0027s external web-links\nvar config \u003d {displaylogo: div.attr(\u0027showLinks\u0027), showLinks: div.attr(\u0027showLinks\u0027), modeBarButtonsToRemove: [\u0027sendDataToCloud\u0027]};\n//Draw the chart\nPlotly.newPlot(\u0027chart\u0027, traces, layout, config);\n\n//Execute this function when user zooms in/out\ndiv.bind(\u0027plotly_relayout\u0027, function(event,meta){\n var t1 \u003d new Date(meta[\u0027xaxis.range[0]\u0027]);\n var t2 \u003d new Date(meta[\u0027xaxis.range[1]\u0027]);\n $(\u0027#t1\u0027).text(\u0027Left Bound: \u0027 + t1);\n $(\u0027#t2\u0027).text(\u0027Right Bound: \u0027 + t2);\n var text \u003d Math.floor(t1.getTime()/1000) + \"|\" + Math.floor(t2.getTime()/1000);\n bounds.val(text);\n //Give Angular a few ms to mark \u0027bounds\u0027 as dirty/get ready to catch change event\n window.setTimeout(function(){bounds.trigger(\u0027input\u0027);}, 500);\n});", | |
"dateUpdated": "Sep 15, 2016 1:28:43 AM", | |
"config": { | |
"tableHide": false, | |
"colWidth": 12.0, | |
"editorMode": "ace/mode/scala", | |
"editorHide": false, | |
"title": true, | |
"graph": { | |
"mode": "table", | |
"height": 300.0, | |
"optionOpen": false, | |
"keys": [], | |
"values": [], | |
"groups": [], | |
"scatter": {}, | |
"map": { | |
"baseMapType": "Streets", | |
"isOnline": true, | |
"pinCols": [] | |
} | |
}, | |
"enabled": true | |
}, | |
"settings": { | |
"params": {}, | |
"forms": {} | |
}, | |
"apps": [], | |
"jobName": "paragraph_1473916762544_-1198470594", | |
"id": "20160912-040323_647948317", | |
"result": { | |
"code": "SUCCESS", | |
"type": "ANGULAR", | |
"msg": "\u003cdiv id\u003d\"chart\" data\u003d\"data\" yAxes\u003d\"Requests\" title\u003d\"Web Activity\"\nrefresh\u003d\"20160914-221415_1942638313,20160914-225103_297917127,20160914-221501_1892040487,20160912-040402_885019782\"\u003e\u003c/div\u003e\n\u003cinput id\u003d\"bounds\" type\u003d\"text\" class\u003d\"hide\" ng-model\u003d\"bounds\"\u003e\u003c/input\u003e\n\u003ccenter\u003e\n \u003ch5 id\u003d\"t1\"\u003eLeft Bound: \u003c/h5\u003e\u003ch5 id\u003d\"t2\"\u003eRight Bound: \u003c/h5\u003e\n \u003cbutton id\u003d\"btnRefresh\" type\u003d\"submit\" class\u003d\"btn btn-primary\" ng-click\u003d\"\"\u003eRun Queries\u003c/button\u003e\n\u003c/center\u003e\n\u003cscript type\u003d\"text/javascript\"\u003e\nvar div \u003d $(\u0027#chart\u0027);\nvar bounds \u003d $(\u0027#bounds\u0027);\n\n//Get list of paragraphs to refresh on button click\n$.each(div.attr(\u0027refresh\u0027).split(\u0027,\u0027), function(i, v){\n $(\u0027#btnRefresh\u0027).attr(\u0027ng-click\u0027, $(\u0027#btnRefresh\u0027).attr(\u0027ng-click\u0027) + \"z.runParagraph(\u0027\"+v+\"\u0027);\");\n});\n\nvar data \u003d window.angularVars[div.attr(\u0027data\u0027)];\nvar schema \u003d window.angularVars[div.attr(\u0027data\u0027)+\u0027Schema\u0027];\n\n//Convert query results into Plotly traces: https://plot.ly/javascript/multiple-axes/#multiple-yaxes\nvar traces \u003d [];\n$.each(schema.fields.slice(1), function(i, field){ //Setup trace metadata\n var trace \u003d {x: [], y: [], name: field.name, type: \u0027scatter\u0027, yaxis: \u0027y\u0027};\n traces.push(trace);\n});\n\n//Load query results into trace arrays\n$.each(data, function(i,row){\n //First value is a date\n var date \u003d new Date(row.values[0]);\n $.each(row.values.slice(1), function(v, cell){\n traces[v].x.push(date);\n traces[v].y.push(cell);\n });\n});\n\n//Setup axis labels\nvar layout \u003d { title: div.attr(\u0027title\u0027), legend: {orientation: \u0027h\u0027}};\n$.each(div.attr(\u0027yAxes\u0027).split(\u0027,\u0027), function(i, v){\n var axis \u003d {title: v};\n var key \u003d \u0027yaxis\u0027;\n if (i \u003e 0){\n key +\u003d i+1;\n axis.side \u003d \u0027right\u0027;\n axis.overlaying \u003d \u0027y\u0027;\n axis.position \u003d 1-.04*(i-1);\n }\n layout[key] \u003d axis;\n});\n\n//Hide some of Plotly\u0027s external web-links\nvar config \u003d {displaylogo: div.attr(\u0027showLinks\u0027), showLinks: div.attr(\u0027showLinks\u0027), modeBarButtonsToRemove: [\u0027sendDataToCloud\u0027]};\n//Draw the chart\nPlotly.newPlot(\u0027chart\u0027, traces, layout, config);\n\n//Execute this function when user zooms in/out\ndiv.bind(\u0027plotly_relayout\u0027, function(event,meta){\n var t1 \u003d new Date(meta[\u0027xaxis.range[0]\u0027]);\n var t2 \u003d new Date(meta[\u0027xaxis.range[1]\u0027]);\n $(\u0027#t1\u0027).text(\u0027Left Bound: \u0027 + t1);\n $(\u0027#t2\u0027).text(\u0027Right Bound: \u0027 + t2);\n var text \u003d Math.floor(t1.getTime()/1000) + \"|\" + Math.floor(t2.getTime()/1000);\n bounds.val(text);\n //Give Angular a few ms to mark \u0027bounds\u0027 as dirty/get ready to catch change event\n window.setTimeout(function(){bounds.trigger(\u0027input\u0027);}, 500);\n});" | |
}, | |
"dateCreated": "Sep 15, 2016 1:19:22 AM", | |
"status": "READY", | |
"errorMessage": "", | |
"progressUpdateIntervalMs": 500 | |
}, | |
{ | |
"title": "Distribution of HTTP Codes", | |
"text": "%spark printQueryResultsAsTable(codeQuery)", | |
"dateUpdated": "Sep 15, 2016 1:19:22 AM", | |
"config": { | |
"colWidth": 6.0, | |
"editorMode": "ace/mode/scala", | |
"editorHide": true, | |
"helium": {}, | |
"title": true, | |
"graph": { | |
"mode": "pieChart", | |
"height": 300.0, | |
"optionOpen": false, | |
"keys": [ | |
{ | |
"name": "code", | |
"index": 0.0, | |
"aggr": "sum" | |
} | |
], | |
"values": [ | |
{ | |
"name": "count", | |
"index": 1.0, | |
"aggr": "sum" | |
} | |
], | |
"groups": [], | |
"scatter": {}, | |
"map": { | |
"baseMapType": "Streets", | |
"isOnline": true, | |
"pinCols": [] | |
} | |
}, | |
"enabled": true | |
}, | |
"settings": { | |
"params": {}, | |
"forms": {} | |
}, | |
"apps": [], | |
"jobName": "paragraph_1473916762545_-1198855343", | |
"id": "20160914-221415_1942638313", | |
"result": { | |
"code": "SUCCESS", | |
"type": "TABLE", | |
"msg": "code\tcount\n200\t31157\n302\t1255\n404\t92\n304\t4713\n" | |
}, | |
"dateCreated": "Sep 15, 2016 1:19:22 AM", | |
"status": "READY", | |
"errorMessage": "", | |
"progressUpdateIntervalMs": 500 | |
}, | |
{ | |
"title": "Distribution of Traffic Sources", | |
"text": "%spark printQueryResultsAsTable(sourceQuery)", | |
"dateUpdated": "Sep 15, 2016 1:19:22 AM", | |
"config": { | |
"colWidth": 6.0, | |
"editorMode": "ace/mode/scala", | |
"editorHide": true, | |
"helium": {}, | |
"title": true, | |
"graph": { | |
"mode": "scatterChart", | |
"height": 300.0, | |
"optionOpen": false, | |
"keys": [], | |
"values": [], | |
"groups": [], | |
"scatter": { | |
"xAxis": { | |
"name": "source", | |
"index": 0.0, | |
"aggr": "sum" | |
}, | |
"yAxis": { | |
"name": "count", | |
"index": 1.0, | |
"aggr": "sum" | |
} | |
}, | |
"map": { | |
"baseMapType": "Streets", | |
"isOnline": true, | |
"pinCols": [] | |
} | |
}, | |
"enabled": true | |
}, | |
"settings": { | |
"params": {}, | |
"forms": {} | |
}, | |
"apps": [], | |
"jobName": "paragraph_1473916762545_-1198855343", | |
"id": "20160914-225103_297917127", | |
"result": { | |
"code": "SUCCESS", | |
"type": "TABLE", | |
"msg": "source\tcount\ntheopolis.orl.mmc.com\t505\nvagrant.vf.mmc.com\t426\n163.206.89.4\t425\nmiranda.psychol.ucl.ac.uk\t415\nalyssa.prodigy.com\t259\nwwwproxy.sanders.com\t245\naibn32.astro.uni-bonn.de\t232\n198.30.221.227\t206\nbocagate.bocaraton.ibm.com\t200\ntwip.prl.philips.nl\t184\n131.110.60.192\t177\n134.136.243.100\t173\ninternet-gw.ford.com\t169\nnews.ti.com\t165\npiweba3y.prodigy.com\t160\ngateway.cary.ibm.com\t158\n198.133.29.18\t157\ngate1.btco.com\t156\n148.139.32.56\t156\ngw1.att.com\t154\nedams.ksc.nasa.gov\t148\nsirius.astro.uva.nl\t148\npiweba1y.prodigy.com\t145\nwebgate1.mot.com\t144\nling.caen.gdeb.com\t143\nwynns-pc.jhuapl.edu\t142\nproxy0.research.att.com\t139\npiweba4y.prodigy.com\t136\nfiscal-7.tamu.edu\t135\nastpc3.bns.com\t135\nwww-proxy.crl.research.digital.com\t134\ntrusty.lmsc.lockheed.com\t130\ncarnovsky.cc.bellcore.com\t129\nerigate.ericsson.se\t125\nastro.demon.co.uk\t121\n192.203.159.146\t117\n163.205.1.45\t115\nmsn_2_4.binc.net\t114\npoppy.hensa.ac.uk\t114\n150.176.16.28\t112\nannap2.jsc.mil\t112\n128.227.172.202\t110\n163.205.12.166\t106\n204.117.210.6\t105\nstemmons13.onramp.net\t104\n131.104.168.62\t103\nboole.fl.ensco.com\t102\nadl.dny.rockwell.com\t101\nfaure.borland.com\t100\nip-pdx1-30.teleport.com\t100\n" | |
}, | |
"dateCreated": "Sep 15, 2016 1:19:22 AM", | |
"status": "READY", | |
"errorMessage": "", | |
"progressUpdateIntervalMs": 500 | |
}, | |
{ | |
"title": "Distribution of Traffic by \"Area\" of Site", | |
"text": "%spark printQueryResultsAsTable(areaQuery)", | |
"dateUpdated": "Sep 15, 2016 1:19:22 AM", | |
"config": { | |
"colWidth": 12.0, | |
"editorMode": "ace/mode/scala", | |
"editorHide": true, | |
"helium": {}, | |
"title": true, | |
"graph": { | |
"mode": "multiBarChart", | |
"height": 300.0, | |
"optionOpen": false, | |
"keys": [ | |
{ | |
"name": "area", | |
"index": 0.0, | |
"aggr": "sum" | |
} | |
], | |
"values": [ | |
{ | |
"name": "count", | |
"index": 1.0, | |
"aggr": "sum" | |
} | |
], | |
"groups": [], | |
"scatter": { | |
"xAxis": { | |
"name": "area", | |
"index": 0.0, | |
"aggr": "sum" | |
}, | |
"yAxis": { | |
"name": "count", | |
"index": 1.0, | |
"aggr": "sum" | |
} | |
}, | |
"map": { | |
"baseMapType": "Streets", | |
"isOnline": true, | |
"pinCols": [] | |
} | |
}, | |
"enabled": true | |
}, | |
"settings": { | |
"params": {}, | |
"forms": {} | |
}, | |
"apps": [], | |
"jobName": "paragraph_1473916762549_-1200394339", | |
"id": "20160914-221501_1892040487", | |
"result": { | |
"code": "SUCCESS", | |
"type": "TABLE", | |
"msg": "area\tcount\nshuttle\t15109\nimages\t9921\nhtbin\t7649\nhistory\t1365\ncgi-bin\t1178\nksc.html\t485\n\t375\nicons\t370\nelv\t185\nfacilities\t151\nsoftware\t118\nfinance\t108\nfacts\t50\nmdss\t27\npayloads\t22\nstatistics\t20\npersons\t17\nwhats-new.html\t13\nnews\t7\npub\t7\nmsfc\t7\nicon\t6\nprocurement\t6\nsts-70\t4\n~downs\t4\nntv\t2\nastro-2.msfc.nasa.gov\t2\nwelcome.html\t2\nsightings\t1\npeople\t1\nkistory\t1\nhistory.apollo\t1\nschuttle\t1\n:\t1\nHTBIN\t1\n" | |
}, | |
"dateCreated": "Sep 15, 2016 1:19:22 AM", | |
"status": "READY", | |
"errorMessage": "", | |
"progressUpdateIntervalMs": 500 | |
}, | |
{ | |
"title": "Web Logs for Period", | |
"text": "%spark printQueryResultsAsTable(logQuery)", | |
"dateUpdated": "Sep 15, 2016 1:19:22 AM", | |
"config": { | |
"colWidth": 12.0, | |
"editorMode": "ace/mode/scala", | |
"editorHide": true, | |
"title": true, | |
"graph": { | |
"mode": "table", | |
"height": 300.0, | |
"optionOpen": false, | |
"keys": [ | |
{ | |
"name": "source", | |
"index": 0.0, | |
"aggr": "sum" | |
} | |
], | |
"values": [ | |
{ | |
"name": "datetime", | |
"index": 1.0, | |
"aggr": "sum" | |
} | |
], | |
"groups": [], | |
"scatter": { | |
"xAxis": { | |
"name": "source", | |
"index": 0.0, | |
"aggr": "sum" | |
}, | |
"yAxis": { | |
"name": "datetime", | |
"index": 1.0, | |
"aggr": "sum" | |
} | |
}, | |
"map": { | |
"baseMapType": "Streets", | |
"isOnline": true, | |
"pinCols": [] | |
} | |
}, | |
"enabled": true | |
}, | |
"settings": { | |
"params": {}, | |
"forms": {} | |
}, | |
"apps": [], | |
"jobName": "paragraph_1473916762551_-1199624841", | |
"id": "20160912-040402_885019782", | |
"result": { | |
"code": "SUCCESS", | |
"type": "TABLE", | |
"msg": "source\tdatetime\tverb\turl\tprotocol\tcode\tsize\narcada.arcada.com\t1995-07-13 07:00:35\tGET\t/htbin/cdt_main.pl\tHTTP/1.0\t200\t3585\n152.85.3.3\t1995-07-13 07:00:36\tGET\t/shuttle/missions/sts-67/sts-67-patch-small.gif\tHTTP/1.0\t200\t17083\n193.132.114.242\t1995-07-13 07:00:36\tGET\t/shuttle/countdown/images/cdtclock.gif\tHTTP/1.0\t304\t0\nblazemonger.pc.cc.cmu.edu\t1995-07-13 07:00:37\tGET\t/htbin/cdt_clock.pl HTTP/1.0From: \t\u003cberend@blazemonger.pc.cc.cmu.edu\u003e\t200\t752\nexassrt3.tmit.ac.jp\t1995-07-13 07:00:37\tGET\t/history/apollo/images/apollo-logo1.gif\tHTTP/1.0\t200\t1173\nerigate.ericsson.se\t1995-07-13 07:00:37\tGET\t/htbin/cdt_clock.pl\tHTTP/1.0\t200\t752\nmiranda.psychol.ucl.ac.uk\t1995-07-13 07:00:40\tGET\t/htbin/cdt_clock.pl\tHTTP/1.0\t200\t752\nsladl1p20.ozemail.com.au\t1995-07-13 07:00:40\tGET\t/images/USA-logosmall.gif\tHTTP/1.0\t200\t234\nip-pdx1-30.teleport.com\t1995-07-13 07:00:43\tGET\t/htbin/cdt_clock.pl\tHTTP/1.0\t200\t752\n199.44.46.33\t1995-07-13 07:00:45\tGET\t/shuttle/missions/sts-70/\tHTTP/1.0\t200\t2741\npoppy.hensa.ac.uk\t1995-07-13 07:00:48\tGET\t/shuttle/missions/sts-71/images/KSC-95EC-0876.jpg\tHTTP/1.0\t200\t87766\n193.132.114.242\t1995-07-13 07:00:48\tGET\t/shuttle/countdown/images/cdtclock.gif\tHTTP/1.0\t304\t0\nsladl1p20.ozemail.com.au\t1995-07-13 07:00:50\tGET\t/images/WORLD-logosmall.gif\tHTTP/1.0\t200\t669\nastro.demon.co.uk\t1995-07-13 07:00:50\tGET\t/shuttle/countdown/video/livevideo.jpeg\tHTTP/1.0\t200\t42660\n199.44.46.33\t1995-07-13 07:00:52\tGET\t/shuttle/missions/\tHTTP/1.0\t200\t12283\ngina.zcu.cz\t1995-07-13 07:00:52\tGET\t/htbin/cdt_main.pl\tHTTP/1.0\t200\t3585\n193.132.114.242\t1995-07-13 07:00:54\tGET\t/shuttle/countdown/images/cdtclock.gif\tHTTP/1.0\t304\t0\nastro.demon.co.uk\t1995-07-13 07:00:54\tGET\t/htbin/cdt_clock.pl\tHTTP/1.0\t200\t752\nc3dt1.c3d.rl.af.mil\t1995-07-13 07:00:55\tGET\t/cgi-bin/imagemap/countdown70?74,67\tHTTP/1.0\t302\t72\ngina.zcu.cz\t1995-07-13 07:00:56\tGET\t/shuttle/countdown/images/cdtclock.gif\tHTTP/1.0\t200\t34688\nexassrt3.tmit.ac.jp\t1995-07-13 07:00:56\tGET\t/shuttle/countdown/\tHTTP/1.0\t200\t4247\ngina.zcu.cz\t1995-07-13 07:00:56\tGET\t/images/NASA-logosmall.gif\tHTTP/1.0\t200\t786\n132.80.115.88\t1995-07-13 07:00:58\tGET\t/shuttle/countdown/\tHTTP/V1.0\t200\t4247\n134.47.135.54\t1995-07-13 07:00:59\tGET\t/msfc/astro_home.html\tHTTP/1.0\t200\t2938\npoppy.hensa.ac.uk\t1995-07-13 07:00:59\tGET\t/shuttle/missions/sts-71/images/KSC-95EC-0613.gif\tHTTP/1.0\t200\t45970\nmiranda.psychol.ucl.ac.uk\t1995-07-13 07:01:01\tGET\t/htbin/cdt_clock.pl\tHTTP/1.0\t200\t752\n193.132.114.242\t1995-07-13 07:01:02\tGET\t/shuttle/countdown/images/cdtclock.gif\tHTTP/1.0\t304\t0\n400gtw.nl\t1995-07-13 07:01:02\tGET\t/shuttle/missions/sts-71/sts-71-patch-small.gif\tHTTP/1.0\t200\t12054\nwww-c5.proxy.aol.com\t1995-07-13 07:01:03\tGET\t/htbin/cdt_main.pl\tHTTP/1.0\t200\t3585\n152.85.3.3\t1995-07-13 07:01:03\tGET\t/images/KSC-logosmall.gif\tHTTP/1.0\t200\t1204\np2077jdy.ksc.nasa.gov\t1995-07-13 07:01:03\tGET\t/shuttle/missions/sts-70/images/images.html\tHTTP/1.0\t200\t4048\nix-oma1-08.ix.netcom.com\t1995-07-13 07:01:04\tGET\t/cgi-bin/imagemap/countdown70?286,288\tHTTP/1.0\t302\t85\ndd09-017.compuserve.com\t1995-07-13 07:01:04\tGET\t/shuttle/missions/sts-71/sts-71-patch-small.gif\tHTTP/1.0\t200\t12054\nerigate.ericsson.se\t1995-07-13 07:01:05\tGET\t/htbin/cdt_clock.pl\tHTTP/1.0\t200\t752\ntwip.prl.philips.nl\t1995-07-13 07:01:07\tGET\t/htbin/cdt_main.pl\tHTTP/1.0\t200\t3585\ntwip.prl.philips.nl\t1995-07-13 07:01:08\tGET\t/shuttle/countdown/images/cdtclock.gif\tHTTP/1.0\t304\t0\ntwip.prl.philips.nl\t1995-07-13 07:01:10\tGET\t/images/NASA-logosmall.gif\tHTTP/1.0\t304\t0\nexassrt3.tmit.ac.jp\t1995-07-13 07:01:11\tGET\t/cgi-bin/imagemap/countdown70?231,289\tHTTP/1.0\t302\t114\nad03-007.compuserve.com\t1995-07-13 07:01:12\tGET\t/\tHTTP/1.0\t200\t7062\nerigate.ericsson.se\t1995-07-13 07:01:13\tGET\t/images/NASA-logosmall.gif\tHTTP/1.0\t304\t0\nexassrt3.tmit.ac.jp\t1995-07-13 07:01:13\tGET\t/images/shuttle-patch-small.gif\tHTTP/1.0\t200\t4179\nastro.demon.co.uk\t1995-07-13 07:01:16\tGET\t/images/NASA-logosmall.gif\tHTTP/1.0\t304\t0\nfaust.psychol.ucl.ac.uk\t1995-07-13 07:01:17\tGET\t/shuttle/technology/sts-newsref/sts-lcc.html\tHTTP/1.0\t200\t32252\naibn32.astro.uni-bonn.de\t1995-07-13 07:01:17\tGET\t/images/NASA-logosmall.gif\tHTTP/1.0\t304\t0\ngina.zcu.cz\t1995-07-13 07:01:18\tGET\t/htbin/cdt_main.pl\tHTTP/1.0\t200\t3585\np2077jdy.ksc.nasa.gov\t1995-07-13 07:01:18\tGET\t/shuttle/missions/sts-70/images/KSC-95EC-0768.jpg\tHTTP/1.0\t200\t76048\nnidhogg.srl.caltech.edu\t1995-07-13 07:01:18\tGET\t/htbin/cdt_main.pl\tHTTP/1.0\t200\t3585\npoppy.hensa.ac.uk\t1995-07-13 07:01:18\tGET\t/facts/facts.html\tHTTP/1.0\t200\t4722\nnidhogg.srl.caltech.edu\t1995-07-13 07:01:19\tGET\t/shuttle/countdown/images/cdtclock.gif\tHTTP/1.0\t304\t0\nnidhogg.srl.caltech.edu\t1995-07-13 07:01:19\tGET\t/images/NASA-logosmall.gif\tHTTP/1.0\t304\t0\n" | |
}, | |
"dateCreated": "Sep 15, 2016 1:19:22 AM", | |
"status": "READY", | |
"errorMessage": "", | |
"progressUpdateIntervalMs": 500 | |
}, | |
{ | |
"text": "", | |
"dateUpdated": "Sep 15, 2016 1:19:22 AM", | |
"config": { | |
"colWidth": 12.0, | |
"editorHide": false, | |
"graph": { | |
"mode": "table", | |
"height": 300.0, | |
"optionOpen": false, | |
"keys": [], | |
"values": [], | |
"groups": [], | |
"scatter": {}, | |
"map": { | |
"baseMapType": "Streets", | |
"isOnline": true, | |
"pinCols": [] | |
} | |
}, | |
"enabled": true | |
}, | |
"settings": { | |
"params": {}, | |
"forms": {} | |
}, | |
"apps": [], | |
"jobName": "paragraph_1473916762554_-1200779088", | |
"id": "20160914-182248_651198733", | |
"result": { | |
"code": "SUCCESS", | |
"type": "TEXT", | |
"msg": "" | |
}, | |
"dateCreated": "Sep 15, 2016 1:19:22 AM", | |
"status": "READY", | |
"errorMessage": "", | |
"progressUpdateIntervalMs": 500 | |
} | |
], | |
"name": "SimpleApp", | |
"id": "2BX4SDKJ3", | |
"angularObjects": { | |
"2BQ4DA89C:shared_process": [], | |
"2BQ2F53M6:shared_process": [], | |
"2BSY8XK83:shared_process": [], | |
"2BQQW1DA2:shared_process": [], | |
"2BTD7M9Z7:shared_process": [], | |
"2BRQE418G:shared_process": [] | |
}, | |
"config": {}, | |
"info": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment