[GitHub] spark pull request #15262: [SPARK-17690][STREAMING][SQL] Add mini-dfs cluste...

2016-11-08 Thread ScrapCodes
Github user ScrapCodes closed the pull request at:

https://github.com/apache/spark/pull/15262


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #15262: [SPARK-17690][STREAMING][SQL] Add mini-dfs cluste...

2016-11-08 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/15262#discussion_r87019344
  
--- Diff: pom.xml ---
@@ -800,6 +800,32 @@
 ${curator.version}
 test
   
+ 
--- End diff --

This does seem like a lot of build complexity relative to its value.

BTW isn't this taking Hadoop or some of its dependencies out of compile 
scope? I am not sure why it would entail the changes to the deps files above


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #15262: [SPARK-17690][STREAMING][SQL] Add mini-dfs cluste...

2016-09-27 Thread frreiss
Github user frreiss commented on a diff in the pull request:

https://github.com/apache/spark/pull/15262#discussion_r80826485
  
--- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/streaming/FileStreamSourceSuite.scala
 ---
@@ -330,15 +353,42 @@ class FileStreamSourceSuite extends 
FileStreamSourceTest {
   val filtered = textStream.filter($"value" contains "keep")
 
   testStream(filtered)(
-AddTextFileData("drop1\nkeep2\nkeep3", src, tmp),
+AddTextLocalFileData("drop1\nkeep2\nkeep3", src, tmp),
+CheckAnswer("keep2", "keep3"),
+StopStream,
+AddTextLocalFileData("drop4\nkeep5\nkeep6", src, tmp),
+StartStream(),
+CheckAnswer("keep2", "keep3", "keep5", "keep6"),
+AddTextLocalFileData("drop7\nkeep8\nkeep9", src, tmp),
+CheckAnswer("keep2", "keep3", "keep5", "keep6", "keep8", "keep9")
+  )
+}
+  }
+
+  test("read from text files using hdfs") {
+withTempDirs { case (_src, tmp) =>
+  // Create a mini dfs cluster.
+  System.clearProperty(MiniDFSCluster.PROP_TEST_BUILD_DATA)
+  val conf = new HdfsConfiguration()
+  conf.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, tmp.getAbsolutePath)
+  val cluster = new MiniDFSCluster.Builder(conf).build()
+  val hdfsHomeDirectory: Path = cluster.getFileSystem.getHomeDirectory
+  cluster.getFileSystem.mkdirs(hdfsHomeDirectory)
+  cluster.waitClusterUp()
+  val textStream = createFileStream("text", hdfsHomeDirectory.toString)
+  val filtered = textStream.filter($"value" contains "keep")
+  val src = hdfsHomeDirectory
+  testStream(filtered)(
+AddTextHDFSFileData("drop1\nkeep2\nkeep3", src, tmp, conf),
 CheckAnswer("keep2", "keep3"),
 StopStream,
-AddTextFileData("drop4\nkeep5\nkeep6", src, tmp),
+AddTextHDFSFileData("drop4\nkeep5\nkeep6", src, tmp, conf),
 StartStream(),
 CheckAnswer("keep2", "keep3", "keep5", "keep6"),
-AddTextFileData("drop7\nkeep8\nkeep9", src, tmp),
+AddTextHDFSFileData("drop7\nkeep8\nkeep9", src, tmp, conf),
 CheckAnswer("keep2", "keep3", "keep5", "keep6", "keep8", "keep9")
   )
+cluster.shutdown()
--- End diff --

You'll probably want to put this cleanup code somewhere where it will be 
called even if another part of the test case crashes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #15262: [SPARK-17690][STREAMING][SQL] Add mini-dfs cluste...

2016-09-27 Thread ScrapCodes
GitHub user ScrapCodes opened a pull request:

https://github.com/apache/spark/pull/15262

[SPARK-17690][STREAMING][SQL] Add mini-dfs cluster based tests for 
FileStreamSourceSuite.

## What changes were proposed in this pull request?

Added a few HDFS based tests, for some tests the behavior with local file 
system can be very different from HDFS. For example, one of these tests were 
failing a week earlier and now with some recent additions, it passes.


## How was this patch tested?

Tested against, hadoop 2.2 and 2.7.




You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ScrapCodes/spark SPARK-17690

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/15262.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #15262


commit da1b82d151fea8ea8eada808c5d6229a399a001c
Author: Prashant Sharma 
Date:   2016-09-19T05:59:08Z

[SPARK-17690][STREAMING][SQL] Add mini-dfs cluster based tests for 
FileStreamSourceSuite.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org