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-11380][Docs] Replace example code in mllib-frequent-pattern-mining.md using include_example #9340
Conversation
@pravingadakh Could you update the PR title to make it more specific? |
ok to test |
@pravingadakh You need to label After finishing the work, you can go to |
import org.apache.spark.api.java.JavaSparkContext; | ||
import org.apache.spark.mllib.fpm.AssociationRules; | ||
import org.apache.spark.mllib.fpm.FPGrowth; | ||
import java.util.Arrays; |
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.
order of imports
@yinxusen I will do the changes mentioned. I am confused about one thing though, FPGrowth examples are already available in scala and java language, and it's content does not match with whatever is there in doc. What should be done here? Should I create a new file with example used in doc? |
Test build #44571 has finished for PR 9340 at commit
|
@pravingadakh I perfer to use the existing example code. @mengxr What is your opinion? |
@yinxusen When you say use the existing example code, you mean the one in the doc or the one which is readily available in examples directory? |
Jenkins test this please |
Test build #44597 has finished for PR 9340 at commit
|
Test build #44598 has finished for PR 9340 at commit
|
Jenkins test this please |
@pravingadakh You can run |
@yinxusen Let's make this PR simple. Just move the example code from user guide to |
@mengxr Ran the style checks locally, passed. Also I have moved FPGrowth example code from user guide to examples. |
package org.apache.spark.examples.mllib | ||
|
||
// $example on$ | ||
import org.apache.spark.rdd.RDD |
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.
swap this two lines. imports in one group should follow alphabetic order, see here: https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide#SparkCodeStyleGuide-Imports
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import org.apache.spark.mllib.fpm.PrefixSpan; |
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.
reorgnize the import. we can use multi
@mengxr Everything is OK except for some style problems. @pravingadakh Thanks for working on this. |
Test build #44621 has finished for PR 9340 at commit
|
Test build #44622 has finished for PR 9340 at commit
|
@yinxusen Done with all import re-orderings. |
Merged into master. Thanks! @yinxusen Please use |
No description provided.