You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hawq.apache.org by jiny2 <gi...@git.apache.org> on 2015/11/23 04:02:55 UTC

[GitHub] incubator-hawq pull request: HAWQ-177. finalize resource queue ddl...

GitHub user jiny2 opened a pull request:

    https://github.com/apache/incubator-hawq/pull/127

    HAWQ-177. finalize resource queue ddl error messages

    This fix is to finalize all resource queue ddl CREATE/ALTER/DROP RESOURCE QUEUE error messages. Then they will be verified by test cases.
    For the specifications of the ddl and its error messages, please check 
    HAWQ 2.0 Resource Management Design (+FTS), section 4.4

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jiny2/incubator-hawq HAWQ-177

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-hawq/pull/127.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #127
    
----
commit 5a4c9ed50ff59a60e6c88b5c131df27909d03d13
Author: Yi Jin <yj...@pivotal.io>
Date:   2015-11-23T03:02:02Z

    HAWQ-177. finalize resource queue ddl error messages

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-177. finalize resource queue ddl...

Posted by jiny2 <gi...@git.apache.org>.
Github user jiny2 commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/127#discussion_r45826366
  
    --- Diff: src/backend/resourcemanager/resqueuemanager.c ---
    @@ -1511,9 +1521,7 @@ int createQueueAndTrack( DynResourceQueue		queue,
     			{
     				res = RESQUEMGR_WRONG_PARENT_QUEUE;
     				snprintf( errorbuf, errorbufsize,
    -						  ERRORPOS_FORMAT
    -						  "The parent queue of can not be pg_default.",
    -						  ERRREPORTPOS);
    +						  "the parent queue can not be pg_default");
    --- End diff --
    
    Fixed Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-177. finalize resource queue ddl...

Posted by yaoj2 <gi...@git.apache.org>.
Github user yaoj2 commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/127#discussion_r45691928
  
    --- Diff: src/backend/resourcemanager/resqueuemanager.c ---
    @@ -1511,9 +1521,7 @@ int createQueueAndTrack( DynResourceQueue		queue,
     			{
     				res = RESQUEMGR_WRONG_PARENT_QUEUE;
     				snprintf( errorbuf, errorbufsize,
    -						  ERRORPOS_FORMAT
    -						  "The parent queue of can not be pg_default.",
    -						  ERRREPORTPOS);
    +						  "the parent queue can not be pg_default");
    --- End diff --
    
    it should be cannot here



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-177. finalize resource queue ddl...

Posted by yaoj2 <gi...@git.apache.org>.
Github user yaoj2 commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/127#discussion_r45691109
  
    --- Diff: src/backend/resourcemanager/resqueuemanager.c ---
    @@ -1065,16 +1070,27 @@ int checkAndCompleteNewResourceQueueAttributes(DynResourceQueue  queue,
     		parenttrack = getQueueTrackByQueueOID(queue->ParentOID, &exist);
     		Assert(exist && parenttrack != NULL);
     
    -		/* pg_default can not be a parent queue. */
    +		/* pg_default cannot be a parent queue. */
     		if ( RESQUEUE_IS_DEFAULT(parenttrack->QueueInfo) )
     		{
     			res = RESQUEMGR_WRONG_ATTR;
     			snprintf(errorbuf, errorbufsize,
    -					 "%s can not have children resource queues.",
    +					 "%s cannot have children resource queues",
     					 RESOURCE_QUEUE_DEFAULT_QUEUE_NAME);
     			ELOG_ERRBUF_MESSAGE(WARNING, errorbuf)
     			return res;
     		}
    +
    +		/* The parent queue cannot have roles assigned. */
    +		if ( hasUserAssignedToQueue(parenttrack->QueueInfo) )
    +		{
    +			res = RESQUEMGR_WRONG_ATTR;
    +			snprintf(errorbuf, errorbufsize,
    +					 "%s has at least one role assigned",
    +					 parenttrack->QueueInfo->Name);
    --- End diff --
    
    What about 
    "parent quene %s should not have roles assigned"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-177. finalize resource queue ddl...

Posted by jiny2 <gi...@git.apache.org>.
Github user jiny2 closed the pull request at:

    https://github.com/apache/incubator-hawq/pull/127


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-177. finalize resource queue ddl...

Posted by jiny2 <gi...@git.apache.org>.
Github user jiny2 commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/127#discussion_r45826303
  
    --- Diff: src/backend/resourcemanager/resqueuemanager.c ---
    @@ -1065,16 +1070,27 @@ int checkAndCompleteNewResourceQueueAttributes(DynResourceQueue  queue,
     		parenttrack = getQueueTrackByQueueOID(queue->ParentOID, &exist);
     		Assert(exist && parenttrack != NULL);
     
    -		/* pg_default can not be a parent queue. */
    +		/* pg_default cannot be a parent queue. */
     		if ( RESQUEUE_IS_DEFAULT(parenttrack->QueueInfo) )
     		{
     			res = RESQUEMGR_WRONG_ATTR;
     			snprintf(errorbuf, errorbufsize,
    -					 "%s can not have children resource queues.",
    +					 "%s cannot have children resource queues",
     					 RESOURCE_QUEUE_DEFAULT_QUEUE_NAME);
     			ELOG_ERRBUF_MESSAGE(WARNING, errorbuf)
     			return res;
     		}
    +
    +		/* The parent queue cannot have roles assigned. */
    +		if ( hasUserAssignedToQueue(parenttrack->QueueInfo) )
    +		{
    +			res = RESQUEMGR_WRONG_ATTR;
    +			snprintf(errorbuf, errorbufsize,
    +					 "%s has at least one role assigned",
    +					 parenttrack->QueueInfo->Name);
    --- End diff --
    
    I prefer using the message which explain the error reason.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-177. finalize resource queue ddl...

Posted by linwen <gi...@git.apache.org>.
Github user linwen commented on the pull request:

    https://github.com/apache/incubator-hawq/pull/127#issuecomment-158848091
  
    looks good. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-hawq pull request: HAWQ-177. finalize resource queue ddl...

Posted by yaoj2 <gi...@git.apache.org>.
Github user yaoj2 commented on the pull request:

    https://github.com/apache/incubator-hawq/pull/127#issuecomment-159136931
  
    I suggest that the error message we should directly tell user what should be. 
    For example: 
    ERROR: the values of memory_limit_cluster and core_limit_cluster are not identical
    ->
    ERROR: the values of memory_limit_cluster and core_limit_cluster should be identical
    
    ERROR: active_statements is less than 1
    ->
    ERROR: active_statements should be greater than 1
    
    nvseg_upper_limit_perseg is less than nvseg_lower_limit_perseg
    ->
    nvseg_upper_limit_perseg should be greater than nvseg_lower_limit_perseg
    2. Is it any reason we remove 64MB  for vseg_resource_quota?
    
    3. drop a queue having at least one child queue.
    What about change the message to "resource queue %s has at least one chile queue."


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---