-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
Add example that reads a local file, writes to a DFS path provided by th... #3347
Conversation
… the user, reads the file back from the DFS, and compares word counts on the local and DFS versions. Useful for verifying DFS correctness.
Test build #23561 has started for PR 3347 at commit
|
Test build #23561 has finished for PR 3347 at commit
|
Test PASSed. |
import org.apache.spark.{SparkContext, SparkConf} | ||
import org.apache.spark.SparkContext._ | ||
import scala.io.Source._ | ||
import java.io.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.
import order should be java > scala > 3rd party packages > spark
@andrewor14 , thanks for the comments! I believe I fixed everything except for the changing the name of the example. I wanted some more feedback. I wrote the example to test reading and writing to a DFS. It does so by comparing the result of word count on a local file to word count on the file after copying to the DFS. I'm using it to make sure that DFSs are configured properly and accessible by all nodes. Do you still want me to drop the test suffix? Thanks! |
Test build #23672 has started for PR 3347 at commit
|
Test build #23672 has finished for PR 3347 at commit
|
Test PASSed. |
Test build #23675 has started for PR 3347 at commit
|
Test build #23675 has finished for PR 3347 at commit
|
Test PASSed. |
@andrewor14 Could you take a second look when you get a chance? Thanks! |
I think the latest changes look fine. @pwendell any thoughts? |
@andrewor14 @pwendell Have you had a chance to look at this? Thanks! |
@andrewor14 @pwendell Happy New Year! Ping on this PR? Thanks! |
Test build #26532 has started for PR 3347 at commit
|
Test build #26532 has finished for PR 3347 at commit
|
Test PASSed. |
@andrewor14 if you like the change I think you can merge it; no other comments here. Otherwise i think this has timed out. |
|
||
sc.stop() | ||
|
||
if(localWordCount == dfsWordCount) { |
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.
style: space after if
, here and everywhere.
@rnowling sorry for slipping on this. I'll merge this into master after addressing the latest comments myself. Thanks for your patience. |
Thanks @andrewor14 ! |
...e user, reads the file back from the DFS, and compares word counts on the local and DFS versions. Useful for verifying DFS correctness.