public class TestFSUtils extends Object
FSUtils.| Modifier and Type | Class and Description |
|---|---|
(package private) class |
TestFSUtils.AlwaysFailSetStoragePolicyFileSystem |
| Modifier and Type | Field and Description |
|---|---|
(package private) static int |
blockSize |
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.conf.Configuration |
conf |
private org.apache.hadoop.fs.FileSystem |
fs |
private HBaseTestingUtility |
htu |
(package private) String |
INVALID_STORAGE_POLICY |
private static org.slf4j.Logger |
LOG |
(package private) static long |
seed |
private static boolean |
STREAM_CAPABILITIES_IS_PRESENT |
| Constructor and Description |
|---|
TestFSUtils() |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkAndEraseData(byte[] actual,
int from,
byte[] expected,
String message) |
void |
checkStreamCapabilitiesOnHdfsDataOutputStream() |
private void |
cleanupFile(org.apache.hadoop.fs.FileSystem fileSys,
org.apache.hadoop.fs.Path name) |
private void |
doPread(org.apache.hadoop.fs.FSDataInputStream stm,
long position,
byte[] buffer,
int offset,
int length) |
private void |
pReadFile(org.apache.hadoop.fs.FileSystem fileSys,
org.apache.hadoop.fs.Path name) |
void |
setUp() |
void |
testcomputeHDFSBlocksDistribution() |
void |
testCopyFilesParallel() |
void |
testDeleteAndExists() |
void |
testDFSHedgedReadMetrics()
Ugly test that ensures we can get at the hedged read counters in dfsclient.
|
void |
testFilteredStatusDoesNotThrowOnNotFound() |
void |
testIsHDFS() |
void |
testPermMask() |
void |
testRenameAndSetModifyTime() |
void |
testSetStoragePolicyDefault() |
void |
testSetStoragePolicyInvalid() |
void |
testSetStoragePolicyValidButMaybeNotPresent() |
void |
testVersion() |
private void |
verifyFileInDirWithStoragePolicy(String policy) |
private void |
verifyNoHDFSApiInvocationForDefaultPolicy()
Note: currently the default policy is set to defer to HDFS and this case is to verify the
logic, will need to remove the check if the default policy is changed
|
private void |
WriteDataToHDFS(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path file,
int dataSize) |
private void |
writeVersionFile(org.apache.hadoop.fs.Path versionFile,
String version) |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private HBaseTestingUtility htu
private org.apache.hadoop.fs.FileSystem fs
private org.apache.hadoop.conf.Configuration conf
final String INVALID_STORAGE_POLICY
static final int blockSize
static final long seed
private static final boolean STREAM_CAPABILITIES_IS_PRESENT
public TestFSUtils()
public void setUp() throws IOException
IOExceptionpublic void testIsHDFS() throws Exception
Exceptionprivate void WriteDataToHDFS(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path file, int dataSize) throws Exception
Exceptionpublic void testcomputeHDFSBlocksDistribution() throws Exception
Exceptionprivate void writeVersionFile(org.apache.hadoop.fs.Path versionFile, String version) throws IOException
IOExceptionpublic void testVersion() throws org.apache.hadoop.hbase.exceptions.DeserializationException, IOException
org.apache.hadoop.hbase.exceptions.DeserializationExceptionIOExceptionpublic void testPermMask() throws Exception
Exceptionpublic void testDeleteAndExists() throws Exception
Exceptionpublic void testFilteredStatusDoesNotThrowOnNotFound() throws Exception
Exceptionpublic void testRenameAndSetModifyTime() throws Exception
Exceptionpublic void testSetStoragePolicyDefault() throws Exception
Exceptionprivate void verifyNoHDFSApiInvocationForDefaultPolicy()
public void testSetStoragePolicyValidButMaybeNotPresent() throws Exception
Exceptionpublic void testSetStoragePolicyInvalid() throws Exception
Exceptionprivate void verifyFileInDirWithStoragePolicy(String policy) throws Exception
Exceptionpublic void testDFSHedgedReadMetrics() throws Exception
Exceptionpublic void testCopyFilesParallel() throws Exception
Exceptionprivate void pReadFile(org.apache.hadoop.fs.FileSystem fileSys, org.apache.hadoop.fs.Path name) throws IOException
IOExceptionprivate void checkAndEraseData(byte[] actual, int from, byte[] expected, String message)
private void doPread(org.apache.hadoop.fs.FSDataInputStream stm, long position, byte[] buffer, int offset, int length) throws IOException
IOExceptionprivate void cleanupFile(org.apache.hadoop.fs.FileSystem fileSys, org.apache.hadoop.fs.Path name) throws IOException
IOExceptionpublic void checkStreamCapabilitiesOnHdfsDataOutputStream() throws Exception
ExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.