Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 4: Integration Tests Successful https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/587/ : SUCCESS -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Michael Blow has submitted this change and it was merged. Change subject: Expose Asterix Configuration on Cluster Servlet .. Expose Asterix Configuration on Cluster Servlet Also, a few test executor improvements Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Reviewed-on: https://asterix-gerrit.ics.uci.edu/1153 Sonar-Qube: JenkinsReviewed-by: Till Westmann Tested-by: Jenkins Integration-Tests: Jenkins --- M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java A asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql A asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.cstate.aql A asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.adm M asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractAsterixProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixCompilerProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixExternalProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixFeedProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixReplicationProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixStorageProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixTransactionProperties.java M asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java M asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AbstractExecutionIT.java M asterixdb/asterix-server/src/test/java/org/apache/asterix/server/test/NCServiceExecutionIT.java 15 files changed, 350 insertions(+), 78 deletions(-) Approvals: Till Westmann: Looks good to me, approved Jenkins: Verified; No violations found; Verified diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java index c7cf1ea..8a16cd7 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java @@ -20,12 +20,16 @@ import java.io.IOException; import java.io.PrintWriter; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.asterix.app.result.ResultUtil; +import org.apache.asterix.common.config.AbstractAsterixProperties; import org.apache.asterix.runtime.util.AsterixClusterProperties; import org.json.JSONException; import org.json.JSONObject; @@ -40,7 +44,9 @@ PrintWriter responseWriter = response.getWriter(); try { JSONObject responseObject = AsterixClusterProperties.INSTANCE.getClusterStateDescription(); -responseWriter.write(responseObject.toString()); +Map allProperties = getAllClusterProperties(); +responseObject.put("config", allProperties); +responseWriter.write(responseObject.toString(4)); response.setStatus(HttpServletResponse.SC_OK); } catch (JSONException e) { ResultUtil.apiErrorHandler(responseWriter, e); @@ -48,4 +54,16 @@ } responseWriter.flush(); } + +protected Map getAllClusterProperties() { +Map allProperties = new HashMap<>(); +for (AbstractAsterixProperties properties : getPropertiesInstances()) { +allProperties.putAll(properties.getProperties()); +} +return allProperties; +} + +protected List getPropertiesInstances() { +return AbstractAsterixProperties.getImplementations(); +} } diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql new file mode 100644 index 000..517b5b0 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 4: Integration-Tests+1 Integration Tests Successful https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/586/ : SUCCESS -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 4: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/587/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Till Westmann has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 4: Code-Review+2 -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 4: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/586/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Michael Blow has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 4: TRIGGER asterix-gerrit-integration-tests -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 4: Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2553/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Hello Jenkins, I'd like you to reexamine a change. Please visit https://asterix-gerrit.ics.uci.edu/1153 to look at the new patch set (#4). Change subject: Expose Asterix Configuration on Cluster Servlet .. Expose Asterix Configuration on Cluster Servlet Also, a few test executor improvements Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d --- M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java A asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql A asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.cstate.aql A asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.adm M asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractAsterixProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixCompilerProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixExternalProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixFeedProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixReplicationProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixStorageProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixTransactionProperties.java M asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java M asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AbstractExecutionIT.java M asterixdb/asterix-server/src/test/java/org/apache/asterix/server/test/NCServiceExecutionIT.java 15 files changed, 350 insertions(+), 78 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/53/1153/4 -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 3: Integration-Tests-1 Integration Tests Failed https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/585/ : UNSTABLE -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 3: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/585/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Hello Jenkins, I'd like you to reexamine a change. Please visit https://asterix-gerrit.ics.uci.edu/1153 to look at the new patch set (#3). Change subject: Expose Asterix Configuration on Cluster Servlet .. Expose Asterix Configuration on Cluster Servlet Also, a few test executor improvements Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d --- M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java A asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql A asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.cstate.aql A asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.adm M asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractAsterixProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixCompilerProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixExternalProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixFeedProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixReplicationProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixStorageProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixTransactionProperties.java M asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java M asterixdb/asterix-installer/src/test/java/org/apache/asterix/installer/test/AbstractExecutionIT.java M asterixdb/asterix-server/src/test/java/org/apache/asterix/server/test/NCServiceExecutionIT.java 15 files changed, 350 insertions(+), 78 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/53/1153/3 -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 2: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/584/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 2: Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2551/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Michael Blow has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 1: (3 comments) Tests added. https://asterix-gerrit.ics.uci.edu/#/c/1153/1/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixReplicationProperties.java File asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixReplicationProperties.java: Line 198: @PropertyKey("replication.factor") > Introduce a constant? Done Line 209: @PropertyKey("replication.timeout") > Introduce a constant? Done Line 260: @PropertyKey("replication.max.remote.recovery.attempts") > Introduce a constant? Done -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Michael Blow Gerrit-Reviewer: Till Westmann Gerrit-HasComments: Yes
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Hello Jenkins, I'd like you to reexamine a change. Please visit https://asterix-gerrit.ics.uci.edu/1153 to look at the new patch set (#2). Change subject: Expose Asterix Configuration on Cluster Servlet .. Expose Asterix Configuration on Cluster Servlet Also, a few test executor improvements Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d --- M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java A asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql A asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_2/cluster_state_2.1.cstate.aql A asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.adm M asterixdb/asterix-app/src/test/resources/runtimets/testsuite.xml M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractAsterixProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixCompilerProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixExternalProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixFeedProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixReplicationProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixStorageProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixTransactionProperties.java M asterixdb/asterix-common/src/test/java/org/apache/asterix/test/aql/TestExecutor.java 14 files changed, 337 insertions(+), 76 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/53/1153/2 -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 2 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Till Westmann has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 1: (3 comments) Very nice! But I think that we should also add a test of 2. It seems that the TestExecutor already has some support for testing this endpoint - not sure if we also have tests for it ... https://asterix-gerrit.ics.uci.edu/#/c/1153/1/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixReplicationProperties.java File asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixReplicationProperties.java: Line 198: @PropertyKey("replication.factor") Introduce a constant? Line 209: @PropertyKey("replication.timeout") Introduce a constant? Line 260: @PropertyKey("replication.max.remote.recovery.attempts") Introduce a constant? -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-HasComments: Yes
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 1: Integration-Tests+1 Integration Tests Successful https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/580/ : SUCCESS -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 1: Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/580/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Jenkins has posted comments on this change. Change subject: Expose Asterix Configuration on Cluster Servlet .. Patch Set 1: Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2544/ -- To view, visit https://asterix-gerrit.ics.uci.edu/1153 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Michael BlowGerrit-Reviewer: Jenkins Gerrit-HasComments: No
Change in asterixdb[master]: Expose Asterix Configuration on Cluster Servlet
Michael Blow has uploaded a new change for review. https://asterix-gerrit.ics.uci.edu/1153 Change subject: Expose Asterix Configuration on Cluster Servlet .. Expose Asterix Configuration on Cluster Servlet Change-Id: I828d6a61afe615f7826079ede4b1d638bbd7ac5d --- M asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractAsterixProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixCompilerProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixExternalProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixFeedProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixReplicationProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixStorageProperties.java M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AsterixTransactionProperties.java 8 files changed, 165 insertions(+), 38 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/53/1153/1 diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java index c7cf1ea..8a16cd7 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/ClusterAPIServlet.java @@ -20,12 +20,16 @@ import java.io.IOException; import java.io.PrintWriter; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.asterix.app.result.ResultUtil; +import org.apache.asterix.common.config.AbstractAsterixProperties; import org.apache.asterix.runtime.util.AsterixClusterProperties; import org.json.JSONException; import org.json.JSONObject; @@ -40,7 +44,9 @@ PrintWriter responseWriter = response.getWriter(); try { JSONObject responseObject = AsterixClusterProperties.INSTANCE.getClusterStateDescription(); -responseWriter.write(responseObject.toString()); +MapallProperties = getAllClusterProperties(); +responseObject.put("config", allProperties); +responseWriter.write(responseObject.toString(4)); response.setStatus(HttpServletResponse.SC_OK); } catch (JSONException e) { ResultUtil.apiErrorHandler(responseWriter, e); @@ -48,4 +54,16 @@ } responseWriter.flush(); } + +protected Map getAllClusterProperties() { +Map allProperties = new HashMap<>(); +for (AbstractAsterixProperties properties : getPropertiesInstances()) { +allProperties.putAll(properties.getProperties()); +} +return allProperties; +} + +protected List getPropertiesInstances() { +return AbstractAsterixProperties.getImplementations(); +} } diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractAsterixProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractAsterixProperties.java index e68676e..845483e 100644 --- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractAsterixProperties.java +++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/AbstractAsterixProperties.java @@ -18,10 +18,49 @@ */ package org.apache.asterix.common.config; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + public abstract class AbstractAsterixProperties { +private static final Logger LOGGER = Logger.getLogger(AbstractAsterixProperties.class.getName()); +private static final List IMPLS = Collections.synchronizedList(new ArrayList<>()); + protected final AsterixPropertiesAccessor accessor; public AbstractAsterixProperties(AsterixPropertiesAccessor accessor) { this.accessor = accessor; +IMPLS.add(this); +} + +public Map getProperties() { +Map properties = new HashMap<>(); +for (Method m : getClass().getMethods()) { +PropertyKey key = m.getAnnotation(PropertyKey.class); +if (key !=