hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/protocolPB/ScmBlockLocationProtocolClientSideTranslatorPB.java
@Override
  public List<DeleteBlockGroupResult> deleteKeyBlocks(
      List<BlockGroup> keyBlocksInfoList) throws IOException {
    List<KeyBlocks> keyBlocksProto = keyBlocksInfoList.stream()
        .map(BlockGroup::getProto).collect(Collectors.toList());
    DeleteScmKeyBlocksRequestProto request = DeleteScmKeyBlocksRequestProto
        .newBuilder().addAllKeyBlocks(keyBlocksProto).build();

    final DeleteScmKeyBlocksResponseProto resp;
    try {
      resp = rpcProxy.deleteScmKeyBlocks(NULL_RPC_CONTROLLER, request);
    } catch (ServiceException e) {
      throw ProtobufHelper.getRemoteException(e);
    }
    List<DeleteBlockGroupResult> results =
        new ArrayList<>(resp.getResultsCount());
    results.addAll(resp.getResultsList().stream().map(
        result -> new DeleteBlockGroupResult(result.getObjectKey(),
            DeleteBlockGroupResult
                .convertBlockResultProto(result.getBlockResultsList())))
        .collect(Collectors.toList()));
    return results;
  }
/**
   * Delete the set of keys specified.
   *
   * @param keyBlocksInfoList batch of block keys to delete.
   * @return list of block deletion results.
   * @throws IOException if there is any failure.
   *
   */
Delete the set of keys specified.
@param keyBlocksInfoList batch of block keys to delete.
@return list of block deletion results.
@throws IOException if there is any failure.
Delete the set of keys specified . @param keyBlocksInfoList batch of block keys to delete . @return list of block deletion results . @throws IOException if there is any failure .
@Override
  public List<DeleteBlockGroupResult> deleteKeyBlocks(
      List<BlockGroup> keyBlocksInfoList) throws IOException {
    List<KeyBlocks> keyBlocksProto = keyBlocksInfoList.stream()
        .map(BlockGroup::getProto).collect(Collectors.toList());
    DeleteScmKeyBlocksRequestProto request = DeleteScmKeyBlocksRequestProto
        .newBuilder().addAllKeyBlocks(keyBlocksProto).build();
    final DeleteScmKeyBlocksResponseProto resp;
    try {
      resp = rpcProxy.deleteScmKeyBlocks(NULL_RPC_CONTROLLER, request);
    } catch (ServiceException e) {
      throw ProtobufHelper.getRemoteException(e);
    }
    List<DeleteBlockGroupResult> results =
        new ArrayList<>(resp.getResultsCount());
    results.addAll(resp.getResultsList().stream().map(
        result -> new DeleteBlockGroupResult(result.getObjectKey(),
            DeleteBlockGroupResult
                .convertBlockResultProto(result.getBlockResultsList())))
        .collect(Collectors.toList()));
    return results;
  }
@ Override public List < DeleteBlockGroupResult > deleteKeyBlocks ( List < BlockGroup > keyBlocksInfoList ) throws IOException { List < KeyBlocks > keyBlocksProto = keyBlocksInfoList . stream ( ) . map ( BlockGroup :: getProto ) . collect ( Collectors . toList ( ) ) ; DeleteScmKeyBlocksRequestProto request = DeleteScmKeyBlocksRequestProto . newBuilder ( ) . addAllKeyBlocks ( keyBlocksProto ) . build ( ) ; final DeleteScmKeyBlocksResponseProto resp ; try { resp = rpcProxy . deleteScmKeyBlocks ( NULL_RPC_CONTROLLER , request ) ; } catch ( ServiceException e ) { throw ProtobufHelper . getRemoteException ( e ) ; } List < DeleteBlockGroupResult > results = new ArrayList < > ( resp . getResultsCount ( ) ) ; results . addAll ( resp . getResultsList ( ) . stream ( ) . map ( result -> new DeleteBlockGroupResult ( result . getObjectKey ( ) , DeleteBlockGroupResult . convertBlockResultProto ( result . getBlockResultsList ( ) ) ) ) . collect ( Collectors . toList ( ) ) ) ; return results ; }
Delete the set of keys specified.
Delete the set of keys specified .