aboutsummaryrefslogtreecommitdiff
path: root/streaming
diff options
context:
space:
mode:
authorPrashant Sharma <prashant.s@imaginea.com>2013-07-16 15:01:33 +0530
committerPrashant Sharma <prashant.s@imaginea.com>2013-07-16 15:01:33 +0530
commit119c98c1becf9f0038d6bb946545cd65006bd367 (patch)
tree41dbdd50d8105f26967c141982d443370a861ba7 /streaming
parentf89cc7ae3c475b3ffdadbe1daccc26265f0bca2a (diff)
downloadspark-119c98c1becf9f0038d6bb946545cd65006bd367.tar.gz
spark-119c98c1becf9f0038d6bb946545cd65006bd367.tar.bz2
spark-119c98c1becf9f0038d6bb946545cd65006bd367.zip
code formatting, The warning related to scope exit and enter is not worth fixing as it only affects debugging scopes and nothing else.
Diffstat (limited to 'streaming')
-rw-r--r--streaming/src/main/scala/spark/streaming/util/MasterFailureTest.scala28
1 files changed, 14 insertions, 14 deletions
diff --git a/streaming/src/main/scala/spark/streaming/util/MasterFailureTest.scala b/streaming/src/main/scala/spark/streaming/util/MasterFailureTest.scala
index b3daa5a91b..ca654c45c9 100644
--- a/streaming/src/main/scala/spark/streaming/util/MasterFailureTest.scala
+++ b/streaming/src/main/scala/spark/streaming/util/MasterFailureTest.scala
@@ -363,20 +363,20 @@ class FileGeneratingThread(input: Seq[String], testDir: Path, interval: Long)
val tempHadoopFile = new Path(testDir, ".tmp_" + (i+1).toString)
FileUtils.writeStringToFile(localFile, input(i).toString + "\n")
var tries = 0
- var done = false
- while (!done && tries < maxTries) {
- tries += 1
- try {
- // fs.copyFromLocalFile(new Path(localFile.toString), hadoopFile)
- fs.copyFromLocalFile(new Path(localFile.toString), tempHadoopFile)
- fs.rename(tempHadoopFile, hadoopFile)
- done = true
- } catch {
- case ioe: IOException => {
- fs = testDir.getFileSystem(new Configuration())
- logWarning("Attempt " + tries + " at generating file " + hadoopFile + " failed.", ioe)
- }
- }
+ var done = false
+ while (!done && tries < maxTries) {
+ tries += 1
+ try {
+ // fs.copyFromLocalFile(new Path(localFile.toString), hadoopFile)
+ fs.copyFromLocalFile(new Path(localFile.toString), tempHadoopFile)
+ fs.rename(tempHadoopFile, hadoopFile)
+ done = true
+ } catch {
+ case ioe: IOException => {
+ fs = testDir.getFileSystem(new Configuration())
+ logWarning("Attempt " + tries + " at generating file " + hadoopFile + " failed.", ioe)
+ }
+ }
}
if (!done)
logError("Could not generate file " + hadoopFile)