mirror of
https://github.com/apache/sqoop.git
synced 2025-05-07 23:03:07 +08:00
SQOOP-1831: Sqoop2: Log filenames of detected Mapreduce files in HdfsUtils
(Jarek Jarcec Cecho via Abraham Elmahrek)
This commit is contained in:
parent
a4e0bfa51d
commit
9febdf3aed
@ -33,7 +33,6 @@
|
|||||||
*/
|
*/
|
||||||
public class HdfsUtils {
|
public class HdfsUtils {
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private static final Logger LOG = Logger.getLogger(HdfsUtils.class);
|
private static final Logger LOG = Logger.getLogger(HdfsUtils.class);
|
||||||
|
|
||||||
private static final char PATH_SEPARATOR = '/';
|
private static final char PATH_SEPARATOR = '/';
|
||||||
@ -49,6 +48,7 @@ public class HdfsUtils {
|
|||||||
public static Path [] getOutputMapreduceFiles(FileSystem fs, String directory) throws FileNotFoundException, IOException {
|
public static Path [] getOutputMapreduceFiles(FileSystem fs, String directory) throws FileNotFoundException, IOException {
|
||||||
LinkedList<Path> files = new LinkedList<Path>();
|
LinkedList<Path> files = new LinkedList<Path>();
|
||||||
for (FileStatus fileStatus : fs.listStatus(new Path(directory))) {
|
for (FileStatus fileStatus : fs.listStatus(new Path(directory))) {
|
||||||
|
LOG.debug("Found mapreduce output file: " + fileStatus.getPath() + " with size " + fileStatus.getLen());
|
||||||
files.add(fileStatus.getPath());
|
files.add(fileStatus.getPath());
|
||||||
}
|
}
|
||||||
return files.toArray(new Path[files.size()]);
|
return files.toArray(new Path[files.size()]);
|
||||||
|
Loading…
Reference in New Issue
Block a user