You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org> on 2015/10/23 04:46:33 UTC

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Ian Maxon has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/468

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................

ASTERIXDB-1153: Determine build information at runtime

WIP. This still needs tests, but it works. Just do a GET against /admin/version.

Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
---
M .gitignore
M asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
A asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
M asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
A asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
M asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
M asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
M asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
M pom.xml
9 files changed, 199 insertions(+), 33 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/68/468/1

diff --git a/.gitignore b/.gitignore
index 189af35..b75b189 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@
 .idea/
 asterix.ipr
 asterix.iws
+git.properties
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java b/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
index 35afd8b..ab22773 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
@@ -24,14 +24,7 @@
 
 import org.apache.asterix.common.api.AsterixThreadExecutor;
 import org.apache.asterix.common.api.IAsterixAppRuntimeContext;
-import org.apache.asterix.common.config.AsterixCompilerProperties;
-import org.apache.asterix.common.config.AsterixExternalProperties;
-import org.apache.asterix.common.config.AsterixFeedProperties;
-import org.apache.asterix.common.config.AsterixMetadataProperties;
-import org.apache.asterix.common.config.AsterixPropertiesAccessor;
-import org.apache.asterix.common.config.AsterixStorageProperties;
-import org.apache.asterix.common.config.AsterixTransactionProperties;
-import org.apache.asterix.common.config.IAsterixPropertiesProvider;
+import org.apache.asterix.common.config.*;
 import org.apache.asterix.common.context.AsterixFileMapManager;
 import org.apache.asterix.common.context.DatasetLifecycleManager;
 import org.apache.asterix.common.exceptions.ACIDException;
@@ -95,6 +88,7 @@
     private AsterixStorageProperties storageProperties;
     private AsterixTransactionProperties txnProperties;
     private AsterixFeedProperties feedProperties;
+    private AsterixBuildProperties buildProperties;
 
     private AsterixThreadExecutor threadExecutor;
     private DatasetLifecycleManager indexLifecycleManager;
@@ -118,6 +112,7 @@
         storageProperties = new AsterixStorageProperties(ASTERIX_PROPERTIES_ACCESSOR);
         txnProperties = new AsterixTransactionProperties(ASTERIX_PROPERTIES_ACCESSOR);
         feedProperties = new AsterixFeedProperties(ASTERIX_PROPERTIES_ACCESSOR);
+        buildProperties = new AsterixBuildProperties(ASTERIX_PROPERTIES_ACCESSOR);
     }
 
     public void initialize() throws IOException, ACIDException, AsterixException {
@@ -249,6 +244,11 @@
     }
 
     @Override
+    public AsterixBuildProperties getBuildProperties() {
+        return buildProperties;
+    }
+
+    @Override
     public List<IVirtualBufferCache> getVirtualBufferCaches(int datasetID) {
         return indexLifecycleManager.getVirtualBufferCaches(datasetID);
     }
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
new file mode 100644
index 0000000..0f83370
--- /dev/null
+++ b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
@@ -0,0 +1,34 @@
+package org.apache.asterix.api.http.servlet;
+
+import org.apache.asterix.api.common.SessionConfig;
+import org.apache.asterix.common.config.AsterixBuildProperties;
+import org.apache.asterix.common.config.AsterixPropertiesAccessor;
+import org.apache.asterix.hyracks.bootstrap.CCApplicationEntryPoint;
+import org.apache.asterix.om.util.AsterixAppContextInfo;
+import org.apache.hadoop.http.HttpServer;
+import org.json.JSONObject;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Map;
+
+public class VersionAPIServlet extends HttpServlet {
+
+    private static final String ASTERIX_BUILD_PROP_ATTR = "org.apache.asterix.PROPS";
+
+    @Override
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        ServletContext context = getServletContext();
+        AsterixAppContextInfo props = (AsterixAppContextInfo) context.getAttribute(ASTERIX_BUILD_PROP_ATTR);
+        Map<String, String> buildProperties = props.getBuildProperties().getAllProps();
+        JSONObject responseObject = new JSONObject(buildProperties);
+        response.setCharacterEncoding("utf-8");
+        PrintWriter responseWriter =  response.getWriter();
+        responseWriter.write(responseObject.toString());
+        response.setStatus(HttpServletResponse.SC_OK);
+    }
+}
diff --git a/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java b/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
index 1ad34da..974b2d4 100644
--- a/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
+++ b/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
@@ -21,21 +21,13 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import org.apache.asterix.api.http.servlet.*;
+import org.apache.asterix.common.config.AsterixBuildProperties;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.eclipse.jetty.util.component.AbstractLifeCycle;
 
-import org.apache.asterix.api.http.servlet.APIServlet;
-import org.apache.asterix.api.http.servlet.AQLAPIServlet;
-import org.apache.asterix.api.http.servlet.ConnectorAPIServlet;
-import org.apache.asterix.api.http.servlet.DDLAPIServlet;
-import org.apache.asterix.api.http.servlet.FeedServlet;
-import org.apache.asterix.api.http.servlet.QueryAPIServlet;
-import org.apache.asterix.api.http.servlet.QueryResultAPIServlet;
-import org.apache.asterix.api.http.servlet.QueryStatusAPIServlet;
-import org.apache.asterix.api.http.servlet.ShutdownAPIServlet;
-import org.apache.asterix.api.http.servlet.UpdateAPIServlet;
 import org.apache.asterix.common.api.AsterixThreadFactory;
 import org.apache.asterix.common.config.AsterixExternalProperties;
 import org.apache.asterix.common.config.AsterixMetadataProperties;
