Skip to content

Commit 5b74ebd

Browse files
committed
MAPREDUCE-5794. SliveMapper always uses default FileSystem. (Contributed by szetszwo)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1577281 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3ea2ad5 commit 5b74ebd

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

hadoop-mapreduce-project/CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ Release 2.4.0 - UNRELEASED
228228
MAPREDUCE-5789. Average Reduce time is incorrect on Job Overview page
229229
(Rushabh S Shah via jlowe)
230230

231+
MAPREDUCE-5794. SliveMapper always uses default FileSystem. (szetszwo via
232+
Arpit Agarwal)
233+
231234
Release 2.3.1 - UNRELEASED
232235

233236
INCOMPATIBLE CHANGES

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/slive/DummyInputFormat.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
/**
3232
* A input format which returns one dummy key and value
3333
*/
34-
@SuppressWarnings("deprecation")
3534
class DummyInputFormat implements InputFormat<Object, Object> {
3635

3736
static class EmptySplit implements InputSplit {

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/slive/SliveMapper.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
* that have been selected and upon operation completion output the collected
4343
* output from that operation (and repeat until finished).
4444
*/
45-
@SuppressWarnings("deprecation")
4645
public class SliveMapper extends MapReduceBase implements
4746
Mapper<Object, Object, Text, Text> {
4847

@@ -63,15 +62,10 @@ public class SliveMapper extends MapReduceBase implements
6362
*/
6463
@Override // MapReduceBase
6564
public void configure(JobConf conf) {
66-
try {
67-
filesystem = FileSystem.get(conf);
68-
} catch (Exception e) {
69-
throw new RuntimeException(
70-
"Unable to get the filesystem from provided configuration", e);
71-
}
7265
try {
7366
config = new ConfigExtractor(conf);
7467
ConfigExtractor.dumpOptions(config);
68+
filesystem = config.getBaseDirectory().getFileSystem(conf);
7569
} catch (Exception e) {
7670
LOG.error("Unable to setup slive " + StringUtils.stringifyException(e));
7771
throw new RuntimeException("Unable to setup slive configuration", e);

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/slive/SlivePartitioner.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
* The partition number is the hash of the operation type modular the total
2727
* number of the reducers.
2828
*/
29-
@SuppressWarnings("deprecation")
3029
public class SlivePartitioner implements Partitioner<Text, Text> {
3130
@Override // JobConfigurable
3231
public void configure(JobConf conf) {}

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/slive/SliveReducer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
* The slive reducer which iterates over the given input values and merges them
3636
* together into a final output value.
3737
*/
38-
@SuppressWarnings("deprecation")
3938
public class SliveReducer extends MapReduceBase implements
4039
Reducer<Text, Text, Text, Text> {
4140

0 commit comments

Comments
 (0)