when block is local and client is local, retry policy is invalid

Description

when i cat a file:
alluxio fs cat /data/mytest/redis.conf > /tmp/redis.conf

where it has one block in two worker, worker1, worker2.
when worker1 is crashed, if i run such command in worker3, retry policy is available, and run successfully.
2018-08-14 15:08:13,935 WARN FileInStream - Failed to read block 318783881216 from worker WorkerNetAddress...

but if i do such thing in worker1, it will throw a exception:
java.io.IOException: syscall:getsockopt(..) failed: Connection refused: xxx
at alluxio.cli.fs.command.AbstractFileSystemCommand.runWildCardCmd(AbstractFileSystemCommand.java:79)
at alluxio.cli.fs.command.CatCommand.run(CatCommand.java:86)
at alluxio.cli.AbstractShell.run(AbstractShell.java:100)
at alluxio.cli.fs.FileSystemShell.main(FileSystemShell.java:65)

because when we read locally, in BlockInStream.createLocalBlockInStream, it throws a ConnectException, but only NotFoundException is catch, as a result of which, it's failed to select a remote node to read.

so, if we catch ConnectException | NotFoundException e in BlockInStream.create when handle createLocalBlockInStream(), it would be better?

Environment

alluxio 1.8.0

Status

Assignee

snodawn

Reporter

snodawn

Labels

None

Components

Affects versions

1.8.0

Priority

Major
Configure