hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hubertzh...@apache.org
Subject [1/2] incubator-hawq git commit: HAWQ-1044. Add normal path testcase for hawq register when file exists, file does not exist and --force
Date Mon, 19 Sep 2016 06:43:28 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 410f35a7c -> 044411285


HAWQ-1044. Add normal path testcase for hawq register when file exists, file does not exist
and --force


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

Branch: refs/heads/master
Commit: f87c234e127315aa2a0ab00a0dfe9c3acdef530a
Parents: 410f35a
Author: Chunling Wang <wangchunling14@126.com>
Authored: Mon Sep 19 11:15:38 2016 +0800
Committer: Chunling Wang <wangchunling14@126.com>
Committed: Mon Sep 19 11:15:56 2016 +0800

----------------------------------------------------------------------
 .../feature/ManagementTool/test_hawq_register.h | 54 +++++++++++++---
 .../test_hawq_register_usage2_case1.cpp         | 51 +++++++++++++++
 .../test_hawq_register_usage2_case2.cpp         | 65 ++++++++++++++++++++
 .../ManagementTool/usage2case2/t_tpl_1.yml      | 31 ++++++++++
 .../ManagementTool/usage2case2/t_tpl_2.yml      | 33 ++++++++++
 .../ManagementTool/usage2case2/t_tpl_3.yml      | 21 +++++++
 .../ManagementTool/usage2case2/t_tpl_4.yml      | 23 +++++++
 .../ManagementTool/usage2case2/t_tpl_new_1.yml  | 43 +++++++++++++
 .../ManagementTool/usage2case2/t_tpl_new_2.yml  | 45 ++++++++++++++
 .../ManagementTool/usage2case2/t_tpl_new_3.yml  | 23 +++++++
 .../ManagementTool/usage2case2/t_tpl_new_4.yml  | 25 ++++++++
 11 files changed, 405 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/test_hawq_register.h
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/test_hawq_register.h b/src/test/feature/ManagementTool/test_hawq_register.h
index 3cdc288..70a2998 100644
--- a/src/test/feature/ManagementTool/test_hawq_register.h
+++ b/src/test/feature/ManagementTool/test_hawq_register.h
@@ -2,19 +2,55 @@
 #define TEST_HAWQ_REGISTER_H
 
 #include <string>
