use of alluxio.client.block.policy.BlockLocationPolicy in project alluxio by Alluxio.
the class InStreamOptionsTest method fields.
/**
* Tests getting and setting fields.
*/
@Test
public void fields() {
ReadType readType = ReadType.NO_CACHE;
FileWriteLocationPolicy policy = new RoundRobinPolicy();
BlockLocationPolicy blockLocationPolicy = new DeterministicHashPolicy();
InStreamOptions options = InStreamOptions.defaults();
options.setReadType(readType);
options.setLocationPolicy(policy);
options.setCachePartiallyReadBlock(true);
options.setSeekBufferSizeBytes(Constants.MB);
options.setUfsReadLocationPolicy(blockLocationPolicy);
options.setMaxUfsReadConcurrency(5);
Assert.assertEquals(options.getAlluxioStorageType(), readType.getAlluxioStorageType());
Assert.assertEquals(policy, options.getCacheLocationPolicy());
Assert.assertTrue(options.isCachePartiallyReadBlock());
Assert.assertEquals(Constants.MB, options.getSeekBufferSizeBytes());
Assert.assertEquals(blockLocationPolicy, options.getUfsReadLocationPolicy());
Assert.assertEquals(5, options.getMaxUfsReadConcurrency());
}
Aggregations