Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename
  • Loading branch information
zsxwing committed Oct 28, 2016
commit 729d50d5aa81e3b47df9d4f2f55204cdce2f2c29
Original file line number Diff line number Diff line change
Expand Up @@ -210,23 +210,23 @@ class StreamingQueryListenerSuite extends StreamTest with BeforeAndAfter {
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this test is in sql/core, why are the resources in history server?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have noticed this earlier. Sorry!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duh! its in sql/core :(

But good to create a structured-streaming directory rather than history-server

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed

test("ReplayListenerBus should ignore broken event jsons generated in 2.0.0") {
// structured-streaming-query-event-logs-2.0.0.txt has all types of events generated by
// query-event-logs-version-2.0.0.txt has all types of events generated by
// Structured Streaming in Spark 2.0.0.
// SparkListenerApplicationEnd is the only valid event and it's the last event. We use it
// to verify that we can skip broken jsons generated by Structured Streaming.
testReplayListenerBusWithBorkenEventJsons("structured-streaming-query-event-logs-2.0.0.txt")
testReplayListenerBusWithBorkenEventJsons("query-event-logs-version-2.0.0.txt")
}

test("ReplayListenerBus should ignore broken event jsons generated in 2.0.1") {
// structured-streaming-query-event-logs-2.0.1.txt has all types of events generated by
// query-event-logs-version-2.0.1.txt has all types of events generated by
// Structured Streaming in Spark 2.0.1.
// SparkListenerApplicationEnd is the only valid event and it's the last event. We use it
// to verify that we can skip broken jsons generated by Structured Streaming.
testReplayListenerBusWithBorkenEventJsons("structured-streaming-query-event-logs-2.0.1.txt")
testReplayListenerBusWithBorkenEventJsons("query-event-logs-version-2.0.1.txt")
}

private def testReplayListenerBusWithBorkenEventJsons(fileName: String): Unit = {
val input = getClass.getResourceAsStream(s"/history-server/$fileName")
val input = getClass.getResourceAsStream(s"/structured-streaming/$fileName")
val events = mutable.ArrayBuffer[SparkListenerEvent]()
try {
val replayer = new ReplayListenerBus() {
Expand Down