@Override
  public GetLocksResponse getLocks(RpcController controller, GetLocksRequest request)
    throws ServiceException {
    try {
      final GetLocksResponse.Builder builder = GetLocksResponse.newBuilder();

      for (LockedResource lockedResource : server.getLocks()) {
        builder.addLock(ProcedureUtil.convertToProtoLockedResource(lockedResource));
      }

      return builder.build();
    } catch (IOException e) {
      throw new ServiceException(e);
    }
  }
Checks if the specified snapshot is done.
@return true if the snapshot is in file system ready to use, false if the snapshot is in the
        process of completing
@throws ServiceException wrapping UnknownSnapshotException if invalid snapshot, or a wrapped
                         HBaseSnapshotException with progress failure reason.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java