Package org.apache.hama.bsp.message.io

Examples of org.apache.hama.bsp.message.io.SpilledDataInputBuffer$SpilledInputStream


      f = new File(fileName);
      assertTrue(f.exists());
      outputBuffer.close();
      assertTrue(f.length() == 4000);// + (4000 / 1024 + 1) * 4));

      SpilledDataInputBuffer inputBuffer = outputBuffer
          .getInputStreamToRead(fileName);

      for (int i = 0; i < 100; ++i) {
        text.readFields(inputBuffer);
        assertTrue("Testing the spillage of spilling buffer".equals(text
            .toString()));
        text.clear();
      }

      try {
        text.readFields(inputBuffer);
        assertTrue(false);
      } catch (EOFException eof) {
        assertTrue(true);
      }

      inputBuffer.close();
      inputBuffer.completeReading(false);
      assertTrue(f.exists());
      inputBuffer.completeReading(true);
      assertFalse(f.exists());
    } finally {
      if (f != null) {
        if (f.exists()) {
          f.delete();
View Full Code Here


      f = new File(fileName);
      assertTrue(f.exists());
      outputBuffer.close();
      assertTrue(f.length() == 4000);// + (4000 / 1024 + 1) * 4));

      SpilledDataInputBuffer inputBuffer = outputBuffer
          .getInputStreamToRead(fileName);

      for (int i = 0; i < 100; ++i) {
        text.readFields(inputBuffer);
        assertTrue("Testing the spillage of spilling buffer".equals(text
            .toString()));
        text.clear();
      }

      try {
        text.readFields(inputBuffer);
        assertTrue(false);
      } catch (EOFException eof) {
        assertTrue(true);
      }

      inputBuffer.close();
      inputBuffer.completeReading(false);
      assertTrue(f.exists());
      inputBuffer.completeReading(true);
      assertFalse(f.exists());
    } finally {
      if (f != null) {
        if (f.exists()) {
          f.delete();
View Full Code Here

TOP

Related Classes of org.apache.hama.bsp.message.io.SpilledDataInputBuffer$SpilledInputStream

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.