public static RegionEventDescriptor toRegionEventDescriptor(EventType eventType,
    byte[] tableNameAsBytes, byte[] encodedNameAsBytes, byte[] regionNameAsBytes, long seqId,

    ServerName server, Map<byte[], List<Path>> storeFiles) {
    RegionEventDescriptor.Builder desc = RegionEventDescriptor.newBuilder().setEventType(eventType)
      .setTableName(UnsafeByteOperations.unsafeWrap(tableNameAsBytes))
      .setEncodedRegionName(UnsafeByteOperations.unsafeWrap(encodedNameAsBytes))
      .setRegionName(UnsafeByteOperations.unsafeWrap(regionNameAsBytes)).setLogSequenceNumber(seqId)
      .setServer(toServerName(server));

    for (Entry<byte[], List<Path>> entry : storeFiles.entrySet()) {
      StoreDescriptor.Builder builder =
        StoreDescriptor.newBuilder().setFamilyName(UnsafeByteOperations.unsafeWrap(entry.getKey()))
          .setStoreHomeDir(Bytes.toString(entry.getKey()));
      for (Path path : entry.getValue()) {
        builder.addStoreFile(path.getName());
      }

      desc.addStores(builder);
    }
    return desc.build();
  }
Unwraps an exception from a protobuf service into the underlying (expected) IOException. This
method will <strong>always</strong> throw an exception.
@param se the {@code ServiceException} instance to convert into an {@code IOException}
@throws NullPointerException if {@code se} is {@code null}
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java