hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odiache...@apache.org
Subject [08/38] incubator-hawq git commit: HAWQ-576. Remove useless code which includes function GetAllWorkerHostNum, GetSegmentFunctionList and GetProcessFunctionList for identitiy.c.
Date Thu, 31 Mar 2016 00:24:01 GMT
HAWQ-576. Remove useless code which includes function GetAllWorkerHostNum, GetSegmentFunctionList
and GetProcessFunctionList for identitiy.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/5c3bf1f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/5c3bf1f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/5c3bf1f6

Branch: refs/heads/HAWQ-546
Commit: 5c3bf1f67b212212c82245c328ee2c8583fac87e
Parents: 05e9ffd
Author: doli <doli@pivotal.io>
Authored: Tue Mar 22 19:48:21 2016 +0800
Committer: Oleksandr Diachenko <odiachenko@pivotal.io>
Committed: Wed Mar 30 17:23:27 2016 -0700

----------------------------------------------------------------------
 src/backend/commands/tablecmds.c  |  6 ++++++
 src/backend/postmaster/identity.c | 14 ++------------
 src/include/postmaster/identity.h |  3 ---
 3 files changed, 8 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5c3bf1f6/src/backend/commands/tablecmds.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 259821b..d858d5c 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -17665,9 +17665,11 @@ static Datum transformExecOnClause(List	*on_clause, int *preferred_segment_num,
           errOmitLocation(true)));
 
 			/* result: "ALL_SEGMENTS" */
+			/*
 			exec_location_str = (char *) palloc(12 + 1);
 			exec_location_str = "ALL_SEGMENTS";
 			*preferred_segment_num = GetAllWorkerHostNum();
+			*/
 		}
 		else if (strcmp(defel->defname, "hostname") == 0)
 		{
@@ -17678,10 +17680,12 @@ static Datum transformExecOnClause(List	*on_clause, int *preferred_segment_num,
           errOmitLocation(true)));
 
 			/* result: "HOST:<hostname>" */
+			/*
 			value_str = strVal(defel->arg);
 			exec_location_str = (char *) palloc(5 + 1 + strlen(value_str) + 1);
 			sprintf((char *) exec_location_str, "HOST:%s", value_str);
 			*preferred_segment_num = GetAllWorkerHostNum();
+			*/
 		}
 		else if (strcmp(defel->defname, "eachhost") == 0)
 		{
@@ -17692,9 +17696,11 @@ static Datum transformExecOnClause(List	*on_clause, int *preferred_segment_num,
           errOmitLocation(true)));
 
 			/* result: "PER_HOST" */
+			/*
 			exec_location_str = (char *) palloc(8 + 1);
 			exec_location_str = "PER_HOST";
 			*preferred_segment_num = GetAllWorkerHostNum();
+			*/
 		}
 		else if (strcmp(defel->defname, "master") == 0)
 		{

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5c3bf1f6/src/backend/postmaster/identity.c
----------------------------------------------------------------------
diff --git a/src/backend/postmaster/identity.c b/src/backend/postmaster/identity.c
index 36ea0cb..f4dd1ed 100644
--- a/src/backend/postmaster/identity.c
+++ b/src/backend/postmaster/identity.c
@@ -228,18 +228,6 @@ IsOnMaster(void)
 	return SegmentId.role == SEGMENT_ROLE_MASTER;
 }
 
-SegmentFunctionList *
-GetSegmentFunctionList(void)
-{
-	return &SegmentId.function;
-}
-
-ProcessFunctionList *
-GetProcessFunctionList(void)
-{
-	return &SegmentId.pid.function;
-}
-
 static void
 GenerateProcessIdentityLabel(ProcessIdentity *id)
 {
@@ -573,6 +561,7 @@ GetUserDefinedFunctionVsegNum(void)
 	return GetQueryVsegNum();
 }
 
+/*
 int
 GetAllWorkerHostNum(void)
 {
@@ -583,6 +572,7 @@ GetAllWorkerHostNum(void)
 
 	return num;
 }
+*/
 
 static void
 DebugSegmentIdentity(SegmentIdentity *id)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/5c3bf1f6/src/include/postmaster/identity.h
----------------------------------------------------------------------
diff --git a/src/include/postmaster/identity.h b/src/include/postmaster/identity.h
index f43ab62..d5d4c61 100644
--- a/src/include/postmaster/identity.h
+++ b/src/include/postmaster/identity.h
@@ -94,10 +94,7 @@ extern int GetRelOpt_bucket_num_fromRangeVar(const RangeVar* rel_rv, int
default
 extern int GetDefaultPartitionNum(void);
 extern int GetHashDistPartitionNum(void);
 extern int GetExternalTablePartitionNum(void);
-extern int GetAllWorkerHostNum(void);
 
-extern SegmentFunctionList *GetSegmentFunctionList(void);
-extern ProcessFunctionList *GetProcessFunctionList(void);
 
 /* Assert used for everyone */
 #define		AssertOnMaster()		Assert(AmIMaster());


Mime
View raw message