hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject incubator-hawq git commit: HAWQ-772. Hotfix for HAWQ-760 build.
Date Thu, 02 Jun 2016 03:04:29 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 2b50f7fee -> 8e84f4835


HAWQ-772. Hotfix for HAWQ-760 build.


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

Branch: refs/heads/master
Commit: 8e84f48357aac65c5dd8f89e89d35527f70ef29e
Parents: 2b50f7f
Author: xunzhang <xunzhangthu@gmail.com>
Authored: Thu Jun 2 10:54:08 2016 +0800
Committer: xunzhang <xunzhangthu@gmail.com>
Committed: Thu Jun 2 10:54:08 2016 +0800

----------------------------------------------------------------------
 src/test/feature/ManagementTool/test_hawq.paq   | Bin 0 -> 657 bytes
 .../ManagementTool/test_hawq_register.cpp       | 150 +++++++++++++++++++
 src/test/feature/ManagementTool/test_hive.paq   | Bin 0 -> 212 bytes
 src/test/feature/ManagementTool/test_not_paq    | Bin 0 -> 48 bytes
 .../testhawqregister/test-hawq-register.cpp     | 149 ------------------
 src/test/feature/testhawqregister/test_hawq.paq | Bin 657 -> 0 bytes
 src/test/feature/testhawqregister/test_hive.paq | Bin 212 -> 0 bytes
 src/test/feature/testhawqregister/test_not_paq  | Bin 48 -> 0 bytes
 8 files changed, 150 insertions(+), 149 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8e84f483/src/test/feature/ManagementTool/test_hawq.paq
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/test_hawq.paq b/src/test/feature/ManagementTool/test_hawq.paq
new file mode 100644
index 0000000..f2adb4b
Binary files /dev/null and b/src/test/feature/ManagementTool/test_hawq.paq differ

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8e84f483/src/test/feature/ManagementTool/test_hawq_register.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/test_hawq_register.cpp b/src/test/feature/ManagementTool/test_hawq_register.cpp
new file mode 100644
index 0000000..328c19d
--- /dev/null
+++ b/src/test/feature/ManagementTool/test_hawq_register.cpp
@@ -0,0 +1,150 @@
+#include <string>
+
+#include "lib/command.h"
+#include "lib/sql_util.h"
+
+#include "gtest/gtest.h"
+
+using std::string;
+using hawq::test::SQLUtility;
+using hawq::test::Command;
+
+/* This test suite may consume more than 80 seconds. */
+class TestHawqRegister : public ::testing::Test {
+ public:
+  TestHawqRegister() {}
+  ~TestHawqRegister() {}
+};
+
+TEST_F(TestHawqRegister, TestSingleHawqFile) {
+	SQLUtility util;
+	string rootPath(util.getTestRootPath());
+	string relativePath("/testhawqregister/test_hawq.paq");
+	string filePath = rootPath + relativePath;
+
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_hawq.paq"));
+
+	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet);");
+	util.query("select * from hawqregister;", 0);
+
+	EXPECT_EQ(0, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_hawq.paq"));
+
+	util.query("select * from hawqregister;", 3);
+	util.execute("insert into hawqregister values(1);");
+	util.query("select * from hawqregister;", 4);
+	util.execute("drop table hawqregister;");
+}
+
+TEST_F(TestHawqRegister, TestSingleHiveFile) {
+	SQLUtility util;
+	string rootPath(util.getTestRootPath());
+	string relativePath("/testhawqregister/test_hive.paq");
+	string filePath = rootPath + relativePath;
+
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_hive.paq"));
+
+	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet);");
+	util.query("select * from hawqregister;", 0);
+
+	EXPECT_EQ(0, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_hive.paq"));
+
+	util.query("select * from hawqregister;", 1);
+	util.execute("insert into hawqregister values(1);");
+	util.query("select * from hawqregister;", 2);
+	util.execute("drop table hawqregister;");
+}
+
+TEST_F(TestHawqRegister, TestFiles) {
+	SQLUtility util;
+	string rootPath(util.getTestRootPath());
+	string relativePath("/testhawqregister/test_hawq.paq");
+	string filePath1 = rootPath + relativePath;
+	relativePath = "/testhawqregister/test_hive.paq";
+	string filePath2 = rootPath + relativePath;
+
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -mkdir -p /hawq_register_test/t/t"));
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath1 + " /hawq_register_test/hawq1.paq"));
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath1 + " /hawq_register_test/hawq2.paq"));
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath1 + " /hawq_register_test/t/hawq.paq"));
+
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath2 + " /hawq_register_test/hive1.paq"));
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath2 + " /hawq_register_test/hive2.paq"));
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath2 + " /hawq_register_test/t/hive.paq"));
+
+	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet);");
+	util.query("select * from hawqregister;", 0);
+
+	EXPECT_EQ(0, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_test"));
+
+	util.query("select * from hawqregister;", 12);
+	util.execute("insert into hawqregister values(1);");
+	util.query("select * from hawqregister;", 13);
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -rm -r /hawq_register_test"));
+	util.execute("drop table hawqregister;");
+}
+
+TEST_F(TestHawqRegister, TestHashDistributedTable) {
+	SQLUtility util;
+	string rootPath(util.getTestRootPath());
+	string relativePath("/testhawqregister/test_hawq.paq");
+	string filePath = rootPath + relativePath;
+
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_hawq.paq"));
+
+	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet)
distributed by (i);");
+	util.query("select * from hawqregister;", 0);
+
+	EXPECT_EQ(1, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_hawq.paq"));
+	util.query("select * from hawqregister;", 0);
+
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -rm /hawq_register_hawq.paq"));
+	util.execute("drop table hawqregister;");
+}
+
+TEST_F(TestHawqRegister, TestNotParquetFile) {
+	SQLUtility util;
+	string rootPath(util.getTestRootPath());
+	string relativePath("/testhawqregister/test_not_paq");
+	string filePath = rootPath + relativePath;
+
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_test_not_paq"));
+
+	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet);");
+	util.query("select * from hawqregister;", 0);
+
+	EXPECT_EQ(1, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_test_not_paq"));
+	util.query("select * from hawqregister;", 0);
+
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -rm /hawq_register_test_not_paq"));
+	util.execute("drop table hawqregister;");
+}
+
+TEST_F(TestHawqRegister, TestNotParquetTable) {
+	SQLUtility util;
+	string rootPath(util.getTestRootPath());
+	string relativePath("/testhawqregister/test_hawq.paq");
+	string filePath = rootPath + relativePath;
+
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_hawq.paq"));
+
+	util.execute("create table hawqregister(i int);");
+	util.query("select * from hawqregister;", 0);
+
+	EXPECT_EQ(1, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_hawq.paq"));
+	util.query("select * from hawqregister;", 0);
+
+	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -rm /hawq_register_hawq.paq"));
+	util.execute("drop table hawqregister;");
+}
+
+TEST_F(TestHawqRegister, TestFileNotExist) {
+	SQLUtility util;
+
+	util.execute("create table hawqregister(i int);");
+	util.query("select * from hawqregister;", 0);
+
+	EXPECT_EQ(1, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_file_not_exist"));
+	util.query("select * from hawqregister;", 0);
+
+	util.execute("drop table hawqregister;");
+}

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8e84f483/src/test/feature/ManagementTool/test_hive.paq
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/test_hive.paq b/src/test/feature/ManagementTool/test_hive.paq
new file mode 100644
index 0000000..a356fc7
Binary files /dev/null and b/src/test/feature/ManagementTool/test_hive.paq differ

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8e84f483/src/test/feature/ManagementTool/test_not_paq
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/test_not_paq b/src/test/feature/ManagementTool/test_not_paq
new file mode 100644
index 0000000..dc75c44
Binary files /dev/null and b/src/test/feature/ManagementTool/test_not_paq differ

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8e84f483/src/test/feature/testhawqregister/test-hawq-register.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/testhawqregister/test-hawq-register.cpp b/src/test/feature/testhawqregister/test-hawq-register.cpp
deleted file mode 100644
index eb15d32..0000000
--- a/src/test/feature/testhawqregister/test-hawq-register.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-#include <string>
-
-#include "lib/command.h"
-#include "lib/common.h"
-#include "lib/sql-util.h"
-
-#include "gtest/gtest.h"
-
-using std::string;
-
-/* This test suite may consume more than 80 seconds. */
-class TestHawqRegister : public ::testing::Test {
- public:
-  TestHawqRegister() {}
-  ~TestHawqRegister() {}
-};
-
-TEST_F(TestHawqRegister, TestSingleHawqFile) {
-	SQLUtility util;
-	string rootPath(util.getTestRootPath());
-	string relativePath("/testhawqregister/test_hawq.paq");
-	string filePath = rootPath + relativePath;
-
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_hawq.paq"));
-
-	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet);");
-	util.query("select * from hawqregister;", 0);
-
-	EXPECT_EQ(0, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_hawq.paq"));
-
-	util.query("select * from hawqregister;", 3);
-	util.execute("insert into hawqregister values(1);");
-	util.query("select * from hawqregister;", 4);
-	util.execute("drop table hawqregister;");
-}
-
-TEST_F(TestHawqRegister, TestSingleHiveFile) {
-	SQLUtility util;
-	string rootPath(util.getTestRootPath());
-	string relativePath("/testhawqregister/test_hive.paq");
-	string filePath = rootPath + relativePath;
-
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_hive.paq"));
-
-	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet);");
-	util.query("select * from hawqregister;", 0);
-
-	EXPECT_EQ(0, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_hive.paq"));
-
-	util.query("select * from hawqregister;", 1);
-	util.execute("insert into hawqregister values(1);");
-	util.query("select * from hawqregister;", 2);
-	util.execute("drop table hawqregister;");
-}
-
-TEST_F(TestHawqRegister, TestFiles) {
-	SQLUtility util;
-	string rootPath(util.getTestRootPath());
-	string relativePath("/testhawqregister/test_hawq.paq");
-	string filePath1 = rootPath + relativePath;
-	relativePath = "/testhawqregister/test_hive.paq";
-	string filePath2 = rootPath + relativePath;
-
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -mkdir -p /hawq_register_test/t/t"));
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath1 + " /hawq_register_test/hawq1.paq"));
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath1 + " /hawq_register_test/hawq2.paq"));
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath1 + " /hawq_register_test/t/hawq.paq"));
-
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath2 + " /hawq_register_test/hive1.paq"));
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath2 + " /hawq_register_test/hive2.paq"));
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath2 + " /hawq_register_test/t/hive.paq"));
-
-	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet);");
-	util.query("select * from hawqregister;", 0);
-
-	EXPECT_EQ(0, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_test"));
-
-	util.query("select * from hawqregister;", 12);
-	util.execute("insert into hawqregister values(1);");
-	util.query("select * from hawqregister;", 13);
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -rm -r /hawq_register_test"));
-	util.execute("drop table hawqregister;");
-}
-
-TEST_F(TestHawqRegister, TestHashDistributedTable) {
-	SQLUtility util;
-	string rootPath(util.getTestRootPath());
-	string relativePath("/testhawqregister/test_hawq.paq");
-	string filePath = rootPath + relativePath;
-
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_hawq.paq"));
-
-	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet)
distributed by (i);");
-	util.query("select * from hawqregister;", 0);
-
-	EXPECT_EQ(1, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_hawq.paq"));
-	util.query("select * from hawqregister;", 0);
-
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -rm /hawq_register_hawq.paq"));
-	util.execute("drop table hawqregister;");
-}
-
-TEST_F(TestHawqRegister, TestNotParquetFile) {
-	SQLUtility util;
-	string rootPath(util.getTestRootPath());
-	string relativePath("/testhawqregister/test_not_paq");
-	string filePath = rootPath + relativePath;
-
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_test_not_paq"));
-
-	util.execute("create table hawqregister(i int) with (appendonly=true, orientation=parquet);");
-	util.query("select * from hawqregister;", 0);
-
-	EXPECT_EQ(1, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_test_not_paq"));
-	util.query("select * from hawqregister;", 0);
-
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -rm /hawq_register_test_not_paq"));
-	util.execute("drop table hawqregister;");
-}
-
-TEST_F(TestHawqRegister, TestNotParquetTable) {
-	SQLUtility util;
-	string rootPath(util.getTestRootPath());
-	string relativePath("/testhawqregister/test_hawq.paq");
-	string filePath = rootPath + relativePath;
-
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -put " + filePath + " /hawq_register_hawq.paq"));
-
-	util.execute("create table hawqregister(i int);");
-	util.query("select * from hawqregister;", 0);
-
-	EXPECT_EQ(1, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_hawq.paq"));
-	util.query("select * from hawqregister;", 0);
-
-	EXPECT_EQ(0, Command::getCommandStatus("hadoop fs -rm /hawq_register_hawq.paq"));
-	util.execute("drop table hawqregister;");
-}
-
-TEST_F(TestHawqRegister, TestFileNotExist) {
-	SQLUtility util;
-
-	util.execute("create table hawqregister(i int);");
-	util.query("select * from hawqregister;", 0);
-
-	EXPECT_EQ(1, Command::getCommandStatus("hawq register postgres hawqregister /hawq_register_file_not_exist"));
-	util.query("select * from hawqregister;", 0);
-
-	util.execute("drop table hawqregister;");
-}

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8e84f483/src/test/feature/testhawqregister/test_hawq.paq
----------------------------------------------------------------------
diff --git a/src/test/feature/testhawqregister/test_hawq.paq b/src/test/feature/testhawqregister/test_hawq.paq
deleted file mode 100644
index f2adb4b..0000000
Binary files a/src/test/feature/testhawqregister/test_hawq.paq and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8e84f483/src/test/feature/testhawqregister/test_hive.paq
----------------------------------------------------------------------
diff --git a/src/test/feature/testhawqregister/test_hive.paq b/src/test/feature/testhawqregister/test_hive.paq
deleted file mode 100644
index a356fc7..0000000
Binary files a/src/test/feature/testhawqregister/test_hive.paq and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/8e84f483/src/test/feature/testhawqregister/test_not_paq
----------------------------------------------------------------------
diff --git a/src/test/feature/testhawqregister/test_not_paq b/src/test/feature/testhawqregister/test_not_paq
deleted file mode 100644
index dc75c44..0000000
Binary files a/src/test/feature/testhawqregister/test_not_paq and /dev/null differ


Mime
View raw message