Search in sources :

Example 1 with AccessModeProto

use of org.apache.hadoop.hdds.protocol.proto.HddsProtos.BlockTokenSecretProto.AccessModeProto in project ozone by apache.

the class OzoneBlockTokenIdentifier method write.

@Override
public void write(DataOutput out) throws IOException {
    BlockTokenSecretProto.Builder builder = BlockTokenSecretProto.newBuilder().setBlockId(blockId).setOwnerId(getOwnerId()).setOmCertSerialId(getCertSerialId()).setExpiryDate(getExpiryDate()).setMaxLength(maxLength);
    // Add access mode allowed
    for (AccessModeProto mode : modes) {
        builder.addModes(AccessModeProto.valueOf(mode.name()));
    }
    out.write(builder.build().toByteArray());
}
Also used : AccessModeProto(org.apache.hadoop.hdds.protocol.proto.HddsProtos.BlockTokenSecretProto.AccessModeProto) BlockTokenSecretProto(org.apache.hadoop.hdds.protocol.proto.HddsProtos.BlockTokenSecretProto)

Aggregations

BlockTokenSecretProto (org.apache.hadoop.hdds.protocol.proto.HddsProtos.BlockTokenSecretProto)1 AccessModeProto (org.apache.hadoop.hdds.protocol.proto.HddsProtos.BlockTokenSecretProto.AccessModeProto)1