HAWQ-991. Disable --repair mode and partiton table support of hawq register for 
2.0.1.0 release.


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

Branch: refs/heads/master
Commit: dc12e94b43bddb2a9c71189efe284bb81d81afd3
Parents: 25e082a
Author: xunzhang <xunzhang...@gmail.com>
Authored: Thu Sep 22 14:39:21 2016 +0800
Committer: xunzhang <xunzhang...@gmail.com>
Committed: Thu Sep 22 15:57:41 2016 +0800

----------------------------------------------------------------------
 .../ManagementTool/test_hawq_register_usage2_case3.cpp       | 2 +-
 tools/bin/hawqregister                                       | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dc12e94b/src/test/feature/ManagementTool/test_hawq_register_usage2_case3.cpp
----------------------------------------------------------------------
diff --git 
a/src/test/feature/ManagementTool/test_hawq_register_usage2_case3.cpp 
b/src/test/feature/ManagementTool/test_hawq_register_usage2_case3.cpp
index 1d021d3..8e8fb6d 100644
--- a/src/test/feature/ManagementTool/test_hawq_register_usage2_case3.cpp
+++ b/src/test/feature/ManagementTool/test_hawq_register_usage2_case3.cpp
@@ -14,7 +14,7 @@ using hawq::test::SQLUtility;
 using hawq::test::Command;
 using hawq::test::HdfsConfig;
 
-TEST_F(TestHawqRegister, TestUsage2Case3Expected) {
+TEST_F(TestHawqRegister, DISABLED_TestUsage2Case3Expected) {
     SQLUtility util;
     string test_root(util.getTestRootPath());
     std::vector<string> create_table_matrix = {"distributed by (i)", 
"distributed randomly"};

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/dc12e94b/tools/bin/hawqregister
----------------------------------------------------------------------
diff --git a/tools/bin/hawqregister b/tools/bin/hawqregister
index 1a6b5d3..09b8532 100755
--- a/tools/bin/hawqregister
+++ b/tools/bin/hawqregister
@@ -296,6 +296,8 @@ class HawqRegister(object):
             if force:
                 return 'force'
             elif repair:
+                logger.info('--repair mode is not supported in current release 
of hawq register.')
+                sys.exit(0)
                 if not table_existed():
                     logger.error('--repair mode asserts the table has been 
already created.')
                     sys.exit(1)
@@ -405,6 +407,9 @@ class HawqRegister(object):
 
             if params['FileFormat'].lower() == 'parquet':
                 partitionby = 
params.get('Parquet_FileLocations').get('PartitionBy')
+                if partitionby:
+                    logger.info('Partition table is not supported in current 
release of hawq register.')
+                    sys.exit(0)
                 if params.get('Parquet_FileLocations').get('Partitions') and 
len(params['Parquet_FileLocations']['Partitions']):
                     partitions_checksum = [d['Checksum'] for d in 
params['Parquet_FileLocations']['Partitions']]
                     partitions_compression_level = [d['CompressionLevel'] for 
d in params['Parquet_FileLocations']['Partitions']]
@@ -424,6 +429,9 @@ class HawqRegister(object):
 
             else: #AO format
                 partitionby = params.get('AO_FileLocations').get('PartitionBy')
+                if partitionby:
+                    logger.info('Partition table is not supported in current 
release of hawq register.')
+                    sys.exit(0)
                 if params.get('AO_FileLocations').get('Partitions') and 
len(params['AO_FileLocations']['Partitions']):
                     partitions_checksum = [d['Checksum'] for d in 
params['AO_FileLocations']['Partitions']]
                     partitions_compressionLevel = [d['CompressionLevel'] for d 
in params['AO_FileLocations']['Partitions']]

Reply via email to