usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [01/50] [abbrv] usergrid git commit: Removed hazel cast from the pom and the files that use hazel cast for testing. Removing and replacing instances of commons.collection with commons.collection4
Date Mon, 02 May 2016 17:54:32 GMT
Repository: usergrid
Updated Branches:
  refs/heads/USERGRID-1246-MASTER [created] e65946639


Removed hazel cast from the pom and the files that use hazel cast for testing.
Removing and replacing instances of commons.collection with commons.collection4


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

Branch: refs/heads/USERGRID-1246-MASTER
Commit: ff9dcab75303ade4aaedf6c4b15e208d00d377d3
Parents: a4d30ec
Author: George Reyes <grey@apache.org>
Authored: Fri Apr 29 09:16:45 2016 -0700
Committer: George Reyes <grey@apache.org>
Committed: Fri Apr 29 09:16:45 2016 -0700

----------------------------------------------------------------------
 stack/core/pom.xml                              |  19 +--
 .../hazelcast/HazelcastLifecycleMonitor.java    |  79 -------------
 .../org/apache/usergrid/utils/MapUtils.java     |   3 +-
 .../clustering/hazelcast/HazelcastTest.java     | 115 -------------------
 stack/corepersistence/pom.xml                   |   2 +-
 stack/corepersistence/queryindex/pom.xml        |   6 +-
 stack/pom.xml                                   |  12 +-
 stack/rest/pom.xml                              |   4 +-
 8 files changed, 13 insertions(+), 227 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/ff9dcab7/stack/core/pom.xml
----------------------------------------------------------------------
diff --git a/stack/core/pom.xml b/stack/core/pom.xml
index ed3c6a1..f776377 100644
--- a/stack/core/pom.xml
+++ b/stack/core/pom.xml
@@ -148,8 +148,8 @@
     </dependency>
 
     <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-collections4</artifactId>
     </dependency>
 
     <dependency>
@@ -205,11 +205,6 @@
     </dependency>
 
     <dependency>
-      <groupId>com.hazelcast</groupId>
-      <artifactId>hazelcast-all</artifactId>
-    </dependency>
-
-    <dependency>
       <groupId>com.netflix.curator</groupId>
       <artifactId>curator-recipes</artifactId>
     </dependency>
@@ -349,16 +344,6 @@
       <scope>test</scope>
     </dependency>
 
-
-       <dependency>
-        <groupId>org.apache.usergrid</groupId>
-        <artifactId>common</artifactId>
-        <version>2.1.1-SNAPSHOT</version>
-        <type>test-jar</type>
-           <scope>test</scope>
-       </dependency>
-
-
     <!-- Core Persistence deps -->
     <dependency>
 	    <groupId>org.apache.usergrid</groupId>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/ff9dcab7/stack/core/src/main/java/org/apache/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java
