usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [60/63] [abbrv] usergrid git commit: merge from 2.1-release
Date Fri, 09 Oct 2015 21:37:40 GMT
merge from 2.1-release


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

Branch: refs/heads/remove-inmemory-event-service
Commit: bce1359b8874406e9d03da03eea4fe19e91dafcd
Parents: 3b838c8 9ceae77
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Thu Oct 1 09:59:48 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Thu Oct 1 09:59:48 2015 -0600

----------------------------------------------------------------------
 stack/awscluster/gatling-cluster-cf.json        |   2 +-
 .../batch/service/JobSchedulerService.java      |   2 +-
 .../corepersistence/CpManagerCache.java         |  12 +-
 .../usergrid/corepersistence/ManagerCache.java  |   7 +
 .../asyncevents/AmazonAsyncEventService.java    | 151 +++++++++++++------
 .../asyncevents/AsyncIndexProvider.java         |  12 +-
 .../asyncevents/InMemoryAsyncEventService.java  |  26 +++-
 .../corepersistence/index/IndexServiceImpl.java |  22 +--
 .../read/search/CandidateEntityFilter.java      |  21 +--
 .../pipeline/read/search/CandidateIdFilter.java |  15 +-
 .../index/AmazonAsyncEventServiceTest.java      |   5 +-
 .../index/InMemoryAsycIndexServiceTest.java     |   5 +-
 .../corepersistence/index/IndexServiceTest.java |  18 ++-
 .../persistence/index/EntityIndexBatch.java     |   8 +-
 .../index/impl/EsEntityIndexBatchImpl.java      |   6 +-
 .../index/impl/EsEntityIndexFactoryImpl.java    |   4 -
 .../index/impl/EsEntityIndexImpl.java           |   5 +-
 .../index/impl/EsIndexProducerImpl.java         |  39 +++--
 .../index/impl/IndexOperationMessage.java       |   7 +
 .../index/impl/IndexRefreshCommandImpl.java     |   2 +-
 .../persistence/index/impl/EntityIndexTest.java |  54 +++----
 .../persistence/index/impl/GeoPagingTest.java   |   3 +-
 .../index/impl/IndexLoadTestsIT.java            |   9 +-
 stack/pom.xml                                   |   2 +-
 .../exceptions/AbstractExceptionMapper.java     |   2 +-
 stack/rest_integration_tests/lib/entities.js    |  41 +++++
 .../test/entities/create.js                     |  24 ++-
 .../management/AppInfoMigrationPlugin.java      |  11 ++
 .../assets/data/AwsSdkS3BinaryStore.java        |  37 ++---
 29 files changed, 360 insertions(+), 192 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/bce1359b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/search/CandidateEntityFilter.java
----------------------------------------------------------------------
diff --cc stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/search/CandidateEntityFilter.java
index ac2962a,ceb18ae..551d083
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/search/CandidateEntityFilter.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/search/CandidateEntityFilter.java
@@@ -177,7 -178,8 +178,7 @@@ public class CandidateEntityFilter exte
                  validate( candidateResult );
              }
  
-             producer.put(batch).subscribe();
+             indexProducer.put(batch.build()).subscribe();
 -
          }
  
  

http://git-wip-us.apache.org/repos/asf/usergrid/blob/bce1359b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/search/CandidateIdFilter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/usergrid/blob/bce1359b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
index 3679887,68830ca..1ffcd02
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexBatchImpl.java
@@@ -120,8 -118,9 +118,8 @@@ public class EsEntityIndexBatchImpl imp
          return deindex( searchEdge, entity.getId(), entity.getVersion() );
      }
  
 -
      @Override
-     public IndexOperationMessage build(){
+     public IndexOperationMessage build() {
          return container;
      }
  

http://git-wip-us.apache.org/repos/asf/usergrid/blob/bce1359b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsIndexProducerImpl.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsIndexProducerImpl.java
index 9223293,2b36fc8..b784c2d
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsIndexProducerImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsIndexProducerImpl.java
@@@ -24,7 -22,6 +22,9 @@@ import java.util.Set
  import java.util.concurrent.atomic.AtomicLong;
  
  import com.codahale.metrics.Histogram;
++
++
 +import org.apache.usergrid.persistence.index.EntityIndexBatch;
  import org.elasticsearch.action.WriteConsistencyLevel;
  import org.elasticsearch.action.bulk.BulkItemResponse;
  import org.elasticsearch.action.bulk.BulkRequestBuilder;
@@@ -88,14 -85,8 +88,13 @@@ public class EsIndexProducerImpl implem
  
      }
  
