From 87b017fd371426da8217390a94079d7540d3508a Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Fri, 13 Mar 2015 08:07:17 -0400 Subject: [PATCH] Prefixed HDFS commands with ! so they can be executed within IPython Notebook. --- spark/hdfs.ipynb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/spark/hdfs.ipynb b/spark/hdfs.ipynb index 44d7585..96c8af5 100644 --- a/spark/hdfs.ipynb +++ b/spark/hdfs.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:50db54b924da35ab4fc1dba7b6a4d444e2206d0d631f40b085a56636d739839c" + "signature": "sha256:ff0a8cf7aae0fcbadcd718a2f9164affac4fd22893c629a3755198b4f003d63a" }, "nbformat": 3, "nbformat_minor": 0, @@ -26,7 +26,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs" + "!hdfs" ], "language": "python", "metadata": {}, @@ -43,7 +43,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs dfs" + "!hdfs dfs" ], "language": "python", "metadata": {}, @@ -60,7 +60,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs dfs -ls" + "!hdfs dfs -ls" ], "language": "python", "metadata": {}, @@ -77,7 +77,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs dfs -ls /" + "!hdfs dfs -ls /" ], "language": "python", "metadata": {}, @@ -94,7 +94,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs dfs -put file.txt file.txt" + "!hdfs dfs -put file.txt file.txt" ], "language": "python", "metadata": {}, @@ -111,7 +111,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs dfs -cat file.txt" + "!hdfs dfs -cat file.txt" ], "language": "python", "metadata": {}, @@ -128,7 +128,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs dfs -cat file.txt | tail -n 10" + "!hdfs dfs -cat file.txt | tail -n 10" ], "language": "python", "metadata": {}, @@ -145,7 +145,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs dfs -cat dir/* | less" + "!hdfs dfs -cat dir/* | less" ], "language": "python", "metadata": {}, @@ -162,7 +162,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs dfs -get file.txt file.txt" + "!hdfs dfs -get file.txt file.txt" ], "language": "python", "metadata": {}, @@ -179,7 +179,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs dfs -mkdir dir" + "!hdfs dfs -mkdir dir" ], "language": "python", "metadata": {}, @@ -196,7 +196,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "hdfs dfs -rm -r dir" + "!hdfs dfs -rm -r dir" ], "language": "python", "metadata": {},