public static PipeRuntimeMeta deserialize(
      final ByteBuffer byteBuffer, final boolean needPersist) {
    final byte pipeRuntimeVersionByte = ReadWriteIOUtils.readByte(byteBuffer);
    final PipeRuntimeMetaVersion pipeRuntimeMetaVersion =
        PipeRuntimeMetaVersion.deserialize(pipeRuntimeVersionByte);
    switch (pipeRuntimeMetaVersion) {
      case VERSION_1:
        return deserializeVersion1(byteBuffer, pipeRuntimeVersionByte, needPersist);
      case VERSION_2:
        return deserializeVersion2(byteBuffer, needPersist);
      default:
        throw new UnsupportedOperationException(
            "Unknown pipe runtime meta version: " + pipeRuntimeMetaVersion.getVersion());
    }
  }
We use negative regionId to identify the external pipe source, which is not a consensus group
id. Then we can reuse the regionId to schedule the external pipe source and store the progress
information.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/agent/task/meta/PipeRuntimeMeta.java