Examples of VerifyOutput


Examples of org.apache.hadoop.fs.slive.DataVerifier.VerifyOutput

    LOG.info(ostat);
    fs.close();
    assertTrue(ostat.getBytesWritten() == byteAm);
    DataVerifier vf = new DataVerifier();
    FileInputStream fin = new FileInputStream(fn);
    VerifyOutput vfout = vf.verifyFile(byteAm, new DataInputStream(fin));
    LOG.info(vfout);
    fin.close();
    assertEquals(vfout.getBytesRead(), byteAm);
    assertTrue(vfout.getChunksDifferent() == 0);
  }
View Full Code Here

Examples of org.apache.hadoop.fs.slive.DataVerifier.VerifyOutput

    rnd.nextBytes(bytes);
    fout.write(bytes);
    fout.close();
    // attempt to read it
    DataVerifier vf = new DataVerifier();
    VerifyOutput vout = new VerifyOutput(0, 0, 0, 0);
    DataInputStream in = null;
    try {
      in = new DataInputStream(new FileInputStream(fn));
      vout = vf.verifyFile(byteAm, in);
    } catch (Exception e) {

    } finally {
      if(in != null) in.close();
    }
    assertTrue(vout.getChunksSame() == 0);
  }
View Full Code Here

Examples of org.apache.hadoop.fs.slive.DataVerifier.VerifyOutput

        // open
        startTime = Timer.now();
        is = fs.open(fn);
        timeTaken += Timer.elapsed(startTime);
        // read & verify
        VerifyOutput vo = vf.verifyFile(readSize, is);
        timeTaken += vo.getReadTime();
        chunkSame += vo.getChunksSame();
        chunkDiff += vo.getChunksDifferent();
        bytesRead += vo.getBytesRead();
        // capture close time
        startTime = Timer.now();
        is.close();
        is = null;
        timeTaken += Timer.elapsed(startTime);
View Full Code Here

Examples of org.apache.hadoop.fs.slive.DataVerifier.VerifyOutput

    LOG.info(ostat);
    fs.close();
    assertTrue(ostat.getBytesWritten() == byteAm);
    DataVerifier vf = new DataVerifier();
    FileInputStream fin = new FileInputStream(fn);
    VerifyOutput vfout = vf.verifyFile(byteAm, new DataInputStream(fin));
    LOG.info(vfout);
    fin.close();
    assertEquals(vfout.getBytesRead(), byteAm);
    assertTrue(vfout.getChunksDifferent() == 0);
  }
View Full Code Here

Examples of org.apache.hadoop.fs.slive.DataVerifier.VerifyOutput

    rnd.nextBytes(bytes);
    fout.write(bytes);
    fout.close();
    // attempt to read it
    DataVerifier vf = new DataVerifier();
    VerifyOutput vout = new VerifyOutput(0, 0, 0, 0);
    DataInputStream in = null;
    try {
      in = new DataInputStream(new FileInputStream(fn));
      vout = vf.verifyFile(byteAm, in);
    } catch (Exception e) {

    } finally {
      if(in != null) in.close();
    }
    assertTrue(vout.getChunksSame() == 0);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.