Skip to content

Conversation

@sarutak
Copy link
Member

@sarutak sarutak commented Mar 25, 2015

The main thread of UIWorkloadGenerator spawn sub threads to launch jobs but the main thread stop SparkContext without waiting for finishing those threads.

Copy link
Contributor

Choose a reason for hiding this comment

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

why not just join() on all of those threads?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's because I didn't think it's simple to use join(); we need to allocate array for those threads and the main thread should call for each thread in the array.

But, I also think it's simpler to use CounDownLatch instead of Semaphore right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm yeah. Well I don't have a strong opinion either way. Either count down latch or semaphore is fine.

@SparkQA
Copy link

SparkQA commented Mar 25, 2015

Test build #29165 has finished for PR 5187 at commit 4e9307a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class RegexTokenizer extends UnaryTransformer[String, Seq[String], RegexTokenizer]

@andrewor14
Copy link
Contributor

Actually LGTM I'll just merge this to master as is. Thanks @sarutak.

@asfgit asfgit closed this in acef51d Mar 25, 2015
@sarutak sarutak deleted the SPARK-6537 branch April 11, 2015 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants