[ 
https://issues.apache.org/jira/browse/HAWQ-47?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14974031#comment-14974031
 ] 

ASF GitHub Bot commented on HAWQ-47:
------------------------------------

Github user jiny2 commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/34#discussion_r42980358
  
    --- Diff: src/backend/utils/misc/guc.c ---
    @@ -13520,4 +13542,38 @@ assign_gp_temporary_directory_mark_error(int 
newval, bool doit, GucSource source
        return true;
     }
     
    +static const char *
    +assign_hawq_rm_stmt_vseg_memory(const char *newval, bool doit, GucSource 
source)
    +{
    +   if (doit)
    +   {
    +           int32_t newvalmb = 0;
    +       int parseres = FUNC_RETURN_OK;
    +       SimpString valuestr;
    +       setSimpleStringRef(&valuestr, newval, strlen(newval));
    +       parseres = SimpleStringToStorageSizeMB(&valuestr, &newvalmb);
    +
    +       if ( parseres != FUNC_RETURN_OK )
    +       {
    +           return NULL; /* Not valid format of memory quota. */
    +       }
    +
    +       if ( newvalmb == 64   ||
    +            newvalmb == 128  ||
    +                    newvalmb == 256  ||
    +                    newvalmb == 512  ||
    +                    newvalmb == 1024 ||
    +                    newvalmb == 2048 ||
    +                    newvalmb == 4096 ||
    +                    newvalmb == 8192 ||
    +                    newvalmb == 16384 )
    --- End diff --
    
    fixed.


> Make user able to set statement level resource usage.
> -----------------------------------------------------
>
>                 Key: HAWQ-47
>                 URL: https://issues.apache.org/jira/browse/HAWQ-47
>             Project: Apache HAWQ
>          Issue Type: New Feature
>          Components: Resource Manager
>            Reporter: Yi Jin
>            Assignee: Yi Jin
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> SET STATEMENT_VSEG_MEM=memory_units
> SET STATEMENT_NVSEG=<integer>
> memory_units ::= 128mb|256mb|512mb|1024mb|1gb|2gb|4gb|8gb|16gb 
> Resource manager will try to reserve expected resource for current statement 
> execution. The default value of STATEMENT_NVSEG is 0, which means the 
> statement level setting is not activated, when STATEMENT_NVSEG is greater 
> than zero, STATEMENT_MEM overrides the resource queue virtual segment 
> resource quota. Memory core ratio derived by resource queue hierarchy and 
> cluster capacity. 
> If the expected resource specified by STATEMENT_MEM and STATEMENT_NVSEG can 
> not be satisfied due to various reason, the session is timed out.
> Yi Jin <y...@pivotal.io>
> Oct 8 (5 days ago)
> to Lei, Jiali, Amy 
> 1) If the expected resource specified by STATEMENT_MEM and STATEMENT_NVSEG 
> can not be satisfied due to queue capacity limits, the error is reported at 
> once, the session is aborted; 
> 2) The setting of statement level resource may cause different query plan 
> generated; (Change code for passing this into optimizer??)
> 3) If the expected resource can not be satisfied by the other various 
> reasons, the session is timed out.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to