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 05C3C1139A for ; Wed, 14 May 2014 22:15:34 +0000 (UTC) Received: (qmail 14608 invoked by uid 500); 10 May 2014 22:08:55 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 14021 invoked by uid 500); 10 May 2014 22:08:53 -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 13564 invoked by uid 99); 10 May 2014 22:08:53 -0000 Received: from Unknown (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 May 2014 22:08:53 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 4E4161D78DA; Thu, 8 May 2014 14:01:07 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2695694008381583520==" MIME-Version: 1.0 Subject: Re: Review Request 21181: Ability to work on a view as "exploded" to support UI dev From: "Tom Beerbower" To: "Nate Cole" , "Sumit Mohanty" Cc: "Tom Beerbower" , "Ambari" Date: Thu, 08 May 2014 14:01:07 -0000 Message-ID: <20140508140107.25724.78634@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Tom Beerbower" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/21181/ X-Sender: "Tom Beerbower" References: <20140508121217.28778.32260@reviews.apache.org> In-Reply-To: <20140508121217.28778.32260@reviews.apache.org> Reply-To: "Tom Beerbower" X-ReviewRequest-Repository: ambari --===============2695694008381583520== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > On May 8, 2014, 12:12 p.m., Nate Cole wrote: > > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java, lines 701-704 > > > > > > Will this return false on a write protected filesystem, or throw an Exception? For the case where Ambari is running non-root. If an Exception is thrown, it doesn't appear to be caught by the caller? Yeah, good point. I think that it would just return false in that case which would result in an error logged and no views deployed. If a runtime exception is thrown, it will not be caught and the ambari server start will fail. I'll adjust the code and submit a new patch. Thanks! - Tom ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21181/#review42497 ----------------------------------------------------------- On May 7, 2014, 11:19 p.m., Tom Beerbower wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/21181/ > ----------------------------------------------------------- > > (Updated May 7, 2014, 11:19 p.m.) > > > Review request for Ambari, Nate Cole and Sumit Mohanty. > > > Bugs: AMBARI-5702 > https://issues.apache.org/jira/browse/AMBARI-5702 > > > Repository: ambari > > > Description > ------- > > After deploying view JAR, explode the view so that UI resources can be modified without requiring re-deploy or ambari-server restart. > > Developer should be able to make changes to UI code and click "refresh" in browser to pick up the changes. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 532259b > ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java 37862f0 > > Diff: https://reviews.apache.org/r/21181/diff/ > > > Testing > ------- > > Added new unit test. All existing unit tests pass ... > > Results : > > Tests run: 1595, Failures: 0, Errors: 0, Skipped: 9 > ... > > [INFO] ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] ------------------------------------------------------------------------ > [INFO] Total time: 22:19.667s > [INFO] Finished at: Wed May 07 18:19:17 EDT 2014 > [INFO] Final Memory: 36M/123M > [INFO] ------------------------------------------------------------------------ > > Manual test ... > > > 1. Under ambari-views/examples/helloworld-view, build the hello world view example : mvn clean install > 2. Copy the hello world view archive from ambari-views/examples/helloworld-view/target/helloworld-view-1.0.0.jar to the views directory on the Ambari server : /var/lib/ambari-server/resources/views > 3. Start the Ambari server : ambari-server start > 4. Check to see that the hello world view has been exploded. Under /var/lib/ambari-server/resources/views/work you should see a new folder HELLO_WORLD{1.0.0} > 5. Verify through the API that the view is deployed : http://c6401.ambari.apache.org:8080/api/v1/views/ > 6. Verify through the API that the view instance is available : http://c6401.ambari.apache.org:8080/api/v1/views/HELLO_WORLD/versions/1.0.0/instances/INSTANCE_1 > 7. Note the context path in the response : "context_path" : "/views/HELLO_WORLD/1.0.0/INSTANCE_1" > 8. Access the view UI : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello world!' in the browser. > 9. Modify the index.html file in the view : /var/lib/ambari-server/resources/views/work/HELLO_WORLD\{1.0.0\}/index.html. Change 'Hello world!' to 'Hello TOM!' > 10. Refresh the browser : http://c6401.ambari.apache.org:8080/views/HELLO_WORLD/1.0.0/INSTANCE_1/. You should see 'Hello TOM!'. > > > Thanks, > > Tom Beerbower > > --===============2695694008381583520==--