b/stack/core/src/main/java/org/apache/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java
deleted file mode 100644
index 0c436f6..0000000
--- a/stack/core/src/main/java/org/apache/usergrid/clustering/hazelcast/HazelcastLifecycleMonitor.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.usergrid.clustering.hazelcast;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.hazelcast.core.Hazelcast;
-import com.hazelcast.core.Instance;
-import com.hazelcast.core.InstanceEvent;
-import com.hazelcast.core.InstanceListener;
-import com.hazelcast.core.MembershipEvent;
-import com.hazelcast.core.MembershipListener;
-
-
-public class HazelcastLifecycleMonitor implements InstanceListener, MembershipListener {
-
-    private static final Logger logger = LoggerFactory.getLogger( HazelcastLifecycleMonitor.class
);
-
-
-    public HazelcastLifecycleMonitor() {
-    }
-
-
-    public void init() {
-        logger.info( "HazelcastLifecycleMonitor initializing..." );
-        Hazelcast.addInstanceListener( this );
-        Hazelcast.getCluster().addMembershipListener( this );
-        logger.info( "HazelcastLifecycleMonitor initialized" );
-    }
-
-
-    public void destroy() {
-        logger.info( "Shutting down Hazelcast" );
-        Hazelcast.shutdownAll();
-        logger.info( "Hazelcast shutdown" );
-    }
-
-
-    @Override
-    public void instanceCreated( InstanceEvent event ) {
-        Instance instance = event.getInstance();
-        logger.info( "Created instance ID: [{}] Type: [{}]", instance.getId(), instance.getInstanceType()
);
-    }
-
-
-    @Override
-    public void instanceDestroyed( InstanceEvent event ) {
-        Instance instance = event.getInstance();
-        logger.info( "Destroyed instance ID: [{}] Type: [{}]", instance.getId(), instance.getInstanceType()
);
-    }
-
-
-    @Override
-    public void memberAdded( MembershipEvent membersipEvent ) {
-        logger.info( "MemberAdded {}", membersipEvent );
-    }
-
-
-    @Override
-    public void memberRemoved( MembershipEvent membersipEvent ) {
-        logger.info( "MemberRemoved {}", membersipEvent );
-    }
-}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/ff9dcab7/stack/core/src/main/java/org/apache/usergrid/utils/MapUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/utils/MapUtils.java b/stack/core/src/main/java/org/apache/usergrid/utils/MapUtils.java
index c5d0d75..5b8fcfd 100644
--- a/stack/core/src/main/java/org/apache/usergrid/utils/MapUtils.java
+++ b/stack/core/src/main/java/org/apache/usergrid/utils/MapUtils.java
@@ -34,7 +34,8 @@ import static org.apache.commons.lang.StringUtils.isNotBlank;
 import static org.apache.usergrid.utils.ClassUtils.cast;
 
 
