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

    https://github.com/apache/storm/pull/2113#discussion_r120404519
  
    --- Diff: docs/Resource_Aware_Scheduler_overview.md ---
    @@ -45,38 +46,53 @@ For a Storm Topology, the user can now specify the 
amount of resources a topolog
     ### Setting Memory Requirement
     
     API to set component memory requirement:
    -
    +```
         public T setMemoryLoad(Number onHeap, Number offHeap)
    -
    +```
     Parameters:
     * Number onHeap – The amount of on heap memory an instance of this 
component will consume in megabytes
     * Number offHeap – The amount of off heap memory an instance of this 
component will consume in megabytes
     
     The user also has to option to just specify the on heap memory requirement 
if the component does not have an off heap memory need.
    -
    +```
         public T setMemoryLoad(Number onHeap)
    -
    +```
     Parameters:
     * Number onHeap – The amount of on heap memory an instance of this 
component will consume
     
     If no value is provided for offHeap, 0.0 will be used. If no value is 
provided for onHeap, or if the API is never called for a component, the default 
value will be used.
     
     Example of Usage:
    -
    +```
         SpoutDeclarer s1 = builder.setSpout("word", new TestWordSpout(), 10);
         s1.setMemoryLoad(1024.0, 512.0);
         builder.setBolt("exclaim1", new ExclamationBolt(), 3)
                     .shuffleGrouping("word").setMemoryLoad(512.0);
    -
    +```
     The entire memory requested for this topology is 16.5 GB. That is from 10 
spouts with 1GB on heap memory and 0.5 GB off heap memory each and 3 bolts with 
0.5 GB on heap memory each.
     
    +<div id='Setting-Shared-Memory'/>
    +### Shared Memory
    +
    +In some cases you may have memory that is shared between components. It 
may be a cache shared within a worker between instances of a bolt, or it might 
be static data that is memory mapped into a bolt and is shared accross a 
worker.  In any case you can specify your share memory request by
    +creating one of `SharedOffHeapWithinNode`, `SharedOffHeapWithinWorker`, or 
`SharedOnHeap` and adding it to bolts and spouts that use that shared memory.
    --- End diff --
    
    Is there a difference between `SharedOnHeap` and just declaring a static 
field?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to