hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From y...@apache.org
Subject incubator-hawq git commit: HAWQ-641. Add log for changing host capacity that registers before fixing cluster memory to core ratio
Date Sat, 09 Apr 2016 01:08:11 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master a1872589e -> e0430586f


HAWQ-641. Add log for changing host capacity that registers before fixing cluster memory to
core ratio


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

Branch: refs/heads/master
Commit: e0430586fcfe749fe295cbb44cd443b7bde6e5af
Parents: a187258
Author: YI JIN <yjin@pivotal.io>
Authored: Sat Apr 9 11:07:54 2016 +1000
Committer: YI JIN <yjin@pivotal.io>
Committed: Sat Apr 9 11:07:54 2016 +1000

----------------------------------------------------------------------
 src/backend/resourcemanager/resourcepool.c | 36 ++++++++++++++++++-------
 1 file changed, 27 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/e0430586/src/backend/resourcemanager/resourcepool.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcepool.c b/src/backend/resourcemanager/resourcepool.c
index 1be9079..9941226 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -4776,14 +4776,23 @@ void adjustSegmentCapacityForNone(SegResource segres)
 	adjustMemoryCoreValue(&(segres->Stat->FTSTotalMemoryMB),
 						  &(segres->Stat->FTSTotalCore));
 
-	if ( !IS_SEGSTAT_FTSAVAILABLE(segres->Stat) )
-	{
-		return;
-	}
 
 	if ( oldmemorymb != segres->Stat->FTSTotalMemoryMB ||
 		 oldcore	 != segres->Stat->FTSTotalCore )
 	{
+		elog(LOG, "Resource manager adjusts segment %s original resource "
+				  "capacity from (%d MB, %d CORE) to (%d MB, %d CORE)",
+				  GET_SEGINFO_HOSTNAME(&(segres->Stat->Info)),
+				  oldmemorymb,
+				  oldcore,
+				  segres->Stat->FTSTotalMemoryMB,
+				  segres->Stat->FTSTotalCore);
+
+		if ( !IS_SEGSTAT_FTSAVAILABLE(segres->Stat) )
+		{
+			return;
+		}
+
 		minusResourceBundleData(&(PRESPOOL->FTSTotal),
 								oldmemorymb,
 								oldcore * 1.0);
@@ -4809,14 +4818,23 @@ void adjustSegmentCapacityForGRM(SegResource segres)
 	adjustMemoryCoreValue(&(segres->Stat->GRMTotalMemoryMB),
 						  &(segres->Stat->GRMTotalCore));
 
-	if (!IS_SEGSTAT_FTSAVAILABLE(segres->Stat))
-	{
-		return;
-	}
-
 	if ( oldmemorymb != segres->Stat->GRMTotalMemoryMB ||
 		 oldcore 	 != segres->Stat->GRMTotalCore )
 	{
+		elog(LOG, "Resource manager adjusts segment %s original global resource "
+				  "manager resource capacity from (%d MB, %d CORE) to "
+				  "(%d MB, %d CORE)",
+				  GET_SEGINFO_HOSTNAME(&(segres->Stat->Info)),
+				  oldmemorymb,
+				  oldcore,
+				  segres->Stat->GRMTotalMemoryMB,
+				  segres->Stat->GRMTotalCore);
+
+		if (!IS_SEGSTAT_FTSAVAILABLE(segres->Stat))
+		{
+			return;
+		}
+
 		minusResourceBundleData(&(PRESPOOL->GRMTotal),
 								oldmemorymb,
 								oldcore * 1.0);


Mime
View raw message