Return-Path: X-Original-To: apmail-reef-dev-archive@minotaur.apache.org Delivered-To: apmail-reef-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 951E117F17 for ; Wed, 8 Oct 2014 17:12:06 +0000 (UTC) Received: (qmail 66932 invoked by uid 500); 8 Oct 2014 17:12:06 -0000 Delivered-To: apmail-reef-dev-archive@reef.apache.org Received: (qmail 66906 invoked by uid 500); 8 Oct 2014 17:12:06 -0000 Mailing-List: contact dev-help@reef.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@reef.incubator.apache.org Delivered-To: mailing list dev@reef.incubator.apache.org Received: (qmail 66895 invoked by uid 99); 8 Oct 2014 17:12:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2014 17:12:06 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of yunseong.lee@me.com designates 17.172.81.0 as permitted sender) Received: from [17.172.81.0] (HELO st11p00mm-asmtp001.mac.com) (17.172.81.0) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2014 17:12:01 +0000 Received: from localhost (unknown [125.186.179.12]) by st11p00mm-asmtp001.mac.com (Oracle Communications Messaging Server 7u4-27.10(7.0.4.27.9) 64bit (built Jun 6 2014)) with ESMTPSA id <0ND400MC8YFCXA80@st11p00mm-asmtp001.mac.com> for dev@reef.incubator.apache.org; Wed, 08 Oct 2014 17:11:40 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.12.52,1.0.28,0.0.0000 definitions=2014-10-08_08:2014-10-08,2014-10-08,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1410080144 Date: Thu, 09 Oct 2014 02:11:30 +0900 From: Yunseong Lee To: dev@reef.incubator.apache.org Message-id: In-reply-to: References: Subject: Re: Question about Reef-webserver X-Mailer: Airmail (247) MIME-version: 1.0 Content-type: multipart/alternative; boundary=54357047_257130a3_aed9 X-Virus-Checked: Checked by ClamAV on apache.org --54357047_257130a3_aed9 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Thanks for the explanation in detail Yingda, Markus and Julia. Now I understand why users are not always able to set the port number. But I still have a question about binding parameter. I already tried to b= ind a port number as you suggested: =C2=A0 final Configuration httpServerConfiguration =3D Tang.=46actory.get= Tang().newConfigurationBuilder()=C2=A0 =C2=A0 .bindNamedParameter(PortNumber.class, =229000=22)=C2=A0 =C2=A0 .build();=C2=A0 However, since PortNumber is not a public class, it is not available to u= se in my class so that I could not bind the parameter. Would you please let me know if I missed some point=3F Thank you. - Yunseong I tried the way Julia suggested, but PortNumber is not a public class,=C2= =A0 On October 9, 2014 at 1:07:01 AM, Markus Weimer (weimer=40apache.org) wro= te: Hi, =20 mostly: What Yingda said. =20 Typically, we are on clusters with shared machines where one physical =20 machine (and IP address) hosts multiple containers. Assuming that any one= =20 particular port is available for us isn't possible. Hence, the constructo= r =20 of HttpServerImpl tries different ports until an available one is found. = In =20 the case of the Driver, we use the found port in order to register the =20 application with the resource manager to enable discovery through the RM,= =20 which is part of the infrastructure of the cluster and therefore a known = =20 entity. =20 The way HttpServerImpl does this searchfor a port is configurable, but it= =20 starts with com.microsoft.reef.webserver.PortNumber, which defaults =20 to 8080. If you want to start the search elsewhere, you can bind a =20 different value to that named parameter. =20 Hope this helps, =20 Markus =20 On Wed, Oct 8, 2014 at 7:15 AM, Yingda Chen wrote: =20 > We had similar discussions before, and for most usage cases, we depend = on =20 > YARN to do the http traffic forwarding, which will automatically find t= he =20 > port used by Reef (AM) http server. =20 > =20 > I agree that allowing user to set port can provide more flexibility, bu= t =20 > with flexibility also comes some uncertainty - since we cannot guarante= e =20 > that the port specified by the user can be used, as another application= may =20 > already be using that. In fact, on a multi-tenant cluster where multipl= e =20 > Reef applications are running, port-collision is inevitable. I guess we= can =20 > still do it and make it clear to the user that REE=46 can only bind the= port =20 > on a best-effort basis. I am open to that discussion :) =20 > =20 > -Yingda =20 > =20 > On Wed, Oct 8, 2014 at 3:21 AM, Yunseong Lee wr= ote: =20 > =20 > > Hi, I am building an application using Reef-webserver and I have a =20 > > question. =20 > > =20 > > Is there a way to set a port number other than the default value(8080= )=3F =20 > > =20 > > As far as I have found, HttpServer does not have a method to set the = port =20 > > number. =20 > > I found some tests binding PortNumber via Configuration, but since =20 > > PortNumber is not a public class =20 > > it is not available outside the package. =20 > > =20 > > In my opinion, it is reasonable to allow user to set the port number.= =20 > > When another application reserved 8080 port, I found the app and =20 > > reef-webserver both go wrong. =20 > > =20 > > Any thoughts=3F =20 > > =20 > > Thank you. =20 > > - Yunseong =20 > =20 --54357047_257130a3_aed9--