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

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

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

    https://github.com/apache/storm/pull/1074#discussion_r52216501
  
    --- Diff: storm-core/src/jvm/org/apache/storm/utils/Utils.java ---
    @@ -580,20 +655,23 @@ public static void restrictPermissions(String 
baseDir) {
         }
     
     
    -    public static synchronized IFn loadClojureFn(String namespace, String 
name) {
    +    public static synchronized clojure.lang.IFn loadClojureFn(String 
namespace, String name) {
             try {
                 clojure.lang.Compiler.eval(RT.readString("(require '" + 
namespace + ")"));
             } catch (Exception e) {
                 //if playing from the repl and defining functions, file won't 
exist
             }
    -        return (IFn) RT.var(namespace, name).deref();
    +        return (clojure.lang.IFn) RT.var(namespace, name).deref();
         }
     
         public static boolean isSystemId(String id) {
             return id.startsWith("__");
         }
     
    -    public static <K, V> Map<V, K> reverseMap(Map<K, V> map) {
    +    /*
    +        TODO: Can this be replaced with reverseMap in this file?
    --- End diff --
    
    Does not look like it can.  The return types are completely different.


> Port backtype.storm.util to java
> --------------------------------
>
>                 Key: STORM-1226
>                 URL: https://issues.apache.org/jira/browse/STORM-1226
>             Project: Apache Storm
>          Issue Type: New Feature
>          Components: storm-core
>            Reporter: Robert Joseph Evans
>            Assignee: Reza Farivar
>              Labels: java-migration, jstorm-merger
>
> Port backtype.storm.util from clojure to java.  In as many instances as 
> possible the same interface should be maintained, and calls to clojure 
> functions in the rest of the code should be replaces with calls to the 
> corresponding java code.
> Some similar functions can be found at  
> https://github.com/apache/storm/blob/jstorm-import/jstorm-core/src/main/java/com/alibaba/jstorm/utils/JStormUtils.java
> Although they are not identical.
> For function callbacks we may need to evaluate adding in appropriate callback 
> interfaces instead.  Please try to avoid using clojure internal java classes 
> unless necessary.



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

Reply via email to