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-590. Remove Dead Codes in resourcepool.c and requesthandler_ddl.c
Date Mon, 28 Mar 2016 02:00:10 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master e224fdb59 -> eb229d974


HAWQ-590. Remove Dead Codes in resourcepool.c and requesthandler_ddl.c


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

Branch: refs/heads/master
Commit: eb229d97484d50d180c10c7dd2122553820d2270
Parents: e224fdb
Author: Wen Lin <wlin@pivotal.io>
Authored: Mon Mar 28 09:59:27 2016 +0800
Committer: Wen Lin <wlin@pivotal.io>
Committed: Mon Mar 28 09:59:27 2016 +0800

----------------------------------------------------------------------
 .../resourcemanager/include/resourcepool.h      |  2 -
 .../resourcemanager/requesthandler_ddl.c        | 47 --------------------
 src/backend/resourcemanager/resourcepool.c      | 36 ---------------
 3 files changed, 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/eb229d97/src/backend/resourcemanager/include/resourcepool.h
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/include/resourcepool.h b/src/backend/resourcemanager/include/resourcepool.h
index 08ce305..f9f893d 100644
--- a/src/backend/resourcemanager/include/resourcepool.h
+++ b/src/backend/resourcemanager/include/resourcepool.h
@@ -610,8 +610,6 @@ void dropAllGRMContainersFromSegment(SegResource segres);
 
 void returnAllGRMResourceFromUnavailableSegments(void);
 
-void generateSegResourceReport(int32_t nodeid, SelfMaintainBuffer buff);
-
 /* Notify RM SEG to update resource capacity. */
 int notifyToBeAcceptedGRMContainersToRMSEG(void);
 int notifyToBeKickedGRMContainersToRMSEG(void);

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/eb229d97/src/backend/resourcemanager/requesthandler_ddl.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/requesthandler_ddl.c b/src/backend/resourcemanager/requesthandler_ddl.c
index 48a726c..f50d924 100644
--- a/src/backend/resourcemanager/requesthandler_ddl.c
+++ b/src/backend/resourcemanager/requesthandler_ddl.c
@@ -45,9 +45,6 @@ int performInsertActionForPGResqueue(List *colvalues, Oid *newoid);
 int performUpdateActionForPGResqueue(List *colvalues, char *queuename);
 int performDeleteActionForPGResqueue(char *queuename);
 
-Datum getDatumFromStringValuForPGResqueue(int	 colindex,
-								   		  char  *colvaluestr);
-
 int buildInsertActionForPGResqueue(DynResourceQueue   queue,
 							   	   List 			 *rsqattr,
 							   	   List		   		**insvalues);
@@ -1547,50 +1544,6 @@ cleanup:
 	return res;
 }
 
-/*******************************************************************************
- * Recognize the column value based on column index and convert string format
- * value into Datum instance for caql operations.
- ******************************************************************************/
-Datum getDatumFromStringValuForPGResqueue(int	 colindex,
-										  char  *colvaluestr)
-{
-	switch(colindex) {
-	case Anum_pg_resqueue_rsqname:
-		/* Set value as name format */
-		return DirectFunctionCall1(namein, CStringGetDatum(colvaluestr));
-
-
-	case Anum_pg_resqueue_creationtime:
-	case Anum_pg_resqueue_updatetime:
-		return 0;
-
-	case Anum_pg_resqueue_memorylimit:
-	case Anum_pg_resqueue_corelimit:
-	case Anum_pg_resqueue_allocpolicy:
-	case Anum_pg_resqueue_vsegresourcequota:
-	case Anum_pg_resqueue_status:
-		/* Set value as text format */
-		return DirectFunctionCall1(textin, CStringGetDatum(colvaluestr));
-
-	case Anum_pg_resqueue_activestats:
-	{
-		int32_t tmpvalue;
-		sscanf(colvaluestr, "%d", &tmpvalue);
-		return Int32GetDatum(tmpvalue);
-	}
-	case Anum_pg_resqueue_parentoid:
-	{
-		int64_t tmpoid;
-		Oid 	parentoid;
-		sscanf(colvaluestr, INT64_FORMAT, &tmpoid);
-		parentoid = tmpoid;
-		return ObjectIdGetDatum(parentoid);
-	}
-	Assert(false);
-	}
-	return 0;
-}
-
 void freeUpdateActionList(MCTYPE context, List **actions)
 {
 	while( list_length(*actions) > 0 )

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/eb229d97/src/backend/resourcemanager/resourcepool.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcepool.c b/src/backend/resourcemanager/resourcepool.c
index abc4abc..c875df9 100644
--- a/src/backend/resourcemanager/resourcepool.c
+++ b/src/backend/resourcemanager/resourcepool.c
@@ -1804,42 +1804,6 @@ int setSegResHAWQAvailability( SegResource segres, uint8_t newstatus)
 	return res;
 }
 
-/* Generate HAWQ host report. */
-void generateSegResourceReport(int32_t segid, SelfMaintainBuffer buff)
-{
-	SegResource seg = getSegResource(segid);
-
-	if ( seg == NULL )
-	{
-		static char messagenull[] = "NULL NODE.";
-		appendSelfMaintainBuffer(buff, messagenull, sizeof(messagenull));
-	}
-	else
-	{
-		static char reporthead[256];
-
-		int headsize = sprintf(reporthead,
-							   "SEGMENT:ID=%d, "
-							   "HAWQAVAIL=%d. "
-							   "FTS( %d MB, %d CORE). "
-							   "GRM( %d MB, %d CORE). "
-							   "MEM=%d(%d) MB. "
-							   "CORE=%lf(%lf).\n",
-							   seg->Stat->ID,
-							   seg->Stat->FTSAvailable,
-							   seg->Stat->FTSTotalMemoryMB,
-							   seg->Stat->FTSTotalCore,
-							   seg->Stat->GRMTotalMemoryMB,
-							   seg->Stat->GRMTotalCore,
-							   seg->Allocated.MemoryMB,
-							   seg->Available.MemoryMB,
-							   seg->Allocated.Core,
-							   seg->Available.Core);
-		appendSelfMaintainBuffer(buff, reporthead, headsize);
-		generateSegInfoReport(&(seg->Stat->Info), buff);
-	}
-}
-
 /* Generate machine id instance data into a string as report. */
 void  generateSegInfoReport(SegInfo seginfo, SelfMaintainBuffer buff)
 {


Mime
View raw message