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/9dedc6ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/9dedc6ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/9dedc6ae

Branch: refs/heads/master
Commit: 9dedc6ae4c41e2dc329115c686122ab7ab4ef578
Parents: 7c8fc37
Author: doli <[email protected]>
Authored: Tue Mar 22 19:48:21 2016 +0800
Committer: Ming LI <[email protected]>
Committed: Wed Mar 23 10:42:01 2016 +0800

----------------------------------------------------------------------
 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/9dedc6ae/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/9dedc6ae/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/9dedc6ae/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());

Reply via email to