Java. Lang. IllegalArgumentException: URI scheme is not “file” error
The code in
Map side setup is as follows
URI[] uris = context.getCacheFiles();
File file = new File(uris[0]);
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
Code cached in the Driver phase
job.addCacheFile(new URI("/MR/job/input/com.txt"));
After thinking about it and looking for some forums on the Internet, I thought it might be what I wanted to do, but I could not do it with File, so I should do it with Stream.
file f = new file (UI)
le f = new file (UI)
file f = new file (UI)
file f = new file (UI); The file protocol
is now the URL(” http://… “) ) it is impossible to document
so will some changes have been made the setup phase of the code
URI[] cacheFiles = context.getCacheFiles();
FileSystem fileSystem = FileSystem.get(cacheFiles[0], context.getConfiguration());
FSDataInputStream inputStream = fileSystem.open(new Path(cacheFiles[0]));
BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));
Found that after the change was really good