[ 
https://issues.apache.org/jira/browse/BEAM-7305?focusedWorklogId=243596&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-243596
 ]

ASF GitHub Bot logged work on BEAM-7305:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/May/19 19:20
            Start Date: 16/May/19 19:20
    Worklog Time Spent: 10m 
      Work Description: mxm commented on pull request #8592: [BEAM-7305] 
Improve and extend Hazelcast Jet based Java Runner
URL: https://github.com/apache/beam/pull/8592#discussion_r284856811
 
 

 ##########
 File path: 
runners/jet-experimental/src/main/java/org/apache/beam/runners/jet/Utils.java
 ##########
 @@ -246,4 +259,34 @@ static boolean usesStateOrTimers(AppliedPTransform<?, ?, 
?> appliedTransform) {
     return WindowedValue.FullWindowedValueCoder.of(
         ListCoder.of(elementCoder.getValueCoder()), 
elementCoder.getWindowCoder());
   }
+
+  /** A wrapper of {@code byte[]} that can be used as a hash-map key. */
+  public static class ByteArrayKey {
+    private final byte[] value;
+    private int hash;
+
+    public ByteArrayKey(@Nonnull byte[] value) {
+      this.value = value;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+      if (this == o) {
+        return true;
+      }
+      if (o == null || getClass() != o.getClass()) {
+        return false;
+      }
+      ByteArrayKey that = (ByteArrayKey) o;
+      return Arrays.equals(value, that.value);
+    }
+
+    @Override
+    public int hashCode() {
+      if (hash == 0) {
 
 Review comment:
   Make `hash` an `Integer` and check for null here?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 243596)
    Time Spent: 2.5h  (was: 2h 20m)

> Add first version of Hazelcast Jet Runner
> -----------------------------------------
>
>                 Key: BEAM-7305
>                 URL: https://issues.apache.org/jira/browse/BEAM-7305
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-jet
>            Reporter: Maximilian Michels
>            Assignee: Jozsef Bartok
>            Priority: Major
>             Fix For: 2.14.0
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to