Repository: incubator-hawq Updated Branches: refs/heads/master b8e6afd12 -> 97ace9cf8
HAWQ-1433. ALTER RESOURCE QUEUE DDL does not check the format of attribute MEMORY_CLUSTER_LIMIT and CORE_CLUSTER_LIMIT Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/97ace9cf Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/97ace9cf Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/97ace9cf Branch: refs/heads/master Commit: 97ace9cf88432163eea5e91db55edc8a13d78496 Parents: b8e6afd Author: stanlyxiang <[email protected]> Authored: Mon Apr 24 20:01:40 2017 +1000 Committer: Yi <[email protected]> Committed: Mon Apr 24 20:01:40 2017 +1000 ---------------------------------------------------------------------- src/backend/resourcemanager/resqueuemanager.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/97ace9cf/src/backend/resourcemanager/resqueuemanager.c ---------------------------------------------------------------------- diff --git a/src/backend/resourcemanager/resqueuemanager.c b/src/backend/resourcemanager/resqueuemanager.c index 3d3e46a..1834c58 100644 --- a/src/backend/resourcemanager/resqueuemanager.c +++ b/src/backend/resourcemanager/resqueuemanager.c @@ -484,9 +484,13 @@ int parseResourceQueueAttributes( List *attributes, } else { - memlimit_value = true; - res = SimpleStringToStorageSizeMB(attrvalue, - (uint32_t *) &(queue->ClusterMemoryMB)); + res = RESQUEMGR_WRONG_RES_QUOTA_EXP; + snprintf(errorbuf, errorbufsize, + "%s format \'%s\' is invalid, only support percentage now.", + loadcatalog ? + RSQTBLAttrNames[RSQ_TBL_ATTR_MEMORY_LIMIT_CLUSTER] : + RSQDDLAttrNames[RSQ_DDL_ATTR_MEMORY_LIMIT_CLUSTER], + attrvalue->Str); } break; @@ -501,8 +505,13 @@ int parseResourceQueueAttributes( List *attributes, } else { - corelimit_value = true; - res = SimpleStringToDouble(attrvalue, &(queue->ClusterVCore)); + res = RESQUEMGR_WRONG_RES_QUOTA_EXP; + snprintf(errorbuf, errorbufsize, + "%s format \'%s\' is invalid, only support percentage now.", + loadcatalog ? + RSQTBLAttrNames[RSQ_TBL_ATTR_CORE_LIMIT_CLUSTER] : + RSQDDLAttrNames[RSQ_DDL_ATTR_CORE_LIMIT_CLUSTER], + attrvalue->Str); } break;
