Package org.apache.hadoop.io.IOUtils

Examples of org.apache.hadoop.io.IOUtils.NullOutputStream


     */
    @Test
    public void stress_write() throws Exception {
        int count = 10000000;
        DecimalOption option = new DecimalOption(new BigDecimal("3.14"));
        DataOutput out = new DataOutputStream(new NullOutputStream());
        for (int i = 0; i < count; i++) {
            option.write(out);
        }
    }
View Full Code Here


      BufferedReader br = Files.openFileReader("/users/craigm/src/tr3/linksList");
      String line = null;
     
     
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      NullOutputStream nos = new NullOutputStream();
      BitOutputStream bo_null = new BitOutputStream(nos);
      DirectInvertedDocidOnlyOuptutStream dios = new DirectInvertedDocidOnlyOuptutStream(bo_null);
      BitOutputStream bo = new BitOutputStream(baos);
      if (initial_bitoffset > 0)
        bo.writeBinary(initial_bitoffset, 0);
View Full Code Here

    assertEquals("Lengths must match", tempEditsFile.length(),
        ledger.getLength());

    long tempFileCrc32 = IOUtils.copyBytesAndGenerateCRC(
        new FileInputStream(tempEditsFile),
        new NullOutputStream(),
        (int) tempEditsFile.length(),
        false);
    long ledgerCrc32 = IOUtils.copyBytesAndGenerateCRC(
        new LedgerInputStream(ledger),
        new NullOutputStream(),
        (int) ledger.getLength(),
        false);

    // Test that the same data (including a log version) has been written
    // to both BookKeeperEditLogOutputStream and EditLogFileOutputStream
View Full Code Here

TOP

Related Classes of org.apache.hadoop.io.IOUtils.NullOutputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.