Return-Path: X-Original-To: apmail-geode-issues-archive@minotaur.apache.org Delivered-To: apmail-geode-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3B03418259 for ; Mon, 22 Jun 2015 19:32:25 +0000 (UTC) Received: (qmail 84445 invoked by uid 500); 22 Jun 2015 19:32:25 -0000 Delivered-To: apmail-geode-issues-archive@geode.apache.org Received: (qmail 84410 invoked by uid 500); 22 Jun 2015 19:32:25 -0000 Mailing-List: contact issues-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list issues@geode.incubator.apache.org Received: (qmail 84401 invoked by uid 99); 22 Jun 2015 19:32:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2015 19:32:25 +0000 X-ASF-Spam-Status: No, hits=-2001.4 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 22 Jun 2015 19:30:14 +0000 Received: (qmail 83078 invoked by uid 99); 22 Jun 2015 19:32:01 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2015 19:32:01 +0000 Date: Mon, 22 Jun 2015 19:32:01 +0000 (UTC) From: "William Markito Oliveira (JIRA)" To: issues@geode.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-20) Allow REST web API to be launched. Eliminate duplicate code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GEODE-20?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D145965= 05#comment-14596505 ]=20 William Markito Oliveira commented on GEODE-20: ----------------------------------------------- Thanks Wes, a couple of comments here: You already had a pull request open for this change and I don't think this = one looks different, can you confirm so I'll go ahead and close the #2. - https://github.com/apache/incubator-geode/pull/9 - https://github.com/apache/incubator-geode/pull/2=20 There is a failing due to the need for GEMFIRE enviroment variable: {code} Class com.gemstone.gemfire.management.internal.AgentUtilJUnitTest java.lang.AssertionError: The GEMFIRE environment variable must be set! {code} I'm going to work on this... Looks like this test would actually be an Inte= grationTest and really a UnitTest so I'm moving it gemfire-assembly, so gem= fire-web-api would be already built and in place in order to test.=20 > Allow REST web API to be launched. Eliminate duplicate code > ----------------------------------------------------------- > > Key: GEODE-20 > URL: https://issues.apache.org/jira/browse/GEODE-20 > Project: Geode > Issue Type: Bug > Components: management & tools > Affects Versions: 1.0.0-incubating > Reporter: Wes Williams > Assignee: Wes Williams > Fix For: 1.0.0-incubating > > Original Estimate: 168h > Remaining Estimate: 168h > > GitHub user wwilliams-pivotal opened a pull request: > https://github.com/apache/incubator-geode/pull/2 > Allow REST web API to be launched. Eliminate duplicate code > - Refactored duplicate code into a common class > - Changed the return for the web rest dev api to return gemfire-web-a= pi instead of gemfire-web > - Applied standard formatting conventions against the existing classe= s per code policy > - Added unit test to check for existence of gemfire-web-api jar > You can merge this pull request into a Git repository by running: > $ git pull https://github.com/wwilliams-pivotal/incubator-geode maste= r > Alternatively you can review and apply these changes as the patch at: > https://github.com/apache/incubator-geode/pull/2.patch > To close this pull request, make a commit to your master/trunk branch > with (at least) the following in the commit message: > This closes #2 > To make the review simpler, the only two material changes are below. All = of the rest is/ (should be) duplicate code refactoring or source code forma= tting according to the conventions that Anthony sent out earlier. > ManagementAgent > - > - //Find developer REST WAR file > - final String gemfireAPIWar =3D getGemFireAPIWarLocation(gemfireHo= me); > + > + // Find developer REST WAR file > + final String gemfireAPIWar =3D agentUtil.getGemFireWebApiWarLocati= on(); > =E2=80=8BRestAgent > - > - final String gemfireAPIWar =3D getGemFireAPIWarLocation(gemfireHom= e); > - if(gemfireAPIWar =3D=3D null){ > - logger.info("Unable to find GemFire Developer REST API WAR file; t= he Developer REST API for GemFire will not be exported and accessible."); > + final String gemfireAPIWar =3D agentUtil.getGemFireWebApiWarLocation= (); > + if (gemfireAPIWar =3D=3D null) { -- This message was sent by Atlassian JIRA (v6.3.4#6332)