I am able to copy the local files to hdfs within the cluster. However, it fails when I read the HDFS files from remote machine ,it fails with the following stack trace :
[UNK_66009] File [hdfs://
35.199.186.207/tmp/sample.csv] could not be read because of the following error: [org.apache.hadoop.hdfs.BlockMissingException: Could not obtain block: BP-1033207192-10.138.0.2-1513236990327:blk_1073741825_1001 file=/tmp/sample.csv
at org.apache.hadoop.hdfs.DFSInputStream.chooseDataNode(DFSInputStream.java:1022)
at org.apache.hadoop.hdfs.DFSInputStream.blockSeekTo(DFSInputStream.java:641)
at org.apache.hadoop.hdfs.DFSInputStream.readWithStrategy(DFSInputStream.java:920)
at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:976)
at java.io.DataInputStream.read(DataInputStream.java:149)