[GitHub] spark pull request #18308: [SPARK-21099][Spark Core] INFO Log Message Using ...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/18308 --- 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 #18308: [SPARK-21099][Spark Core] INFO Log Message Using ...
Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/18308#discussion_r125189804 --- Diff: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala --- @@ -432,8 +432,10 @@ private[spark] class ExecutorAllocationManager( if (testing || executorsRemoved.nonEmpty) { executorsRemoved.foreach { removedExecutorId => newExecutorTotal -= 1 +val hasCachedBlocks = SparkEnv.get.blockManager.master.hasCachedBlocks(removedExecutorId) +val timeout = if (hasCachedBlocks) cachedExecutorIdleTimeoutS else executorIdleTimeoutS logInfo(s"Removing executor $removedExecutorId because it has been idle for " + - s"$executorIdleTimeoutS seconds (new desired total will be $newExecutorTotal)") + s"${if (SparkEnv.get.blockManager.master.hasCachedBlocks(executorId)) cachedExecutorIdleTimeoutS else executorIdleTimeoutS} seconds (new desired total will be $newExecutorTotal)") --- End diff -- This is hard to read. @vanzin 's idea is better. Can you split this into two statements? cheap one at info, expensive one at debug? --- 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 #18308: [SPARK-21099][Spark Core] INFO Log Message Using ...
Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/18308#discussion_r122496127 --- Diff: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala --- @@ -432,8 +432,10 @@ private[spark] class ExecutorAllocationManager( if (testing || executorsRemoved.nonEmpty) { executorsRemoved.foreach { removedExecutorId => newExecutorTotal -= 1 +val hasCachedBlocks = SparkEnv.get.blockManager.master.hasCachedBlocks(removedExecutorId) --- End diff -- This is a pretty expensive call just so you can print a more accurate log message... at the very least it should be inside the `logInfo` call: ``` logInfo { expensiveStuff() "This is the log message referencing the expensive stuff." } ``` But I'd prefer a solution that doesn't make this call at all, since INFO is more often than not enabled. --- 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 #18308: [SPARK-21099][Spark Core] INFO Log Message Using ...
Github user jerryshao commented on a diff in the pull request: https://github.com/apache/spark/pull/18308#discussion_r122129884 --- Diff: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala --- @@ -432,8 +432,10 @@ private[spark] class ExecutorAllocationManager( if (testing || executorsRemoved.nonEmpty) { executorsRemoved.foreach { removedExecutorId => newExecutorTotal -= 1 +val hasCachedBlocks = SparkEnv.get.blockManager.master.hasCachedBlocks(executorId); --- End diff -- Btw, there could be a chance when querying executor from BlockManager, the executor/block manager was already removed, so we will potentially get `false`. --- 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 #18308: [SPARK-21099][Spark Core] INFO Log Message Using ...
Github user jerryshao commented on a diff in the pull request: https://github.com/apache/spark/pull/18308#discussion_r122129357 --- Diff: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala --- @@ -432,8 +432,10 @@ private[spark] class ExecutorAllocationManager( if (testing || executorsRemoved.nonEmpty) { executorsRemoved.foreach { removedExecutorId => newExecutorTotal -= 1 +val hasCachedBlocks = SparkEnv.get.blockManager.master.hasCachedBlocks(executorId); --- End diff -- And final semicolon ";" is not necessary. --- 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 #18308: [SPARK-21099][Spark Core] INFO Log Message Using ...
Github user jerryshao commented on a diff in the pull request: https://github.com/apache/spark/pull/18308#discussion_r122129269 --- Diff: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala --- @@ -432,8 +432,10 @@ private[spark] class ExecutorAllocationManager( if (testing || executorsRemoved.nonEmpty) { executorsRemoved.foreach { removedExecutorId => newExecutorTotal -= 1 +val hasCachedBlocks = SparkEnv.get.blockManager.master.hasCachedBlocks(executorId); --- End diff -- This variable `executorId` is not defined, should be change to `removedExecutorId`. --- 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 #18308: [SPARK-21099][Spark Core] INFO Log Message Using ...
GitHub user ihazem opened a pull request: https://github.com/apache/spark/pull/18308 [SPARK-21099][Spark Core] INFO Log Message Using Incorrect Executor I⦠â¦dle Timeout Value ## What changes were proposed in this pull request? Updated the INFO logging method (logInfo) to use $timeout instead, which uses cachedExecutorIdleTimeoutS if the executor has cached blocks ## How was this patch tested? Testing was done by doing the following: 1. Update spark-defaults.conf to set the following: executorIdleTimeout=30 cachedExecutorIdleTimeout=20 2. Update log4j.properties to set the following: shell.log.level=INFO 3. Run the following in spark-shell: scala> val textFile = sc.textFile("/user/spark/applicationHistory/app_1234") scala> textFile.cache().count() 4. After 20 secs I see the timeout message for idle cache, and after 30 secs I see the timeout message for executor (executorIdleTimeoutS). Please review http://spark.apache.org/contributing.html before opening a pull request. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ihazem/spark master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/18308.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 #18308 commit 00a42e7c3d08ba01265db8c7329f0ba2148ce41a Author: root Date: 2017-06-14T22:56:24Z [SPARK-21099][Spark Core] INFO Log Message Using Incorrect Executor Idle Timeout Value --- 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