Author: omalley
Date: Fri Mar 4 03:47:32 2011
New Revision: 1077162
URL: http://svn.apache.org/viewvc?rev=1077162&view=rev
Log:
commit 5ef04fe9348b44aa5511a04f92a951c698d64911
Author: Mahadev Konar <[email protected]>
Date: Thu Feb 11 19:35:40 2010 +0000
MAPREDUCE:1399 from
http://issues.apache.org/jira/secure/attachment/12435380/m1399_20100205trunk2_y0.20.patch
+++ b/YAHOO-CHANGES.txt
+ MAPREDUCE-1399. The archive command shows a null error message.
(nicholas)
+
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/HadoopArchives.java
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/HadoopArchives.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/HadoopArchives.java?rev=1077162&r1=1077161&r2=1077162&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/HadoopArchives.java
(original)
+++
hadoop/common/branches/branch-0.20-security-patches/src/tools/org/apache/hadoop/tools/HadoopArchives.java
Fri Mar 4 03:47:32 2011
@@ -742,8 +742,10 @@ public class HadoopArchives implements T
for (Path p: srcPaths) {
FileSystem fs = p.getFileSystem(getConf());
FileStatus[] statuses = fs.globStatus(p);
- for (FileStatus status: statuses) {
- globPaths.add(fs.makeQualified(status.getPath()));
+ if (statuses != null) {
+ for (FileStatus status: statuses) {
+ globPaths.add(fs.makeQualified(status.getPath()));
+ }
}
}
archive(parentPath, globPaths, archiveName, destPath);
@@ -764,8 +766,13 @@ public class HadoopArchives implements T
ret = ToolRunner.run(harchives, args);
} catch(Exception e) {
LOG.debug("Exception in archives ", e);
- System.err.println("Exception in archives");
- System.err.println(e.getLocalizedMessage());
+ System.err.println(e.getClass().getSimpleName() + " in archives");
+ final String s = e.getLocalizedMessage();
+ if (s != null) {
+ System.err.println(s);
+ } else {
+ e.printStackTrace(System.err);
+ }
System.exit(1);
}
System.exit(ret);