aboutsummaryrefslogtreecommitdiff
path: root/examples/src/main/python/pagerank.py
diff options
context:
space:
mode:
authorVaradharajan Mukundan <srinathsmn@gmail.com>2014-11-10 14:32:29 -0800
committerXiangrui Meng <meng@databricks.com>2014-11-10 14:32:29 -0800
commit974d334cf06a84317234a6c8e2e9ecca8271fa41 (patch)
tree6b091dd19569b6f5052fb30b06d7baa7982455f1 /examples/src/main/python/pagerank.py
parentb32734e12d5197bad26c080e529edd875604c6fb (diff)
downloadspark-974d334cf06a84317234a6c8e2e9ecca8271fa41.tar.gz
spark-974d334cf06a84317234a6c8e2e9ecca8271fa41.tar.bz2
spark-974d334cf06a84317234a6c8e2e9ecca8271fa41.zip
[SPARK-4047] - Generate runtime warnings for example implementation of PageRank
Based on SPARK-2434, this PR generates runtime warnings for example implementations (Python, Scala) of PageRank. Author: Varadharajan Mukundan <srinathsmn@gmail.com> Closes #2894 from varadharajan/SPARK-4047 and squashes the following commits: 5f9406b [Varadharajan Mukundan] [SPARK-4047] - Point users to LogisticRegressionWithSGD and LogisticRegressionWithLBFGS instead of LogisticRegressionModel 252f595 [Varadharajan Mukundan] a. Generate runtime warnings for 05a018b [Varadharajan Mukundan] Fix PageRank implementation's package reference 5c2bf54 [Varadharajan Mukundan] [SPARK-4047] - Generate runtime warnings for example implementation of PageRank
Diffstat (limited to 'examples/src/main/python/pagerank.py')
-rwxr-xr-xexamples/src/main/python/pagerank.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/src/main/python/pagerank.py b/examples/src/main/python/pagerank.py
index b539c4128c..a5f25d78c1 100755
--- a/examples/src/main/python/pagerank.py
+++ b/examples/src/main/python/pagerank.py
@@ -15,6 +15,11 @@
# limitations under the License.
#
+"""
+This is an example implementation of PageRank. For more conventional use,
+Please refer to PageRank implementation provided by graphx
+"""
+
import re
import sys
from operator import add
@@ -40,6 +45,9 @@ if __name__ == "__main__":
print >> sys.stderr, "Usage: pagerank <file> <iterations>"
exit(-1)
+ print >> sys.stderr, """WARN: This is a naive implementation of PageRank and is
+ given as an example! Please refer to PageRank implementation provided by graphx"""
+
# Initialize the spark context.
sc = SparkContext(appName="PythonPageRank")