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
Read More:
- java.lang.IllegalArgumentException : URI is not absolute error
- java.lang.IllegalArgumentException : urlcoder exception resolution
- java.lang.IllegalArgumentException: column ‘_id’ does not exist
- java.lang.IllegalArgumentException : could not get next sequenced ID for sequence name: Visitor solution
- java.lang.IllegalArgumentException: Index for header ‘XXX‘ is 1 but CSVRecord only has 1 value
- java.lang.IllegalArgumentException: Receiver not registered:
- java.lang.IllegalArgumentException: Address 127.0.0.1:5672:5672 seems to contain an unquoted IPv6
- Error java.lang.IllegalArgumentException: Validation failed for query for method public abstract
- Springboot startup error: java.lang.IllegalArgumentException : Property ‘sqlSessionFactory’ or ‘sqlSessionTempla
- java.lang.IllegalArgumentException: error at ::0 can‘t find referenced pointcut anyMethod
- JMeter running error response code: non HTTP response code: java.lang.illegalargumentexception find and solve
- NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
- How to Fix:java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/methods/HttpPost
- Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError
- java.lang.NoSuchMethodError: org.json.JSONObject.put(Java/lang/String; Java/util/Collection;) “209151;”
- Request processing failed;nested exception is java.lang.*
- After Vue is packaged, a blank page appears, an error is reported in the resource request, and there is no error handling scheme
- Error:java.io.FileNotFoundException: Path is not a file [How to Solve]
- Spring nested exception is java.lang.NoClassDefFoundError: org/springframework/core/MethodClassKey
- Error encountered during QT + opencv compilation: file not recognized: file format not recognized error resolution