-     public Observable<IndexOperationMessage>  put( EntityIndexBatch batch ) {
-         Preconditions.checkNotNull(batch, "Batch cannot be null");
-         return put(batch.build());
++    @Override
++    public Observable<IndexOperationMessage> put(EntityIndexBatch message) {
++        return put(message.build());
 +    }
 +
      public Observable<IndexOperationMessage>  put( IndexOperationMessage message )
{
- 
-             Preconditions.checkNotNull(message, "Message cannot be null");
+         Preconditions.checkNotNull(message, "Message cannot be null");
          indexSizeCounter.inc(message.getDeIndexRequests().size());
          indexSizeCounter.inc(message.getIndexRequests().size());
          return  processBatch(message);

http://git-wip-us.apache.org/repos/asf/usergrid/blob/bce1359b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityIndexTest.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityIndexTest.java
index b8136fa,5243d5a..3a91f12
--- a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityIndexTest.java
+++ b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityIndexTest.java
@@@ -135,11 -136,11 +136,11 @@@ public class EntityIndexTest extends Ba
          entity1.setField(new UUIDField(IndexingUtils.ENTITY_ID_FIELDNAME, UUID.randomUUID()));
          entity1.setField( new StringField( "testfield", "test" ) );
          entity1.setField(new IntegerField("ordinal", 0));
 -        entity1.setField(new UUIDField("testuuid",uuid));
 +        entity1.setField(new UUIDField("testuuid", uuid));
  
  
-         batch.index(indexEdge, entity1);
-         indexProducer.put(batch).subscribe();
+         batch.index( indexEdge, entity1 );
+         indexProducer.put(batch.build()).subscribe();
  
  
          Entity entity2 = new Entity( entityType );
@@@ -147,13 -148,13 +148,13 @@@
  
  
          List<String> list = new ArrayList<>();
 -        list.add( "test" );
 -        entity2.setField( new ArrayField<>( "testfield", list ) );
 -        entity2.setField( new IntegerField( "ordinal", 1 ) );
 +        list.add("test");
 +        entity2.setField(new ArrayField<>("testfield", list));
 +        entity2.setField(new IntegerField("ordinal", 1));
  
  
-         batch.index(indexEdge, entity2);
-         indexProducer.put(batch).subscribe();
+         batch.index( indexEdge, entity2 );
+         indexProducer.put(batch.build()).subscribe();;
  
          entityIndex.refreshAsync().toBlocking().first();
  
@@@ -362,11 -363,11 +363,11 @@@
  
  
          Entity entity = EntityIndexMapUtils.fromMap( entityMap );
 -        EntityUtils.setId( entity, new SimpleId( "fastcar" ) );
 -        EntityUtils.setVersion( entity, UUIDGenerator.newTimeUUID() );
 -        entity.setField( new UUIDField( IndexingUtils.ENTITY_ID_FIELDNAME, UUID.randomUUID()
) );
 +        EntityUtils.setId(entity, new SimpleId( "fastcar" ) );
 +        EntityUtils.setVersion(entity, UUIDGenerator.newTimeUUID() );
 +        entity.setField(new UUIDField(IndexingUtils.ENTITY_ID_FIELDNAME, UUID.randomUUID()
) );
  
-         indexProducer.put(entityIndex.createBatch().index( searchEdge, entity )).toBlocking().last();
+         indexProducer.put(entityIndex.createBatch().index( searchEdge, entity ).build()).subscribe();
          entityIndex.refreshAsync().toBlocking().first();
  
          CandidateResults candidateResults = entityIndex

http://git-wip-us.apache.org/repos/asf/usergrid/blob/bce1359b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/GeoPagingTest.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/GeoPagingTest.java
index 4d727c3,98b85f1..e74e95e
--- a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/GeoPagingTest.java
+++ b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/GeoPagingTest.java
@@@ -70,8 -70,10 +70,7 @@@ public class GeoPagingTest extends Base
      @Inject
      public EntityIndexFactory eif;
  
- 
      @Inject
 -    IndexProducer indexProducer;
 -
 -    @Inject
      @Rule
      public MigrationManagerRule migrationManagerRule;
  

http://git-wip-us.apache.org/repos/asf/usergrid/blob/bce1359b/stack/pom.xml
----------------------------------------------------------------------


Mime
View raw message