usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [15/36] usergrid git commit: Commented out the delay because it broke tests. Cleaned up some commented out code and spaces.
Date Fri, 08 Apr 2016 20:21:02 GMT
Commented out the delay because it broke tests.
Cleaned up some commented out code and spaces.


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

Branch: refs/heads/release-2.1.1
Commit: 1ba12b882ac9454a40e938199007a575b8d13078
Parents: e1d60b4
Author: George Reyes <grey@apache.org>
Authored: Thu Mar 24 10:37:57 2016 -0700
Committer: George Reyes <grey@apache.org>
Committed: Thu Mar 24 10:37:57 2016 -0700

----------------------------------------------------------------------
 .../corepersistence/CpRelationManager.java      | 38 --------------------
 .../corepersistence/index/IndexServiceImpl.java |  3 --
 .../index/ReIndexServiceImpl.java               |  2 ++
 .../index/impl/EntityToMapConverter.java        |  8 -----
 .../rest/applications/CollectionResource.java   |  8 -----
 .../rest/applications/ServiceResource.java      |  2 --
 6 files changed, 2 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/1ba12b88/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
index faffbba..739aea4 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
@@ -408,44 +408,6 @@ public class CpRelationManager implements RelationManager {
 
         GraphManager gm = managerCache.getGraphManager( applicationScope );
 
-//        //do logic here
-//        String jsonMap = mm.getString( collectionName );
-//
-//        Set<String> defaultProperties = null;
-//
-//        if(jsonMap != null) {
-//
-//            Map jsonMapData = ( Map ) JsonUtils.parse( jsonMap );
-//            Schema schema = Schema.getDefaultSchema();
-//            defaultProperties = schema.getRequiredProperties( collectionName );
-//            //TODO: additional logic to
-//            ArrayList fieldsToKeep = ( ArrayList ) jsonMapData.get( "fields" );
-//            defaultProperties.addAll( fieldsToKeep );
-//
-//        }
-//
-//        Collection<String> trimmedFields = null;
-//        if(defaultProperties!=null){
-//           // if(cpHeadEntity.getFields())
-//            final Set<String> finalDefaultProperties = defaultProperties;
-//            trimmedFields = memberEntity.getFieldMap().keySet();
-//            Iterator collectionIterator = trimmedFields.iterator();
-//            while(collectionIterator.hasNext()){
-//                if(!finalDefaultProperties.contains( collectionIterator.next() )){
-//                    collectionIterator.remove();
-//                }
-//            }
-
-
-//            trimmedFields.forEach( element -> {
-//                if(!finalDefaultProperties.contains( element )){
-//                    memberEntity.removeField( element );
-//                }
-//            });
-
-//        }
-
-
         gm.writeEdge( edge ).doOnNext( writtenEdge -> {
             if ( logger.isDebugEnabled() ) {
                 logger.debug( "Wrote edge {}", writtenEdge );

http://git-wip-us.apache.org/repos/asf/usergrid/blob/1ba12b88/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java
index f8d7aa5..c0f2e1b 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/IndexServiceImpl.java
@@ -119,9 +119,6 @@ public class IndexServiceImpl implements IndexService {
         //we may have to index  we're indexing from source->target here
         final Observable<IndexEdge> sourceEdgesToIndex = edgesToTarget.map( edge ->
generateScopeFromSource( edge ) );
 
-
-
-
         //do our observable for batching
         //try to send a whole batch if we can
         final Observable<IndexOperationMessage>  batches =  sourceEdgesToIndex

http://git-wip-us.apache.org/repos/asf/usergrid/blob/1ba12b88/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/ReIndexServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/ReIndexServiceImpl.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/ReIndexServiceImpl.java
index da2ef1d..fc1c97f 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/ReIndexServiceImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/ReIndexServiceImpl.java
@@ -21,6 +21,7 @@ package org.apache.usergrid.corepersistence.index;
 
 
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 
 import org.apache.usergrid.persistence.index.EntityIndexFactory;
@@ -125,6 +126,7 @@ public class ReIndexServiceImpl implements ReIndexService {
         final Observable<List<EdgeScope>> runningReIndex = allEntityIdsObservable.getEdgesToEntities(
applicationScopes,
             reIndexRequestBuilder.getCollectionName(), cursorSeek.getSeekValue() )
             .buffer( indexProcessorFig.getReindexBufferSize())
+            //.delay( 50, TimeUnit.MILLISECONDS )
             .doOnNext(edges -> {
 
                 logger.info("Sending batch of {} to be indexed.", edges.size());

http://git-wip-us.apache.org/repos/asf/usergrid/blob/1ba12b88/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverter.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverter.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverter.java
index 77a8d92..b43f4bb 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverter.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverter.java
@@ -17,22 +17,15 @@
 package org.apache.usergrid.persistence.index.impl;
 
 
-import java.util.ArrayList;
-import java.util.Collection;
 import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.index.IndexEdge;
-import org.apache.usergrid.persistence.map.MapManager;
-import org.apache.usergrid.persistence.map.MapScope;
 import org.apache.usergrid.persistence.model.entity.Entity;
 import org.apache.usergrid.persistence.model.entity.EntityMap;
 import org.apache.usergrid.persistence.model.entity.Id;
-import org.apache.usergrid.persistence.model.entity.SimpleId;
 
 import static org.apache.usergrid.persistence.index.impl.IndexingUtils.APPLICATION_ID_FIELDNAME;
 import static org.apache.usergrid.persistence.index.impl.IndexingUtils.EDGE_NAME_FIELDNAME;
@@ -51,7 +44,6 @@ import static org.apache.usergrid.persistence.index.impl.IndexingUtils.getType;
 import static org.apache.usergrid.persistence.index.impl.IndexingUtils.nodeId;
 
 
-
 /**
  * Convert a CP entity to an elasticsearch document
  */

http://git-wip-us.apache.org/repos/asf/usergrid/blob/1ba12b88/stack/rest/src/main/java/org/apache/usergrid/rest/applications/CollectionResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/CollectionResource.java
b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/CollectionResource.java
index 8b05a79..b674ac4 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/CollectionResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/CollectionResource.java
@@ -144,14 +144,6 @@ public class CollectionResource extends ServiceResource {
                                              @QueryParam("callback") @DefaultValue("callback")
String callback )
         throws Exception {
 
-        System.out.println();
-//        logger.info( "Rebuilding collection {} in  application {}", collectionName, applicationIdStr
);
-//
-//
-//
-//        final UUID appId = UUIDUtils.tryExtractUUID( applicationIdStr );
-//
-        //TODO: check to see how all of this runs with service and query params. Ideally
none should be passed in.
         final ReIndexRequestBuilder request =
             createRequest().withApplicationId( services.getApplicationId() ).withCollection(
                 String.valueOf( getServiceParameters().get( 0 ) ) );

http://git-wip-us.apache.org/repos/asf/usergrid/blob/1ba12b88/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ServiceResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ServiceResource.java
b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ServiceResource.java
index c723366..9e7bc91 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ServiceResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ServiceResource.java
@@ -297,8 +297,6 @@ public class ServiceResource extends AbstractContextResource {
         httpServletRequest.setAttribute( "applicationId", services.getApplicationId() );
 
         return results;
-
-
     }
 
     public ServiceResults executeServicePostRequestForSchema(UriInfo ui, ApiResponse response,
ServiceAction action,


Mime
View raw message