usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdun...@apache.org
Subject [08/15] usergrid git commit: Basic code improvements 1. Increase some testing timeouts. 2. improve some logging statements. 3. Fix duplicate dependency in cored-persistence pom.xml 4. Accept SNS or DISTRIBUTED_SNS as SNS queue types. 5. Drop missed test
Date Mon, 28 Aug 2017 23:23:54 GMT
Basic code improvements
1. Increase some testing timeouts.
2. improve some logging statements.
3. Fix duplicate dependency in cored-persistence pom.xml
4. Accept SNS or DISTRIBUTED_SNS as SNS queue types.
5. Drop missed test keyspaces for qakka tests.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/400365c3
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/400365c3
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/400365c3

Branch: refs/heads/master
Commit: 400365c36eb1a46ba76ca3b2cf8f2db6670227b1
Parents: 25f1b0e
Author: Mike Dunker <mdunker@google.com>
Authored: Thu Aug 17 08:59:18 2017 -0700
Committer: Mike Dunker <mdunker@google.com>
Committed: Thu Aug 17 13:37:06 2017 -0700

----------------------------------------------------------------------
 .../main/resources/usergrid-default.properties    |  2 +-
 .../resources/usergrid-custom-test.properties     |  2 +-
 .../actorsystem/ActorSystemManagerImpl.java       |  3 ++-
 .../persistence/index/impl/EsEntityIndexImpl.java |  2 +-
 stack/corepersistence/queue/pom.xml               | 18 ++++++------------
 .../persistence/queue/guice/QueueModule.java      |  2 +-
 .../persistence/qakka/KeyspaceDropper.java        |  6 +++++-
 .../qakka/core/QueueMessageManagerTest.java       |  2 +-
 .../resources/usergrid-custom-test.properties     |  2 +-
 9 files changed, 19 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/config/src/main/resources/usergrid-default.properties
----------------------------------------------------------------------
diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties
index 77b047e..bf1f5e7 100644
--- a/stack/config/src/main/resources/usergrid-default.properties
+++ b/stack/config/src/main/resources/usergrid-default.properties
@@ -112,7 +112,7 @@ cassandra.embedded=false
 
 # Read timeout for an individual request (in millseconds)
 #
-#cassandra.timeout=5000
+#cassandra.timeout=20000
 
 
 # Set the credentials used for Cassandra, if any.

http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/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 e32b146..df253f0 100644
--- a/stack/core/src/test/resources/usergrid-custom-test.properties
+++ b/stack/core/src/test/resources/usergrid-custom-test.properties
@@ -16,7 +16,7 @@
 # with ug.heapmax=5000m and ug.heapmin=3000m (set in Maven settings.xml)
 #cassandra.connections=30
 cassandra.timeout.pool=20000
-cassandra.timeout=20000
+cassandra.timeout=25000
 
 
 #Not a good number for real systems.  Write shards should be 2x cluster size from our tests

http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
index bfa3abe..ea9ada8 100644
--- a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
+++ b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
@@ -377,6 +377,7 @@ public class ActorSystemManagerImpl implements ActorSystemManager {
                 Iterator<Class> messageTypes = routerProducer.getMessageTypes().iterator();
                 while ( messageTypes.hasNext() ) {
                     Class messageType = messageTypes.next();
+                    logger.info("createClusterSystem: routerProducer {}: message type={}",
routerProducer.getRouterPath(), messageType.getName());
                     routersByMessageType.put( messageType, routerProducer.getRouterPath()
);
                 }
             }