+#include <pwd.h>
 #include "lib/hdfs_config.h"
 #include "gtest/gtest.h"
 
 class TestHawqRegister : public ::testing::Test {
- public:
-  TestHawqRegister() {}
-  ~TestHawqRegister() {}
-  std::string getHdfsLocation() {
-    hawq::test::HdfsConfig hc;
-    std::string namenodehost = "";
-    EXPECT_EQ(true, hc.getNamenodeHost(namenodehost));
-    return hawq::test::stringFormat("hdfs://%s", namenodehost.c_str());
-  }
+    public:
+        TestHawqRegister() {
+            std::string user = HAWQ_USER;
+            if(user.empty()) {
+                struct passwd *pw;
+                uid_t uid = geteuid();
+                pw = getpwuid(uid);
+                user.assign(pw->pw_name);
+            }
+            conn.reset(new hawq::test::PSQL(HAWQ_DB, HAWQ_HOST, HAWQ_PORT, user, HAWQ_PASSWORD));
+        }
+        ~TestHawqRegister() {}
+
+        std::string getHdfsLocation() {
+            hawq::test::HdfsConfig hc;
+            std::string namenodehost = "";
+            EXPECT_EQ(true, hc.getNamenodeHost(namenodehost));
+            return hawq::test::stringFormat("hdfs://%s", namenodehost.c_str());
+        }
+
+        std::string getDatabaseOid() {
+            const hawq::test::PSQLQueryResult &result = conn->getQueryResult(
+                hawq::test::stringFormat("SELECT oid from pg_database where datname = \'%s\';",
HAWQ_DB));
+            std::vector<std::vector<std::string>> table = result.getRows();
+            if (table.size() > 0) {
+                return table[0][0];
+            }
+
+            return "";
+        }
+
+        std::string getTableOid(std::string relname) {
+            const hawq::test::PSQLQueryResult &result = conn->getQueryResult(
+                hawq::test::stringFormat("SELECT oid from pg_class where relname = \'%s\';",
relname.c_str()));
+            std::vector<std::vector<std::string>> table = result.getRows();
+            if (table.size() > 0) {
+                return table[0][0];
+            }
+
+            return "";
+        }
+
+    private:
+        std::unique_ptr<hawq::test::PSQL> conn;
 };
 
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/test_hawq_register_usage2_case1.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/test_hawq_register_usage2_case1.cpp b/src/test/feature/ManagementTool/test_hawq_register_usage2_case1.cpp
new file mode 100644
index 0000000..fa0d00d
--- /dev/null
+++ b/src/test/feature/ManagementTool/test_hawq_register_usage2_case1.cpp
@@ -0,0 +1,51 @@
+#include <string>
+
+#include "lib/command.h"
+#include "lib/sql_util.h"
+#include "lib/string_util.h"
+#include "lib/hdfs_config.h"
+#include "test_hawq_register.h"
+
+#include "gtest/gtest.h"
+
+using std::string;
+using hawq::test::SQLUtility;
+using hawq::test::Command;
+using hawq::test::HdfsConfig;
+
+TEST_F(TestHawqRegister, TestUsage2Case1Expected) {
+    SQLUtility util;
+    std::vector<string> create_table_matrix = {"distributed by (i)", "distributed randomly"};
+    std::vector<string> fmt_matrix = {"row", "parquet"};
+    int suffix=0;
+    for (auto & ddl : create_table_matrix) {
+        for (auto & fmt : fmt_matrix) {
+            suffix++;
+            auto t = hawq::test::stringFormat("t_usage2_case1_%s", std::to_string(suffix).c_str());
+            auto nt = hawq::test::stringFormat("nt_usage2_case1_%s", std::to_string(suffix).c_str());
+            util.execute(hawq::test::stringFormat("drop table if exists %s;", t.c_str()));
+            util.execute(hawq::test::stringFormat("drop table if exists %s;", nt.c_str()));
+
+            // hawq register -d hawq_feature_test -c t_usage2_case1_#.yml nt_usage2_case1_#,
where nt_usage2_case1_# does not exist
+            util.execute(hawq::test::stringFormat("create table %s(i int) with (appendonly=true,
orientation=%s) %s;", t.c_str(), fmt.c_str(), ddl.c_str()));
+            util.execute(hawq::test::stringFormat("insert into %s select generate_series(1,
100);", t.c_str()));
+            util.query(hawq::test::stringFormat("select * from %s;", t.c_str()), 100);
+            EXPECT_EQ(0, Command::getCommandStatus(hawq::test::stringFormat("hawq extract
-d %s -o t_%s.yml testhawqregister_testusage2case1expected.%s", HAWQ_DB, std::to_string(suffix).c_str(),
t.c_str())));
+            EXPECT_EQ(0, Command::getCommandStatus(hawq::test::stringFormat("hawq register
-d %s -c t_%s.yml testhawqregister_testusage2case1expected.%s", HAWQ_DB, std::to_string(suffix).c_str(),
nt.c_str())));
+            util.query(hawq::test::stringFormat("select * from %s;", nt.c_str()), 100);
+
+            // hawq register -d hawq_feature_test -c t_usage2_case1_#.yml nt_usage2_case1_#,
where nt_usage2_case1_# exists
+            util.execute(hawq::test::stringFormat("drop table if exists %s;", t.c_str()));
+            util.execute(hawq::test::stringFormat("create table %s(i int) with (appendonly=true,
orientation=%s) %s;", t.c_str(), fmt.c_str(), ddl.c_str()));
+            util.execute(hawq::test::stringFormat("insert into %s select generate_series(101,
150);", t.c_str()));
+            util.query(hawq::test::stringFormat("select * from %s;", t.c_str()), 50);
+            EXPECT_EQ(0, Command::getCommandStatus(hawq::test::stringFormat("hawq extract
-d %s -o t_%s.yml testhawqregister_testusage2case1expected.%s", HAWQ_DB, std::to_string(suffix).c_str(),
t.c_str())));
+            EXPECT_EQ(0, Command::getCommandStatus(hawq::test::stringFormat("hawq register
-d %s -c t_%s.yml testhawqregister_testusage2case1expected.%s", HAWQ_DB, std::to_string(suffix).c_str(),
nt.c_str())));
+            util.query(hawq::test::stringFormat("select * from %s;", nt.c_str()), 150);
+            EXPECT_EQ(0, Command::getCommandStatus("rm -rf t.yml"));
+            util.execute(hawq::test::stringFormat("drop table %s;", t.c_str()));
+            util.execute(hawq::test::stringFormat("drop table %s;", nt.c_str()));
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/test_hawq_register_usage2_case2.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/test_hawq_register_usage2_case2.cpp b/src/test/feature/ManagementTool/test_hawq_register_usage2_case2.cpp
new file mode 100644
index 0000000..43fd837
--- /dev/null
+++ b/src/test/feature/ManagementTool/test_hawq_register_usage2_case2.cpp
@@ -0,0 +1,65 @@
+#include <string>
+
+#include "lib/command.h"
+#include "lib/sql_util.h"
+#include "lib/string_util.h"
+#include "lib/hdfs_config.h"
+#include "lib/file_replace.h"
+#include "test_hawq_register.h"
+
+#include "gtest/gtest.h"
+
+using std::string;
+using hawq::test::SQLUtility;
+using hawq::test::Command;
+using hawq::test::HdfsConfig;
+
+TEST_F(TestHawqRegister, TestUsage2Case2Expected) {
+    SQLUtility util;
+    string test_root(util.getTestRootPath());
+    std::vector<string> create_table_matrix = {"distributed by (i)", "distributed randomly"};
+    std::vector<string> fmt_matrix = {"row", "parquet"};
+    int suffix=0;
+
+    for (auto & ddl : create_table_matrix) {
+        for (auto & fmt : fmt_matrix) {
+            suffix++;
+            string t_yml_tpl(hawq::test::stringFormat("%s/ManagementTool/usage2case2/t_tpl_%s.yml",
test_root.c_str(), std::to_string(suffix).c_str()));
+            string t_yml_tpl_new(hawq::test::stringFormat("%s/ManagementTool/usage2case2/t_tpl_new_%s.yml",
test_root.c_str(), std::to_string(suffix).c_str()));
+            string t_yml(hawq::test::stringFormat("%s/ManagementTool/usage2case2/t_%s.yml",
test_root.c_str(), std::to_string(suffix).c_str()));
+            string t_yml_new(hawq::test::stringFormat("%s/ManagementTool/usage2case2/t_new_%s.yml",
test_root.c_str(), std::to_string(suffix).c_str()));
+            auto t = hawq::test::stringFormat("t_usage2_case2_%s", std::to_string(suffix).c_str());
+            auto nt = hawq::test::stringFormat("nt_usage2_case2_%s", std::to_string(suffix).c_str());
+            util.execute(hawq::test::stringFormat("drop table if exists %s;", t.c_str()));
+            util.execute(hawq::test::stringFormat("drop table if exists %s;", nt.c_str()));
+
+            // hawq register -d hawq_feature_test -c t_#.yml nt_usage2_case2_#
+            util.execute(hawq::test::stringFormat("create table %s(i int) with (appendonly=true,
orientation=%s) %s;", t.c_str(), fmt.c_str(), ddl.c_str()));
+            util.execute(hawq::test::stringFormat("insert into %s select generate_series(1,
100);", t.c_str()));
+            util.execute(hawq::test::stringFormat("insert into %s select generate_series(101,
200);", t.c_str()));
+            util.query(hawq::test::stringFormat("select * from %s;", t.c_str()), 200);
+            hawq::test::FileReplace frep;
+            std::unordered_map<std::string, std::string> strs_src_dst;
+            strs_src_dst["@DATABASE_OID@"]= getDatabaseOid();
+            strs_src_dst["@TABLE_OID@"]= getTableOid(t);
+            frep.replace(t_yml_tpl, t_yml, strs_src_dst);
+            auto tmp = hawq::test::stringFormat("hawq register -d %s -c %s testhawqregister_testusage2case2expected.%s",
HAWQ_DB, t_yml.c_str(), nt.c_str());
+            EXPECT_EQ(0, Command::getCommandStatus(hawq::test::stringFormat("hawq register
-d %s -c %s testhawqregister_testusage2case2expected.%s", HAWQ_DB, t_yml.c_str(), nt.c_str())));
+            util.query(hawq::test::stringFormat("select * from %s;", nt.c_str()), 200);
+
+            // hawq register --force -d hawq_feature_test -c t_new_#.yml nt_usage2_case2_#
+            util.execute(hawq::test::stringFormat("drop table if exists %s;", t.c_str()));
+            util.execute(hawq::test::stringFormat("create table %s(i int) with (appendonly=true,
orientation=%s) %s;", t.c_str(), fmt.c_str(), ddl.c_str()));
+            util.execute(hawq::test::stringFormat("insert into %s select generate_series(1,
50);", t.c_str()));
+            util.query(hawq::test::stringFormat("select * from %s;", t.c_str()), 50);
+            strs_src_dst["@DATABASE_OID@"]= getDatabaseOid();
+            strs_src_dst["@TABLE_OID_OLD@"]= getTableOid(nt);
+            strs_src_dst["@TABLE_OID_NEW@"]= getTableOid(t);
+            frep.replace(t_yml_tpl_new, t_yml_new, strs_src_dst);
+            tmp = hawq::test::stringFormat("hawq register --force -d %s -c %s testhawqregister_testusage2case2expected.%s",
HAWQ_DB, t_yml_new.c_str(), nt.c_str());
+            EXPECT_EQ(0, Command::getCommandStatus(hawq::test::stringFormat("hawq register
--force -d %s -c %s testhawqregister_testusage2case2expected.%s", HAWQ_DB, t_yml_new.c_str(),
nt.c_str())));
+            util.query(hawq::test::stringFormat("select * from %s;", nt.c_str()), 150);
+        }
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/usage2case2/t_tpl_1.yml
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/usage2case2/t_tpl_1.yml b/src/test/feature/ManagementTool/usage2case2/t_tpl_1.yml
new file mode 100644
index 0000000..eaa47b0
--- /dev/null
+++ b/src/test/feature/ManagementTool/usage2case2/t_tpl_1.yml
@@ -0,0 +1,31 @@
+AO_FileLocations:
+  Blocksize: 32768
+  Checksum: false
+  CompressionLevel: 0
+  CompressionType: null
+  Files:
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/1
+    size: 368
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/2
+    size: 368
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/3
+    size: 352
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/4
+    size: 368
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/5
+    size: 400
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/6
+    size: 376
+AO_Schema:
+- name: i
+  type: int4
+Bucketnum: 6
+DBVersion: PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.0.1.0 build
+  dev) on x86_64-apple-darwin14.5.0, compiled by GCC Apple LLVM version 6.1.0 (clang-602.0.53)
+  (based on LLVM 3.6.0svn) compiled on Jul  6 2016 10:22:33
+DFS_URL: hdfs://localhost:8020
+Distribution_Policy: DISTRIBUTED BY (i)
+Encoding: UTF8
+FileFormat: AO
+TableName: public.t_1
+Version: 1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/usage2case2/t_tpl_2.yml
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/usage2case2/t_tpl_2.yml b/src/test/feature/ManagementTool/usage2case2/t_tpl_2.yml
new file mode 100644
index 0000000..728363f
--- /dev/null
+++ b/src/test/feature/ManagementTool/usage2case2/t_tpl_2.yml
@@ -0,0 +1,33 @@
+Bucketnum: 6
+DBVersion: PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.0.1.0 build
+  dev) on x86_64-apple-darwin14.5.0, compiled by GCC Apple LLVM version 6.1.0 (clang-602.0.53)
+  (based on LLVM 3.6.0svn) compiled on Jul  6 2016 10:22:33
+DFS_URL: hdfs://localhost:8020
+Distribution_Policy: DISTRIBUTED BY (i)
+Encoding: UTF8
+FileFormat: Parquet
+Parquet_FileLocations:
+  Checksum: false
+  CompressionLevel: 0
+  CompressionType: null
+  EnableDictionary: false
+  Files:
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/1
+    size: 547
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/2
+    size: 547
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/3
+    size: 537
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/4
+    size: 547
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/5
+    size: 559
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/6
+    size: 549
+  PageSize: 1048576
+  RowGroupSize: 8388608
+Parquet_Schema:
+- name: i
+  type: int4
+TableName: public.t_2
+Version: 1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/usage2case2/t_tpl_3.yml
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/usage2case2/t_tpl_3.yml b/src/test/feature/ManagementTool/usage2case2/t_tpl_3.yml
new file mode 100644
index 0000000..95d6bac
--- /dev/null
+++ b/src/test/feature/ManagementTool/usage2case2/t_tpl_3.yml
@@ -0,0 +1,21 @@
+AO_FileLocations:
+  Blocksize: 32768
+  Checksum: false
+  CompressionLevel: 0
+  CompressionType: null
+  Files:
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/1
+    size: 2032
+AO_Schema:
+- name: i
+  type: int4
+Bucketnum: 6
+DBVersion: PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.0.1.0 build
+  dev) on x86_64-apple-darwin14.5.0, compiled by GCC Apple LLVM version 6.1.0 (clang-602.0.53)
+  (based on LLVM 3.6.0svn) compiled on Jul  6 2016 10:22:33
+DFS_URL: hdfs://localhost:8020
+Distribution_Policy: DISTRIBUTED RANDOMLY
+Encoding: UTF8
+FileFormat: AO
+TableName: public.t_3
+Version: 1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/usage2case2/t_tpl_4.yml
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/usage2case2/t_tpl_4.yml b/src/test/feature/ManagementTool/usage2case2/t_tpl_4.yml
new file mode 100644
index 0000000..4958dbc
--- /dev/null
+++ b/src/test/feature/ManagementTool/usage2case2/t_tpl_4.yml
@@ -0,0 +1,23 @@
+Bucketnum: 6
+DBVersion: PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.0.1.0 build
+  dev) on x86_64-apple-darwin14.5.0, compiled by GCC Apple LLVM version 6.1.0 (clang-602.0.53)
+  (based on LLVM 3.6.0svn) compiled on Jul  6 2016 10:22:33
+DFS_URL: hdfs://localhost:8020
+Distribution_Policy: DISTRIBUTED RANDOMLY
+Encoding: UTF8
+FileFormat: Parquet
+Parquet_FileLocations:
+  Checksum: false
+  CompressionLevel: 0
+  CompressionType: null
+  EnableDictionary: false
+  Files:
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID@/1
+    size: 1229
+  PageSize: 1048576
+  RowGroupSize: 8388608
+Parquet_Schema:
+- name: i
+  type: int4
+TableName: public.t_4
+Version: 1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/usage2case2/t_tpl_new_1.yml
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/usage2case2/t_tpl_new_1.yml b/src/test/feature/ManagementTool/usage2case2/t_tpl_new_1.yml
new file mode 100644
index 0000000..1e09490
--- /dev/null
+++ b/src/test/feature/ManagementTool/usage2case2/t_tpl_new_1.yml
@@ -0,0 +1,43 @@
+AO_FileLocations:
+  Blocksize: 32768
+  Checksum: false
+  CompressionLevel: 0
+  CompressionType: null
+  Files:
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/1
+    size: 176
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/2
+    size: 168
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/3
+    size: 192
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/4
+    size: 168
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/5
+    size: 192
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/6
+    size: 216
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/1
+    size: 120
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/2
+    size: 96
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/3
+    size: 96
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/4
+    size: 112
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/5
+    size: 88
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/6
+    size: 96
+AO_Schema:
+- name: i
+  type: int4
+Bucketnum: 6
+DBVersion: PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.0.1.0 build
+  dev) on x86_64-apple-darwin14.5.0, compiled by GCC Apple LLVM version 6.1.0 (clang-602.0.53)
+  (based on LLVM 3.6.0svn) compiled on Jul  6 2016 10:22:33
+DFS_URL: hdfs://localhost:8020
+Distribution_Policy: DISTRIBUTED BY (i)
+Encoding: UTF8
+FileFormat: AO
+TableName: public.t_1
+Version: 1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/usage2case2/t_tpl_new_2.yml
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/usage2case2/t_tpl_new_2.yml b/src/test/feature/ManagementTool/usage2case2/t_tpl_new_2.yml
new file mode 100644
index 0000000..36c0354
--- /dev/null
+++ b/src/test/feature/ManagementTool/usage2case2/t_tpl_new_2.yml
@@ -0,0 +1,45 @@
+Bucketnum: 6
+DBVersion: PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.0.1.0 build
+  dev) on x86_64-apple-darwin14.5.0, compiled by GCC Apple LLVM version 6.1.0 (clang-602.0.53)
+  (based on LLVM 3.6.0svn) compiled on Jul  6 2016 10:22:33
+DFS_URL: hdfs://localhost:8020
+Distribution_Policy: DISTRIBUTED BY (i)
+Encoding: UTF8
+FileFormat: Parquet
+Parquet_FileLocations:
+  Checksum: false
+  CompressionLevel: 0
+  CompressionType: null
+  EnableDictionary: false
+  Files:
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/1
+    size: 254
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/2
+    size: 250
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/3
+    size: 258
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/4
+    size: 250
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/5
+    size: 258
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/6
+    size: 270
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/1
+    size: 228
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/2
+    size: 215
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/3
+    size: 215
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/4
+    size: 220
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/5
+    size: 210
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/6
+    size: 215
+  PageSize: 1048576
+  RowGroupSize: 8388608
+Parquet_Schema:
+- name: i
+  type: int4
+TableName: public.t_2
+Version: 1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/usage2case2/t_tpl_new_3.yml
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/usage2case2/t_tpl_new_3.yml b/src/test/feature/ManagementTool/usage2case2/t_tpl_new_3.yml
new file mode 100644
index 0000000..b682bfa
--- /dev/null
+++ b/src/test/feature/ManagementTool/usage2case2/t_tpl_new_3.yml
@@ -0,0 +1,23 @@
+AO_FileLocations:
+  Blocksize: 32768
+  Checksum: false
+  CompressionLevel: 0
+  CompressionType: null
+  Files:
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/1
+    size: 1016
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/1
+    size: 520
+AO_Schema:
+- name: i
+  type: int4
+Bucketnum: 6
+DBVersion: PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.0.1.0 build
+  dev) on x86_64-apple-darwin14.5.0, compiled by GCC Apple LLVM version 6.1.0 (clang-602.0.53)
+  (based on LLVM 3.6.0svn) compiled on Jul  6 2016 10:22:33
+DFS_URL: hdfs://localhost:8020
+Distribution_Policy: DISTRIBUTED RANDOMLY
+Encoding: UTF8
+FileFormat: AO
+TableName: public.t_3
+Version: 1.0.0

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/f87c234e/src/test/feature/ManagementTool/usage2case2/t_tpl_new_4.yml
----------------------------------------------------------------------
diff --git a/src/test/feature/ManagementTool/usage2case2/t_tpl_new_4.yml b/src/test/feature/ManagementTool/usage2case2/t_tpl_new_4.yml
new file mode 100644
index 0000000..2c36306
--- /dev/null
+++ b/src/test/feature/ManagementTool/usage2case2/t_tpl_new_4.yml
@@ -0,0 +1,25 @@
+Bucketnum: 6
+DBVersion: PostgreSQL 8.2.15 (Greenplum Database 4.2.0 build 1) (HAWQ 2.0.1.0 build
+  dev) on x86_64-apple-darwin14.5.0, compiled by GCC Apple LLVM version 6.1.0 (clang-602.0.53)
+  (based on LLVM 3.6.0svn) compiled on Jul  6 2016 10:22:33
+DFS_URL: hdfs://localhost:8020
+Distribution_Policy: DISTRIBUTED RANDOMLY
+Encoding: UTF8
+FileFormat: Parquet
+Parquet_FileLocations:
+  Checksum: false
+  CompressionLevel: 0
+  CompressionType: null
+  EnableDictionary: false
+  Files:
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_OLD@/1
+    size: 596
+  - path: /hawq_default/16385/@DATABASE_OID@/@TABLE_OID_NEW@/1
+    size: 390
+  PageSize: 1048576
+  RowGroupSize: 8388608
+Parquet_Schema:
+- name: i
+  type: int4
+TableName: public.t_4
+Version: 1.0.0


Mime
View raw message