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

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

Introduction

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

Prototype

public String[] getFiles() 

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();
        cookie = cfb.getCookie();/*from ww  w  .  j  a  va 2  s  .  com*/
        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++;
    }
}