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

ASF GitHub Bot commented on STORM-1152:
---------------------------------------

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

    https://github.com/apache/storm/pull/836#discussion_r43553925
  
    --- Diff: 
storm-core/src/jvm/backtype/storm/serialization/SerializationFactory.java ---
    @@ -81,8 +81,9 @@ public static Kryo getKryo(Map conf) {
             kryoFactory.preRegister(k, conf);
     
             boolean skipMissing = (Boolean) 
conf.get(Config.TOPOLOGY_SKIP_MISSING_KRYO_REGISTRATIONS);
    -        for(String klassName: registrations.keySet()) {
    -            String serializerClassName = registrations.get(klassName);
    +        for(Map.Entry<String, String> entry: registrations.entrySet()) {
    +            String klassName = entry.getKey();
    --- End diff --
    
    There is another variable of type Class klass that is used in that part of 
the code. So the name klassName is consistent with it. Any way the next version 
of the patch just uses entry.getKey() directly.


> Change map keySet iteration to entrySet iteration for efficiency
> ----------------------------------------------------------------
>
>                 Key: STORM-1152
>                 URL: https://issues.apache.org/jira/browse/STORM-1152
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: storm-core
>            Reporter: Suresh Srinivas
>            Assignee: Suresh Srinivas
>            Priority: Minor
>
> Many places keySet iteration is used where entrySet iteration would avoid 
> unnecessary key lookup.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to