Esempio n. 1
0
 /// <exception cref="System.IO.IOException"/>
 public override void ReplaceBlock(ExtendedBlock blk, StorageType storageType, Org.Apache.Hadoop.Security.Token.Token
                                   <BlockTokenIdentifier> blockToken, string delHint, DatanodeInfo source)
 {
     DataTransferProtos.OpReplaceBlockProto proto = ((DataTransferProtos.OpReplaceBlockProto
                                                      )DataTransferProtos.OpReplaceBlockProto.NewBuilder().SetHeader(DataTransferProtoUtil
                                                                                                                     .BuildBaseHeader(blk, blockToken)).SetStorageType(PBHelper.ConvertStorageType(storageType
                                                                                                                                                                                                   )).SetDelHint(delHint).SetSource(PBHelper.ConvertDatanodeInfo(source)).Build());
     Send(@out, OP.ReplaceBlock, proto);
 }
Esempio n. 2
0
 /// <exception cref="System.IO.IOException"/>
 public override void BlockChecksum(ExtendedBlock blk, Org.Apache.Hadoop.Security.Token.Token
                                    <BlockTokenIdentifier> blockToken)
 {
     DataTransferProtos.OpBlockChecksumProto proto = ((DataTransferProtos.OpBlockChecksumProto
                                                       )DataTransferProtos.OpBlockChecksumProto.NewBuilder().SetHeader(DataTransferProtoUtil
                                                                                                                       .BuildBaseHeader(blk, blockToken)).Build());
     Send(@out, OP.BlockChecksum, proto);
 }
Esempio n. 3
0
 /// <exception cref="System.IO.IOException"/>
 public override void RequestShortCircuitFds(ExtendedBlock blk, Org.Apache.Hadoop.Security.Token.Token
                                             <BlockTokenIdentifier> blockToken, ShortCircuitShm.SlotId slotId, int maxVersion
                                             , bool supportsReceiptVerification)
 {
     DataTransferProtos.OpRequestShortCircuitAccessProto.Builder builder = DataTransferProtos.OpRequestShortCircuitAccessProto
                                                                           .NewBuilder().SetHeader(DataTransferProtoUtil.BuildBaseHeader(blk, blockToken)).
                                                                           SetMaxVersion(maxVersion);
     if (slotId != null)
     {
         builder.SetSlotId(PBHelper.Convert(slotId));
     }
     builder.SetSupportsReceiptVerification(supportsReceiptVerification);
     DataTransferProtos.OpRequestShortCircuitAccessProto proto = ((DataTransferProtos.OpRequestShortCircuitAccessProto
                                                                   )builder.Build());
     Send(@out, OP.RequestShortCircuitFds, proto);
 }