[
https://issues.apache.org/jira/browse/STORM-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15018602#comment-15018602
]
ASF GitHub Bot commented on STORM-1198:
---------------------------------------
Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/875#discussion_r45507777
--- Diff: storm-core/src/jvm/backtype/storm/utils/Utils.java ---
@@ -764,5 +778,30 @@ public static long zipFileSize(File myFile) throws
IOException{
public static double zeroIfNaNOrInf(double x) {
return (Double.isNaN(x) || Double.isInfinite(x)) ? 0.0 : x;
}
+
+ /**
+ * parses the arguments to extract jvm heap memory size.
+ * @param input
+ * @param defaultValue
+ * @return the value of the JVM heap memory setting in a java command.
+ */
+ public static Double parseWorkerChildOpts(String input, Double
defaultValue) {
+ if (input != null) {
+ Pattern optsPattern = Pattern.compile("Xmx[0-9]+m");
--- End diff --
This is not good enough. It is not just an 'm' that is supported.
From http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html
```
-Xmxn
Specifies the maximum size, in bytes, of the memory allocation pool.
This value must a multiple of 1024 greater than 2 MB. Append the letter k or K
to indicate kilobytes, or m or M to indicate megabytes. The default value is
chosen at runtime based on system configuration.
```
I have also seen 'g' and 'G' work for gigabytes too.
> Web UI to show resource usages and Total Resources on all supervisors
> ---------------------------------------------------------------------
>
> Key: STORM-1198
> URL: https://issues.apache.org/jira/browse/STORM-1198
> Project: Apache Storm
> Issue Type: Story
> Components: storm-core
> Reporter: Zhuo Liu
> Assignee: Zhuo Liu
> Priority: Minor
> Attachments: supervisor-resources.png
>
>
> As we have resource aware scheduler (STORM-894), we want to be able to
> display resource capacity (CPU, memory; and network in future) and scheduled
> resource usage on each supervisor node.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)