public static FragmentInstanceFailureInfo deserialize(ByteBuffer byteBuffer) {
    final String message = ReadWriteIOUtils.readString(byteBuffer);
    FragmentInstanceFailureInfo cause;
    List<FragmentInstanceFailureInfo> suppressed = new ArrayList<>();
    List<String> stack = new ArrayList<>();
    int flag = ReadWriteIOUtils.readInt(byteBuffer);
    if (flag == 0) {
      cause = null;
    } else {
      cause = deserialize(byteBuffer);
    }
    int suppressedSize = ReadWriteIOUtils.readInt(byteBuffer);
    for (int i = 0; i < suppressedSize; i++) {
      suppressed.add(deserialize(byteBuffer));
    }
    int stackSize = ReadWriteIOUtils.readInt(byteBuffer);
    for (int i = 0; i < stackSize; i++) {
      stack.add(ReadWriteIOUtils.readString(byteBuffer));
    }
    return new FragmentInstanceFailureInfo(message, cause, suppressed, stack);
  }
This class is inspired by Trino <a
href="https://github.com/trinodb/trino/blob/master/core/trino-main/src/main/java/io/trino/execution/ExecutionFailureInfo.java">...</a>.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceFailureInfo.java