Package org.apache.hadoop.hdfs.web.WebHdfsFileSystem

Examples of org.apache.hadoop.hdfs.web.WebHdfsFileSystem.OffsetUrlInputStream.seek()


    // No additional connections should have been made (no seek)

    rspy.setURL(new URL("http://resolvedurl/"));

    is.seek(100);
    is.read();

    assertEquals("getPos should be 101 after reading one byte", 101,
        is.getPos());
View Full Code Here


    assertEquals("getPos should be 101 after reading one byte", 101,
        is.getPos());

    verify(rspy, times(1)).openConnection();

    is.seek(101);
    is.read();

    verify(rspy, times(1)).openConnection();

    // Seek to 101 should not result in another request"
View Full Code Here

    verify(rspy, times(1)).openConnection();

    // Seek to 101 should not result in another request"

    is.seek(2500);
    is.read();

    ((MockHttpURLConnection) rspy.openConnection()).setResponseCode(206);
    is.seek(0);
View Full Code Here

    is.seek(2500);
    is.read();

    ((MockHttpURLConnection) rspy.openConnection()).setResponseCode(206);
    is.seek(0);

    try {
      is.read();
      fail("Exception should be thrown when 206 response is given "
           + "but 200 is expected");
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.