You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/03/20 14:45:32 UTC
[1/3] incubator-usergrid git commit: Resolves class loader problems
during test
Repository: incubator-usergrid
Updated Branches:
refs/heads/USERGRID-480 d6bcf4bf3 -> f7e78f4a6
Resolves class loader problems during test
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/0a16033c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/0a16033c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/0a16033c
Branch: refs/heads/USERGRID-480
Commit: 0a16033c3fa4c3f093a58bbdb39f323c2958e5a5
Parents: 8ea46ba
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Mar 19 18:31:34 2015 -0600
Committer: Todd Nine <tn...@apigee.com>
Committed: Thu Mar 19 19:47:22 2015 -0600
----------------------------------------------------------------------
stack/core/pom.xml | 7 +++----
stack/pom.xml | 6 ++++--
stack/rest/pom.xml | 1 +
stack/services/pom.xml | 1 +
4 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/0a16033c/stack/core/pom.xml
----------------------------------------------------------------------
diff --git a/stack/core/pom.xml b/stack/core/pom.xml
index 971ee62..d053211 100644
--- a/stack/core/pom.xml
+++ b/stack/core/pom.xml
@@ -88,10 +88,9 @@
<forkCount>${usergrid.it.forkCount}</forkCount>
<threadCount>${usergrid.it.threads}</threadCount>
<reuseForks>true</reuseForks>
- <argLine>-Dtest.barrier.timestamp=${maven.build.timestamp} -Dtest.clean.storage=true -Xmx${ug.heapmax}
- -Xms${ug.heapmin} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8
- -javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline}
- </argLine>
+ <argLine>-Dtest.barrier.timestamp=${maven.build.timestamp} -Dtest.clean.storage=true -Xmx${ug.heapmax} -Xms${ug.heapmin} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline} </argLine>
+ <!-- see this page for documentation on classloading issues http://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html -->
+ <useSystemClassLoader>false</useSystemClassLoader>
<includes>
<include>**/*IT.java</include>
<include>**/*Test.java</include>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/0a16033c/stack/pom.xml
----------------------------------------------------------------------
diff --git a/stack/pom.xml b/stack/pom.xml
index f24917a..6126046 100644
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@ -109,7 +109,7 @@
<jersey-version>1.18.1</jersey-version>
<junit-version>4.12</junit-version>
<log4j-version>1.2.16</log4j-version>
- <org.springframework.version>3.1.2.RELEASE</org.springframework.version>
+ <org.springframework.version>3.2.13.RELEASE</org.springframework.version>
<shiro-version>1.2.3</shiro-version>
<slf4j-version>1.6.1</slf4j-version>
<snakeyaml-version>1.8</snakeyaml-version>
@@ -1461,6 +1461,8 @@
<forkCount>${usergrid.it.forkCount}</forkCount>
<reuseForks>${usergrid.it.reuseForks}</reuseForks>
<threadCount>${usergrid.it.forkCount}</threadCount>
+ <!-- see this page for documentation on classloading issues http://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html -->
+ <useSystemClassLoader>false</useSystemClassLoader>
<argLine>-Xmx${ug.heapmax} -Xms${ug.heapmin} -javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline}</argLine>
<testFailureIgnore>false</testFailureIgnore>
</configuration>
@@ -1471,7 +1473,7 @@
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
- <artifactId>surefire-junit4</artifactId>
+ <artifactId>${surefire.plugin.artifactName}</artifactId>
<version>${surefire.plugin.version}</version>
<!--<exclusions>-->
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/0a16033c/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index deb11f8..974945f 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -102,6 +102,7 @@
<parallel>methods</parallel>
<forkCount>1</forkCount>
<threadCount>${usergrid.rest.threads}</threadCount>
+ <useSystemClassLoader>false</useSystemClassLoader>
<reuseForks>true</reuseForks>
<argLine>-Dwebapp.directory=${basedir}/src/main/webapp -Dtest.barrier.timestamp=${maven.build.timestamp} -Dtest.clean.storage=true -Xmx${ug.heapmax} -Xms${ug.heapmin} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline}
</argLine>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/0a16033c/stack/services/pom.xml
----------------------------------------------------------------------
diff --git a/stack/services/pom.xml b/stack/services/pom.xml
index 68f1a4a..6074e65 100644
--- a/stack/services/pom.xml
+++ b/stack/services/pom.xml
@@ -92,6 +92,7 @@
<forkCount>${usergrid.it.forkCount}</forkCount>
<threadCount>${usergrid.it.threads}</threadCount>
<reuseForks>${usergrid.it.reuseForks}</reuseForks>
+ <useSystemClassLoader>false</useSystemClassLoader>
<argLine>-Dtest.barrier.timestamp=${maven.build.timestamp} -Dtest.clean.storage=true -Xmx${ug.heapmax} -Xms${ug.heapmin} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline}
</argLine>
<includes>
[3/3] incubator-usergrid git commit: adding refresh retry
Posted by sf...@apache.org.
adding refresh retry
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/f7e78f4a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/f7e78f4a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/f7e78f4a
Branch: refs/heads/USERGRID-480
Commit: f7e78f4a65cca60c4f4ba064a872331a0d820843
Parents: 51a38fc
Author: Shawn Feldman <sf...@apache.org>
Authored: Fri Mar 20 07:45:22 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Fri Mar 20 07:45:22 2015 -0600
----------------------------------------------------------------------
.../test/resources/usergrid-custom-test.properties | 1 +
.../persistence/index/impl/EsEntityIndexImpl.java | 17 +++++++++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f7e78f4a/stack/core/src/test/resources/usergrid-custom-test.properties
----------------------------------------------------------------------
diff --git a/stack/core/src/test/resources/usergrid-custom-test.properties b/stack/core/src/test/resources/usergrid-custom-test.properties
index 949b60e..fe528fd 100644
--- a/stack/core/src/test/resources/usergrid-custom-test.properties
+++ b/stack/core/src/test/resources/usergrid-custom-test.properties
@@ -24,4 +24,5 @@ cassandra.connections=1000
#This is just way more efficient for a single node and the number of shards we're creating
elasticsearch.number_shards=1
elasticsearch.number_replicas=0
+elasticsearch.index_prefix=core_tests
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f7e78f4a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
index 1eb73d3..18c3d67 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
@@ -35,6 +35,7 @@ import org.apache.usergrid.persistence.model.util.UUIDGenerator;
import org.elasticsearch.action.ActionFuture;
+import org.elasticsearch.action.ShardOperationFailedException;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest;
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
import org.elasticsearch.action.admin.cluster.tasks.PendingClusterTasksRequest;
@@ -47,6 +48,7 @@ import org.elasticsearch.action.admin.indices.alias.IndicesAliasesResponse;
import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse;
+import org.elasticsearch.action.admin.indices.refresh.RefreshResponse;
import org.elasticsearch.client.AdminClient;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
@@ -346,9 +348,20 @@ public class EsEntityIndexImpl implements AliasedEntityIndex {
return true;
}
//Added For Graphite Metrics
- esProvider.getClient().admin().indices().prepareRefresh( indexes ).execute().actionGet();
+ RefreshResponse response = esProvider.getClient().admin().indices().prepareRefresh( indexes ).execute().actionGet();
+ int failedShards = response.getFailedShards();
+ int successfulShards = response.getSuccessfulShards();
+ ShardOperationFailedException[] sfes = response.getShardFailures();
+ if(sfes!=null) {
+ for (ShardOperationFailedException sfe : sfes) {
+ logger.error("Failed to refresh index:{} reason:{}", sfe.index(), sfe.reason());
+ }
+ }
+ logger.debug("Refreshed indexes: {},success:{} failed:{} ", StringUtils.join(indexes, ", "),successfulShards,failedShards);
timeRefreshIndex.stop();
- logger.debug("Refreshed indexes: {}", StringUtils.join(indexes, ", "));
+ if(failedShards>0){
+ throw new RuntimeException("Failed to update all shards in refresh operation");
+ }
return true;
}
catch ( IndexMissingException e ) {
[2/3] incubator-usergrid git commit: Merge branch 'USERGRID-405' of
https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-480
Posted by sf...@apache.org.
Merge branch 'USERGRID-405' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-480
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/51a38fc1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/51a38fc1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/51a38fc1
Branch: refs/heads/USERGRID-480
Commit: 51a38fc1a9321f1eb66e82293bcab9b52c478a77
Parents: d6bcf4b 0a16033
Author: Shawn Feldman <sf...@apache.org>
Authored: Fri Mar 20 07:10:06 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Fri Mar 20 07:10:06 2015 -0600
----------------------------------------------------------------------
stack/core/pom.xml | 7 +++----
stack/pom.xml | 6 ++++--
stack/rest/pom.xml | 1 +
stack/services/pom.xml | 1 +
4 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------