mWriteType = WriteType.fromProto(options.getWriteType());
/** * Converts a {@link CreateFilePOptions} object to an {@link OpenFilePOptions} object with a * matching Alluxio storage type. * * @param op a {@link CreateFilePOptions} object * @return an {@link OpenFilePOptions} object with a matching Alluxio storage type */ public static OpenFilePOptions toOpenFileOptions(CreateFilePOptions op) { if (WriteType.fromProto(op.getWriteType()).getAlluxioStorageType().isStore()) { return OpenFilePOptions.newBuilder().setReadType(ReadPType.CACHE).build(); } return OpenFilePOptions.newBuilder().setReadType(ReadPType.NO_CACHE).build(); }
setWriteType(other.getWriteType());