svn merge -c 1575049 from trunk for MAPREDUCE-5780. SliveTest should use the specified path to get the particular FileSystem instead of using the default FileSystem.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1575055 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
68eab8c5b9
commit
eb4e72d190
|
@ -66,6 +66,9 @@ Release 2.4.0 - UNRELEASED
|
||||||
MAPREDUCE-5768. TestMRJobs.testContainerRollingLog fails on trunk (Gera
|
MAPREDUCE-5768. TestMRJobs.testContainerRollingLog fails on trunk (Gera
|
||||||
Shegalov via jlowe)
|
Shegalov via jlowe)
|
||||||
|
|
||||||
|
MAPREDUCE-5780. SliveTest should use the specified path to get the
|
||||||
|
particular FileSystem instead of using the default FileSystem. (szetszwo)
|
||||||
|
|
||||||
Release 2.3.1 - UNRELEASED
|
Release 2.3.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -58,7 +58,6 @@ import org.apache.hadoop.util.ToolRunner;
|
||||||
* The number of maps is specified by "slive.maps".
|
* The number of maps is specified by "slive.maps".
|
||||||
* The number of reduces is specified by "slive.reduces".
|
* The number of reduces is specified by "slive.reduces".
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public class SliveTest implements Tool {
|
public class SliveTest implements Tool {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(SliveTest.class);
|
private static final Log LOG = LogFactory.getLog(SliveTest.class);
|
||||||
|
@ -221,7 +220,7 @@ public class SliveTest implements Tool {
|
||||||
private void writeReport(ConfigExtractor cfg) throws Exception {
|
private void writeReport(ConfigExtractor cfg) throws Exception {
|
||||||
Path dn = cfg.getOutputPath();
|
Path dn = cfg.getOutputPath();
|
||||||
LOG.info("Writing report using contents of " + dn);
|
LOG.info("Writing report using contents of " + dn);
|
||||||
FileSystem fs = FileSystem.get(cfg.getConfig());
|
FileSystem fs = dn.getFileSystem(cfg.getConfig());
|
||||||
FileStatus[] reduceFiles = fs.listStatus(dn);
|
FileStatus[] reduceFiles = fs.listStatus(dn);
|
||||||
BufferedReader fileReader = null;
|
BufferedReader fileReader = null;
|
||||||
PrintWriter reportWriter = null;
|
PrintWriter reportWriter = null;
|
||||||
|
@ -292,10 +291,10 @@ public class SliveTest implements Tool {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
private void cleanup(ConfigExtractor cfg) throws IOException {
|
private void cleanup(ConfigExtractor cfg) throws IOException {
|
||||||
FileSystem fs = FileSystem.get(cfg.getConfig());
|
|
||||||
Path base = cfg.getBaseDirectory();
|
Path base = cfg.getBaseDirectory();
|
||||||
if (base != null) {
|
if (base != null) {
|
||||||
LOG.info("Attempting to recursively delete " + base);
|
LOG.info("Attempting to recursively delete " + base);
|
||||||
|
FileSystem fs = base.getFileSystem(cfg.getConfig());
|
||||||
fs.delete(base, true);
|
fs.delete(base, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue