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

Peter Bacsko commented on OOZIE-2833:
-------------------------------------

I just have minor comments.

1. Please change the order to be public-public-private
{code}
+    public static final int YARN_MEMORY_MB_MIN = 512;
+    private static final Pattern heapPattern = 
Pattern.compile("-Xmx(([0-9]+)[mMgG]?)");
+    public static final int MAX_LAUNCHER_HEAPSIZE_FOR_AM = 3584;
{code}

2. 4096 seems to be a magic number here, pls extract:
{code}
if (heapSizeForMapInMB < 4096 && heapSizeForAmInMB < 4096 && heapSize > 
MAX_LAUNCHER_HEAPSIZE_FOR_AM)
{code}

3. Same here
{code}
if (launcherMapMemoryMB < 4096 && amMemoryMB < 4096 && memoryMB > 4096)
{code}


> when using uber mode the regex pattern used in the extractHeapSizeMB method 
> does not allow heap sizes specified in bytes.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OOZIE-2833
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2833
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Thomas Scott
>            Assignee: Attila Sasvari
>            Priority: Minor
>         Attachments: OOZIE-2833.01.patch, OOZIE-2833.02.patch
>
>
> The extractHeapSizeMB method used here:
> https://github.com/apache/oozie/blob/9c0516608bdd0787b1fac3a69ccfe9d36cbb2d15/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java#L401
> Uses the following pattern:
> -Xmx(([0-9]+)[mMgG])
> This requires that the -Xmx configuration option end in "m" or "g". However, 
> it is valid to configure this option in bytes without the "m" or "g" and this 
> will not be picked up. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to