Return-Path: Delivered-To: apmail-hadoop-core-commits-archive@www.apache.org Received: (qmail 39693 invoked from network); 17 Mar 2008 05:36:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Mar 2008 05:36:31 -0000 Received: (qmail 45830 invoked by uid 500); 17 Mar 2008 05:36:29 -0000 Delivered-To: apmail-hadoop-core-commits-archive@hadoop.apache.org Received: (qmail 45799 invoked by uid 500); 17 Mar 2008 05:36:29 -0000 Mailing-List: contact core-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-commits@hadoop.apache.org Received: (qmail 45790 invoked by uid 99); 17 Mar 2008 05:36:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Mar 2008 22:36:29 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2008 05:35:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1864A1A9832; Sun, 16 Mar 2008 22:36:08 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r637727 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/mapred/MapOutputLocation.java Date: Mon, 17 Mar 2008 05:36:07 -0000 To: core-commits@hadoop.apache.org From: ddas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080317053608.1864A1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ddas Date: Sun Mar 16 22:36:06 2008 New Revision: 637727 URL: http://svn.apache.org/viewvc?rev=637727&view=rev Log: HADOOP-2825. Deprecated MapOutputLocation.getFile() is removed. Contributed by Amareshwari Sriramadasu. Modified: hadoop/core/trunk/CHANGES.txt hadoop/core/trunk/src/java/org/apache/hadoop/mapred/MapOutputLocation.java Modified: hadoop/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=637727&r1=637726&r2=637727&view=diff ============================================================================== --- hadoop/core/trunk/CHANGES.txt (original) +++ hadoop/core/trunk/CHANGES.txt Sun Mar 16 22:36:06 2008 @@ -241,6 +241,10 @@ with different sizes to the namenode, the namenode picks the replica(s) with the largest size as the only valid replica(s). (dhruba) + HADOOP-2825. Deprecated MapOutputLocation.getFile() is removed. + (Amareshwari Sri Ramadasu via ddas) + + Release 0.16.1 - 2008-03-13 INCOMPATIBLE CHANGES Modified: hadoop/core/trunk/src/java/org/apache/hadoop/mapred/MapOutputLocation.java URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/mapred/MapOutputLocation.java?rev=637727&r1=637726&r2=637727&view=diff ============================================================================== --- hadoop/core/trunk/src/java/org/apache/hadoop/mapred/MapOutputLocation.java (original) +++ hadoop/core/trunk/src/java/org/apache/hadoop/mapred/MapOutputLocation.java Sun Mar 16 22:36:06 2008 @@ -99,78 +99,6 @@ } /** - * Get the map output into a local file from the remote server. - * We use the file system so that we generate checksum files on the data. - * @param fileSys the filesystem to write the file to - * @param localFilename the filename to write the data into - * @param reduce the reduce id to get for - * @param pingee a status object that wants to know when we make progress - * @param timeout number of ms for connection and read timeout - * @throws IOException when something goes wrong - * @deprecated - */ - @Deprecated - public long getFile(FileSystem fileSys, - Path localFilename, - int reduce, - Progressable pingee, - int timeout) throws IOException, InterruptedException { - boolean good = false; - long totalBytes = 0; - Thread currentThread = Thread.currentThread(); - URL path = new URL(toString() + "&reduce=" + reduce); - try { - URLConnection connection = path.openConnection(); - if (timeout > 0) { - connection.setConnectTimeout(timeout); - connection.setReadTimeout(timeout); - } - InputStream input = connection.getInputStream(); - try { - OutputStream output = fileSys.create(localFilename); - try { - byte[] buffer = new byte[64 * 1024]; - if (currentThread.isInterrupted()) { - throw new InterruptedException(); - } - int len = input.read(buffer); - while (len > 0) { - totalBytes += len; - output.write(buffer, 0 , len); - if (pingee != null) { - pingee.progress(); - } - if (currentThread.isInterrupted()) { - throw new InterruptedException(); - } - len = input.read(buffer); - } - } finally { - output.close(); - } - } finally { - input.close(); - } - good = ((int) totalBytes) == connection.getContentLength(); - if (!good) { - throw new IOException("Incomplete map output received for " + path + - " (" + totalBytes + " instead of " + - connection.getContentLength() + ")"); - } - } finally { - if (!good) { - try { - fileSys.delete(localFilename, true); - totalBytes = 0; - } catch (Throwable th) { - // IGNORED because we are cleaning up - } - } - } - return totalBytes; - } - - /** * Get the map output into a local file (either in the inmemory fs or on the * local fs) from the remote server. * We use the file system so that we generate checksum files on the data.