soumyakanti3578 commented on code in PR #6851:
URL: https://github.com/apache/hive/pull/6851#discussion_r4594230068
##########
ql/src/java/org/apache/hadoop/hive/ql/io/SymlinkTextInputFormat.java:
##########
@@ -192,8 +193,14 @@ private static void getTargetPathsFromSymlinksDirs(
fileSystem.open(symlink.getPath())));
String line;
while ((line = reader.readLine()) != null) {
- targetPaths.add(new Path(line));
- symlinkPaths.add(symlink.getPath());
+ List<Path> matches = resolveTargets(conf, symlink.getPath(),
allowedRoots, line);
+ if (matches.isEmpty()) {
+ throw new IOException("Symlink target " + line + " does not
match any path");
+ }
Review Comment:
The two already differed before this PR. `getSplits` went through
`FileInputFormat`, which fails on a missing path or a glob with no match.
`rework` already did nothing for a glob with no match, and now does the same
for a missing path instead of hitting an NPE.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]