5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-06 19:30:52 +08:00

SQOOP-1831: Sqoop2: Log filenames of detected Mapreduce files in HdfsUtils

(Jarek Jarcec Cecho via Abraham Elmahrek)
This commit is contained in:
Abraham Elmahrek 2014-12-04 00:30:13 -08:00
parent a4e0bfa51d
commit 9febdf3aed

View File

@ -33,7 +33,6 @@
*/
public class HdfsUtils {
@SuppressWarnings("unused")
private static final Logger LOG = Logger.getLogger(HdfsUtils.class);
private static final char PATH_SEPARATOR = '/';
@ -49,6 +48,7 @@ public class HdfsUtils {
public static Path [] getOutputMapreduceFiles(FileSystem fs, String directory) throws FileNotFoundException, IOException {
LinkedList<Path> files = new LinkedList<Path>();
for (FileStatus fileStatus : fs.listStatus(new Path(directory))) {
LOG.debug("Found mapreduce output file: " + fileStatus.getPath() + " with size " + fileStatus.getLen());
files.add(fileStatus.getPath());
}
return files.toArray(new Path[files.size()]);