Instead of writing the map you can just write a variable in the abstract
class.
On Apr 23, 2015 7:45 AM, "Matthias J. Sax" <[email protected]>
wrote:

> I understand that.
>
> In my case, I use a class hierarchy with abstract spouts/bolts and
> multiple concrete spouts/bolts. The abstract class uses some default
> values (if not provided in the given config) similar to the derived
> classes. However, some derived classes overwrite the default values for
> the abstract class, ie, if no value is given in the config, some derived
> classes set the values and other do not. Additionally, open()/prepare()
> of the abstract class is called, too, and set the default value if the
> value was neither provided by the user, not by the derived class.
>
> Does it make sense how I explained it?
>
>
> -Matthias
>
>
>
>
> On 04/23/2015 01:08 PM, Nathan Leung wrote:
> > Config should be set when the topology is created before it's sent to the
> > nimbus. If you write an option to the map there is no mechanism to
> > propagate the change to the rest of the instances of storm components.
> > On Apr 23, 2015 6:02 AM, "Matthias J. Sax" <
> [email protected]>
> > wrote:
> >
> >> Hi,
> >>
> >> in the Spout/Bolt open()/prepare() method, a Map containing the current
> >> configuration is given. This Map is of type
> >> clojure.lang.PersistentHashMap and calling .put(...) raises an
> >> UnsupportedOperationException.
> >>
> >> I was wondering, why a persistent map is used? I could image, that
> >> system defined values should not be modified. But adding new key/value
> >> pairs is not allowed either (and would be very helpful in my case).
> >>
> >> Right now, I simply copy all values into a new HashMap object and add my
> >> own values to this new HashMap. But this is an annoying workaround I
> >> have to do each time...
> >>
> >> Would it make sense, the change the type of the system provided Map (or
> >> modify it's behavior to all for adding new key/value pairs)?
> >>
> >>
> >> -Matthias
> >>
> >>
> >>
> >>
> >>
> >
>
>

Reply via email to