Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-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 DBF0118EE3 for ; Tue, 19 May 2015 16:08:30 +0000 (UTC) Received: (qmail 93124 invoked by uid 500); 19 May 2015 16:08:30 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 93093 invoked by uid 500); 19 May 2015 16:08:30 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 93079 invoked by uid 99); 19 May 2015 16:08:30 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 May 2015 16:08:30 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 7DBF31DD547; Tue, 19 May 2015 16:08:29 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5279920755272677102==" MIME-Version: 1.0 Subject: Re: Review Request 34382: Views : AmbariStreamProvider and URLStreamProvider should accept body as Object From: "Nate Cole" To: "Nate Cole" , "Jonathan Hurley" Cc: "Ambari" , "Tom Beerbower" Date: Tue, 19 May 2015 16:08:29 -0000 Message-ID: <20150519160829.14201.74709@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Nate Cole" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/34382/ X-Sender: "Nate Cole" References: <20150519102419.14201.19390@reviews.apache.org> In-Reply-To: <20150519102419.14201.19390@reviews.apache.org> Reply-To: "Nate Cole" X-ReviewRequest-Repository: ambari --===============5279920755272677102== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On May 19, 2015, 6:24 a.m., Nate Cole wrote: > > What's the ultimate goal here? The methods imply you're going down the Object serialization route, which I've seen go Very Badly once JDK support changes. Maybe we can support a type of InputStream method so that the caller decides what to do instead of Ambari? > > Tom Beerbower wrote: > Thanks for reviewing. > > The reason that we are doing this is that the Storm team needs to be able to pass a binary as the body. The Ambari URLStreamProvider already had that signature but when we added a URLStreamProvider interface for views we made the body property a String. I'm not sure why, I think it was just an oversight. So, to support the Storm use case we had to add the new signature but couldn't remove the old without breaking existing views. Thanks for clarifying. - Nate ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34382/#review84294 ----------------------------------------------------------- On May 18, 2015, 8:12 p.m., Tom Beerbower wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/34382/ > ----------------------------------------------------------- > > (Updated May 18, 2015, 8:12 p.m.) > > > Review request for Ambari, Jonathan Hurley and Nate Cole. > > > Bugs: AMBARI-11170 > https://issues.apache.org/jira/browse/AMBARI-11170 > > > Repository: ambari > > > Description > ------- > > Add new signatures to the URLStreamProvider methods that take an Object for the body. The existing methods take a String for the body. Deprecate the existing methods. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/view/ViewAmbariStreamProvider.java d8448b8 > ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java 0b81e04 > ambari-server/src/test/java/org/apache/ambari/server/view/ViewAmbariStreamProviderTest.java 94f5e86 > ambari-server/src/test/java/org/apache/ambari/server/view/ViewURLStreamProviderTest.java 4a265e7 > ambari-views/src/main/java/org/apache/ambari/view/AmbariStreamProvider.java 0f8367a > ambari-views/src/main/java/org/apache/ambari/view/URLStreamProvider.java 2b667e4 > > Diff: https://reviews.apache.org/r/34382/diff/ > > > Testing > ------- > > Manual testing. > > New unit tests. > > mvn clean test > > All tests pass. > > > Thanks, > > Tom Beerbower > > --===============5279920755272677102==--