Return-Path: X-Original-To: apmail-giraph-dev-archive@www.apache.org Delivered-To: apmail-giraph-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D45819F72 for ; Mon, 3 Sep 2012 20:47:19 +0000 (UTC) Received: (qmail 21074 invoked by uid 500); 3 Sep 2012 20:47:19 -0000 Delivered-To: apmail-giraph-dev-archive@giraph.apache.org Received: (qmail 21013 invoked by uid 500); 3 Sep 2012 20:47:19 -0000 Mailing-List: contact dev-help@giraph.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@giraph.apache.org Delivered-To: mailing list dev@giraph.apache.org Delivered-To: moderator for dev@giraph.apache.org Received: (qmail 90341 invoked by uid 99); 3 Sep 2012 18:16:36 -0000 Content-Type: multipart/alternative; boundary="===============3928505121354549764==" MIME-Version: 1.0 Subject: Re: Review Request: GIRAPH-211: Add secure authentication to Netty IPC From: "Eli Reisman" To: "Eugene Koontz" , "Eli Reisman" , "giraph" , "Maja Kabiljo" Date: Mon, 03 Sep 2012 18:16:35 -0000 Message-ID: <20120903181635.583.46654@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Eli Reisman" X-ReviewGroup: giraph X-ReviewRequest-URL: https://reviews.apache.org/r/6609/ X-Sender: "Eli Reisman" References: <20120830033440.27228.72223@reviews.apache.org> In-Reply-To: <20120830033440.27228.72223@reviews.apache.org> Reply-To: "Eli Reisman" --===============3928505121354549764== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable > On Aug. 30, 2012, 3:34 a.m., Eugene Koontz wrote: > > > = > Maja Kabiljo wrote: > Eugene, this seems like a lot of great work, I'm grateful I was advis= ed against trying to solve this issue when I first started :-) > = > When I run "mvn -Phadoop_2.0.1 clean test" I get: = > The requested profile "hadoop_2.0.1" could not be activated because i= t does not exist > And with other profiles this code doesn't compile. > = > When merging with GIRAPH-313 you reverted a few things which were cha= nged there. I removed ServerData from RequestServerHandler and made separat= e handlers for worker and master with the idea that they will have differen= t kinds of data and therefore different methods which can be called on it. = Since right now master communication is not used yet you didn't have any pr= oblems with the tests, and it seems to me this addition won't work well wit= h it. I suggest putting secretManager somewhere else, or we could make Serv= erData abstract and keep the secretManager there and then make two implemen= tations of it, one for worker with current stuff. Also you should return to= calling processRequest instead of request.doRequest in RequestServerHandle= r. Or if you have some better suggestion on how to have different requests = work on different data. > = > Eli Reisman wrote: > Yeah it looks like the patch might have gone a bit stale. This is gre= at work though, I am learning a lot about SASL and our security model just = reading it! I'll be happy to come back and try to review this properly when= the patch is rebased. > = > As for the doRequest/process request thing, I meant to ask about that= change before. Seems like its a good pattern for WritableRequests to meet = a common doRequest-style interface and let whatever any subclass of Writabl= eRequest needs to do happen in there (like the Command pattern.) It does av= oid the unneeded generics and avoids putting the responsibility on the Hand= ler's processRequest() to figure out what each request needs to do, what ty= pe it is, and how to do it. Letting the Handler just call a known API like = doRequest (or call it processRequest) implemented at the Request side and s= upplied with the objects it needs to have side effects on keeps each code p= ath separate in its own WritableRequest object. As long as there's a big re= base to do here anyway, maybe it wouldn't be bad if couple things like that= could get reinstated in some sensible way? > = > Either way, great work. This is crucial for getting rid of the old RP= C and I'll be excited to see this in the codebase! > Never mind, I see doRequest is still in there in the subclasses of the Hand= lers. So processRequest is like this because of the new master communicatio= n channels, and the master one doesn't get a ServerData as input? Fair enou= gh. So Maja: you're saying the trouble for this patch is that the master re= quests don't' get access to the SeverData but the current version of the pa= tch expects one to be there in a request? - Eli ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/6609/#review10873 ----------------------------------------------------------- On Aug. 30, 2012, 1:50 a.m., Eugene Koontz wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/6609/ > ----------------------------------------------------------- > = > (Updated Aug. 30, 2012, 1:50 a.m.) > = > = > Review request for giraph. > = > = > Description > ------- > = > Same patch as: https://issues.apache.org/jira/secure/attachment/12543007/= GIRAPH-211.patch > = > Current limitations: > = > -Not tested on other than hadoop 2.0.1-SNAPSHOT > -Needs useAuth=3Dtrue switch to turn on/off (default =3D off(?)) > = > How to compile and test: > = > mvn -Phadoop_2.0.1 clean test > = > Works with the following test: > = > $HADOOP_RUNTIME/bin/hadoop jar $GIRAPH_DIR/target/giraph-0.2-SNAPSHOT-for= -hadoop-2.0.1-SNAPSHOT-jar-with-dependencies.jar org.apache.giraph.benchmar= k.PageRankBenchmark -Dgiraph.useNetty=3Dtrue -e 2 -s 10 -v -V 2 -w 2 > = > = > This addresses bug GIRAPH-211. > https://issues.apache.org/jira/browse/GIRAPH-211 > = > = > Diffs > ----- > = > src/main/java/org/apache/giraph/comm/BasicRPCCommunications.java bc53b8= 3 = > src/main/java/org/apache/giraph/comm/ServerData.java 68a2044 = > src/main/java/org/apache/giraph/comm/WorkerClient.java c3ec4fe = > src/main/java/org/apache/giraph/comm/netty/NettyClient.java 428b877 = > src/main/java/org/apache/giraph/comm/netty/NettyServer.java 5904908 = > src/main/java/org/apache/giraph/comm/netty/NettyWorkerClient.java 72e79= a9 = > src/main/java/org/apache/giraph/comm/netty/NettyWorkerClientServer.java= b06e0f6 = > src/main/java/org/apache/giraph/comm/netty/SaslNettyClient.java PRE-CRE= ATION = > src/main/java/org/apache/giraph/comm/netty/SaslNettyServer.java PRE-CRE= ATION = > src/main/java/org/apache/giraph/comm/netty/handler/MasterRequestServerH= andler.java 719515d = > src/main/java/org/apache/giraph/comm/netty/handler/RequestServerHandler= .java 6f0fc20 = > src/main/java/org/apache/giraph/comm/netty/handler/ResponseClientHandle= r.java c1c2574 = > src/main/java/org/apache/giraph/comm/netty/handler/WorkerRequestServerH= andler.java e8b6c54 = > src/main/java/org/apache/giraph/comm/requests/NullReply.java PRE-CREATI= ON = > src/main/java/org/apache/giraph/comm/requests/RequestType.java 4fbf692 = > src/main/java/org/apache/giraph/comm/requests/ResponseEncoder.java PRE-= CREATION = > src/main/java/org/apache/giraph/comm/requests/SaslComplete.java PRE-CRE= ATION = > src/main/java/org/apache/giraph/comm/requests/SaslTokenMessage.java PRE= -CREATION = > src/main/java/org/apache/giraph/comm/requests/SendPartitionCurrentMessa= gesRequest.java 7cae1e2 = > src/main/java/org/apache/giraph/comm/requests/SendPartitionMessagesRequ= est.java 6c7ebb6 = > src/main/java/org/apache/giraph/comm/requests/SendPartitionMutationsReq= uest.java d3553c1 = > src/main/java/org/apache/giraph/comm/requests/SendVertexRequest.java 20= 04db4 = > src/main/java/org/apache/giraph/comm/requests/WritableRequest.java a68b= 26a = > = > Diff: https://reviews.apache.org/r/6609/diff/ > = > = > Testing > ------- > = > Tested only on Hadoop 2.0.1-SNAPSHOT : needs testing on other Hadoops. > = > = > Thanks, > = > Eugene Koontz > = > --===============3928505121354549764==--