You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by HeartSaVioR <gi...@git.apache.org> on 2018/03/29 14:42:55 UTC

[GitHub] storm pull request #2591: STORM-2979: WorkerHooks EOFException during run_wo...

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

    https://github.com/apache/storm/pull/2591#discussion_r178078460
  
    --- Diff: storm-core/src/clj/org/apache/storm/daemon/worker.clj ---
    @@ -566,9 +566,12 @@
             worker-topology-context (worker-context worker)
             hooks (.get_worker_hooks topology)]
         (dofor [hook hooks]
    -      (let [hook-bytes (Utils/toByteArray hook)
    -            deser-hook (Utils/javaDeserialize hook-bytes BaseWorkerHook)]
    -        (.start deser-hook topo-conf worker-topology-context)))))
    +      (let [savedposition (.position hook)
    --- End diff --
    
    I guess we could do simpler: `(.duplicate hook)` to get duplicated ByteBuffer object, and read from that instance. It will not increase position from `hook` object.


---