From fd756a0c403e2d3c982096b165e53c2fefe8f31f Mon Sep 17 00:00:00 2001 From: Jarek Jarcec Cecho Date: Mon, 20 May 2013 07:27:53 -0700 Subject: [PATCH] SQOOP-891: Sqoop export from S3 to MySQL fails when S3 is not default filesystem. (Jurgen Van Gael via Jarek Jarcec Cecho) --- .../org/apache/sqoop/mapreduce/CombineFileInputFormat.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/sqoop/mapreduce/CombineFileInputFormat.java b/src/java/org/apache/sqoop/mapreduce/CombineFileInputFormat.java index 7d2be385..e08f9978 100644 --- a/src/java/org/apache/sqoop/mapreduce/CombineFileInputFormat.java +++ b/src/java/org/apache/sqoop/mapreduce/CombineFileInputFormat.java @@ -224,7 +224,11 @@ public List getSplits(JobContext job) // times, one time each for each pool in the next loop. List newpaths = new LinkedList(); for (int i = 0; i < paths.length; i++) { - Path p = new Path(paths[i].toUri().getPath()); + FileSystem fs = paths[i].getFileSystem(conf); + + //the scheme and authority will be kept if the path is + //a valid path for a non-default file system + Path p = fs.makeQualified(paths[i]); newpaths.add(p); } paths = null;