Search in sources :

Example 1 with HdfsFileInputStream

use of alluxio.hadoop.HdfsFileInputStream in project alluxio by Alluxio.

the class HdfsFileInputStreamIntegrationTest method before.

@Before
public final void before() throws Exception {
    mFileSystem = sLocalAlluxioClusterResource.get().getClient();
    FileSystemTestUtils.createByteFile(mFileSystem, IN_MEMORY_FILE, WritePType.CACHE_THROUGH, FILE_LEN);
    mInMemInputStream = new HdfsFileInputStream(mFileSystem, new AlluxioURI(IN_MEMORY_FILE), null);
}
Also used : HdfsFileInputStream(alluxio.hadoop.HdfsFileInputStream) AlluxioURI(alluxio.AlluxioURI) Before(org.junit.Before)

Example 2 with HdfsFileInputStream

use of alluxio.hadoop.HdfsFileInputStream in project alluxio by Alluxio.

the class HdfsFileInputStreamIntegrationTest method createUfsInStream.

private void createUfsInStream(ReadType readType) throws Exception {
    InstancedConfiguration conf = new InstancedConfiguration(ServerConfiguration.copyProperties());
    conf.set(PropertyKey.USER_FILE_READ_TYPE_DEFAULT, readType.name());
    FileSystem fs = FileSystem.Factory.create(conf);
    FileSystemTestUtils.createByteFile(fs, UFS_ONLY_FILE, WritePType.THROUGH, FILE_LEN);
    mUfsInputStream = new HdfsFileInputStream(fs, new AlluxioURI(UFS_ONLY_FILE), null);
}
Also used : InstancedConfiguration(alluxio.conf.InstancedConfiguration) FileSystem(alluxio.client.file.FileSystem) HdfsFileInputStream(alluxio.hadoop.HdfsFileInputStream) AlluxioURI(alluxio.AlluxioURI)

Aggregations

AlluxioURI (alluxio.AlluxioURI)2 HdfsFileInputStream (alluxio.hadoop.HdfsFileInputStream)2 FileSystem (alluxio.client.file.FileSystem)1 InstancedConfiguration (alluxio.conf.InstancedConfiguration)1 Before (org.junit.Before)1