This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit f3438893ef4f2bc71c534e2a423caeb5f2fb7bd7
Author: Till Rohrmann <trohrm...@apache.org>
AuthorDate: Thu Dec 30 12:25:00 2021 +0100

    [hotfix] Allow AllocationID to be built from hexString representation
---
 .../flink/runtime/clusterframework/types/AllocationID.java       | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/AllocationID.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/AllocationID.java
index 72f0330..d97e94b 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/AllocationID.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/AllocationID.java
@@ -19,6 +19,7 @@
 package org.apache.flink.runtime.clusterframework.types;
 
 import org.apache.flink.util.AbstractID;
+import org.apache.flink.util.StringUtils;
 
 /**
  * Unique identifier for a physical slot allocated by a JobManager via the 
ResourceManager from a
@@ -41,6 +42,10 @@ public class AllocationID extends AbstractID {
         super();
     }
 
+    private AllocationID(byte[] bytes) {
+        super(bytes);
+    }
+
     /**
      * Constructs a new AllocationID with the given parts.
      *
@@ -50,4 +55,8 @@ public class AllocationID extends AbstractID {
     public AllocationID(long lowerPart, long upperPart) {
         super(lowerPart, upperPart);
     }
+
+    public static AllocationID fromHexString(String hexString) {
+        return new AllocationID(StringUtils.hexStringToByte(hexString));
+    }
 }

Reply via email to