@TestOnly
  public static String buffer2String(ByteBuffer buffer) throws MetadataException {
    StringBuilder builder = new StringBuilder("[");
    ICachedMNode node = buffer2Node("unspecified", buffer);
    if (node.isMeasurement()) {
      builder.append("measurementNode, ");
      builder.append(
          String.format(
              "alias: %s, ",
              node.getAsMeasurementMNode().getAlias() == null
                  ? ""
                  : node.getAsMeasurementMNode().getAlias()));
      builder.append(
          String.format("type: %s, ", node.getAsMeasurementMNode().getDataType().toString()));
      builder.append(
          String.format(
              "encoding: %s, ",
              node.getAsMeasurementMNode().getSchema().getEncodingType().toString()));
      builder.append(
          String.format(
              "compressor: %s]",
              node.getAsMeasurementMNode().getSchema().getCompressor().toString()));
      return builder.toString();
    } else if (node.isDevice()) {
      builder.append("entityNode, ");

      if (node.getAsDeviceMNode().isAlignedNullable() == null) {
        builder.append("aligned is null, ");
      } else if (node.getAsDeviceMNode().isAligned()) {
        builder.append("aligned, ");
      } else {
        builder.append("not aligned, ");
      }

      if (node.getAsDeviceMNode().isUseTemplate()) {
        builder.append("using template.]");
      } else {
        builder.append("not using template.]");
      }

    } else {
      builder.append("internalNode, ");
    }

    return builder.toString();
  }
return as: [dataType, encoding, compression, preDelete]
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/RecordUtils.java