@@ -57,6 +49,7 @@
     private static final Logger LOGGER = Logger.getLogger(CCApplicationEntryPoint.class.getName());
 
     private static final String HYRACKS_CONNECTION_ATTR = "org.apache.asterix.HYRACKS_CONNECTION";
+    private static final String ASTERIX_BUILD_PROP_ATTR = "org.apache.asterix.PROPS";
 
     private Server webServer;
     private Server jsonAPIServer;
@@ -89,7 +82,7 @@
         AsterixExternalProperties externalProperties = AsterixAppContextInfo.getInstance().getExternalProperties();
         setupWebServer(externalProperties);
         webServer.start();
-
+        AsterixBuildProperties buildProperties = AsterixAppContextInfo.getInstance().getBuildProperties();
         setupJSONAPIServer(externalProperties);
         jsonAPIServer.start();
 
@@ -160,6 +153,9 @@
 
         IHyracksClientConnection hcc = getNewHyracksClientConnection();
         context.setAttribute(HYRACKS_CONNECTION_ATTR, hcc);
+        context.setAttribute(ASTERIX_BUILD_PROP_ATTR, AsterixAppContextInfo.getInstance());
+
+
 
         jsonAPIServer.setHandler(context);
         context.addServlet(new ServletHolder(new QueryAPIServlet()), "/query");
@@ -170,6 +166,7 @@
         context.addServlet(new ServletHolder(new AQLAPIServlet()), "/aql");
         context.addServlet(new ServletHolder(new ConnectorAPIServlet()), "/connector");
         context.addServlet(new ServletHolder(new ShutdownAPIServlet()), "/admin/shutdown");