-public class MapUtils extends org.apache.commons.collections.MapUtils {
+public class MapUtils extends org.apache.commons.collections4.MapUtils{
+
 
     public static <A, B> void addMapSet( Map<A, Set<B>> map, A a, B b )
{
         addMapSet( map, false, a, b );

http://git-wip-us.apache.org/repos/asf/usergrid/blob/ff9dcab7/stack/core/src/test/java/org/apache/usergrid/clustering/hazelcast/HazelcastTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/clustering/hazelcast/HazelcastTest.java
b/stack/core/src/test/java/org/apache/usergrid/clustering/hazelcast/HazelcastTest.java
deleted file mode 100644
index 63a181e..0000000
--- a/stack/core/src/test/java/org/apache/usergrid/clustering/hazelcast/HazelcastTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.usergrid.clustering.hazelcast;
-
-
-import java.util.Collection;
-import java.util.Set;
-
-import org.apache.usergrid.ExperimentalTest;
-import org.apache.usergrid.StressTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import com.hazelcast.core.Hazelcast;
-import com.hazelcast.core.ITopic;
-import com.hazelcast.core.Instance;
-import com.hazelcast.core.InstanceEvent;
-import com.hazelcast.core.InstanceListener;
-import com.hazelcast.core.Member;
-import com.hazelcast.core.MessageListener;
-
-
-@Category(ExperimentalTest.class)
-public class HazelcastTest implements InstanceListener, MessageListener<Object> {
-
-    private static final Logger logger = LoggerFactory.getLogger( HazelcastTest.class );
-
-    ClassPathXmlApplicationContext ac;
-
-
-    @Before
-    public void setup() throws Exception {
-        // assertNotNull(client);
-
-        String maven_opts = System.getenv( "MAVEN_OPTS" );
-        logger.info( "Maven options: " + maven_opts );
-
-        String[] locations = { "usergrid-test-context.xml" };
-        ac = new ClassPathXmlApplicationContext( locations );
-
-        AutowireCapableBeanFactory acbf = ac.getAutowireCapableBeanFactory();
-        acbf.autowireBeanProperties( this, AutowireCapableBeanFactory.AUTOWIRE_BY_NAME, false
);
-        acbf.initializeBean( this, "testClient" );
-    }
-
-
-    @Test
-    public void doTest() {
-        logger.info( "do test" );
-        Hazelcast.addInstanceListener( this );
-
-        ITopic<Object> topic = Hazelcast.getTopic( "default" );
-        topic.addMessageListener( this );
-        topic.publish( "my-message-object" );
-
-        Collection<Instance> instances = Hazelcast.getInstances();
-        for ( Instance instance : instances ) {
-            logger.info( "ID: [" + instance.getId() + "] Type: [" + instance.getInstanceType()
+ "]" );
-        }
-
-        Set<Member> setMembers = Hazelcast.getCluster().getMembers();
-        for ( Member member : setMembers ) {
-            logger.info( "isLocalMember " + member.localMember() );
-            logger.info( "member.inetsocketaddress " + member.getInetSocketAddress() );
-        }
-    }
-
-
-    @Override
-    public void instanceCreated( InstanceEvent event ) {
-        Instance instance = event.getInstance();
-        logger.info( "Created instance ID: [" + instance.getId() + "] Type: [" + instance.getInstanceType()
+ "]" );
-    }
-
-
-    @Override
-    public void instanceDestroyed( InstanceEvent event ) {
-        Instance instance = event.getInstance();
-        logger.info( "Destroyed isntance ID: [" + instance.getId() + "] Type: [" + instance.getInstanceType()
+ "]" );
-    }
-
-
-    @After
-    public void teardown() {
-        logger.info( "Stopping test" );
-        ac.close();
-    }
-
-
-    @Override
-    public void onMessage( Object msg ) {
-        logger.info( "Message received = " + msg );
-    }
-}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/ff9dcab7/stack/corepersistence/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/pom.xml b/stack/corepersistence/pom.xml
index f2bbbcd..b953e9b 100644
--- a/stack/corepersistence/pom.xml
+++ b/stack/corepersistence/pom.xml
@@ -77,7 +77,7 @@ limitations under the License.
         <cassandra.version>1.2.18</cassandra.version>
         <!--        <chop.version>1.0</chop.version>-->
         <commons.codec.version>1.6</commons.codec.version>
-        <commons.collections.version>3.2.1</commons.collections.version>
+        <commons.collections4.version>4.0</commons.collections4.version>
         <commons.io.version>2.4</commons.io.version>
         <commons.lang.version>3.1</commons.lang.version>
         <elasticsearch.version>1.7.3</elasticsearch.version>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/ff9dcab7/stack/corepersistence/queryindex/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/pom.xml b/stack/corepersistence/queryindex/pom.xml
index 003281e..60c7c5e 100644
--- a/stack/corepersistence/queryindex/pom.xml
+++ b/stack/corepersistence/queryindex/pom.xml
@@ -147,9 +147,9 @@
         </dependency>
 
         <dependency>
-            <groupId>commons-collections</groupId>
-            <artifactId>commons-collections</artifactId>
-            <version>${commons.collections.version}</version>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-collections4</artifactId>
+            <version>4.0</version>
             <type>jar</type>
         </dependency>
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/ff9dcab7/stack/pom.xml
----------------------------------------------------------------------
diff --git a/stack/pom.xml b/stack/pom.xml
index 5eaecd7..f7d21c5 100644
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@ -246,9 +246,9 @@
             </dependency>
 
             <dependency>
-                <groupId>commons-collections</groupId>
-                <artifactId>commons-collections</artifactId>
-                <version>3.2.1</version>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-collections4</artifactId>
+                <version>4.0</version>
             </dependency>
 
             <dependency>
@@ -638,12 +638,6 @@
             </dependency>
 
             <dependency>
-                <groupId>com.hazelcast</groupId>
-                <artifactId>hazelcast-all</artifactId>
-                <version>1.9.3.1</version>
-            </dependency>
-
-            <dependency>
                 <groupId>com.google.guava</groupId>
                 <artifactId>guava</artifactId>
                 <version>${guava.version}</version>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/ff9dcab7/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index 5f0df68..f4daab0 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -208,8 +208,8 @@
         <!-- Apache Dependencies -->
 
         <dependency>
-            <groupId>commons-collections</groupId>
-            <artifactId>commons-collections</artifactId>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-collections4</artifactId>
         </dependency>
 
         <!-- Java EE and Jersey dependencies -->


Mime
View raw message