http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/persistence/EntityDictionaryIT.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityDictionaryIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityDictionaryIT.java index 6af35d7..555716a 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityDictionaryIT.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityDictionaryIT.java @@ -21,17 +21,13 @@ import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; -import java.util.UUID; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.commons.lang3.RandomStringUtils; - import org.apache.usergrid.AbstractCoreIT; import org.apache.usergrid.persistence.entities.Application; -import org.apache.usergrid.persistence.model.util.UUIDGenerator; import org.apache.usergrid.utils.JsonUtils; import static org.junit.Assert.assertArrayEquals; @@ -43,7 +39,7 @@ import static org.junit.Assert.assertTrue; public class EntityDictionaryIT extends AbstractCoreIT { - private static final Logger LOG = LoggerFactory.getLogger( EntityDictionaryIT.class ); + private static final Logger logger = LoggerFactory.getLogger( EntityDictionaryIT.class ); public EntityDictionaryIT() { @@ -62,7 +58,7 @@ public class EntityDictionaryIT extends AbstractCoreIT { provider.setAccessTokenEndpointUrl( "https://accounts.google.com/o/oauth2/token" ); provider.setVersion( "2.0" ); - LOG.info( "EntityDictionaryIT.testApplicationDictionaries" ); + logger.info( "EntityDictionaryIT.testApplicationDictionaries" ); EntityManager em = app.getEntityManager(); assertNotNull( em ); @@ -70,13 +66,13 @@ public class EntityDictionaryIT extends AbstractCoreIT { em.addToDictionary( em.getApplicationRef(), "oauthproviders", "google", provider ); Object o = em.getDictionaryElementValue( em.getApplicationRef(), "oauthproviders", "google" ); - LOG.info( JsonUtils.mapToFormattedJsonString( o ) ); + logger.info( JsonUtils.mapToFormattedJsonString( o ) ); } @Test public void testUserDictionaries() throws Exception { - LOG.info( "EntityDictionaryIT.testUserDictionaries" ); + logger.info( "EntityDictionaryIT.testUserDictionaries" ); @@ -101,7 +97,7 @@ public class EntityDictionaryIT extends AbstractCoreIT { em.addToDictionary( user, "credentials", "plaintext", credentials ); Object o = em.getDictionaryElementValue( user, "credentials", "plaintext" ); - LOG.info( JsonUtils.mapToFormattedJsonString( o ) ); + logger.info( JsonUtils.mapToFormattedJsonString( o ) ); assertEquals( CredentialsInfo.class, o.getClass() ); @@ -123,7 +119,7 @@ public class EntityDictionaryIT extends AbstractCoreIT { em.addToDictionary( user, "credentials", "encrypted", credentials ); o = em.getDictionaryElementValue( user, "credentials", "encrypted" ); - LOG.info( JsonUtils.mapToFormattedJsonString( o ) ); + logger.info( JsonUtils.mapToFormattedJsonString( o ) ); assertEquals( CredentialsInfo.class, o.getClass() ); returned = ( CredentialsInfo ) o; @@ -137,7 +133,7 @@ public class EntityDictionaryIT extends AbstractCoreIT { @Test public void testRemoveFromDictionary() throws Exception { - LOG.info( "EntityDictionaryIT.testRemoveFromDictionary" ); + logger.info( "EntityDictionaryIT.testRemoveFromDictionary" ); Application.OAuthProvider provider = new Application.OAuthProvider(); provider.setClientId( "123456789012.apps.googleusercontent.com" ); @@ -148,7 +144,7 @@ public class EntityDictionaryIT extends AbstractCoreIT { provider.setAccessTokenEndpointUrl( "https://accounts.google.com/o/oauth2/token" ); provider.setVersion( "2.0" ); - LOG.info( "EntityDictionaryIT.testApplicationDictionaries" ); + logger.info( "EntityDictionaryIT.testApplicationDictionaries" ); EntityManager em = app.getEntityManager(); @@ -170,7 +166,7 @@ public class EntityDictionaryIT extends AbstractCoreIT { @Test public void testGetDictionaries() throws Exception { - LOG.info( "EntityDictionaryIT.testGetDictionaries" ); + logger.info( "EntityDictionaryIT.testGetDictionaries" ); Application.OAuthProvider provider = new Application.OAuthProvider(); @@ -197,7 +193,7 @@ public class EntityDictionaryIT extends AbstractCoreIT { } @Test public void testAddMapToDictionaries() throws Exception { - LOG.info( "EntityDictionaryIT.testAddMapToDictionaries" ); + logger.info( "EntityDictionaryIT.testAddMapToDictionaries" ); Map<String,Object> testMap = new HashMap<String,Object>();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java index 658c808..0f257fb 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java @@ -46,7 +46,7 @@ import static org.junit.Assert.assertTrue; public class EntityManagerIT extends AbstractCoreIT { - private static final Logger LOG = LoggerFactory.getLogger( EntityManagerIT.class ); + private static final Logger logger = LoggerFactory.getLogger( EntityManagerIT.class ); public EntityManagerIT() { @@ -56,7 +56,7 @@ public class EntityManagerIT extends AbstractCoreIT { @Test public void testEntityManager() throws Exception { - LOG.info( "EntityManagerIT.testEntityManagerTest" ); + logger.info( "EntityManagerIT.testEntityManagerTest" ); EntityManager em = app.getEntityManager(); assertNotNull( em ); @@ -83,8 +83,8 @@ public class EntityManagerIT extends AbstractCoreIT { assertEquals( "userRef.id not expected value", user.getUuid(), userRef.getUuid() ); assertEquals( "userRef.type not expected value", "user", userRef.getType() ); - LOG.info( "user.username: " + user.getProperty( "username" ) ); - LOG.info( "user.email: " + user.getProperty( "email" ) ); + logger.info( "user.username: " + user.getProperty( "username" ) ); + logger.info( "user.email: " + user.getProperty( "email" ) ); final Query query = Query.fromQL( "username = 'edanuff'" ); @@ -96,8 +96,8 @@ public class EntityManagerIT extends AbstractCoreIT { assertEquals( "user.username not expected value", "edanuff", user.getProperty( "username" ) ); assertEquals( "user.email not expected value", "[email protected]", user.getProperty( "email" ) ); - LOG.info( "user.username: " + user.getProperty( "username" ) ); - LOG.info( "user.email: " + user.getProperty( "email" ) ); + logger.info( "user.username: " + user.getProperty( "username" ) ); + logger.info( "user.email: " + user.getProperty( "email" ) ); final Query emailQuery = Query.fromQL( "email = '[email protected]'" ); @@ -109,14 +109,14 @@ public class EntityManagerIT extends AbstractCoreIT { assertEquals( "user.username not expected value", "edanuff", user.getProperty( "username" ) ); assertEquals( "user.email not expected value", "[email protected]", user.getProperty( "email" ) ); - LOG.info( "user.username: " + user.getProperty( "username" ) ); - LOG.info( "user.email: " + user.getProperty( "email" ) ); + logger.info( "user.username: " + user.getProperty( "username" ) ); + logger.info( "user.email: " + user.getProperty( "email" ) ); } @Test public void testCreateAndGet() throws Exception { - LOG.info( "EntityDaoTest.testCreateAndGet" ); + logger.info( "EntityDaoTest.testCreateAndGet" ); EntityManager em = app.getEntityManager(); @@ -184,7 +184,7 @@ public class EntityManagerIT extends AbstractCoreIT { @Test public void testDictionaries() throws Exception { - LOG.info( "EntityDaoTest.testDictionaries" ); + logger.info( "EntityDaoTest.testDictionaries" ); EntityManager em = app.getEntityManager(); @@ -201,9 +201,9 @@ public class EntityManagerIT extends AbstractCoreIT { assertEquals( "Wrong number of items in list", 3, set.size() ); Iterator<Object> i = set.iterator(); - LOG.info( "first item is " + i.next() ); - LOG.info( "second item is " + i.next() ); - LOG.info( "third item is " + i.next() ); + logger.info( "first item is " + i.next() ); + logger.info( "second item is " + i.next() ); + logger.info( "third item is " + i.next() ); i = set.iterator(); assertEquals( "first item should be alpha", "alpha", i.next() ); @@ -225,7 +225,7 @@ public class EntityManagerIT extends AbstractCoreIT { @Test public void testProperties() throws Exception { - LOG.info( "EntityDaoTest.testProperties" ); + logger.info( "EntityDaoTest.testProperties" ); EntityManager em = app.getEntityManager(); @@ -248,7 +248,7 @@ public class EntityManagerIT extends AbstractCoreIT { assertEquals( "wrong value for property gamma", ( long ) 3, props.get( "gamma" ) ); for ( Entry<String, Object> entry : props.entrySet() ) { - LOG.info( entry.getKey() + " : " + entry.getValue() ); + logger.info( entry.getKey() + " : " + entry.getValue() ); } em.deleteProperty( entity, "alpha" ); @@ -261,7 +261,7 @@ public class EntityManagerIT extends AbstractCoreIT { @Test public void testCreateAndDelete() throws Exception { - LOG.info( "EntityDaoTest.testCreateAndDelete" ); + logger.info( "EntityDaoTest.testCreateAndDelete" ); EntityManager em = app.getEntityManager(); String name = "test.thing" + UUIDUtils.newTimeUUID(); @@ -270,15 +270,15 @@ public class EntityManagerIT extends AbstractCoreIT { properties.put( "name", name ); properties.put( "foo", "bar" ); - LOG.info( "Starting entity create" ); + logger.info( "Starting entity create" ); Entity thing = em.create( "thing", properties ); - LOG.info( "Entity created" ); + logger.info( "Entity created" ); app.refreshIndex(); - LOG.info( "Starting entity delete" ); + logger.info( "Starting entity delete" ); em.delete( thing ); - LOG.info( "Entity deleted" ); + logger.info( "Entity deleted" ); app.refreshIndex(); @@ -296,7 +296,7 @@ public class EntityManagerIT extends AbstractCoreIT { @Test public void testCreateAndDeleteUser() throws Exception { - LOG.info( "EntityDaoTest.testCreateAndDeleteUser" ); + logger.info( "EntityDaoTest.testCreateAndDeleteUser" ); EntityManager em = app.getEntityManager(); @@ -306,15 +306,15 @@ public class EntityManagerIT extends AbstractCoreIT { properties.put( "username", name ); properties.put( "foo", "bar" ); - LOG.info( "Starting entity create" ); + logger.info( "Starting entity create" ); Entity user = em.create( "user", properties ); - LOG.info( "Entity created" ); + logger.info( "Entity created" ); app.refreshIndex(); - LOG.info( "Starting entity delete" ); + logger.info( "Starting entity delete" ); em.delete( user ); - LOG.info( "Entity deleted" ); + logger.info( "Entity deleted" ); app.refreshIndex(); @@ -331,9 +331,9 @@ public class EntityManagerIT extends AbstractCoreIT { properties.put( "username", name ); properties.put( "foo", "bar" ); - LOG.info( "Starting entity create" ); + logger.info( "Starting entity create" ); user = em.create( "user", properties ); - LOG.info( "Entity created" ); + logger.info( "Entity created" ); app.refreshIndex(); @@ -350,7 +350,7 @@ public class EntityManagerIT extends AbstractCoreIT { @SuppressWarnings( "unchecked" ) @Test public void testJson() throws Exception { - LOG.info( "EntityDaoTest.testProperties" ); + logger.info( "EntityDaoTest.testProperties" ); EntityManager em = app.getEntityManager(); @@ -384,7 +384,7 @@ public class EntityManagerIT extends AbstractCoreIT { @Ignore( "Pending https://issues.apache.org/jira/browse/USERGRID-1753. Concurrency issue.") // There is a concurrency issue due to counters not being thread safe public void testEntityCounters() throws Exception { - LOG.info( "EntityManagerIT#testEntityCounters" ); + logger.info( "EntityManagerIT#testEntityCounters" ); EntityManager em = app.getEntityManager(); Group organizationEntity = new Group(); @@ -411,7 +411,7 @@ public class EntityManagerIT extends AbstractCoreIT { em = setup.getEmf().getEntityManager( setup.getEmf().getManagementAppId() ); Map<String, Long> counts = em.getEntityCounters( setup.getEmf().getManagementAppId() ); - LOG.info( "Entity counters: {}", counts ); + logger.info( "Entity counters: {}", counts ); assertNotNull( counts ); assertEquals( 4, counts.size() ); @@ -420,7 +420,7 @@ public class EntityManagerIT extends AbstractCoreIT { em = setup.getEmf().getEntityManager( applicationId ); counts = em.getEntityCounters( applicationId ); - LOG.info( "Entity counters: {}", counts ); + logger.info( "Entity counters: {}", counts ); assertNotNull( counts ); assertEquals( 3, counts.size() ); } @@ -428,7 +428,7 @@ public class EntityManagerIT extends AbstractCoreIT { @Test public void testCreateAndList() throws Exception { - LOG.info( "EntityDaoTest.testCreateAndDelete" ); + logger.info( "EntityDaoTest.testCreateAndDelete" ); EntityManager em = app.getEntityManager(); @@ -438,9 +438,9 @@ public class EntityManagerIT extends AbstractCoreIT { properties.put( "name", name ); properties.put( "foo", "bar" ); - LOG.info( "Starting entity create" ); + logger.info( "Starting entity create" ); Entity thing1 = em.create( "thing", properties ); - LOG.info( "Entity created" ); + logger.info( "Entity created" ); String name2 = "test.thing" + UUIDUtils.newTimeUUID() + 2; @@ -448,9 +448,9 @@ public class EntityManagerIT extends AbstractCoreIT { properties.put( "name", name2 ); properties.put( "foo", "bar" ); - LOG.info( "Starting entity create" ); + logger.info( "Starting entity create" ); Entity thing2 = em.create( "thing", properties ); - LOG.info( "Entity created" ); + logger.info( "Entity created" ); // now search by username, no results should be returned @@ -492,7 +492,7 @@ public class EntityManagerIT extends AbstractCoreIT { @Test public void testImmutableForcedPropChange() throws Exception { - LOG.info( "EntityDaoTest.testProperties" ); + logger.info( "EntityDaoTest.testProperties" ); EntityManager em = app.getEntityManager(); @@ -569,7 +569,7 @@ public class EntityManagerIT extends AbstractCoreIT { @Test public void testDeprecatedGet() throws Exception { - LOG.info( "EntityManagerIT.testDeprecatedGet" ); + logger.info( "EntityManagerIT.testDeprecatedGet" ); EntityManager em = app.getEntityManager(); http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java index ae09f97..0b15e09 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java @@ -28,7 +28,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.usergrid.AbstractCoreIT; -import org.apache.usergrid.persistence.model.field.value.Location; import org.apache.usergrid.utils.MapUtils; import static org.junit.Assert.assertEquals; @@ -37,7 +36,7 @@ import static org.junit.Assert.assertTrue; public class GeoIT extends AbstractCoreIT { - private static final Logger LOG = LoggerFactory.getLogger(GeoIT.class); + private static final Logger logger = LoggerFactory.getLogger(GeoIT.class); int NEARBY_RADIUS = 10000; int CIRCUMFERENCE_OF_THE_EARTH = 40000000; @@ -125,7 +124,7 @@ public class GeoIT extends AbstractCoreIT { */ @Test public void testMovingTarget() throws Exception { - LOG.info("GeoIT.testMovingTarget"); + logger.info("GeoIT.testMovingTarget"); //Get the EntityManager instance EntityManager em = app.getEntityManager(); assertNotNull(em); @@ -171,7 +170,7 @@ public class GeoIT extends AbstractCoreIT { */ @Test public void validateDistanceQueryExists() throws Exception { - LOG.info("GeoIT.validateDistanceQueryExists"); + logger.info("GeoIT.validateDistanceQueryExists"); //Get the EntityManager instance EntityManager em = app.getEntityManager(); assertNotNull(em); @@ -277,7 +276,7 @@ public class GeoIT extends AbstractCoreIT { for (Map<String, Object> location : LOCATION_PROPERTIES) { Entity entity = em.create("store", location); assertNotNull(entity); - LOG.debug("Entity {} created", entity.getProperty("name")); + logger.debug("Entity {} created", entity.getProperty("name")); } app.refreshIndex(); //2. validate the size of the result @@ -318,7 +317,7 @@ public class GeoIT extends AbstractCoreIT { for (Map<String, Object> location : locations) { Entity entity = em.create("store", location); assertNotNull(entity); - LOG.debug("Entity {} created", entity.getProperty("name")); + logger.debug("Entity {} created", entity.getProperty("name")); } app.refreshIndex(); //2. validate the size of the result @@ -389,7 +388,7 @@ public class GeoIT extends AbstractCoreIT { * circumference of the earth */ public void testGeoFromNearbyLocation() throws Exception { - LOG.info( "GeoIT.testGeoFromNearbyLocation" ); + logger.info( "GeoIT.testGeoFromNearbyLocation" ); //1. create entities with geo EntityManager em = loadGeolocationTestEntities(); @@ -426,7 +425,7 @@ public class GeoIT extends AbstractCoreIT { */ @Test public void testGeoFromMultipleLocations() throws Exception { - LOG.info("GeoIT.testGeoFromMultipleLocations"); + logger.info("GeoIT.testGeoFromMultipleLocations"); //1 Create entities with geo EntityManager em = loadGeolocationTestEntities(); //2 Create a list of points from different geographic areas @@ -767,7 +766,7 @@ public class GeoIT extends AbstractCoreIT { long endTime = System.currentTimeMillis(); - LOG.info("Runtime took {} milliseconds to search", endTime - startTime); + logger.info("Runtime took {} milliseconds to search", endTime - startTime); } @@ -779,14 +778,14 @@ public class GeoIT extends AbstractCoreIT { * 4. return the entity manager */ private EntityManager loadGeolocationTestEntities() throws Exception { - LOG.info("GeoIT.loadGeolocationTestEntities"); + logger.info("GeoIT.loadGeolocationTestEntities"); //1. Get an instance of the entity manager EntityManager em = app.getEntityManager(); assertNotNull(em); //2. load test entities for (Map<String, Object> location : LOCATION_PROPERTIES) { - LOG.info("Create entity with location '{}'", location.get("name")); + logger.info("Create entity with location '{}'", location.get("name")); Entity entity = em.create("store", location); assertNotNull(entity); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java index 3c04ce6..9a3f5a6 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java @@ -20,7 +20,6 @@ package org.apache.usergrid.persistence; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.Map; -import java.util.UUID; import org.junit.Test; import org.slf4j.Logger; @@ -35,7 +34,7 @@ import static org.junit.Assert.assertNotNull; public class GeoQueryBooleanTest extends AbstractCoreIT { - private static final Logger log = LoggerFactory.getLogger( GeoQueryBooleanTest.class ); + private static final Logger logger = LoggerFactory.getLogger( GeoQueryBooleanTest.class ); public GeoQueryBooleanTest() { @@ -46,7 +45,7 @@ public class GeoQueryBooleanTest extends AbstractCoreIT { @Test public void testGeoQueryWithOr() throws Exception { - log.info( "GeoQueryBooleanTest.testGeoQueryWithOr" ); + logger.info( "GeoQueryBooleanTest.testGeoQueryWithOr" ); EntityManager em = app.getEntityManager(); @@ -110,7 +109,7 @@ public class GeoQueryBooleanTest extends AbstractCoreIT { @Test public void testGeoQueryWithNot() throws Exception { - log.info( "GeoQueryBooleanTest.testGeoQueryWithOr" ); + logger.info( "GeoQueryBooleanTest.testGeoQueryWithOr" ); EntityManager em = app.getEntityManager(); http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/persistence/IndexIT.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/IndexIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/IndexIT.java index 15c6f61..f4aa204 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/IndexIT.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/IndexIT.java @@ -17,32 +17,23 @@ package org.apache.usergrid.persistence; -import java.nio.ByteBuffer; import java.util.LinkedHashMap; import java.util.Map; import java.util.UUID; -import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.usergrid.AbstractCoreIT; -import org.apache.usergrid.cassandra.SpringResource; -import org.apache.usergrid.persistence.cassandra.CassandraService; import org.apache.usergrid.utils.JsonUtils; -import org.apache.usergrid.utils.UUIDUtils; - -import me.prettyprint.cassandra.serializers.ByteBufferSerializer; -import me.prettyprint.hector.api.Keyspace; -import me.prettyprint.hector.api.mutation.Mutator; import static me.prettyprint.hector.api.factory.HFactory.createMutator; import static org.junit.Assert.*; public class IndexIT extends AbstractCoreIT { - private static final Logger LOG = LoggerFactory.getLogger( IndexIT.class ); + private static final Logger logger = LoggerFactory.getLogger( IndexIT.class ); public static final String[] alphabet = { "Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", @@ -53,7 +44,7 @@ public class IndexIT extends AbstractCoreIT { @Test public void testCollectionOrdering() throws Exception { - LOG.info( "testCollectionOrdering" ); + logger.info( "testCollectionOrdering" ); UUID applicationId = app.getId(); @@ -106,7 +97,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "order by name desc" ).withCursor(r.getCursor()); r = em.searchCollection( em.getApplicationRef(), "items", query ); - // LOG.info(JsonUtils.mapToFormattedJsonString(r.getEntities())); + // logger.info(JsonUtils.mapToFormattedJsonString(r.getEntities())); for ( Entity entity : r.getEntities() ) { i--; assertEquals( alphabet[i], entity.getProperty( "name" ) ); @@ -125,7 +116,7 @@ public class IndexIT extends AbstractCoreIT { @Test public void testCollectionFilters() throws Exception { - LOG.info( "testCollectionFilters" ); + logger.info( "testCollectionFilters" ); UUID applicationId = app.getId(); assertNotNull( applicationId ); @@ -145,7 +136,7 @@ public class IndexIT extends AbstractCoreIT { Query query = Query.fromQL( "name < 'delta' order by name asc" ); Results r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); int i = 0; for ( Entity entity : r.getEntities() ) { assertEquals( alphabet[i], entity.getProperty( "name" ) ); @@ -155,7 +146,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "name <= 'delta' order by name asc" ); r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); i = 0; for ( Entity entity : r.getEntities() ) { assertEquals( alphabet[i], entity.getProperty( "name" ) ); @@ -165,7 +156,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "name <= 'foxtrot' and name > 'bravo' order by name asc" ); r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); i = 2; for ( Entity entity : r.getEntities() ) { assertEquals( alphabet[i], entity.getProperty( "name" ) ); @@ -175,7 +166,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "name < 'foxtrot' and name > 'bravo' order by name asc" ); r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); i = 2; for ( Entity entity : r.getEntities() ) { assertEquals( alphabet[i], entity.getProperty( "name" ) ); @@ -185,7 +176,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "name < 'foxtrot' and name >= 'bravo' order by name asc" ); r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); i = 1; for ( Entity entity : r.getEntities() ) { assertEquals( alphabet[i], entity.getProperty( "name" ) ); @@ -195,7 +186,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "name <= 'foxtrot' and name >= 'bravo' order by name asc" ); r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); i = 1; for ( Entity entity : r.getEntities() ) { assertEquals( alphabet[i], entity.getProperty( "name" ) ); @@ -205,7 +196,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "name <= 'foxtrot' and name >= 'bravo' order by name desc" ); r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); i = 6; for ( Entity entity : r.getEntities() ) { i--; @@ -215,7 +206,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "name < 'foxtrot' and name > 'bravo' order by name desc" ); r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); i = 5; for ( Entity entity : r.getEntities() ) { i--; @@ -225,7 +216,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "name < 'foxtrot' and name >= 'bravo' order by name desc" ); r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); i = 5; for ( Entity entity : r.getEntities() ) { i--; @@ -235,7 +226,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "name = 'foxtrot'" ); r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); assertEquals( 1, r.size() ); long created = r.getEntity().getCreated(); @@ -243,7 +234,7 @@ public class IndexIT extends AbstractCoreIT { query = Query.fromQL( "created = " + created ); r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); assertEquals( 1, r.size() ); assertEquals( entityId, r.getEntity().getUuid() ); } @@ -251,7 +242,7 @@ public class IndexIT extends AbstractCoreIT { @Test public void testSecondarySorts() throws Exception { - LOG.info( "testSecondarySorts" ); + logger.info( "testSecondarySorts" ); UUID applicationId = app.getId(); assertNotNull( applicationId ); @@ -273,7 +264,7 @@ public class IndexIT extends AbstractCoreIT { Query query = Query.fromQL( "group = 1 order by name desc" ); Results r = em.searchCollection( em.getApplicationRef(), "items", query ); - LOG.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); + logger.info( JsonUtils.mapToFormattedJsonString( r.getEntities() ) ); int i = 6; for ( Entity entity : r.getEntities() ) { i--; http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/persistence/SchemaTest.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/SchemaTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/SchemaTest.java index 68c19d2..b2f0be8 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/SchemaTest.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/SchemaTest.java @@ -33,16 +33,16 @@ import static org.junit.Assert.assertTrue; public class SchemaTest { - private static final Logger LOG = LoggerFactory.getLogger( SchemaTest.class ); + private static final Logger logger = LoggerFactory.getLogger( SchemaTest.class ); @Test public void testTypes() throws Exception { - LOG.info( "" + Schema.getDefaultSchema().getEntityClass( "sample_entity" ) ); - LOG.info( "" + Schema.getDefaultSchema().getEntityType( SampleEntity.class ) ); + logger.info( "" + Schema.getDefaultSchema().getEntityClass( "sample_entity" ) ); + logger.info( "" + Schema.getDefaultSchema().getEntityType( SampleEntity.class ) ); SampleEntity entity = new SampleEntity(); - LOG.info( entity.getType() ); + logger.info( entity.getType() ); } @@ -55,14 +55,14 @@ public class SchemaTest { List<String> entitiesPackage = schema.getEntitiesPackage(); for ( String entityPackage : entitiesPackage ) { - LOG.info( entityPackage ); + logger.info( entityPackage ); } Assert.assertEquals( schema.getEntityClass( "simple" ), Simple.class ); Assert.assertEquals( schema.getEntityType( Simple.class ), "simple" ); Simple entity = new Simple(); - LOG.info( entity.getType() ); + logger.info( entity.getType() ); } @@ -76,7 +76,7 @@ public class SchemaTest { public void dumpSetNames( String entityType ) { - LOG.info( entityType + " entity has the following sets: " + Schema.getDefaultSchema() + logger.info( entityType + " entity has the following sets: " + Schema.getDefaultSchema() .getDictionaryNames( entityType ) ); } @@ -84,9 +84,9 @@ public class SchemaTest { @Test public void testJsonSchema() throws Exception { - LOG.info( mapToFormattedJsonString( Schema.getDefaultSchema().getEntityJsonSchema( "user" ) ) ); + logger.info( mapToFormattedJsonString( Schema.getDefaultSchema().getEntityJsonSchema( "user" ) ) ); - LOG.info( mapToFormattedJsonString( Schema.getDefaultSchema().getEntityJsonSchema( "test" ) ) ); + logger.info( mapToFormattedJsonString( Schema.getDefaultSchema().getEntityJsonSchema( "test" ) ) ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/persistence/query/IntersectionTransitivePagingIT.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/IntersectionTransitivePagingIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/query/IntersectionTransitivePagingIT.java index aee643b..cea3b35 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/IntersectionTransitivePagingIT.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/IntersectionTransitivePagingIT.java @@ -43,7 +43,7 @@ import static org.junit.Assert.assertEquals; */ public class IntersectionTransitivePagingIT{ - private static final Logger LOG = LoggerFactory.getLogger( IntersectionTransitivePagingIT.class ); + private static final Logger logger = LoggerFactory.getLogger( IntersectionTransitivePagingIT.class ); private static final String union = "select * where city = 'San Francisco' AND postalCode = 94100"; private static final String unionReverse = "select * where postalCode = 94100 AND city = 'San Francisco'"; @@ -171,7 +171,7 @@ public class IntersectionTransitivePagingIT{ long stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, expectedResults.size() ); + logger.info( "Query took {} ms to return {} entities", stop - start, expectedResults.size() ); assertEquals( "All names returned", expectedResults.size(), currentExpectedIndex ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/persistence/query/IntersectionUnionPagingIT.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/IntersectionUnionPagingIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/query/IntersectionUnionPagingIT.java index 9ab8c78..4d60164 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/IntersectionUnionPagingIT.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/IntersectionUnionPagingIT.java @@ -45,7 +45,7 @@ import static org.junit.Assert.assertTrue; */ public class IntersectionUnionPagingIT { - private static final Logger LOG = LoggerFactory.getLogger( IntersectionUnionPagingIT.class ); + private static final Logger logger = LoggerFactory.getLogger( IntersectionUnionPagingIT.class ); private static final String unionScan = "select * where (field1Or > '00000000' OR field2Or > '00000000') AND fieldDate = '0000-00-00'"; @@ -97,7 +97,7 @@ public class IntersectionUnionPagingIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); final String zeros = String.format( "%08d", 0 ); @@ -129,8 +129,8 @@ public class IntersectionUnionPagingIT { Entity saved = io.writeEntity( entity ); - if (LOG.isDebugEnabled()) { - LOG.debug("Writing entity with id '{}'", saved.getUuid()); + if (logger.isDebugEnabled()) { + logger.debug("Writing entity with id '{}'", saved.getUuid()); } } @@ -138,7 +138,7 @@ public class IntersectionUnionPagingIT { app.refreshIndex(); long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); return Collections.unmodifiableSet( names ); } @@ -178,7 +178,7 @@ public class IntersectionUnionPagingIT { long stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, expectedResults.size() ); + logger.info( "Query took {} ms to return {} entities", stop - start, expectedResults.size() ); assertEquals( "All names returned", 0, newSets.size() ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java index 3ff48b6..b2003fe 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/IteratingQueryIT.java @@ -45,7 +45,7 @@ import static org.junit.Assert.assertTrue; /** @author tnine */ public class IteratingQueryIT { - private static final Logger LOG = LoggerFactory.getLogger( IteratingQueryIT.class ); + private static final Logger logger = LoggerFactory.getLogger( IteratingQueryIT.class ); @ClassRule public static CoreITSetup setup = new CoreITSetupImpl( ); @@ -288,7 +288,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); for ( int i = 0; i < size; i++ ) { Map<String, Object> entity = new HashMap<String, Object>(); @@ -302,7 +302,7 @@ public class IteratingQueryIT { Thread.sleep(1000); long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL("order by created" ); query.setLimit( queryLimit ); @@ -328,7 +328,7 @@ public class IteratingQueryIT { while ( results.getCursor() != null ); stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); assertEquals( size, count ); } @@ -348,7 +348,7 @@ public class IteratingQueryIT { List<String> expected = new ArrayList<String>( size / intersectIncrement ); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); for ( int i = 0; i < size; i++ ) { Map<String, Object> entity = new HashMap<String, Object>(); @@ -371,7 +371,7 @@ public class IteratingQueryIT { long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( "select * where intersect = true order by created asc" ); query.setLimit( queryLimit ); @@ -397,7 +397,7 @@ public class IteratingQueryIT { stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); assertEquals( expected.size(), count ); } @@ -416,7 +416,7 @@ public class IteratingQueryIT { io.doSetup(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<String> expectedResults = new ArrayList<String>( size / secondIncrement ); @@ -441,7 +441,7 @@ public class IteratingQueryIT { this.app.refreshIndex(); long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( "select * where intersect = true AND intersect2 = true order by created" ); query.setLimit( queryLimit ); @@ -468,7 +468,7 @@ public class IteratingQueryIT { stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); assertEquals( expectedResults.size(), count ); } @@ -485,7 +485,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); for ( int i = 0; i < size; i++ ) { Map<String, Object> entity = new HashMap<String, Object>(); @@ -498,7 +498,7 @@ public class IteratingQueryIT { long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( "select * where intersect = true AND intersect2 = true order by created" ); query.setLimit( queryLimit ); @@ -511,7 +511,7 @@ public class IteratingQueryIT { stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, 0 ); + logger.info( "Query took {} ms to return {} entities", stop - start, 0 ); assertEquals( 0, results.size() ); } @@ -530,7 +530,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<String> expectedResults = new ArrayList<String>( size / secondIncrement ); @@ -555,7 +555,7 @@ public class IteratingQueryIT { long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( "select * where intersect = true OR intersect2 = true order by created" ); query.setLimit( queryLimit ); @@ -582,7 +582,7 @@ public class IteratingQueryIT { stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); assertEquals( expectedResults.size(), count ); } @@ -601,7 +601,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<String> expectedResults = new ArrayList<String>( size / secondIncrement ); @@ -626,7 +626,7 @@ public class IteratingQueryIT { app.refreshIndex(); long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( "select * where NOT (intersect = true AND intersect2 = true) order by created" ); query.setLimit( queryLimit ); @@ -653,7 +653,7 @@ public class IteratingQueryIT { stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); assertEquals( expectedResults.size(), count ); } @@ -670,7 +670,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<String> expected = new ArrayList<String>( matchMax ); @@ -692,7 +692,7 @@ public class IteratingQueryIT { app.refreshIndex(); long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( "select * where searched = true order by created" ); query.setLimit( queryLimit ); @@ -712,7 +712,7 @@ public class IteratingQueryIT { assertTrue( results.getCursor() == null ); stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); assertEquals( expected.size(), count ); } @@ -728,7 +728,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<String> expected = new ArrayList<String>( size ); @@ -746,7 +746,7 @@ public class IteratingQueryIT { long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( "select * where index >= "+ startValue + " order by index desc" ); query.setLimit( queryLimit ); @@ -775,7 +775,7 @@ public class IteratingQueryIT { assertEquals( expected.size() - delta, count ); stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); } @@ -789,7 +789,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<String> expected = new ArrayList<String>( size ); @@ -807,7 +807,7 @@ public class IteratingQueryIT { long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( "select * where index >= "+ startValue + " order by index desc" ); query.setLimit( queryLimit ); @@ -836,7 +836,7 @@ public class IteratingQueryIT { assertEquals( expected.size() - delta, count ); stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); } @@ -850,7 +850,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<String> expected = new ArrayList<String>( size ); @@ -868,7 +868,7 @@ public class IteratingQueryIT { app.refreshIndex(); long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( "select * where index >= "+ startValue + " order by index desc" ); query.setLimit( queryLimit ); @@ -896,7 +896,7 @@ public class IteratingQueryIT { assertEquals( expected.size() - startValue, count ); stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); } @@ -910,7 +910,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<String> expected = new ArrayList<String>( size ); @@ -929,7 +929,7 @@ public class IteratingQueryIT { Thread.sleep(500); long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( "select * where index >= "+ startValue + " order by index desc" ); query.setLimit( queryLimit ); @@ -957,7 +957,7 @@ public class IteratingQueryIT { assertEquals( expected.size() - startValue , count ); stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); } @@ -972,7 +972,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<String> expected = new ArrayList<String>( size ); @@ -990,7 +990,7 @@ public class IteratingQueryIT { app.refreshIndex(); long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( String.format( "select * where index >= %d AND index <= %d order by index desc", startValue, @@ -1021,7 +1021,7 @@ public class IteratingQueryIT { assertEquals( expected.size() - startValue - delta +1 , count ); stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); } @@ -1036,7 +1036,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<String> expected = new ArrayList<String>( size ); @@ -1054,7 +1054,7 @@ public class IteratingQueryIT { long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL( String.format( "select * where index >= %d AND index <= %d order by index asc", startValue, @@ -1085,7 +1085,7 @@ public class IteratingQueryIT { assertEquals( expected.size() - startValue - delta + 1, count ); stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); } @@ -1102,7 +1102,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); for ( int i = 0; i < size; i++ ) { Map<String, Object> entity = new HashMap<String, Object>(); @@ -1114,7 +1114,7 @@ public class IteratingQueryIT { long stop = System.currentTimeMillis(); - LOG.info("Writes took {} ms", stop - start ); + logger.info("Writes took {} ms", stop - start ); Query query = new Query(); @@ -1141,7 +1141,7 @@ public class IteratingQueryIT { while ( results.getCursor() != null ); stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); assertEquals( size, count ); } @@ -1188,7 +1188,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); for ( int i = 0; i < size; i++ ) { Map<String, Object> entity = new HashMap<String, Object>(); @@ -1214,7 +1214,7 @@ public class IteratingQueryIT { long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); app.refreshIndex(); @@ -1248,7 +1248,7 @@ public class IteratingQueryIT { stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); assertEquals( sortedResults.size(), count ); } @@ -1267,7 +1267,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); Set<Entity> sortedResults = new TreeSet<Entity>( new Comparator<Entity>() { @@ -1320,7 +1320,7 @@ public class IteratingQueryIT { long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); app.refreshIndex(); @@ -1352,7 +1352,7 @@ public class IteratingQueryIT { stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); assertEquals( sortedResults.size(), count ); } @@ -1374,7 +1374,7 @@ public class IteratingQueryIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); for ( int i = 0; i < size; i++ ) { Map<String, Object> entity = new HashMap<String, Object>(); @@ -1388,7 +1388,7 @@ public class IteratingQueryIT { long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); Query query = Query.fromQL("select * where NOT boolean = false order by index asc"); query.setLimit( 2 ); @@ -1416,7 +1416,7 @@ public class IteratingQueryIT { while ( results.getCursor() != null ); stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, count ); + logger.info( "Query took {} ms to return {} entities", stop - start, count ); assertEquals( size/2, count ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/persistence/query/NotSubPropertyIT.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/query/NotSubPropertyIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/query/NotSubPropertyIT.java index 4208a85..f7308da 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/query/NotSubPropertyIT.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/query/NotSubPropertyIT.java @@ -44,7 +44,7 @@ import static org.junit.Assert.assertEquals; public class NotSubPropertyIT { - private static final Logger LOG = LoggerFactory.getLogger( IntersectionUnionPagingIT.class ); + private static final Logger logger = LoggerFactory.getLogger( IntersectionUnionPagingIT.class ); private static final String notQuery = "select * where NOT subArray.usageType = 'true' order by created asc"; @@ -93,7 +93,7 @@ public class NotSubPropertyIT { long start = System.currentTimeMillis(); - LOG.info( "Writing {} entities.", size ); + logger.info( "Writing {} entities.", size ); List<UUID> expected = new ArrayList<UUID>( size ); @@ -130,7 +130,7 @@ public class NotSubPropertyIT { long stop = System.currentTimeMillis(); - LOG.info( "Writes took {} ms", stop - start ); + logger.info( "Writes took {} ms", stop - start ); app.refreshIndex(); @@ -171,7 +171,7 @@ public class NotSubPropertyIT { long stop = System.currentTimeMillis(); - LOG.info( "Query took {} ms to return {} entities", stop - start, expectedResults.size() ); + logger.info( "Query took {} ms to return {} entities", stop - start, expectedResults.size() ); assertEquals( "All names returned", expectedResults.size(), expectedIndex ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/utils/IndexUtilsTest.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/utils/IndexUtilsTest.java b/stack/core/src/test/java/org/apache/usergrid/utils/IndexUtilsTest.java index c107f20..1758eb9 100644 --- a/stack/core/src/test/java/org/apache/usergrid/utils/IndexUtilsTest.java +++ b/stack/core/src/test/java/org/apache/usergrid/utils/IndexUtilsTest.java @@ -32,7 +32,7 @@ import static org.junit.Assert.assertEquals; public class IndexUtilsTest { - private static final Logger LOG = LoggerFactory.getLogger( IndexUtilsTest.class ); + private static final Logger logger = LoggerFactory.getLogger( IndexUtilsTest.class ); @Test @@ -45,7 +45,7 @@ public class IndexUtilsTest { assertEquals( 11, keywords.size() ); for ( String keyword : keywords ) { - LOG.info( keyword ); + logger.info( keyword ); } } @@ -63,7 +63,7 @@ public class IndexUtilsTest { List<Entry<String, Object>> l = IndexUtils.getKeyValueList( activity, false ); for ( Entry<String, Object> e : l ) { - LOG.info( e.getKey() + " = " + e.getValue() ); + logger.info( e.getKey() + " = " + e.getValue() ); } assertEquals( 7, l.size() ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/utils/JsonUtilsTest.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/utils/JsonUtilsTest.java b/stack/core/src/test/java/org/apache/usergrid/utils/JsonUtilsTest.java index 34461bc..e9eadbb 100644 --- a/stack/core/src/test/java/org/apache/usergrid/utils/JsonUtilsTest.java +++ b/stack/core/src/test/java/org/apache/usergrid/utils/JsonUtilsTest.java @@ -34,7 +34,7 @@ import static org.junit.Assert.assertEquals; public class JsonUtilsTest { - private static final Logger LOG = LoggerFactory.getLogger( JsonUtilsTest.class ); + private static final Logger logger = LoggerFactory.getLogger( JsonUtilsTest.class ); @SuppressWarnings("unchecked") @@ -70,7 +70,7 @@ public class JsonUtilsTest { List<Map.Entry<String, Object>> list = IndexUtils.getKeyValueList( path, json, true ); for ( Map.Entry<String, Object> e : list ) { - LOG.info( e.getKey() + " = " + e.getValue() ); + logger.info( e.getKey() + " = " + e.getValue() ); } } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/utils/ListUtilsTest.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/utils/ListUtilsTest.java b/stack/core/src/test/java/org/apache/usergrid/utils/ListUtilsTest.java index aa841c6..8f291c3 100644 --- a/stack/core/src/test/java/org/apache/usergrid/utils/ListUtilsTest.java +++ b/stack/core/src/test/java/org/apache/usergrid/utils/ListUtilsTest.java @@ -29,7 +29,7 @@ import static org.junit.Assert.assertEquals; public class ListUtilsTest { - private static final Logger LOG = LoggerFactory.getLogger( ListUtilsTest.class ); + private static final Logger logger = LoggerFactory.getLogger( ListUtilsTest.class ); @Test @@ -42,12 +42,12 @@ public class ListUtilsTest { l = ListUtils.flatten( l ); assertEquals( 9, l.size() ); - LOG.info( JsonUtils.mapToFormattedJsonString( l ) ); + logger.info( JsonUtils.mapToFormattedJsonString( l ) ); l = Arrays.asList( Arrays.asList( 1, 2, 3 ), 4, 5, 6, Arrays.asList( 7, 8, 9 ) ); l = ListUtils.flatten( l ); assertEquals( 9, l.size() ); - LOG.info( JsonUtils.mapToFormattedJsonString( l ) ); + logger.info( JsonUtils.mapToFormattedJsonString( l ) ); } } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/utils/MapUtilsTest.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/utils/MapUtilsTest.java b/stack/core/src/test/java/org/apache/usergrid/utils/MapUtilsTest.java index a587d4f..24a9e3a 100644 --- a/stack/core/src/test/java/org/apache/usergrid/utils/MapUtilsTest.java +++ b/stack/core/src/test/java/org/apache/usergrid/utils/MapUtilsTest.java @@ -26,16 +26,16 @@ import org.slf4j.LoggerFactory; public class MapUtilsTest { - private static final Logger LOG = LoggerFactory.getLogger( MapUtilsTest.class ); + private static final Logger logger = LoggerFactory.getLogger( MapUtilsTest.class ); @Test public void testMapUtils() { Map<String, ?> map = MapUtils.putPath( "a.b.c", 5 ); - LOG.info( JsonUtils.mapToFormattedJsonString( map ) ); + logger.info( JsonUtils.mapToFormattedJsonString( map ) ); map = MapUtils.putPath( map, "a.c", 6 ); - LOG.info( JsonUtils.mapToFormattedJsonString( map ) ); + logger.info( JsonUtils.mapToFormattedJsonString( map ) ); } } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/core/src/test/java/org/apache/usergrid/utils/TestInflector.java ---------------------------------------------------------------------- diff --git a/stack/core/src/test/java/org/apache/usergrid/utils/TestInflector.java b/stack/core/src/test/java/org/apache/usergrid/utils/TestInflector.java index 79d58f1..0499207 100644 --- a/stack/core/src/test/java/org/apache/usergrid/utils/TestInflector.java +++ b/stack/core/src/test/java/org/apache/usergrid/utils/TestInflector.java @@ -25,7 +25,7 @@ import static org.junit.Assert.assertEquals; public class TestInflector { - private static final Logger LOG = LoggerFactory.getLogger( TestInflector.class ); + private static final Logger logger = LoggerFactory.getLogger( TestInflector.class ); @Test @@ -68,14 +68,14 @@ public class TestInflector { public void testSingularize( String p, String expected ) { String s = Inflector.getInstance().singularize( p ); - LOG.info( "Inflector says singular form of " + p + " is " + s ); + logger.info( "Inflector says singular form of " + p + " is " + s ); assertEquals( "singular form of " + p + " not expected value", expected, s ); } public void testPluralize( String s, String expected ) { String p = Inflector.getInstance().pluralize( s ); - LOG.info( "Inflector says plural form of " + s + " is " + p ); + logger.info( "Inflector says plural form of " + s + " is " + p ); assertEquals( "plural form of " + s + " not expected value", expected, p ); } } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerStressTest.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerStressTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerStressTest.java index 1aabf75..c919c8f 100644 --- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerStressTest.java +++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerStressTest.java @@ -22,7 +22,6 @@ import java.util.HashSet; import java.util.Set; import org.apache.usergrid.StressTest; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -54,7 +53,7 @@ import static org.junit.Assert.assertNotNull; @UseModules(TestCollectionModule.class) @Category(StressTest.class) public class EntityCollectionManagerStressTest { - private static final Logger log = LoggerFactory.getLogger( + private static final Logger logger = LoggerFactory.getLogger( EntityCollectionManagerStressTest.class ); @Inject @@ -90,11 +89,11 @@ public class EntityCollectionManagerStressTest { ids.add(returned.getId()); if ( i % 1000 == 0 ) { - log.info(" Wrote: " + i); + logger.info(" Wrote: " + i); } } timer.stop(); - log.info( "Total time to write {} entries {}ms", limit, timer.getTime()); + logger.info( "Total time to write {} entries {}ms", limit, timer.getTime()); timer.reset(); timer.start(); @@ -104,6 +103,6 @@ public class EntityCollectionManagerStressTest { assertNotNull("Returned has a version", entity.getVersion()); } timer.stop(); - log.info( "Total time to read {} entries {}ms", limit, timer.getTime()); + logger.info( "Total time to read {} entries {}ms", limit, timer.getTime()); } } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/changelog/ChangeLogGeneratorImplTest.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/changelog/ChangeLogGeneratorImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/changelog/ChangeLogGeneratorImplTest.java index 0ca0649..7133e5a 100644 --- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/changelog/ChangeLogGeneratorImplTest.java +++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/changelog/ChangeLogGeneratorImplTest.java @@ -48,7 +48,7 @@ import static org.junit.Assert.assertTrue; * Test basic operation of change log */ public class ChangeLogGeneratorImplTest { - private static final Logger LOG = LoggerFactory.getLogger( ChangeLogGeneratorImplTest.class ); + private static final Logger logger = LoggerFactory.getLogger( ChangeLogGeneratorImplTest.class ); /** @@ -57,7 +57,7 @@ public class ChangeLogGeneratorImplTest { @Test public void testBasicOperation() throws ConnectionException { - LOG.info( "ChangeLogGeneratorImpl test" ); + logger.info( "ChangeLogGeneratorImpl test" ); final Id entityId = new SimpleId( "test" ); @@ -117,7 +117,7 @@ public class ChangeLogGeneratorImplTest { @Test public void testDeletedVersionFirst() throws ConnectionException { - LOG.info( "ChangeLogGeneratorImpl test" ); + logger.info( "ChangeLogGeneratorImpl test" ); final Id entityId = new SimpleId( "test" ); @@ -175,7 +175,7 @@ public class ChangeLogGeneratorImplTest { @Test public void testDeletedMiddle() throws ConnectionException { - LOG.info( "ChangeLogGeneratorImpl test" ); + logger.info( "ChangeLogGeneratorImpl test" ); final Id entityId = new SimpleId( "test" ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteOptimisticVerifyTest.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteOptimisticVerifyTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteOptimisticVerifyTest.java index 1af8867..6a705e4 100644 --- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteOptimisticVerifyTest.java +++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteOptimisticVerifyTest.java @@ -58,7 +58,7 @@ import static org.mockito.Mockito.when; @UseModules( TestCollectionModule.class ) public class WriteOptimisticVerifyTest extends AbstractMvccEntityStageTest { - private static final Logger log = LoggerFactory.getLogger(WriteOptimisticVerifyTest.class); + private static final Logger logger = LoggerFactory.getLogger(WriteOptimisticVerifyTest.class); @Override protected void validateStage( final CollectionIoEvent<MvccEntity> event ) { @@ -150,7 +150,7 @@ public class WriteOptimisticVerifyTest extends AbstractMvccEntityStageTest { newStage.call( new CollectionIoEvent<>(scope, mvccEntity)); } catch (WriteOptimisticVerifyException e) { - log.info("Error", e); + logger.info("Error", e); conflictDetected = true; rollbackAction.call( e ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/data/AbstractMigrationPlugin.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/data/AbstractMigrationPlugin.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/data/AbstractMigrationPlugin.java index 9671bc5..63af58d 100644 --- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/data/AbstractMigrationPlugin.java +++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/data/AbstractMigrationPlugin.java @@ -38,7 +38,7 @@ public abstract class AbstractMigrationPlugin implements MigrationPlugin { - private static final Logger LOG = LoggerFactory.getLogger( AbstractMigrationPlugin.class ); + private static final Logger logger = LoggerFactory.getLogger( AbstractMigrationPlugin.class ); private final Set<DataMigration> entityDataMigrations; @@ -57,7 +57,7 @@ public abstract class AbstractMigrationPlugin implements MigrationPlugin { //run until complete while(runMigration( observer )){ - LOG.info( "Migration complete, checking for next run" ); + logger.info( "Migration complete, checking for next run" ); } } @@ -102,7 +102,7 @@ public abstract class AbstractMigrationPlugin implements MigrationPlugin { } if(migrationToExecute == null){ - LOG.info( "No migrations found to execute" ); + logger.info( "No migrations found to execute" ); return false; } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/TestUtils.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/TestUtils.java b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/TestUtils.java index f693857..8ee7e36 100644 --- a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/TestUtils.java +++ b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/TestUtils.java @@ -39,7 +39,7 @@ import com.netflix.astyanax.model.ColumnFamily; */ public class TestUtils { - private static final Logger log = LoggerFactory.getLogger( TestUtils.class ); + private static final Logger logger = LoggerFactory.getLogger( TestUtils.class ); /** * Create the kespace, ignore exceptions if it already exists @@ -58,7 +58,7 @@ public class TestUtils { keyspace.createKeyspace( options ); } catch ( Throwable t ) { - log.info( "Error on creating keyspace, ignoring", t ); + logger.info( "Error on creating keyspace, ignoring", t ); } @@ -70,7 +70,7 @@ public class TestUtils { try{ keyspace.createColumnFamily( columnFamily, new HashMap<String, Object>() ); }catch(Exception e){ - log.error( "Error on creating column family, ignoring" , e); + logger.error( "Error on creating column family, ignoring" , e); } } } http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/OrderedMergeTest.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/OrderedMergeTest.java b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/OrderedMergeTest.java index da35ec5..23d7eb9 100644 --- a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/OrderedMergeTest.java +++ b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/OrderedMergeTest.java @@ -42,7 +42,7 @@ import static org.junit.Assert.fail; public class OrderedMergeTest { - private static final Logger log = LoggerFactory.getLogger( OrderedMergeTest.class ); + private static final Logger logger = LoggerFactory.getLogger( OrderedMergeTest.class ); @Test @@ -74,7 +74,7 @@ public class OrderedMergeTest { @Override public void onNext( final Integer integer ) { - log.info( "onNext invoked with {}", integer ); + logger.info( "onNext invoked with {}", integer ); results.add( integer ); } } ); @@ -122,14 +122,14 @@ public class OrderedMergeTest { @Override public void onError( final Throwable e ) { - log.error("Test failed due to exception", e); + logger.error("Test failed due to exception", e); fail( "An error was thrown " ); } @Override public void onNext( final Integer integer ) { - log.info( "onNext invoked with {}", integer ); + logger.info( "onNext invoked with {}", integer ); results.add( integer ); } } ); @@ -182,7 +182,7 @@ public class OrderedMergeTest { @Override public void onError( final Throwable e ) { - log.error( "Expected error thrown", e ); + logger.error( "Expected error thrown", e ); if ( e.getMessage().contains( "The maximum queue size of 2 has been reached" ) ) { errorThrown[0] = true; @@ -194,7 +194,7 @@ public class OrderedMergeTest { @Override public void onNext( final Integer integer ) { - log.info( "onNext invoked with {}", integer ); + logger.info( "onNext invoked with {}", integer ); results.add( integer ); } } ); @@ -250,7 +250,7 @@ public class OrderedMergeTest { @Override public void onNext(final Integer integer) { - log.info("onNext invoked with {}", integer); + logger.info("onNext invoked with {}", integer); results.add(integer); } }); @@ -306,7 +306,7 @@ public class OrderedMergeTest { @Override public void onError( final Throwable e ) { - log.error("Expected error thrown", e); + logger.error("Expected error thrown", e); if ( e.getMessage().contains( "The maximum queue size of 2 has been reached" ) ) { errorThrown[0] = true; @@ -318,7 +318,7 @@ public class OrderedMergeTest { @Override public void onNext( final Integer integer ) { - log.info("onNext invoked with {}", integer); + logger.info("onNext invoked with {}", integer); } } ); @@ -373,14 +373,14 @@ public class OrderedMergeTest { @Override public void onError( final Throwable e ) { - log.error("Test failed due to exception", e); + logger.error("Test failed due to exception", e); fail("An error was thrown "); } @Override public void onNext( final Integer integer ) { - log.info( "onNext invoked with {}", integer ); + logger.info( "onNext invoked with {}", integer ); results.add(integer); } } ); @@ -449,7 +449,7 @@ public class OrderedMergeTest { @Override public void onNext( final Integer integer ) { - log.info( "onNext invoked with {}", integer ); + logger.info( "onNext invoked with {}", integer ); results.add( integer ); } } ); @@ -473,10 +473,10 @@ public class OrderedMergeTest { final AtomicInteger i = new AtomicInteger(); Observable.from(expected).doOnNext(x -> { - log.info("print " + x); + logger.info("print " + x); i.set(x); - }).doOnError(e -> log.error(e.getMessage())).subscribe(); - log.info("last"); + }).doOnError(e -> logger.error(e.getMessage())).subscribe(); + logger.info("last"); assertTrue(i.get()==0); } @@ -487,10 +487,10 @@ public class OrderedMergeTest { List<Integer> expected = Arrays.asList(10, 9, 9, 8, 7, 6, 6, 5, 5, 5, 4, 3, 3, 2, 2, 1, 1, 0); Observable.from(expected).doOnNext(x -> { - log.info("print " + x); + logger.info("print " + x); throw new RuntimeException(); - }).doOnError(e -> log.error(e.getMessage())).subscribe(); - log.info("last"); + }).doOnError(e -> logger.error(e.getMessage())).subscribe(); + logger.info("last"); fail(); } catch (Exception e) { } @@ -546,7 +546,7 @@ public class OrderedMergeTest { @Override public void onNext( final Integer integer ) { - log.info( "onNext invoked with {}", integer ); + logger.info( "onNext invoked with {}", integer ); results.add( integer ); } } ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/stage/EdgeDeleteRepairImpl.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/stage/EdgeDeleteRepairImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/stage/EdgeDeleteRepairImpl.java index a87a079..aaa9814 100644 --- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/stage/EdgeDeleteRepairImpl.java +++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/stage/EdgeDeleteRepairImpl.java @@ -20,20 +20,14 @@ package org.apache.usergrid.persistence.graph.impl.stage; -import java.util.Iterator; import java.util.UUID; -import com.google.common.base.Optional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.usergrid.persistence.core.rx.ObservableIterator; import org.apache.usergrid.persistence.core.scope.ApplicationScope; -import org.apache.usergrid.persistence.graph.Edge; import org.apache.usergrid.persistence.graph.GraphFig; import org.apache.usergrid.persistence.graph.MarkedEdge; -import org.apache.usergrid.persistence.graph.SearchByEdgeType; -import org.apache.usergrid.persistence.graph.impl.SimpleSearchByEdge; import org.apache.usergrid.persistence.graph.serialization.EdgeSerialization; import com.google.common.base.Preconditions; @@ -42,8 +36,6 @@ import com.netflix.astyanax.Keyspace; import com.netflix.astyanax.connectionpool.exceptions.ConnectionException; import rx.Observable; -import rx.functions.Action1; -import rx.functions.Func1; /** @@ -53,7 +45,7 @@ import rx.functions.Func1; public class EdgeDeleteRepairImpl implements EdgeDeleteRepair { - private static final Logger LOG = LoggerFactory.getLogger( EdgeDeleteRepairImpl.class ); + private static final Logger logger = LoggerFactory.getLogger( EdgeDeleteRepairImpl.class ); protected final EdgeSerialization storageSerialization; protected final GraphFig graphFig; @@ -82,7 +74,7 @@ public class EdgeDeleteRepairImpl implements EdgeDeleteRepair { return Observable.just( edge ).filter( markedEdge-> markedEdge.isDeleted() ) .doOnNext( markedEdge -> { //it's still in the same state as it was when we queued it. Remove it - LOG.info( "Removing edge {} ", markedEdge ); + logger.info( "Removing edge {} ", markedEdge ); //remove from the commit log http://git-wip-us.apache.org/repos/asf/usergrid/blob/bc33c88d/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java index 8fa8914..116e526 100644 --- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java +++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java @@ -57,7 +57,7 @@ import com.netflix.astyanax.util.TimeUUIDUtils; public class NodeShardAllocationImpl implements NodeShardAllocation { - private static final Logger LOG = LoggerFactory.getLogger( NodeShardAllocationImpl.class ); + private static final Logger logger = LoggerFactory.getLogger( NodeShardAllocationImpl.class ); private final EdgeShardSerialization edgeShardSerialization; private final EdgeColumnFamilies edgeColumnFamilies; @@ -138,13 +138,13 @@ public class NodeShardAllocationImpl implements NodeShardAllocation { * Nothing to do, it's been created very recently, we don't create a new one */ if ( shardEntryGroup.isCompactionPending() ) { - if (LOG.isTraceEnabled()) LOG.trace( "Shard entry group {} is compacting, not auditing", shardEntryGroup ); + if (logger.isTraceEnabled()) logger.trace( "Shard entry group {} is compacting, not auditing", shardEntryGroup ); return false; } //we can't allocate, we have more than 1 write shard currently. We need to compact first if ( shardEntryGroup.entrySize() != 1 ) { - if (LOG.isTraceEnabled()) LOG.trace( "Shard entry group {} does not have 1 entry, not allocating", shardEntryGroup ); + if (logger.isTraceEnabled()) logger.trace( "Shard entry group {} does not have 1 entry, not allocating", shardEntryGroup ); return false; } @@ -158,7 +158,7 @@ public class NodeShardAllocationImpl implements NodeShardAllocation { if ( shard.getCreatedTime() >= minTime ) { - if (LOG.isTraceEnabled()) LOG.trace( "Shard entry group {} and shard {} is before the minimum created time of {}. Not allocating.does not have 1 entry, not allocating", shardEntryGroup, shard, minTime ); + if (logger.isTraceEnabled()) logger.trace( "Shard entry group {} and shard {} is before the minimum created time of {}. Not allocating.does not have 1 entry, not allocating", shardEntryGroup, shard, minTime ); return false; } @@ -199,7 +199,7 @@ public class NodeShardAllocationImpl implements NodeShardAllocation { if ( !edges.hasNext() ) { - if (LOG.isTraceEnabled()) LOG.trace( + if (logger.isTraceEnabled()) logger.trace( "Tried to allocate a new shard for edge meta data {}, " + "but no max value could be found in that row", directedEdgeMeta ); return false; @@ -231,7 +231,7 @@ public class NodeShardAllocationImpl implements NodeShardAllocation { * Sanity check in case we audit before we have a full shard */ if ( marked == null ) { - if (LOG.isTraceEnabled()) LOG.trace( "Shard {} in shard group {} not full, not splitting", shard, shardEntryGroup ); + if (logger.isTraceEnabled()) logger.trace( "Shard {} in shard group {} not full, not splitting", shard, shardEntryGroup ); return false; } @@ -239,7 +239,7 @@ public class NodeShardAllocationImpl implements NodeShardAllocation { final Shard newShard = new Shard( marked.getTimestamp(), createTimestamp, false ); - LOG.info( "Allocating new shard {} for edge meta {}", newShard, directedEdgeMeta ); + logger.info( "Allocating new shard {} for edge meta {}", newShard, directedEdgeMeta ); final MutationBatch batch = this.edgeShardSerialization.writeShardMeta( scope, newShard, directedEdgeMeta );
