List of usage examples for org.apache.hadoop.hdfs DFSTestUtil readFile
public static String readFile(File f) throws IOException
From source file:com.mellanox.r4h.MiniDFSCluster.java
License:Apache License
public String readBlockOnDataNode(int i, ExtendedBlock block) throws IOException { assert (i >= 0 && i < dataNodes.size()) : "Invalid datanode " + i; File blockFile = getBlockFile(i, block); if (blockFile != null && blockFile.exists()) { return DFSTestUtil.readFile(blockFile); }//from w w w . j av a 2 s .co m return null; }