Example usage for org.apache.hadoop.hdfs.protocol CorruptFileBlocks getCookie

List of usage examples for org.apache.hadoop.hdfs.protocol CorruptFileBlocks getCookie

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.protocol CorruptFileBlocks getCookie.

Prototype

public String getCookie() 

Source Link

Usage

From source file:com.mellanox.r4h.CorruptFileBlockIterator.java

License:Apache License

private void loadNext() throws IOException {
    if (files == null || fileIdx >= files.length) {
        CorruptFileBlocks cfb = dfs.listCorruptFileBlocks(path, cookie);
        files = cfb.getFiles();//  w  w  w. j ava  2  s .c  om
        cookie = cfb.getCookie();
        fileIdx = 0;
        callsMade++;
    }

    if (fileIdx >= files.length) {
        // received an empty response
        // there are no more corrupt file blocks
        nextPath = null;
    } else {
        nextPath = string2Path(files[fileIdx]);
        fileIdx++;
    }
}