List of usage examples for org.apache.hadoop.io.file.tfile TFile COMPRESSION_NONE
String COMPRESSION_NONE
To view the source code for org.apache.hadoop.io.file.tfile TFile COMPRESSION_NONE.
Click Source Link
From source file:com.datatorrent.contrib.hdht.HadoopFilePerformanceTest.java
License:Open Source License
@Test public void testTFileWrite() throws Exception { Path file = Testfile.TFILE.filepath(); logger.info("Writing {} with {} key/value pairs", file, String.format("%,d", testSize)); startTimer();/* w w w .j a v a 2 s. c om*/ writeTFile(file, TFile.COMPRESSION_NONE); logger.info("Duration: {}", stopTimer(Testfile.TFILE, "WRITE")); Assert.assertTrue(hdfs.exists(file)); ContentSummary fileInfo = hdfs.getContentSummary(file); logger.debug("Space consumed: {} bytes in {} files", String.format("%,d", fileInfo.getSpaceConsumed()), String.format("%,d", fileInfo.getFileCount())); }
From source file:com.datatorrent.contrib.hdht.HadoopFilePerformanceTest.java
License:Open Source License
@Test public void testTFileRead() throws Exception { Path file = Testfile.TFILE.filepath(); logger.info("Reading {} with {} key/value pairs", file, String.format("%,d", testSize)); writeTFile(file, TFile.COMPRESSION_NONE); startTimer();//w ww . j a va 2 s . c o m readTFileSeq(file); logger.info("Duration for scanner.next() SEQUENTIAL keys: {}", stopTimer(Testfile.TFILE, "READ-SEQ")); startTimer(); readTFileSeqId(file); logger.info("Duration for scanner.seekTo(key) SEQUENTIAL keys: {}", stopTimer(Testfile.TFILE, "READ-SEQ-ID")); startTimer(); readTFileRandom(file); logger.info("Duration for scanner.seekTo(key) RANDOM keys: {}", stopTimer(Testfile.TFILE, "READ-RAND")); }
From source file:com.datatorrent.contrib.hdht.HadoopFilePerformanceTest.java
License:Open Source License
@Test public void testDTFileRead() throws Exception { Path file = Testfile.DTFILE.filepath(); logger.info("Reading {} with {} key/value pairs", file, String.format("%,d", testSize)); writeTFile(file, TFile.COMPRESSION_NONE); startTimer();//w ww . j a va2 s . com readDTFileSeq(file); logger.info("Duration for scanner.next() SEQUENTIAL keys: {}", stopTimer(Testfile.DTFILE, "READ-SEQ")); startTimer(); readDTFileSeq(file); logger.info("Duration for scanner.seekTo(key) SEQUENTIAL keys: {}", stopTimer(Testfile.DTFILE, "READ-SEQ-ID")); startTimer(); readDTFileRandom(file); logger.info("Duration for scanner.seekTo(key) RANDOM keys: {}", stopTimer(Testfile.DTFILE, "READ-RAND")); }
From source file:com.datatorrent.contrib.hdht.HDHTFileAccessTest.java
License:Open Source License
@Test public void testTFile() throws IOException { testTFile(TFile.COMPRESSION_NONE); }
From source file:com.datatorrent.contrib.hdht.HDHTFileAccessTest.java
License:Open Source License
@Test public void testDTFile() throws IOException { testDTFile(TFile.COMPRESSION_NONE); }