hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iw...@apache.org
Subject incubator-hawq git commit: Revert "HAWQ-789. Explicitly initialize GPOPT and its dependencies."
Date Wed, 08 Jun 2016 05:23:39 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 62f2dfb3c -> 54fcf1461


Revert "HAWQ-789. Explicitly initialize GPOPT and its dependencies."

This reverts commit f2798203efc998a7138e899c053b4a7104ced5b0.


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

Branch: refs/heads/master
Commit: 54fcf1461a8ba663db2cacc5e89844570db8ee22
Parents: 62f2dfb
Author: ivan <iweng@pivotal.io>
Authored: Wed Jun 8 13:23:04 2016 +0800
Committer: ivan <iweng@pivotal.io>
Committed: Wed Jun 8 13:23:04 2016 +0800

----------------------------------------------------------------------
 src/backend/gpopt/CGPOptimizer.cpp | 67 +--------------------------------
 src/backend/gpopt/ivy.xml          |  4 +-
 src/backend/utils/init/postinit.c  | 14 -------
 src/include/gpopt/CGPOptimizer.h   |  7 ----
 4 files changed, 3 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/54fcf146/src/backend/gpopt/CGPOptimizer.cpp
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/CGPOptimizer.cpp b/src/backend/gpopt/CGPOptimizer.cpp
index db3cab8..c0eaa3e 100644
--- a/src/backend/gpopt/CGPOptimizer.cpp
+++ b/src/backend/gpopt/CGPOptimizer.cpp
@@ -48,7 +48,7 @@
 void
 CGPOptimizer::TouchLibraryInitializers()
 {
-	void (*gpos)(gpos_init_params*) = gpos_init;
+	void (*gpos)() = gpos_init;
 	void (*dxl)() = gpdxl_init;
 	void (*opt)() = gpopt_init;
 }
@@ -90,39 +90,6 @@ CGPOptimizer::SzDXLPlan
 	return COptTasks::SzOptimize(pquery);
 }
 
-//---------------------------------------------------------------------------
-//	@function:
-//		InitGPOPT()
-//
-//	@doc:
-//		Initialize GPTOPT and dependent libraries
-//
-//---------------------------------------------------------------------------
-void
-CGPOptimizer::InitGPOPT ()
-{
-  // Use GPORCA's default allocators
-  struct gpos_init_params params = { NULL, NULL };
-  gpos_init(&params);
-  gpdxl_init();
-  gpopt_init();
-}
-
-//---------------------------------------------------------------------------
-//	@function:
-//		TerminateGPOPT()
-//
-//	@doc:
-//		Terminate GPOPT and dependent libraries
-//
-//---------------------------------------------------------------------------
-void
-CGPOptimizer::TerminateGPOPT ()
-{
-  gpopt_terminate();
-  gpdxl_terminate();
-  gpos_terminate();
-}
 
 //---------------------------------------------------------------------------
 //	@function:
@@ -163,36 +130,4 @@ char *SzDXLPlan
 }
 }
 
-//---------------------------------------------------------------------------
-//	@function:
-//		InitGPOPT()
-//
-//	@doc:
-//		Initialize GPTOPT and dependent libraries
-//
-//---------------------------------------------------------------------------
-extern "C"
-{
-void InitGPOPT ()
-{
-	return CGPOptimizer::InitGPOPT();
-}
-}
-
-//---------------------------------------------------------------------------
-//	@function:
-//		TerminateGPOPT()
-//
-//	@doc:
-//		Terminate GPOPT and dependent libraries
-//
-//---------------------------------------------------------------------------
-extern "C"
-{
-void TerminateGPOPT ()
-{
-	return CGPOptimizer::TerminateGPOPT();
-}
-}
-
 // EOF

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/54fcf146/src/backend/gpopt/ivy.xml
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/ivy.xml b/src/backend/gpopt/ivy.xml
index 43423eb..a9d08aa 100644
--- a/src/backend/gpopt/ivy.xml
+++ b/src/backend/gpopt/ivy.xml
@@ -38,8 +38,8 @@ under the License.
     </configurations>
 
     <dependencies>
-      <dependency org="emc"             name="optimizer"       rev="1.633"          conf="osx106_x86->osx106_x86_32;osx106_x86_32->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64"
/>
-      <dependency org="emc"             name="libgpos"         rev="1.137"          conf="osx106_x86->osx106_x86_32;osx106_x86_32->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64"
/>
+      <dependency org="emc"             name="optimizer"       rev="1.630"          conf="osx106_x86->osx106_x86_32;osx106_x86_32->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64"
/>
+      <dependency org="emc"             name="libgpos"         rev="1.136"          conf="osx106_x86->osx106_x86_32;osx106_x86_32->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64"
/>
       <dependency org="xerces"          name="xerces-c"        rev="3.1.1-p1"       conf="osx106_x86->osx106_x86_32;osx106_x86_32->osx106_x86_32;rhel5_x86_64->rhel5_x86_64;suse10_x86_64->suse10_x86_64"
/>
     </dependencies>
 </ivy-module>

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/54fcf146/src/backend/utils/init/postinit.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 5358c5f..c2e3c96 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -62,11 +62,6 @@ static void InitCommunication(void);
 static void ShutdownPostgres(int code, Datum arg);
 static bool ThereIsAtLeastOneRole(void);
 
-#ifdef USE_ORCA
-extern void InitGPOPT();
-extern void TerminateGPOPT();
-#endif
-
 /*** InitPostgres support ***/
 
 /*
@@ -476,11 +471,6 @@ InitPostgres(const char *in_dbname, Oid dboid, const char *username,
 	/* Initialize memory protection */
 	GPMemoryProtect_Init();
 
-#ifdef USE_ORCA
-	/* Initialize GPOPT */
-	InitGPOPT();
-#endif
-
 	/*
 	 * Initialize my entry in the shared-invalidation manager's array of
 	 * per-backend data.
@@ -737,10 +727,6 @@ ShutdownPostgres(int code, Datum arg)
 	 */
 	ReportOOMConsumption();
 
-#ifdef USE_ORCA
-	TerminateGPOPT();
-#endif
-
 	/* Disable memory protection */
 	GPMemoryProtect_Shutdown();
 	/* Release SessionState entry */

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/54fcf146/src/include/gpopt/CGPOptimizer.h
----------------------------------------------------------------------
diff --git a/src/include/gpopt/CGPOptimizer.h b/src/include/gpopt/CGPOptimizer.h
index 68b3957..a1061fd 100644
--- a/src/include/gpopt/CGPOptimizer.h
+++ b/src/include/gpopt/CGPOptimizer.h
@@ -57,13 +57,6 @@ class CGPOptimizer
 		// serialize planned statement into DXL
 		static
 		char *SzDXLPlan(Query *pquery);
-
-		// gpopt initialize and terminate
-		static
-		void InitGPOPT();
-
-		static
-		void TerminateGPOPT();
 };
 
 #endif // CGPOptimizer_H


Mime
View raw message