+        context.addServlet(new ServletHolder(new VersionAPIServlet()), "/admin/version");
     }
 
     private void setupFeedServer(AsterixExternalProperties externalProperties) throws Exception {
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java b/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
new file mode 100644
index 0000000..9e5c91c
--- /dev/null
+++ b/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
@@ -0,0 +1,95 @@
+package org.apache.asterix.common.config;
+
+import java.util.Map;
+import java.util.Properties;
+
+public class AsterixBuildProperties extends AbstractAsterixProperties {
+
+    public AsterixBuildProperties(AsterixPropertiesAccessor accessor) {
+        super(accessor);
+    }
+
+    public String getuserEmail() {
+        return accessor.getProperty("git.build.user.email", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getbuildHost() {
+        return accessor.getProperty("git.build.host", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getdirty() {
+        return accessor.getProperty("git.dirty", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getremoteOriginUrl() {
+        return accessor.getProperty("git.remote.origin.url", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getclosestTagName() {
+        return accessor.getProperty("git.closest.tag.name", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getcommitIdDescribeShort() {
+        return accessor.getProperty("git.commit.id.describe-short", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getcommitUserEmail() {
+        return accessor.getProperty("git.commit.user.email", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getcommitTime() {
+        return accessor.getProperty("git.commit.time", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getcommitMessage() {
+        return accessor.getProperty("git.commit.message.full", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getbuildVersion() {
+        return accessor.getProperty("git.build.version", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getcommitMessageShort() {
+        return accessor.getProperty("git.commit.message.short", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getshortCommitId() {
+        return accessor.getProperty("git.commit.id.abbrev", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getbranch() {
+        return accessor.getProperty("git.branch", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getbuildUserName() {
+        return accessor.getProperty("git.build.user.name", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getclosestTagCommitCount() {
+        return accessor.getProperty("git.closest.tag.commit.count", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getcommitIdDescribe() {
+        return accessor.getProperty("git.commit.id.describe", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getcommitId() {
+        return accessor.getProperty("git.commit.id", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String gettags() {
+        return accessor.getProperty("git.tags", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getbuildTime() {
+        return accessor.getProperty("git.build.time", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getcommitUserName() {
+        return accessor.getProperty("git.commit.user.name", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+    public Map<String, String> getAllProps(){
+        return accessor.getBuildProperties();
+    }
+
+}
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java b/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
index 76dfe4f..64bf9bc 100644
--- a/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
+++ b/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
@@ -20,12 +20,9 @@
 
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.io.InputStream;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
@@ -50,6 +47,7 @@
     private final Map<String, String> coredumpConfig;
     private final Map<String, Property> asterixConfigurationParams;
     private final Map<String, String> transactionLogDirs;
+    private final Map<String, String> asterixBuildProperties;
 
     public AsterixPropertiesAccessor() throws AsterixException {
         String fileName = System.getProperty(GlobalConfig.CONFIG_FILE_PROPERTY);
@@ -96,6 +94,13 @@
         for (TransactionLogDir txnLogDir : asterixConfiguration.getTransactionLogDir()) {
             transactionLogDirs.put(txnLogDir.getNcId(), txnLogDir.getTxnLogDirPath());
         }
+        Properties p = new Properties();
+        try{
+            p.load(getClass().getClassLoader().getResourceAsStream("git.properties"));
+            asterixBuildProperties = new HashMap<String, String>((Map)p);
+        }catch(IOException e){
+            throw new AsterixException(e);
+        }
 
     }
 
@@ -127,6 +132,10 @@
         return coredumpConfig;
     }
 
+    public Map<String, String> getBuildProperties(){
+        return asterixBuildProperties;
+    }
+
     public void putCoredumpPaths(String nodeId, String coredumpPath) {
         if (coredumpConfig.containsKey(nodeId)) {
             throw new IllegalStateException("Cannot override value for coredump path");
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java b/asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
index d7ff0eb..93c58be 100644
--- a/asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
+++ b/asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
@@ -30,4 +30,6 @@
     public AsterixExternalProperties getExternalProperties();
     
     public AsterixFeedProperties getFeedProperties();
+
+    AsterixBuildProperties getBuildProperties();
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java b/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
index 9f076f2..36bf7d8 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
@@ -20,14 +20,7 @@
 
 import java.util.logging.Logger;
 
-import org.apache.asterix.common.config.AsterixCompilerProperties;
-import org.apache.asterix.common.config.AsterixExternalProperties;
-import org.apache.asterix.common.config.AsterixFeedProperties;
-import org.apache.asterix.common.config.AsterixMetadataProperties;
-import org.apache.asterix.common.config.AsterixPropertiesAccessor;
-import org.apache.asterix.common.config.AsterixStorageProperties;
-import org.apache.asterix.common.config.AsterixTransactionProperties;
-import org.apache.asterix.common.config.IAsterixPropertiesProvider;
+import org.apache.asterix.common.config.*;
 import org.apache.asterix.common.dataflow.IAsterixApplicationContextInfo;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.transaction.management.service.transaction.AsterixRuntimeComponentsProvider;
@@ -52,6 +45,7 @@
     private AsterixStorageProperties storageProperties;
     private AsterixTransactionProperties txnProperties;
     private AsterixFeedProperties feedProperties;
+    private AsterixBuildProperties buildProperties;
 
     private IHyracksClientConnection hcc;
 
@@ -67,6 +61,7 @@
         INSTANCE.txnProperties = new AsterixTransactionProperties(propertiesAccessor);
         INSTANCE.feedProperties = new AsterixFeedProperties(propertiesAccessor);
         INSTANCE.hcc = hcc;
+        INSTANCE.buildProperties = new AsterixBuildProperties(propertiesAccessor);
         Logger.getLogger("org.apache").setLevel(INSTANCE.externalProperties.getLogLevel());
     }
 
@@ -113,7 +108,12 @@
     public AsterixFeedProperties getFeedProperties() {
         return feedProperties;
     }
-    
+
+    @Override
+    public AsterixBuildProperties getBuildProperties() {
+        return buildProperties;
+    }
+
     public IHyracksClientConnection getHcc() {
         return hcc;
     }
diff --git a/pom.xml b/pom.xml
index 71c2b2c..7e257c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -179,6 +179,34 @@
                    <compilerArgument>-Xlint:all</compilerArgument>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>pl.project13.maven</groupId>
+                <artifactId>git-commit-id-plugin</artifactId>
+                <version>2.2.0</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>revision</goal>
+                         </goals>
+                    </execution>
+                </executions>
+
+                <configuration>
+                    <!--
+                        If you'd like to tell the plugin where your .git directory is,
+                        use this setting, otherwise we'll perform a search trying to
+                        figure out the right directory. It's better to add it explicite IMHO.
+                    -->
+                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
+                    <!-- this is false by default, forces the plugin to generate the git.properties file -->
+                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
+
+                    <!-- The path for the to be generated properties file, it's relative to ${project.basedir} -->
+                    <generateGitPropertiesFilename>src/main/resources/git.properties</generateGitPropertiesFilename>
+                </configuration>
+
+            </plugin>
+            <!-- END OF GIT COMMIT ID PLUGIN CONFIGURATION -->
         </plugins>
         <pluginManagement>
             <plugins>

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/419/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 2: Verified+1

Build Successful 

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/418/ : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 8: Code-Review+2

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 8
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/417/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/418/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 3: Verified+1

Build Successful 

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/419/ : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 2:

I don't think that it's a problem as we don't ship it or link the product with it. However, everything else being equal, I'd prefer something with a more permissive license over a LGPL solution.

P.S. I'd also like to mention that I think that this a great feature. I wanted to have this for a long time, but when I last looked (a few years ago) I didn't find it ..

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

    https://asterix-gerrit.ics.uci.edu/468

to look at the new patch set (#4).

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................

ASTERIXDB-1153: Determine build information at runtime

Very simple API. Just do a GET against /admin/version and get all of the build-time git info in JSON.

Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
---
M .gitignore
M asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
M asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
A asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
M asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
A asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
A asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
M asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
M asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
M asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
M pom.xml
11 files changed, 356 insertions(+), 18 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/68/468/4
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 8: Verified+1

Build Successful 

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/445/ : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 8
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 5:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/424/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 2:

Would it be feasible to get a comparable result using the MIT-licensed buildnumber plugin [1] instead of the LGPLed maven-git-commit-id-plugin [2]?

[1] http://www.mojohaus.org/buildnumber-maven-plugin/
[2] https://github.com/ktoso/maven-git-commit-id-plugin/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/423/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 7: Verified-1

Build Failed 

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/442/ : FAILURE

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 7
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ian Maxon has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 2:

I suppose so, but is a LGPL maven plugin a problem? I'm not modifying the plugin in any way. It really is just a library.

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 8:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/445/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 8
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 7:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/442/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 7
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 6:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/440/

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

    https://asterix-gerrit.ics.uci.edu/468

to look at the new patch set (#6).

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................

ASTERIXDB-1153: Determine build information at runtime

Very simple API. Just do a GET against /admin/version and get all of the build-time git info in JSON.

Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
---
M .gitignore
M asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
M asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
A asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
M asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
A asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
A asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
M asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
M asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
M asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
M pom.xml
11 files changed, 358 insertions(+), 7 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/68/468/6
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 5: Verified+1

Build Successful 

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/424/ : SUCCESS

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 4: Verified-1

Build Failed 

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/423/ : ABORTED

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

    https://asterix-gerrit.ics.uci.edu/468

to look at the new patch set (#7).

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................

ASTERIXDB-1153: Determine build information at runtime

Very simple API. Just do a GET against /admin/version and get all of the build-time git info in JSON.

Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
---
M .gitignore
M asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
M asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
A asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
M asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
A asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
A asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
M asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
M asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
M asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
M pom.xml
11 files changed, 358 insertions(+), 7 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/68/468/7
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 7
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 3:

(9 comments)

Looks generally good, but the are a number of formatting items that look like you've used another formatter than usual.
Should we fix those or am I mis-remembering?

https://asterix-gerrit.ics.uci.edu/#/c/468/3/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
File asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java:

Line 27: import org.apache.asterix.common.config.*;
I thought we didn't do *-includes ...


https://asterix-gerrit.ics.uci.edu/#/c/468/3/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
File asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java:

Line 24: import org.apache.asterix.api.http.servlet.*;
* include ?


https://asterix-gerrit.ics.uci.edu/#/c/468/3/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
File asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java:

Line 54: import java.util.*;
* includes?


Line 57: import static org.mockito.Mockito.*;
* includes?


https://asterix-gerrit.ics.uci.edu/#/c/468/3/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
File asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java:

Line 31:     public String getuserEmail() {
The capitalization for these methods seems strange. Is there a reason for this?


Line 32:         return accessor.getProperty("git.build.user.email", "", PropertyInterpreters.getStringPropertyInterpreter());
Just to make those lines shorter I'd create a private function that takes the accessor and the property name and returns the property value and use that to implement all others .. but that's probably just me :)


https://asterix-gerrit.ics.uci.edu/#/c/468/3/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
File asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java:

Line 25: import java.util.*;
* includes?


Line 103:         }
Shouldn't there be whitespace between the keywords and the curly braces?


https://asterix-gerrit.ics.uci.edu/#/c/468/3/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
File asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java:

Line 23: import org.apache.asterix.common.config.*;
* includes?


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: Yes

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

    https://asterix-gerrit.ics.uci.edu/468

to look at the new patch set (#2).

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................

ASTERIXDB-1153: Determine build information at runtime

WIP. This still needs tests, but it works. Just do a GET against /admin/version.

Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
---
M .gitignore
M asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
A asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
M asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
A asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
M asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
M asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
M asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
M pom.xml
9 files changed, 236 insertions(+), 33 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/68/468/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ian Maxon has submitted this change and it was merged.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


ASTERIXDB-1153: Determine build information at runtime

Very simple API. Just do a GET against /admin/version and get all of the build-time git info in JSON.

Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Reviewed-on: https://asterix-gerrit.ics.uci.edu/468
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>
---
M .gitignore
M asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
M asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
A asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
M asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
A asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
A asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
M asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
M asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
M asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
M pom.xml
11 files changed, 358 insertions(+), 7 deletions(-)

Approvals:
  Till Westmann: Looks good to me, approved
  Jenkins: Verified



diff --git a/.gitignore b/.gitignore
index 189af35..b75b189 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,4 @@
 .idea/
 asterix.ipr
 asterix.iws
+git.properties
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java b/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
index 35afd8b..2a15384 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
@@ -27,6 +27,7 @@
 import org.apache.asterix.common.config.AsterixCompilerProperties;
 import org.apache.asterix.common.config.AsterixExternalProperties;
 import org.apache.asterix.common.config.AsterixFeedProperties;
+import org.apache.asterix.common.config.AsterixBuildProperties;
 import org.apache.asterix.common.config.AsterixMetadataProperties;
 import org.apache.asterix.common.config.AsterixPropertiesAccessor;
 import org.apache.asterix.common.config.AsterixStorageProperties;
@@ -95,6 +96,7 @@
     private AsterixStorageProperties storageProperties;
     private AsterixTransactionProperties txnProperties;
     private AsterixFeedProperties feedProperties;
+    private AsterixBuildProperties buildProperties;
 
     private AsterixThreadExecutor threadExecutor;
     private DatasetLifecycleManager indexLifecycleManager;
@@ -118,6 +120,7 @@
         storageProperties = new AsterixStorageProperties(ASTERIX_PROPERTIES_ACCESSOR);
         txnProperties = new AsterixTransactionProperties(ASTERIX_PROPERTIES_ACCESSOR);
         feedProperties = new AsterixFeedProperties(ASTERIX_PROPERTIES_ACCESSOR);
+        buildProperties = new AsterixBuildProperties(ASTERIX_PROPERTIES_ACCESSOR);
     }
 
     public void initialize() throws IOException, ACIDException, AsterixException {
@@ -249,6 +252,11 @@
     }
 
     @Override
+    public AsterixBuildProperties getBuildProperties() {
+        return buildProperties;
+    }
+
+    @Override
     public List<IVirtualBufferCache> getVirtualBufferCaches(int datasetID) {
         return indexLifecycleManager.getVirtualBufferCaches(datasetID);
     }
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
index 7db0c94..e13ac8e 100644
--- a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
+++ b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
@@ -53,9 +53,9 @@
 abstract class RESTAPIServlet extends HttpServlet {
     private static final long serialVersionUID = 1L;
 
-    private static final String HYRACKS_CONNECTION_ATTR = "org.apache.asterix.HYRACKS_CONNECTION";
+    public static final String HYRACKS_CONNECTION_ATTR = "org.apache.asterix.HYRACKS_CONNECTION";
 
-    private static final String HYRACKS_DATASET_ATTR = "org.apache.asterix.HYRACKS_DATASET";
+    public static final String HYRACKS_DATASET_ATTR = "org.apache.asterix.HYRACKS_DATASET";
 
     /**
      * Initialize the Content-Type of the response, and construct a
diff --git a/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
new file mode 100644
index 0000000..f98bb06
--- /dev/null
+++ b/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.api.http.servlet;
+
+import org.apache.asterix.api.common.SessionConfig;
+import org.apache.asterix.common.config.AsterixBuildProperties;
+import org.apache.asterix.common.config.AsterixPropertiesAccessor;
+import org.apache.asterix.hyracks.bootstrap.CCApplicationEntryPoint;
+import org.apache.asterix.om.util.AsterixAppContextInfo;
+import org.apache.hadoop.http.HttpServer;
+import org.json.JSONObject;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Map;
+
+public class VersionAPIServlet extends HttpServlet {
+
+    public static final String ASTERIX_BUILD_PROP_ATTR = "org.apache.asterix.PROPS";
+
+    @Override
+    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        ServletContext context = getServletContext();
+        AsterixAppContextInfo props = (AsterixAppContextInfo) context.getAttribute(ASTERIX_BUILD_PROP_ATTR);
+        Map<String, String> buildProperties = props.getBuildProperties().getAllProps();
+        JSONObject responseObject = new JSONObject(buildProperties);
+        response.setCharacterEncoding("utf-8");
+        PrintWriter responseWriter =  response.getWriter();
+        responseWriter.write(responseObject.toString());
+        response.setStatus(HttpServletResponse.SC_OK);
+        responseWriter.flush();
+    }
+}
diff --git a/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java b/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
index 1ad34da..11ea546 100644
--- a/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
+++ b/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
@@ -36,6 +36,8 @@
 import org.apache.asterix.api.http.servlet.QueryStatusAPIServlet;
 import org.apache.asterix.api.http.servlet.ShutdownAPIServlet;
 import org.apache.asterix.api.http.servlet.UpdateAPIServlet;
+import org.apache.asterix.api.http.servlet.VersionAPIServlet;
+import org.apache.asterix.common.config.AsterixBuildProperties;
 import org.apache.asterix.common.api.AsterixThreadFactory;
 import org.apache.asterix.common.config.AsterixExternalProperties;
 import org.apache.asterix.common.config.AsterixMetadataProperties;
@@ -57,6 +59,7 @@
     private static final Logger LOGGER = Logger.getLogger(CCApplicationEntryPoint.class.getName());
 
     private static final String HYRACKS_CONNECTION_ATTR = "org.apache.asterix.HYRACKS_CONNECTION";
+    private static final String ASTERIX_BUILD_PROP_ATTR = "org.apache.asterix.PROPS";
 
     private Server webServer;
     private Server jsonAPIServer;
@@ -89,7 +92,7 @@
         AsterixExternalProperties externalProperties = AsterixAppContextInfo.getInstance().getExternalProperties();
         setupWebServer(externalProperties);
         webServer.start();
-
+        AsterixBuildProperties buildProperties = AsterixAppContextInfo.getInstance().getBuildProperties();
         setupJSONAPIServer(externalProperties);
         jsonAPIServer.start();
 
@@ -160,6 +163,9 @@
 
         IHyracksClientConnection hcc = getNewHyracksClientConnection();
         context.setAttribute(HYRACKS_CONNECTION_ATTR, hcc);
+        context.setAttribute(ASTERIX_BUILD_PROP_ATTR, AsterixAppContextInfo.getInstance());
+
+
 
         jsonAPIServer.setHandler(context);
         context.addServlet(new ServletHolder(new QueryAPIServlet()), "/query");
@@ -170,6 +176,7 @@
         context.addServlet(new ServletHolder(new AQLAPIServlet()), "/aql");
         context.addServlet(new ServletHolder(new ConnectorAPIServlet()), "/connector");
         context.addServlet(new ServletHolder(new ShutdownAPIServlet()), "/admin/shutdown");
+        context.addServlet(new ServletHolder(new VersionAPIServlet()), "/admin/version");
     }
 
     private void setupFeedServer(AsterixExternalProperties externalProperties) throws Exception {
@@ -186,4 +193,4 @@
 
         // add paths here
     }
-}
\ No newline at end of file
+}
diff --git a/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java b/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
new file mode 100644
index 0000000..25ba2a6
--- /dev/null
+++ b/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.asterix.api.http.servlet;
+
+import junit.framework.Assert;
+import org.apache.asterix.common.config.AsterixBuildProperties;
+import org.apache.asterix.om.util.AsterixAppContextInfo;
+import org.apache.asterix.test.runtime.ExecutionTest;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+import org.json.JSONObject;
+import org.json.JSONTokener;
+import org.junit.Test;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Map;
+
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.when;
+
+
+@SuppressWarnings("deprecation")
+public class VersionAPIServletTest {
+
+    @Test
+    public void testGet() throws Exception {
+        // Starts test asterixdb cluster.
+        ExecutionTest.setUp();
+
+        // Configures a test version api servlet.
+        VersionAPIServlet servlet = spy(new VersionAPIServlet());
+        ServletConfig mockServletConfig = mock(ServletConfig.class);
+        servlet.init(mockServletConfig);
+        Map<String, String> propMap = new HashMap<String, String>();
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        PrintWriter outputWriter = new PrintWriter(outputStream);
+
+        // Creates mocks.
+        ServletContext mockContext = mock(ServletContext.class);
+        AsterixAppContextInfo mockCtx = mock(AsterixAppContextInfo.class);
+        HttpServletRequest mockRequest = mock(HttpServletRequest.class);
+        IHyracksClientConnection mockHcc = mock(IHyracksClientConnection.class);
+        HttpServletResponse mockResponse = mock(HttpServletResponse.class);
+        AsterixBuildProperties mockProperties = mock(AsterixBuildProperties.class);
+
+        // Sets up mock returns.
+        when(servlet.getServletContext()).thenReturn(mockContext);
+        when(mockResponse.getWriter()).thenReturn(outputWriter);
+        when(mockContext.getAttribute(RESTAPIServlet.HYRACKS_CONNECTION_ATTR)).thenReturn(mockHcc);
+        when(mockContext.getAttribute(VersionAPIServlet.ASTERIX_BUILD_PROP_ATTR)).thenReturn(mockCtx);
+        when(mockCtx.getBuildProperties()).thenReturn(mockProperties);
+        when(mockProperties.getAllProps()).thenReturn(propMap);
+
+        propMap.put("git.build.user.email","foo@bar.baz");
+        propMap.put("git.build.host","fulliautomatix");
+        propMap.put("git.dirty","true");
+        propMap.put("git.remote.origin.url","git@github.com:apache/incubator-asterixdb.git");
+        propMap.put("git.closest.tag.name","asterix-0.8.7-incubating");
+        propMap.put("git.commit.id.describe-short","asterix-0.8.7-incubating-19-dirty");
+        propMap.put("git.commit.user.email","foo@bar.baz");
+        propMap.put("git.commit.time","21.10.2015 @ 23:36:41 PDT");
+        propMap.put("git.commit.message.full","ASTERIXDB-1045: fix log file reading during recovery\n\nChange-Id: Ic83ee1dd2d7ba88180c25f4ec6c7aa8d0a5a7162\nReviewed-on: https://asterix-gerrit.ics.uci.edu/465\nTested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>");
+        propMap.put("git.build.version","0.8.8-SNAPSHOT");
+        propMap.put("git.commit.message.short","ASTERIXDB-1045: fix log file reading during recovery");
+        propMap.put("git.commit.id.abbrev","e1dad19");
+        propMap.put("git.branch","foo/bar");
+        propMap.put("git.build.user.name","Asterix");
+        propMap.put("git.closest.tag.commit.count","19");
+        propMap.put("git.commit.id.describe","asterix-0.8.7-incubating-19-ge1dad19-dirty");
+        propMap.put("git.commit.id","e1dad1984640517366a7e73e323c9de27b0676f7");
+        propMap.put("git.tags","");
+        propMap.put("git.build.time","22.10.2015 @ 17:11:07 PDT");
+        propMap.put("git.commit.user.name","Obelix");
+
+        // Calls VersionAPIServlet.formResponseObject.
+        servlet.doGet(mockRequest, mockResponse);
+
+        // Constructs the actual response.
+        JSONTokener tokener = new JSONTokener(new InputStreamReader(
+                new ByteArrayInputStream(outputStream.toByteArray())));
+        JSONObject actualResponse = new JSONObject(tokener);
+        JSONObject expectedResponse = new JSONObject(propMap);
+
+        // Checks the response contains all the expected keys.
+        Assert.assertEquals(actualResponse.toString(),expectedResponse.toString());
+
+        // Tears down the asterixdb cluster.
+        ExecutionTest.tearDown();
+    }
+}
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java b/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
new file mode 100644
index 0000000..e065bec
--- /dev/null
+++ b/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.asterix.common.config;
+
+import java.util.Map;
+import java.util.Properties;
+
+public class AsterixBuildProperties extends AbstractAsterixProperties {
+
+    public AsterixBuildProperties(AsterixPropertiesAccessor accessor) {
+        super(accessor);
+    }
+
+    public String getUserEmail() {
+        return accessor.getProperty("git.build.user.email", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getBuildHost() {
+        return accessor.getProperty("git.build.host", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getDirty() {
+        return accessor.getProperty("git.dirty", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getRemoteOriginUrl() {
+        return accessor.getProperty("git.remote.origin.url", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getClosestTagName() {
+        return accessor.getProperty("git.closest.tag.name", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getCommitIdDescribeShort() {
+        return accessor.getProperty("git.commit.id.describe-short", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getCommitUserEmail() {
+        return accessor.getProperty("git.commit.user.email", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getCommitTime() {
+        return accessor.getProperty("git.commit.time", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getCommitMessage() {
+        return accessor.getProperty("git.commit.message.full", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getBuildVersion() {
+        return accessor.getProperty("git.build.version", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getCommitMessageShort() {
+        return accessor.getProperty("git.commit.message.short", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getShortCommitId() {
+        return accessor.getProperty("git.commit.id.abbrev", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getBranch() {
+        return accessor.getProperty("git.branch", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getBuildUserName() {
+        return accessor.getProperty("git.build.user.name", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getClosestTagCommitCount() {
+        return accessor.getProperty("git.closest.tag.commit.count", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getCommitIdDescribe() {
+        return accessor.getProperty("git.commit.id.describe", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getCommitId() {
+        return accessor.getProperty("git.commit.id", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getTags() {
+        return accessor.getProperty("git.tags", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getBuildTime() {
+        return accessor.getProperty("git.build.time", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+
+    public String getCommitUserName() {
+        return accessor.getProperty("git.commit.user.name", "", PropertyInterpreters.getStringPropertyInterpreter());
+    }
+    public Map<String, String> getAllProps(){
+        return accessor.getBuildProperties();
+    }
+
+}
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java b/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
index 76dfe4f..647b032 100644
--- a/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
+++ b/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
@@ -20,14 +20,16 @@
 
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.io.InputStream;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import java.util.Properties;
 
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBException;
@@ -50,6 +52,7 @@
     private final Map<String, String> coredumpConfig;
     private final Map<String, Property> asterixConfigurationParams;
     private final Map<String, String> transactionLogDirs;
+    private final Map<String, String> asterixBuildProperties;
 
     public AsterixPropertiesAccessor() throws AsterixException {
         String fileName = System.getProperty(GlobalConfig.CONFIG_FILE_PROPERTY);
@@ -96,6 +99,13 @@
         for (TransactionLogDir txnLogDir : asterixConfiguration.getTransactionLogDir()) {
             transactionLogDirs.put(txnLogDir.getNcId(), txnLogDir.getTxnLogDirPath());
         }
+        Properties p = new Properties();
+        try {
+            p.load(getClass().getClassLoader().getResourceAsStream("git.properties"));
+            asterixBuildProperties = new HashMap<String, String>((Map)p);
+        } catch(IOException e) {
+            throw new AsterixException(e);
+        }
 
     }
 
@@ -127,6 +137,10 @@
         return coredumpConfig;
     }
 
+    public Map<String, String> getBuildProperties(){
+        return asterixBuildProperties;
+    }
+
     public void putCoredumpPaths(String nodeId, String coredumpPath) {
         if (coredumpConfig.containsKey(nodeId)) {
             throw new IllegalStateException("Cannot override value for coredump path");
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java b/asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
index d7ff0eb..93c58be 100644
--- a/asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
+++ b/asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
@@ -30,4 +30,6 @@
     public AsterixExternalProperties getExternalProperties();
     
     public AsterixFeedProperties getFeedProperties();
+
+    AsterixBuildProperties getBuildProperties();
 }
diff --git a/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java b/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
index 9f076f2..8f9f577 100644
--- a/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
+++ b/asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
@@ -23,6 +23,7 @@
 import org.apache.asterix.common.config.AsterixCompilerProperties;
 import org.apache.asterix.common.config.AsterixExternalProperties;
 import org.apache.asterix.common.config.AsterixFeedProperties;
+import org.apache.asterix.common.config.AsterixBuildProperties;
 import org.apache.asterix.common.config.AsterixMetadataProperties;
 import org.apache.asterix.common.config.AsterixPropertiesAccessor;
 import org.apache.asterix.common.config.AsterixStorageProperties;
@@ -52,6 +53,7 @@
     private AsterixStorageProperties storageProperties;
     private AsterixTransactionProperties txnProperties;
     private AsterixFeedProperties feedProperties;
+    private AsterixBuildProperties buildProperties;
 
     private IHyracksClientConnection hcc;
 
@@ -67,6 +69,7 @@
         INSTANCE.txnProperties = new AsterixTransactionProperties(propertiesAccessor);
         INSTANCE.feedProperties = new AsterixFeedProperties(propertiesAccessor);
         INSTANCE.hcc = hcc;
+        INSTANCE.buildProperties = new AsterixBuildProperties(propertiesAccessor);
         Logger.getLogger("org.apache").setLevel(INSTANCE.externalProperties.getLogLevel());
     }
 
@@ -113,7 +116,12 @@
     public AsterixFeedProperties getFeedProperties() {
         return feedProperties;
     }
-    
+
+    @Override
+    public AsterixBuildProperties getBuildProperties() {
+        return buildProperties;
+    }
+
     public IHyracksClientConnection getHcc() {
         return hcc;
     }
diff --git a/pom.xml b/pom.xml
index 9f02d63..1923fd0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -179,6 +179,34 @@
                    <compilerArgument>-Xlint:all</compilerArgument>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>pl.project13.maven</groupId>
+                <artifactId>git-commit-id-plugin</artifactId>
+                <version>2.2.0</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>revision</goal>
+                         </goals>
+                    </execution>
+                </executions>
+
+                <configuration>
+                    <!--
+                        If you'd like to tell the plugin where your .git directory is,
+                        use this setting, otherwise we'll perform a search trying to
+                        figure out the right directory. It's better to add it explicite IMHO.
+                    -->
+                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
+                    <!-- this is false by default, forces the plugin to generate the git.properties file -->
+                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
+
+                    <!-- The path for the to be generated properties file, it's relative to ${project.basedir} -->
+                    <generateGitPropertiesFilename>src/main/resources/git.properties</generateGitPropertiesFilename>
+                </configuration>
+
+            </plugin>
+            <!-- END OF GIT COMMIT ID PLUGIN CONFIGURATION -->
         </plugins>
         <pluginManagement>
             <plugins>

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 9
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ian Maxon has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 2:

The buildnumber should work but it's a lot less featured it seems. It also looks like it's getting the info for the commit sha from the <scm> tag, which might not work for how we build things. This plugin actually looks at the .git/ folder and uses jgit to parse it in.

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 6: Verified-1

Build Unstable 

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/440/ : UNSTABLE

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 5:

(2 comments)

Still 1 file left. Also, if you are touching it anyway, maybe we could have less personal info in VersionAPIServletTest.java? I know that this is public information anyway as it is in a public git repo, but somehow it doesn't feel right seeing the names and addresses in the source code ...

https://asterix-gerrit.ics.uci.edu/#/c/468/5/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
File asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java:

Line 25: import java.util.*;
* includes


Line 98:         try{
WS around braces


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: Yes

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ian Maxon has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 3:

(6 comments)

https://asterix-gerrit.ics.uci.edu/#/c/468/3/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
File asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java:

Line 27: import org.apache.asterix.common.config.*;
> I thought we didn't do *-includes ...
Done


https://asterix-gerrit.ics.uci.edu/#/c/468/3/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
File asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java:

Line 24: import org.apache.asterix.api.http.servlet.*;
> * include ?
Done


https://asterix-gerrit.ics.uci.edu/#/c/468/3/asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
File asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java:

Line 54: import java.util.*;
> * includes?
Done


Line 57: import static org.mockito.Mockito.*;
> * includes?
Done


https://asterix-gerrit.ics.uci.edu/#/c/468/3/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
File asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java:

Line 31:     public String getuserEmail() {
> The capitalization for these methods seems strange. Is there a reason for t
Nope, fixed.


Line 32:         return accessor.getProperty("git.build.user.email", "", PropertyInterpreters.getStringPropertyInterpreter());
> Just to make those lines shorter I'd create a private function that takes t
I made this all in vim block edit mode, so it's not any easier to do it that way :p


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: Yes

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ian Maxon has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 5:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/468/5/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
File asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java:

Line 25: import java.util.*;
> * includes
Done


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: Yes

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ian Maxon has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 6:

Should be fine now, scrubbed out all the names and such.

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 6:

(2 comments)

https://asterix-gerrit.ics.uci.edu/#/c/468/6/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
File asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java:

Line 103:         try{
space between "try" and "{"?


Line 106:         }catch(IOException e){
spaces between "}" and "catch" and between ")" and "{"?


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: Yes

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

    https://asterix-gerrit.ics.uci.edu/468

to look at the new patch set (#3).

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................

ASTERIXDB-1153: Determine build information at runtime

Very simple API. Just do a GET against /admin/version and get all of the build-time git info in JSON.

Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
---
M .gitignore
M asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
M asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
A asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
M asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
A asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
A asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
M asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
M asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
M asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
M pom.xml
11 files changed, 366 insertions(+), 35 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/68/468/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

    https://asterix-gerrit.ics.uci.edu/468

to look at the new patch set (#5).

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................

ASTERIXDB-1153: Determine build information at runtime

Very simple API. Just do a GET against /admin/version and get all of the build-time git info in JSON.

Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
---
M .gitignore
M asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
M asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
A asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
M asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
A asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
A asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
M asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
M asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
M asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
M pom.xml
11 files changed, 356 insertions(+), 10 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/68/468/5
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 1: Verified-1

Build Failed 

https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/417/ : FAILURE

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ian Maxon has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 6:

(2 comments)

https://asterix-gerrit.ics.uci.edu/#/c/468/6/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
File asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java:

Line 103:         try{
> space between "try" and "{"?
Done


Line 106:         }catch(IOException e){
> spaces between "}" and "catch" and between ")" and "{"?
Done


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 6
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: Yes

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Ian Maxon has posted comments on this change.

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................


Patch Set 5:

*ping* :) Does this look good now? I think I got all the formatting issues resolved (hopefully)

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 5
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No

Change in asterixdb[master]: ASTERIXDB-1153: Determine build information at runtime

Posted by "Ian Maxon (Code Review)" <do...@asterixdb.incubator.apache.org>.
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

    https://asterix-gerrit.ics.uci.edu/468

to look at the new patch set (#8).

Change subject: ASTERIXDB-1153: Determine build information at runtime
......................................................................

ASTERIXDB-1153: Determine build information at runtime

Very simple API. Just do a GET against /admin/version and get all of the build-time git info in JSON.

Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
---
M .gitignore
M asterix-app/src/main/java/org/apache/asterix/api/common/AsterixAppRuntimeContext.java
M asterix-app/src/main/java/org/apache/asterix/api/http/servlet/RESTAPIServlet.java
A asterix-app/src/main/java/org/apache/asterix/api/http/servlet/VersionAPIServlet.java
M asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
A asterix-app/src/test/java/org/apache/asterix/api/http/servlet/VersionAPIServletTest.java
A asterix-common/src/main/java/org/apache/asterix/common/config/AsterixBuildProperties.java
M asterix-common/src/main/java/org/apache/asterix/common/config/AsterixPropertiesAccessor.java
M asterix-common/src/main/java/org/apache/asterix/common/config/IAsterixPropertiesProvider.java
M asterix-om/src/main/java/org/apache/asterix/om/util/AsterixAppContextInfo.java
M pom.xml
11 files changed, 358 insertions(+), 7 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/68/468/8
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/468
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie392eb0cdbd25f2f4679fba12aae4c7a496e9637
Gerrit-PatchSet: 8
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Ian Maxon <im...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>