hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cjcjame...@apache.org
Subject [65/80] [abbrv] incubator-hawq git commit: HAWQ-855. Make resource manager ask for cluster report quickly when YARN is detected down
Date Wed, 29 Jun 2016 01:21:23 GMT
HAWQ-855. Make resource manager ask for cluster report quickly when YARN is detected down


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

Branch: refs/heads/HAWQ-537
Commit: 48a79cc270bb8817d9f58b64fd5abb61f8ef0643
Parents: 2c87cdc
Author: YI JIN <yjin@pivotal.io>
Authored: Thu Jun 23 13:31:32 2016 +1000
Committer: YI JIN <yjin@pivotal.io>
Committed: Thu Jun 23 13:31:32 2016 +1000

----------------------------------------------------------------------
 src/backend/resourcemanager/include/resourcepool.h | 2 +-
 src/backend/resourcemanager/resourcemanager.c      | 2 +-
 src/backend/resourcemanager/resourcepool.c         | 6 +++++-
 3 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/48a79cc2/src/backend/resourcemanager/include/resourcepool.h
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/include/resourcepool.h b/src/backend/resourcemanager/include/resourcepool.h
index 4caf139..f23e77b 100644
--- a/src/backend/resourcemanager/include/resourcepool.h
+++ b/src/backend/resourcemanager/include/resourcepool.h
@@ -617,7 +617,7 @@ void timeoutIdleGRMResourceToRB(void);
 void forceReturnGRMResourceToRB(void);
 
 /* Check if some hosts are not updated from GRM cluster report. */
-bool hasSegmentGRMCapacityNotUpdated(void);
+bool requireInstantClusterReport(void);
 bool allSegmentHasNoGRMContainersAllocated(void);
 
 int addOrderedResourceAllocTreeIndexByRatio(uint32_t ratio, BBST *tree);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/48a79cc2/src/backend/resourcemanager/resourcemanager.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcemanager.c b/src/backend/resourcemanager/resourcemanager.c
index 6e9e365..e511b97 100644
--- a/src/backend/resourcemanager/resourcemanager.c
+++ b/src/backend/resourcemanager/resourcemanager.c
@@ -2882,7 +2882,7 @@ void processResourceBrokerTasks(void)
 		if ( (PRESPOOL->Segments.NodeCount > 0 ) &&
 			 (curtime - PRESPOOL->LastUpdateTime  >
 			  rm_cluster_report_period * 1000000LL ||
-			  hasSegmentGRMCapacityNotUpdated() ) &&
+			  requireInstantClusterReport() ) &&
 			 (curtime - PRESPOOL->LastRequestTime > 5LL * 1000000LL) )
 		{
 			double  maxcap  = 0.0;

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/48a79cc2/src/backend/resourcemanager/resourcepool.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcepool.c b/src/backend/resourcemanager/resourcepool.c
index dc48e70..567b295 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -3711,7 +3711,7 @@ void timeoutIdleGRMResourceToRBByRatio(int 		 ratioindex,
 	validateResourcePoolStatus(false);
 }
 
-bool hasSegmentGRMCapacityNotUpdated(void)
+bool requireInstantClusterReport(void)
 {
 	if (DRMGlobalInstance->ImpType == NONE_HAWQ2)
 	{
@@ -3741,6 +3741,10 @@ bool hasSegmentGRMCapacityNotUpdated(void)
 			res = true;
 			break;
 		}
+		else if ( segresource->Stat->StatusDesc & SEG_STATUS_NO_GRM_NODE_REPORT ) {
+			res = true;
+			break;
+		}
 	}
 	freePAIRRefList(&(PRESPOOL->Segments), &allsegres);
 	return res;


Mime
View raw message