The main cause of the problem was that system did not know who I am. I was needed a client of hadoop, so the problem was solved by adding client dependency into pom:
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.2.0</version>
</dependency>
And here is the working example:
public static void main(String[] args) throws Exception {
try {
Configuration conf = new Configuration();
conf.set("fs.default.name", "hdfs://192.168.56.101:8020");
FileSystem fs = FileSystem.get(conf);
Path pt = new Path("/user/root/vectors/dictionary.file-0");
BufferedReader br = new BufferedReader(new InputStreamReader(fs.open(pt)));
try {
String line;
line = br.readLine();
while (line != null) {
System.out.println(line);
line = br.readLine();
}
} finally {
br.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}