Created
January 26, 2019 05:44
-
-
Save ashkrit/cffc999f4ecd2af44e8a796b9d64348c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private def checkSparkContext(): Unit = { | |
| val startTime = System.currentTimeMillis() | |
| log.info("Context creation monitor thread started") | |
| while (SparkContextBuilder.isContextNotCreated()) { | |
| Thread.sleep(TimeUnit.SECONDS.toMillis(1)) | |
| val total = System.currentTimeMillis() - startTime | |
| log.info("Waiting for spark context from {} seconds", TimeUnit.MILLISECONDS.toSeconds(total)) | |
| } | |
| log.info("Spark context creation took {} seconds", TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - startTime)) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment