public final class TachyonFSTestUtils extends Object
Modifier and Type | Method and Description |
---|---|
static TachyonFile |
createByteFile(TachyonFileSystem tfs,
String fileName,
int len,
OutStreamOptions options)
Creates a simple file with
len bytes. |
static TachyonFile |
createByteFile(TachyonFileSystem tfs,
String fileName,
TachyonStorageType tachyonStorageType,
UnderStorageType underStorageType,
int len)
Creates a simple file with
len bytes. |
static TachyonFile |
createByteFile(TachyonFileSystem tfs,
String fileName,
TachyonStorageType tachyonStorageType,
UnderStorageType underStorageType,
int len,
long blockCapacityByte)
Creates a simple file with
len bytes. |
static TachyonFile |
createByteFile(TachyonFileSystem tfs,
TachyonURI fileURI,
TachyonStorageType tachyonStorageType,
UnderStorageType underStorageType,
int len)
Creates a simple file with
len bytes. |
static List<String> |
listFiles(TachyonFileSystem tfs,
String path)
Returns a list of files at a given
path . |
static InStreamOptions |
toInStreamOptions(OutStreamOptions op)
Converts an OutStreamOptions object to an InStreamOptions object with a matching Tachyon
storage type.
|
public static TachyonFile createByteFile(TachyonFileSystem tfs, String fileName, int len, OutStreamOptions options) throws IOException
len
bytes.tfs
- a TachyonFileSystem handlerfileName
- the name of the file to be createdlen
- file size in bytesoptions
- options to create the file withIOException
- if path
is invalid (e.g., illegal URI)public static TachyonFile createByteFile(TachyonFileSystem tfs, String fileName, TachyonStorageType tachyonStorageType, UnderStorageType underStorageType, int len) throws IOException
len
bytes.tfs
- a TachyonFileSystem handlerfileName
- the name of the file to be createdtachyonStorageType
- TachyonStorageType used to create the fileunderStorageType
- UnderStorageType used to create the filelen
- file sizeIOException
- if path
is invalid (e.g., illegal URI)public static TachyonFile createByteFile(TachyonFileSystem tfs, TachyonURI fileURI, TachyonStorageType tachyonStorageType, UnderStorageType underStorageType, int len) throws IOException
len
bytes.tfs
- a TachyonFileSystem handlerfileURI
- URI of the filetachyonStorageType
- TachyonStorageType used to create the fileunderStorageType
- UnderStorageType used to create the filelen
- file sizeIOException
- if path
is invalid (e.g., illegal URI)public static TachyonFile createByteFile(TachyonFileSystem tfs, String fileName, TachyonStorageType tachyonStorageType, UnderStorageType underStorageType, int len, long blockCapacityByte) throws IOException
len
bytes.tfs
- a TachyonFileSystem handlerfileName
- the name of the file to be createdtachyonStorageType
- TachyonStorageType used to create the fileunderStorageType
- UnderStorageType used to create the filelen
- file sizeblockCapacityByte
- block size of the fileIOException
- if path
is invalid (e.g., illegal URI)public static List<String> listFiles(TachyonFileSystem tfs, String path) throws IOException
path
.tfs
- a TachyonFileSystem handlerpath
- a path in tachyon file systemIOException
- if path
does not exist or is invalidpublic static InStreamOptions toInStreamOptions(OutStreamOptions op)
op
- an OutStreamOptions objectCopyright © 2015. All Rights Reserved.