public static CompactionDescriptor toCompactionDescriptor(
    org.apache.hadoop.hbase.client.RegionInfo info, byte[] regionName, byte[] family,
    List<Path> inputPaths, List<Path> outputPaths, Path storeDir) {
    // compaction descriptor contains relative paths.
    // input / output paths are relative to the store dir
    // store dir is relative to region dir
    CompactionDescriptor.Builder builder = CompactionDescriptor.newBuilder()
      .setTableName(UnsafeByteOperations.unsafeWrap(info.getTable().toBytes()))
      .setEncodedRegionName(UnsafeByteOperations
        .unsafeWrap(regionName == null ? info.getEncodedNameAsBytes() : regionName))
      .setFamilyName(UnsafeByteOperations.unsafeWrap(family)).setStoreHomeDir(storeDir.getName()); // make
                                                                                                   // relative
    for (Path inputPath : inputPaths) {
      builder.addCompactionInput(inputPath.getName()); // relative path
    }
    for (Path outputPath : outputPaths) {
      builder.addCompactionOutput(outputPath.getName());
    }
    builder.setRegionName(UnsafeByteOperations.unsafeWrap(info.getRegionName()));
    return builder.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