Package org.apache.hadoop.hdfs.server.protocol

Examples of org.apache.hadoop.hdfs.server.protocol.FenceResponse


  @Override
  public FenceResponseProto fence(RpcController controller,
      FenceRequestProto req) throws ServiceException {
    try {
      FenceResponse resp = impl.fence(PBHelper.convert(req.getJournalInfo()), req.getEpoch(),
          req.getFencerInfo());
      return FenceResponseProto.newBuilder().setInSync(resp.isInSync())
          .setLastTransactionId(resp.getLastTransactionId())
          .setPreviousEpoch(resp.getPreviousEpoch()).build();
    } catch (IOException e) {
      throw new ServiceException(e);
    }
  }
View Full Code Here


  @Override
  public FenceResponseProto fence(RpcController controller,
      FenceRequestProto req) throws ServiceException {
    try {
      FenceResponse resp = impl.fence(PBHelper.convert(req.getJournalInfo()), req.getEpoch(),
          req.getFencerInfo());
      return FenceResponseProto.newBuilder().setInSync(resp.isInSync())
          .setLastTransactionId(resp.getLastTransactionId())
          .setPreviousEpoch(resp.getPreviousEpoch()).build();
    } catch (IOException e) {
      throw new ServiceException(e);
    }
  }
View Full Code Here

      String fencerInfo) throws IOException {
    FenceRequestProto req = FenceRequestProto.newBuilder().setEpoch(epoch)
        .setJournalInfo(PBHelper.convert(journalInfo)).build();
    try {
      FenceResponseProto resp = rpcProxy.fence(NULL_CONTROLLER, req);
      return new FenceResponse(resp.getPreviousEpoch(),
          resp.getLastTransactionId(), resp.getInSync());
    } catch (ServiceException e) {
      throw ProtobufHelper.getRemoteException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.server.protocol.FenceResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.