-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GraphX] Improve LiveJournalPageRank example #4917
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,11 +17,6 @@ | |
|
||
package org.apache.spark.examples.graphx | ||
|
||
import org.apache.spark.SparkContext._ | ||
import org.apache.spark._ | ||
import org.apache.spark.graphx._ | ||
|
||
|
||
/** | ||
* Uses GraphX to run PageRank on a LiveJournal social network graph. Download the dataset from | ||
* http://snap.stanford.edu/data/soc-LiveJournal1.html. | ||
|
@@ -30,14 +25,14 @@ object LiveJournalPageRank { | |
def main(args: Array[String]) { | ||
if (args.length < 1) { | ||
System.err.println( | ||
"Usage: LiveJournalPageRank <edge_list_file>\n" + | ||
"Usage: LiveJournalPageRank <edge_list_file> --numEPart=<num_edge_partitions>\n" + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about now |
||
" [--tol=<tolerance>]\n" + | ||
" The tolerance allowed at convergence (smaller => more accurate). Default is " + | ||
"0.001.\n" + | ||
" [--output=<output_file>]\n" + | ||
" If specified, the file to write the ranks to.\n" + | ||
" [--numEPart=<num_edge_partitions>]\n" + | ||
" The number of partitions for the graph's edge RDD. Default is 4.\n" + | ||
" The number of partitions for the graph's edge RDD.\n" + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eh, but now you have put the option in twice! why not just move it up and remove the square braces to mark it non-optional? keep everything else the same. |
||
" [--partStrategy=RandomVertexCut | EdgePartition1D | EdgePartition2D | " + | ||
"CanonicalRandomVertexCut]\n" + | ||
" The way edges are assigned to edge partitions. Default is RandomVertexCut.") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure you can remove this one? it imports implicits right?
This change loses the description of the parameter too.
This is on the border of non-trivial, but if it's merely fixing the usage note, seems OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think it is OK.
The description of the parameter will be output by the Analytics.Main, looks like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but, why remove the description, which already existed in the help message in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right. I modified back, just remove the default value description