Package org.apache.hadoop.io

Examples of org.apache.hadoop.io.InputBuffer


     * @throws Exception if failed
     */
    @Test
    public void readByte_random() throws Exception {
        byte[] bytes = "ABC|D|EF".getBytes(Charset.forName("ASCII"));
        InputBuffer buffer = new InputBuffer();
        buffer.reset(bytes, bytes.length);
        Random random = new Random(12345);
        for (int i = 0; i < 100000; i++) {
            int[] bounds = new int[5];
            for (int j = 0; j < bounds.length; j++) {
                bounds[j] = random.nextInt(bytes.length + 1);
View Full Code Here


     * @throws Exception if failed
     */
    @Test
    public void readArray_random() throws Exception {
        byte[] bytes = "ABC|D|EF".getBytes(Charset.forName("ASCII"));
        InputBuffer buffer = new InputBuffer();
        buffer.reset(bytes, bytes.length);
        Random random = new Random(12345);
        for (int i = 0; i < 100000; i++) {
            int[] bounds = new int[5];
            for (int j = 0; j < bounds.length; j++) {
                bounds[j] = random.nextInt(bytes.length + 1);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.io.InputBuffer

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.