Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2385#discussion_r147234270
--- Diff: storm-client/src/jvm/org/apache/storm/Config.java ---
@@ -240,6 +240,12 @@
public static final String TOPOLOGY_TASKS = "topology.tasks";
/**
+ * A map of resources used by each component e.g {"cpu" : 200.0.
"onheap.memory.mb": 256.0, "gpu" : 0.5 }
+ */
+ @isMapEntryType(keyType = String.class, valueType = Double.class)
--- End diff --
It is really hard to enforce a double in the conf. This is because both
json and yaml don't know about this and put the parsed number in the smallest
type that matches it. i.e 1 becomes an integer, not a double. 1.0 might be a
double, but it might also be a float, I dont' know. If the number is really
big it could be a long.
---