I am attempting to read a file from a local PC via a network deployed application. I keep receiving FileNotFoundException
. I am using hadoop FileSystem. I want to send to an InputStream.
InputStream inputStream = null;
FileSystem fileSystem = FileSystem.getLocal(new Configuration());
inputStream = fileSystem.open(new Path("file:///c:/test.pdf"));
I have a file on my local PC at c:/test.pdf
.
I can run this fine if I am running the app locally. However if running from network deployed app, I receive:
java.io.FileNotFoundException: File file:/c:/test.pdf does not exist
Is there a way to accomplish this?