You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by wl...@apache.org on 2016/11/07 09:47:41 UTC
incubator-hawq git commit: HAWQ-1144. Put partition multi-level check
ahead of hdfs file check.
Repository: incubator-hawq
Updated Branches:
refs/heads/master a1ab4ab55 -> 0034834c5
HAWQ-1144. Put partition multi-level check ahead of hdfs file check.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/0034834c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/0034834c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/0034834c
Branch: refs/heads/master
Commit: 0034834c5004f65f90d722a5a5a6b9dc8ec807d3
Parents: a1ab4ab
Author: Wen Lin <wl...@pivotal.io>
Authored: Mon Nov 7 16:47:27 2016 +0800
Committer: Wen Lin <wl...@pivotal.io>
Committed: Mon Nov 7 16:47:27 2016 +0800
----------------------------------------------------------------------
tools/bin/hawqregister | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0034834c/tools/bin/hawqregister
----------------------------------------------------------------------
diff --git a/tools/bin/hawqregister b/tools/bin/hawqregister
index 6817983..5f1c47c 100755
--- a/tools/bin/hawqregister
+++ b/tools/bin/hawqregister
@@ -1009,6 +1009,13 @@ class HawqRegisterPartition(HawqRegister):
sys.exit(1)
self.file_format = 'Parquet'
self._check_hash_type() # Usage1 only support randomly distributed table
+
+ # check if it is a multi-level partition table
+ partitions_parents = self._get_partition_parent()
+ if any(p['parentpartitiontablename'] for p in partitions_parents):
+ logger.error('Multi-level partition table is not supported!')
+ sys.exit(1)
+
for k, pn in enumerate(self.partitions_name):
self.tablename = pn
self.files = self.partitions_filepaths[k]
@@ -1023,12 +1030,6 @@ class HawqRegisterPartition(HawqRegister):
self._check_partitionby()
self._check_partition_num()
partitions = self._get_partition_info()
- partitions_parents = self._get_partition_parent()
-
- # check if it is a multi-level partition table
- if any(p['parentpartitiontablename'] for p in partitions_parents):
- logger.error('Multi-level partition table is not supported!')
- sys.exit(1)
self.queries = "set allow_system_table_mods='dml';"
self.queries += "begin transaction;"