@@ -467,7 +468,7 @@ public class ActorSystemManagerImpl implements ActorSystemManager {
         if (started) {
             logger.info( "ClientActor [{}] has started", ra.path() );
         } else {
-            throw new RuntimeException( "ClientActor ["+ra.path()+"] did not start in time"
);
+            throw new RuntimeException( "ClientActor ["+ra.path()+"] did not start in time,
validate that akka seeds are configured properly" );
         }
     }
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/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 a35921c..cb695d5 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
@@ -502,7 +502,7 @@ public class EsEntityIndexImpl implements EntityIndex,VersionedData {
             searchResponse = srb.execute().actionGet();
         }
         catch ( Throwable t ) {
-            logger.error( "Unable to communicate with Elasticsearch", t.getMessage() );
+            logger.error( "Unable to communicate with Elasticsearch: {}", t.getMessage()
);
             failureMonitor.fail( "Unable to execute batch", t );
             throw t;
         }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/corepersistence/queue/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/pom.xml b/stack/corepersistence/queue/pom.xml
index 153ed4b..005ce0c 100644
--- a/stack/corepersistence/queue/pom.xml
+++ b/stack/corepersistence/queue/pom.xml
@@ -93,6 +93,12 @@
             <groupId>org.apache.usergrid</groupId>
             <artifactId>common</artifactId>
             <version>${project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>cassandra-all</artifactId>
+                    <groupId>org.apache.cassandra</groupId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
 
@@ -152,18 +158,6 @@
             <version>${project.version}</version>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.usergrid</groupId>
-            <artifactId>common</artifactId>
-            <version>${project.version}</version>
-            <exclusions>
-                <exclusion>
-                    <artifactId>cassandra-all</artifactId>
-                    <groupId>org.apache.cassandra</groupId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
         <!--
                 <dependency>
                     <groupId>com.datastax.cassandra</groupId>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/guice/QueueModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/guice/QueueModule.java
b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/guice/QueueModule.java
index a485f55..a6e2451 100644
--- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/guice/QueueModule.java
+++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/guice/QueueModule.java
@@ -43,7 +43,7 @@ public class QueueModule extends AbstractModule {
     public QueueModule( String queueManagerType ) {
 
         logger.info("QueueManagerType={}", queueManagerType);
-        if ( "DISTRIBUTED_SNS".equals( queueManagerType ) ) {
+        if ( "DISTRIBUTED_SNS".equals( queueManagerType ) || "SNS".equals(queueManagerType))
{
             this.implementation = LegacyQueueManager.Implementation.DISTRIBUTED_SNS;
         }
         else if ( "DISTRIBUTED".equals( queueManagerType ) ) {

http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/KeyspaceDropper.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/KeyspaceDropper.java
b/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/KeyspaceDropper.java
index e220650..b2cebaa 100644
--- a/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/KeyspaceDropper.java
+++ b/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/KeyspaceDropper.java
@@ -34,7 +34,7 @@ import java.util.Properties;
  */
 public class KeyspaceDropper {
 
-    private static final Logger logger = LoggerFactory.getLogger( AbstractTest.class );
+    private static final Logger logger = LoggerFactory.getLogger( KeyspaceDropper.class );
 
     static { dropTestKeyspaces(); }
 
@@ -57,6 +57,10 @@ public class KeyspaceDropper {
 
         dropTestKeyspace( keyspaceApp, hosts, port );
         dropTestKeyspace( keyspaceQueue, hosts, port );
+
+        // drop local test keyspaces
+        dropTestKeyspace(keyspaceApp + "_", hosts, port);
+        dropTestKeyspace(keyspaceQueue + "_", hosts, port);
     }
 
     public static void dropTestKeyspace( String keyspace, String[] hosts, int port ) {

http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/core/QueueMessageManagerTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/core/QueueMessageManagerTest.java
b/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/core/QueueMessageManagerTest.java
index d4ed7ef..8da2180 100644
--- a/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/core/QueueMessageManagerTest.java
+++ b/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/core/QueueMessageManagerTest.java
@@ -340,7 +340,7 @@ public class QueueMessageManagerTest extends AbstractAkkaTest {
                 if (qmm.getQueueDepth( queueName, available ) == numMessages) {
                     break;
                 }
-                Thread.sleep( 500 );
+                Thread.sleep( 1000 );
             }
 
             Assert.assertEquals( numMessages, qmm.getQueueDepth( queueName, available ) );

http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/rest/src/test/resources/usergrid-custom-test.properties
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/resources/usergrid-custom-test.properties b/stack/rest/src/test/resources/usergrid-custom-test.properties
index cbec81f..4b76ca4 100644
--- a/stack/rest/src/test/resources/usergrid-custom-test.properties
+++ b/stack/rest/src/test/resources/usergrid-custom-test.properties
@@ -18,7 +18,7 @@
 cassandra.startup=external
 cassandra.connections=30
 cassandra.timeout.pool=20000
-cassandra.timeout=20000
+cassandra.timeout=25000
 
 
 hystrix.threadpool.graph_user.coreSize=1200


Mime
View raw message