You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by ca...@apache.org on 2020/05/15 21:46:06 UTC
[samza] branch master updated: SAMZA-2525:Fix race condition in
ClientHelper#isActiveApplication (#1361)
This is an automated email from the ASF dual-hosted git repository.
cameronlee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/samza.git
The following commit(s) were added to refs/heads/master by this push:
new 5e73b1f SAMZA-2525:Fix race condition in ClientHelper#isActiveApplication (#1361)
5e73b1f is described below
commit 5e73b1f6f08a876037b8d97baad9947c4d5a077c
Author: Ke Wu <ke...@icloud.com>
AuthorDate: Fri May 15 14:45:56 2020 -0700
SAMZA-2525:Fix race condition in ClientHelper#isActiveApplication (#1361)
API Changes: None
Upgrade Instructions: None
Usage Instructions: None
---
.../src/main/scala/org/apache/samza/job/yarn/ClientHelper.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/samza-yarn/src/main/scala/org/apache/samza/job/yarn/ClientHelper.scala b/samza-yarn/src/main/scala/org/apache/samza/job/yarn/ClientHelper.scala
index 196ac91..4c3c93e 100644
--- a/samza-yarn/src/main/scala/org/apache/samza/job/yarn/ClientHelper.scala
+++ b/samza-yarn/src/main/scala/org/apache/samza/job/yarn/ClientHelper.scala
@@ -301,8 +301,8 @@ class ClientHelper(conf: Configuration) extends Logging {
}
private def isActiveApplication(applicationReport: ApplicationReport): Boolean = {
- (Running.equals(toAppStatus(applicationReport).get)
- || New.equals(toAppStatus(applicationReport).get))
+ val status = toAppStatus(applicationReport).get
+ Running.equals(status) || New.equals(status)
}
def toAppStatus(applicationReport: ApplicationReport): Option[ApplicationStatus] = {