hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject incubator-hawq git commit: HAWQ-252. fix a coredump when yarn heartbeat thread doesn't exit quickly
Date Wed, 03 Feb 2016 10:08:19 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 5b6ce99b2 -> 682749953


HAWQ-252. fix a coredump when yarn heartbeat thread doesn't exit quickly


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/68274995
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/68274995
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/68274995

Branch: refs/heads/master
Commit: 682749953dd710f04fc49fb3b631673021648e3a
Parents: 5b6ce99
Author: Wen Lin <wlin@pivotal.io>
Authored: Wed Feb 3 18:07:14 2016 +0800
Committer: Wen Lin <wlin@pivotal.io>
Committed: Wed Feb 3 18:07:14 2016 +0800

----------------------------------------------------------------------
 depends/libyarn/src/CMakeLists.txt                  | 2 +-
 depends/libyarn/src/libyarnclient/LibYarnClient.cpp | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/68274995/depends/libyarn/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/depends/libyarn/src/CMakeLists.txt b/depends/libyarn/src/CMakeLists.txt
index 3ccdd31..9d6bfe3 100644
--- a/depends/libyarn/src/CMakeLists.txt
+++ b/depends/libyarn/src/CMakeLists.txt
@@ -2,7 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 
 SET(libyarn_VERSION_MAJOR 0)
 SET(libyarn_VERSION_MINOR 1)
-SET(libyarn_VERSION_PATCH 11)
+SET(libyarn_VERSION_PATCH 12)
 SET(libyarn_VERSION_STRING "${libyarn_VERSION_MAJOR}.${libyarn_VERSION_MINOR}.${libyarn_VERSION_PATCH}")
 SET(libyarn_VERSION_API 1)
 SET(libyarn_ROOT_SOURCES_DIR ${CMAKE_SOURCE_DIR}/src)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/68274995/depends/libyarn/src/libyarnclient/LibYarnClient.cpp
----------------------------------------------------------------------
diff --git a/depends/libyarn/src/libyarnclient/LibYarnClient.cpp b/depends/libyarn/src/libyarnclient/LibYarnClient.cpp
index 338875e..563dee1 100644
--- a/depends/libyarn/src/libyarnclient/LibYarnClient.cpp
+++ b/depends/libyarn/src/libyarnclient/LibYarnClient.cpp
@@ -106,7 +106,7 @@ list<ResourceRequest> LibYarnClient::getAskRequests() {
 
 void* heartbeatFunc(void* args) {
 	int failcounter = 0;
-
+	int retry = 2;
 	LibYarnClient *client = (LibYarnClient*)args;
 
 	while (client->keepRun) {
@@ -119,13 +119,14 @@ void* heartbeatFunc(void* args) {
 						 "is not correctly executed with exception raised. %s",
 						 e.msg());
 			failcounter++;
-			if ( failcounter > 0 ) {
+			if ( failcounter > retry ) {
 				// In case retry too many times with errors/exceptions, this
 				// thread will return. LibYarn has to re-register application
 				// and start the heartbeat thread again.
 				LOG(WARNING, "LibYarnClient::heartbeatFunc, there are too many "
 						     "failures raised. This heart-beat thread exits now.");
 				client->keepRun = false;
+				break;
 			}
 		}
 		usleep((client->heartbeatInterval) * 1000);


Mime
View raw message