From 18ba71692288b585475595d21ed91d08d245009a Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Sat, 2 Jun 2012 18:47:40 +0000 Subject: [PATCH] MAPREDUCE-4307. TeraInputFormat calls FileSystem.getDefaultBlockSize() without a Path - Failure when using ViewFileSystem. Contributed by Ahmed Radwan git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1345546 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../org/apache/hadoop/examples/terasort/TeraInputFormat.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 8af33f2475..b980e5a695 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -157,6 +157,9 @@ Release 2.0.1-alpha - UNRELEASED MAPREDUCE-3493. Add the default mapreduce.shuffle.port property to mapred-default.xml (Madhukara Phatak via harsh) + MAPREDUCE-4307. TeraInputFormat calls FileSystem.getDefaultBlockSize() + without a Path - Failure when using ViewFileSystem. (Ahmed Radwan via eli) + Release 2.0.0-alpha - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/terasort/TeraInputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/terasort/TeraInputFormat.java index 4ef0033012..f957ad9e4f 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/terasort/TeraInputFormat.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/terasort/TeraInputFormat.java @@ -212,7 +212,7 @@ public void run() { } FileSystem outFs = partFile.getFileSystem(conf); DataOutputStream writer = outFs.create(partFile, true, 64*1024, (short) 10, - outFs.getDefaultBlockSize()); + outFs.getDefaultBlockSize(partFile)); for (int i = 0; i < samples; i++) { try { samplerReader[i].join();