Return-Path: Delivered-To: apmail-hadoop-mapreduce-dev-archive@minotaur.apache.org Received: (qmail 35416 invoked from network); 5 Feb 2011 10:19:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Feb 2011 10:19:57 -0000 Received: (qmail 81795 invoked by uid 500); 5 Feb 2011 10:19:57 -0000 Delivered-To: apmail-hadoop-mapreduce-dev-archive@hadoop.apache.org Received: (qmail 81423 invoked by uid 500); 5 Feb 2011 10:19:54 -0000 Mailing-List: contact mapreduce-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-dev@hadoop.apache.org Delivered-To: mailing list mapreduce-dev@hadoop.apache.org Received: (qmail 81415 invoked by uid 99); 5 Feb 2011 10:19:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Feb 2011 10:19:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of eslam.elnikety@gmail.com designates 209.85.216.176 as permitted sender) Received: from [209.85.216.176] (HELO mail-qy0-f176.google.com) (209.85.216.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Feb 2011 10:19:44 +0000 Received: by qyk10 with SMTP id 10so2421883qyk.14 for ; Sat, 05 Feb 2011 02:19:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=E74Ix9cwnh9UGiSqqUKYyFVa7od19+bYgwzojW9f7OM=; b=VqgfmvsFPCGTIQbTyYNc/z0URc7LXTqdfJIgN8M7vWrQy4+guNJlxNjmQnHvUUg2Y8 hMEZeAqmiCNNUzobKpqieBDRKMxXkhscS0cToxN+vmG7uZLIkaM6VaJMP1hj1jK9OxNV rnSOF6HHQG301tGKGafCFRHRfuFJsVeWnMdk0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=XGCS+lG3aZjWWrvov/IRxRIe0/9ZJAw7a3ZCIqj6qlHVSkEGHyJXRiqytbntq6lhKA k0L2x8ynE8NTksFBzJuDY8Vm75RsWIyG8rC3i+OE8UIxTnWACA5CYvnczH3pdZeHYWLX pUSVMKtkrH3jxITKAHNSPeWVAsSD/XWi2/+Ek= MIME-Version: 1.0 Received: by 10.229.102.86 with SMTP id f22mr193433qco.217.1296901163519; Sat, 05 Feb 2011 02:19:23 -0800 (PST) Received: by 10.229.87.69 with HTTP; Sat, 5 Feb 2011 02:19:23 -0800 (PST) Date: Sat, 5 Feb 2011 13:19:23 +0300 Message-ID: Subject: Reducer-Mapper Communication From: Eslam Elnikety To: mapreduce-dev@hadoop.apache.org Content-Type: multipart/alternative; boundary=0023544714b42910cc049b86551a X-Virus-Checked: Checked by ClamAV on apache.org --0023544714b42910cc049b86551a Content-Type: text/plain; charset=ISO-8859-1 Dear all, I need to pass data from a reducer task to a mapper task. Currently, I am testing Hadoop in a pseudo-distributed mode. The reducer (org.apache.hadoop.mapred.ReduceTask) executes the following code: InetAddress address = InetAddress.*getByName*("localhost"); serverSocket = *new* ServerSocket(port, 0, address); socket = serverSocket.accept(); outStream = *new* ObjectOutputStream(socket.getOutputStream()); where the mapper (org.apache.hadoop.mapred.MapTask) executes: InetAddress address = InetAddress.*getByName*("localhost"); socket = *new* Socket(address, port); inStream = *new* ObjectInputStream(socket.getInputStream()); The variable port has the same value in both mapper and reducer, and is dynamically assigned after scanning for a free port on localhost. The scenario goes like this: 1) The reducer listens correctly on the port (I checked it with netstat) 2) The mapper throws a java.net.ConnectException: Connection refused I can connect to that open port using a test program from both localhost/remote machine using the same code of the mapper while the ReduceTask is waiting on serverSocket.accept(). It only fails when this code is executed by the mapper. I have tried to replace localhost with loopback (127.0.0.1), and eth0 IP address, but I just get the same behavior as described above. Any suggestions what might be causing the problem? Thanks! Regards, Elnikety --0023544714b42910cc049b86551a--