-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-5503][MLLIB] Example code for Power Iteration Clustering #4495
Conversation
Test build #27180 has started for PR 4495 at commit
|
Test build #27180 has finished for PR 4495 at commit
|
Test FAILed. |
Test build #27182 has started for PR 4495 at commit
|
import org.apache.spark.mllib.clustering.PowerIterationClustering | ||
import org.apache.spark.rdd.RDD | ||
import org.apache.spark.{SparkConf, SparkContext} | ||
import scopt.OptionParser |
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.
organize imports (You can use this plugin: https://plugins.jetbrains.com/plugin/7350)
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.
I had already manually fixed the order according to your email. Maybe I did optimize imports again: since the above shows the order was reset .. Apparently the default behavior in IJ is completely different than the spark requirements. Will try that plugin.
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.
That plugin is apparently for IJ13 and says should not be used. So that is a bit confusing.. anyways I did some more manual rearranging.
@javadba Please also check the hidden inline comments. |
Test build #27185 has started for PR 4495 at commit
|
Test build #27182 has finished for PR 4495 at commit
|
Test PASSed. |
Test build #27185 has finished for PR 4495 at commit
|
Test PASSed. |
Test build #27228 has started for PR 4495 at commit
|
Test build #27228 has finished for PR 4495 at commit
|
Test FAILed. |
@javadba I still want to decrease the code complexity because this is example code, so users can focus on the PIC part of the code but not on how to prepare the input. There are two things we can change:
|
Test build #27245 has started for PR 4495 at commit
|
Test build #27245 has finished for PR 4495 at commit
|
Test PASSed. |
val parser = new OptionParser[Params]("PIC Circles") { | ||
head("PowerIterationClusteringExample: an example PIC app using concentric circles.") | ||
opt[Int]('k', "k") | ||
.text(s"number of circles (/clusters), default: ${defaultParams.k}") |
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.
We still use 2-space indentation here. 4-indentation only applies to method/class declarations.
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.
err yes.. back to the drawing board for the IJ auto formatting.
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.
fyi I have created a Youtrack issue for Intellij for this formatting limitation:
Test build #27306 has started for PR 4495 at commit
|
Test build #27306 has finished for PR 4495 at commit
|
Test PASSed. |
Author: sboeschhuawei <[email protected]> Closes #4495 from javadba/picexamples and squashes the following commits: 3c84b14 [sboeschhuawei] PIC Examples updates from Xiangrui's comments round 5 2878675 [sboeschhuawei] Fourth round with xiangrui on PICExample d7ac350 [sboeschhuawei] Updates to PICExample from Xiangrui's comments round 3 d7f0cba [sboeschhuawei] Updates to PICExample from Xiangrui's comments round 3 cef28f4 [sboeschhuawei] Further updates to PICExample from Xiangrui's comments f7ff43d [sboeschhuawei] Update to PICExample from Xiangrui's comments efeec45 [sboeschhuawei] Update to PICExample from Xiangrui's comments 03e8de4 [sboeschhuawei] Added PICExample c509130 [sboeschhuawei] placeholder for pic examples 5864d4a [sboeschhuawei] placeholder for pic examples (cherry picked from commit e1a1ff8) Signed-off-by: Xiangrui Meng <[email protected]>
LGTM. Merged into master and branch-1.3. Thanks!! |
No description provided.