hash = (53 * hash) + getHashingNumberOfShards();
result = result && (getHashingNumberOfShards() == other.getHashingNumberOfShards());
public Builder mergeFrom(alluxio.grpc.OpenFilePOptions other) { if (other == alluxio.grpc.OpenFilePOptions.getDefaultInstance()) return this; if (other.hasReadType()) { setReadType(other.getReadType()); } if (other.hasMaxUfsReadConcurrency()) { setMaxUfsReadConcurrency(other.getMaxUfsReadConcurrency()); } if (other.hasFileReadLocationPolicy()) { bitField0_ |= 0x00000004; fileReadLocationPolicy_ = other.fileReadLocationPolicy_; onChanged(); } if (other.hasHashingNumberOfShards()) { setHashingNumberOfShards(other.getHashingNumberOfShards()); } if (other.hasCommonOptions()) { mergeCommonOptions(other.getCommonOptions()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * Creates with given {@link OpenFilePOptions} instance. * @param status URI status * @param options OpenFile options * @param alluxioConf Alluxio configuration */ public InStreamOptions(URIStatus status, OpenFilePOptions options, AlluxioConfiguration alluxioConf) { // Create OpenOptions builder with default options. OpenFilePOptions.Builder openOptionsBuilder = OpenFilePOptions.newBuilder() .setReadType(alluxioConf.getEnum(PropertyKey.USER_FILE_READ_TYPE_DEFAULT, ReadType.class) .toProto()) .setFileReadLocationPolicy( alluxioConf.get(PropertyKey.USER_UFS_BLOCK_READ_LOCATION_POLICY)) .setHashingNumberOfShards(alluxioConf .getInt(PropertyKey.USER_UFS_BLOCK_READ_LOCATION_POLICY_DETERMINISTIC_HASH_SHARDS)) .setMaxUfsReadConcurrency(alluxioConf .getInt(PropertyKey.USER_UFS_BLOCK_READ_CONCURRENCY_MAX)); // Merge default options with given options. OpenFilePOptions openOptions = openOptionsBuilder.mergeFrom(options).build(); mStatus = status; mProtoOptions = openOptions; CreateOptions blockLocationPolicyCreateOptions = CreateOptions.defaults().setLocationPolicyClassName(openOptions.getFileReadLocationPolicy()) .setDeterministicHashPolicyNumShards(openOptions.getHashingNumberOfShards()); mUfsReadLocationPolicy = BlockLocationPolicy.Factory.create(blockLocationPolicyCreateOptions, alluxioConf); }