Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 36B9B11FA0 for ; Tue, 23 Sep 2014 14:54:52 +0000 (UTC) Received: (qmail 14292 invoked by uid 500); 23 Sep 2014 14:28:52 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 5479 invoked by uid 500); 23 Sep 2014 14:28:45 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 99268 invoked by uid 99); 23 Sep 2014 13:42:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2014 13:42:01 +0000 X-ASF-Spam-Status: No, hits=2.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of java8964@hotmail.com designates 65.55.90.78 as permitted sender) Received: from [65.55.90.78] (HELO SNT004-OMC2S3.hotmail.com) (65.55.90.78) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2014 13:41:33 +0000 Received: from SNT149-W2 ([65.55.90.73]) by SNT004-OMC2S3.hotmail.com with Microsoft SMTPSVC(7.5.7601.22724); Tue, 23 Sep 2014 06:41:32 -0700 X-TMN: [n7g86CO0+EIv/y1cJB37et05on3538B8TQhR64QGD8s=] X-Originating-Email: [java8964@hotmail.com] Message-ID: Content-Type: multipart/alternative; boundary="_7e256102-8a8b-4c55-b370-f07ebe58c241_" From: java8964 To: "user@hadoop.apache.org" Subject: RE: is the HDFS BlockReceiver.PacketResponder source code wrong ? Date: Tue, 23 Sep 2014 09:41:32 -0400 Importance: Normal In-Reply-To: References: MIME-Version: 1.0 X-OriginalArrivalTime: 23 Sep 2014 13:41:32.0497 (UTC) FILETIME=[1608A410:01CFD734] X-Virus-Checked: Checked by ClamAV on apache.org --_7e256102-8a8b-4c55-b370-f07ebe58c241_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Why do you say so? Does it cause a bug in your case? If so=2C can you expla= in the problem you are facing? Yong From: qixiangming@hotmail.com To: user@hadoop.apache.org Subject: is the HDFS BlockReceiver.PacketResponder source code wrong ? Date: Tue=2C 23 Sep 2014 07:37:41 +0000 =0A= =0A= =0A= In org.apache.hadoop.hdfs.server.datanode.BlockReceiver class=2C defined a = inner class PacketResponder. =20 in the the contructor of PacketResponder =20 PacketResponder(final DataOutputStream upstreamOut=2C final DataInputStream downstreamIn=2C final DatanodeInfo[] downstreams) { this.downstreamIn =3D downstreamIn=3B this.upstreamOut =3D upstreamOut=3B this.type =3D downstreams =3D=3D null? PacketResponderType.NON_PIPELI= NE : downstreams.length =3D=3D 0? PacketResponderType.LAST_IN_PIPELI= NE : PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE=3B final StringBuilder b =3D new StringBuilder(getClass().getSimpleName(= )) .append(": ").append(block).append("=2C type=3D").append(type)=3B if (type !=3D PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE) { b.append("=2C downstreams=3D").append(downstreams.length) .append(":").append(Arrays.asList(downstreams))=3B } this.myString =3D b.toString()=3B } has there mistakes ?=20 =20 if (type !=3D PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE) { b.append("=2C downstreams=3D").append(downstreams.length) .append(":").append(Arrays.asList(downstreams))=3B } =20 the if criteria shoud be =3D=3D=2C not !=3D =20 =20 = --_7e256102-8a8b-4c55-b370-f07ebe58c241_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Why do you say so? Does it cause= a bug in your case? If so=2C can you explain the problem you are facing?
Yong


From: qixiangmin= g@hotmail.com
To: user@hadoop.apache.org
Subject: is the HDFS BlockRe= ceiver.PacketResponder source code wrong ?
Date: Tue=2C 23 Sep 2014 07:= 37:41 +0000

=0A= =0A= =0A=
In org.apache.hadoop.hdfs.server.datanode.BlockReceiver cl= ass=2C defined a inner class PacketResponder.
 =3B
in the the con= tructor of PacketResponder
 =3B
 =3B =3B =3B PacketRe= sponder(final DataOutputStream upstreamOut=2C
 =3B =3B =3B&n= bsp=3B =3B =3B =3B final DataInputStream downstreamIn=2C
&nb= sp=3B =3B =3B =3B =3B =3B =3B final DatanodeInfo[] = downstreams) {
 =3B =3B =3B =3B =3B this.downstreamI= n =3D downstreamIn=3B
 =3B =3B =3B =3B =3B this.upst= reamOut =3D upstreamOut=3B
 =3B =3B =3B =3B =3B this= .type =3D downstreams =3D=3D null? PacketResponderType.NON_PIPELINE
&nbs= p=3B =3B =3B =3B =3B =3B =3B =3B =3B : down= streams.length =3D=3D 0? PacketResponderType.LAST_IN_PIPELINE
 =3B&n= bsp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B : PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE=3B
=  =3B =3B =3B =3B =3B final StringBuilder b =3D new Stri= ngBuilder(getClass().getSimpleName())
 =3B =3B =3B =3B&n= bsp=3B =3B =3B =3B =3B .append(": ").append(block).append("= =2C type=3D").append(type)=3B
 =3B =3B =3B =3B =3B i= f (type !=3D PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE) {
 =3B&= nbsp=3B =3B =3B =3B =3B =3B b.append("=2C downstreams= =3D").append(downstreams.length)
 =3B =3B =3B =3B = =3B =3B =3B =3B =3B =3B =3B .append(":").append(Arr= ays.asList(downstreams))=3B
 =3B =3B =3B =3B =3B } =3B =3B =3B =3B =3B this.myString =3D b.toString()= =3B
 =3B =3B =3B }

has there mistakes ?
 =3B<= br> =3Bif (type !=3D PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE) {<= br> b.append("=2C downstreams=3D").append(downstreams.length)
= .append(":").append(Arrays.asList(downstreams))=3B
}
&= nbsp=3B
the if criteria shoud be =3D=3D=2C not !=3D
 =3B
 = =3B
= --_7e256102-8a8b-4c55-b370-f07ebe58c241_--