Java Code Examples for org.apache.hadoop.fs.ChecksumFileSystem#open()
The following examples show how to use
org.apache.hadoop.fs.ChecksumFileSystem#open() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestFSInputChecker.java From RDFS with Apache License 2.0 | 6 votes |
/** * Tests read/seek/getPos/skipped opeation for input stream. */ private void testChecker(ChecksumFileSystem fileSys, boolean readCS) throws Exception { Path file = new Path("try.dat"); if( readCS ) { writeFile(fileSys, file); } else { writeFile(fileSys.getRawFileSystem(), file); } stm = fileSys.open(file); checkReadAndGetPos(); checkSeek(); checkSkip(); //checkMark assertFalse(stm.markSupported()); stm.close(); cleanupFile(fileSys, file); }
Example 2
Source File: TestFSInputChecker.java From hadoop-gpu with Apache License 2.0 | 6 votes |
/** * Tests read/seek/getPos/skipped opeation for input stream. */ private void testChecker(ChecksumFileSystem fileSys, boolean readCS) throws Exception { Path file = new Path("try.dat"); if( readCS ) { writeFile(fileSys, file); } else { writeFile(fileSys.getRawFileSystem(), file); } stm = fileSys.open(file); checkReadAndGetPos(); checkSeek(); checkSkip(); //checkMark assertFalse(stm.markSupported()); stm.close(); cleanupFile(fileSys, file); }
Example 3
Source File: TestFSInputChecker.java From RDFS with Apache License 2.0 | 5 votes |
private void testSeekAndRead(ChecksumFileSystem fileSys) throws IOException { Path file = new Path("try.dat"); writeFile(fileSys, file); stm = fileSys.open(file, fileSys.getConf().getInt("io.file.buffer.size", 4096)); checkSeekAndRead(); stm.close(); cleanupFile(fileSys, file); }
Example 4
Source File: TestFSInputChecker.java From hadoop-gpu with Apache License 2.0 | 5 votes |
private void testSeekAndRead(ChecksumFileSystem fileSys) throws IOException { Path file = new Path("try.dat"); writeFile(fileSys, file); stm = fileSys.open(file, fileSys.getConf().getInt("io.file.buffer.size", 4096)); checkSeekAndRead(); stm.close(); cleanupFile(fileSys, file); }