func newChecksumBlockOp(block *hdfs.LocatedBlockProto) *hdfs.OpBlockChecksumProto { return &hdfs.OpBlockChecksumProto{ Header: &hdfs.BaseHeaderProto{ Block: block.GetB(), Token: block.GetBlockToken(), }, } }
func newBlockReadOp(block *hdfs.LocatedBlockProto, offset, length uint64) *hdfs.OpReadBlockProto { return &hdfs.OpReadBlockProto{ Header: &hdfs.ClientOperationHeaderProto{ BaseHeader: &hdfs.BaseHeaderProto{ Block: block.GetB(), Token: block.GetBlockToken(), }, ClientName: proto.String(ClientName), }, Offset: proto.Uint64(offset), Len: proto.Uint64(length), } }