You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/09/22 17:28:24 UTC

git commit: Removed I/O scheduler so that subscriptions run in the calling thread.

Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o-comments b88fe7ef8 -> 525074213


Removed I/O scheduler so that subscriptions run in the calling thread.


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

Branch: refs/heads/two-dot-o-comments
Commit: 525074213c7fecbcd6440018f37cd9139080a872
Parents: b88fe7e
Author: Todd Nine <to...@apache.org>
Authored: Mon Sep 22 09:28:00 2014 -0600
Committer: Todd Nine <to...@apache.org>
Committed: Mon Sep 22 09:28:00 2014 -0600

----------------------------------------------------------------------
 .../collection/impl/EntityCollectionManagerImpl.java         | 8 ++++----
 .../collection/mvcc/stage/write/WriteUniqueVerify.java       | 2 +-
 .../usergrid/persistence/graph/impl/GraphManagerImpl.java    | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/52507421/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
index 9025b66..96a7ed2 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
@@ -161,7 +161,7 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
         Preconditions.checkNotNull( entityId.getUuid(), "Entity id is required in this stage" );
         Preconditions.checkNotNull( entityId.getType(), "Entity type is required in this stage" );
 
-        return Observable.from( new CollectionIoEvent<Id>( collectionScope, entityId ) ).subscribeOn( Schedulers.io() )
+        return Observable.from( new CollectionIoEvent<Id>( collectionScope, entityId ) )
                          .map( markStart ).map( markCommit );
     }
 
@@ -173,7 +173,7 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
         Preconditions.checkNotNull( entityId.getUuid(), "Entity id uuid required in load stage" );
         Preconditions.checkNotNull( entityId.getType(), "Entity id type required in load stage" );
 
-        return Observable.from( new CollectionIoEvent<Id>( collectionScope, entityId ) ).subscribeOn( Schedulers.io() )
+        return Observable.from( new CollectionIoEvent<Id>( collectionScope, entityId ) )
                          .map( load );
     }
 
@@ -204,7 +204,7 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
 
                //we an update, signal the fix
 
-                //HystrixCassandra.async( Observable.from( new CollectionIoEvent<Id>(collectionScope, entityId ) ).map( load ).subscribeOn( Schedulers.io() ) ).subscribe();
+                //TODO T.N Change this to use request collapsing
                 Observable.from( new CollectionIoEvent<Id>(collectionScope, entityId ) ).map( load ).subscribeOn( Schedulers.io() ).subscribe();
 
 
@@ -215,7 +215,7 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
     // fire the stages
     public Observable<CollectionIoEvent<MvccEntity>> stageRunner( CollectionIoEvent<Entity> writeData,WriteStart writeState ) {
 
-        return Observable.from( writeData ).subscribeOn( Schedulers.io() ).map( writeState ).flatMap(
+        return Observable.from( writeData ).map( writeState ).flatMap(
                 new Func1<CollectionIoEvent<MvccEntity>, Observable<CollectionIoEvent<MvccEntity>>>() {
 
                     @Override

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/52507421/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
index aa878cb..713703f 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
@@ -142,7 +142,7 @@ public class WriteUniqueVerify implements
 
         //short circuit.  If we zip up nothing, we block forever.
         if(fields.size() == 0){
-            return Observable.from(ioevent ).subscribeOn( Schedulers.io() );
+            return Observable.from(ioevent );
         }
 
         //

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/52507421/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
index ae38372..8b8a3ee 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
@@ -123,7 +123,7 @@ public class GraphManagerImpl implements GraphManager {
 
         final MarkedEdge markedEdge = new SimpleMarkedEdge( edge, false );
 
-        return Observable.from( markedEdge ).subscribeOn( Schedulers.io() ).map( new Func1<MarkedEdge, Edge>() {
+        return Observable.from( markedEdge ).map( new Func1<MarkedEdge, Edge>() {
             @Override
             public Edge call( final MarkedEdge edge ) {
 
@@ -151,7 +151,7 @@ public class GraphManagerImpl implements GraphManager {
         final MarkedEdge markedEdge = new SimpleMarkedEdge( edge, true );
 
 
-        return Observable.from( markedEdge ).subscribeOn( Schedulers.io() ).map( new Func1<MarkedEdge, Edge>() {
+        return Observable.from( markedEdge ).map( new Func1<MarkedEdge, Edge>() {
             @Override
             public Edge call( final MarkedEdge edge ) {
 
@@ -179,7 +179,7 @@ public class GraphManagerImpl implements GraphManager {
 
     @Override
     public Observable<Id> deleteNode( final Id node, final long timestamp ) {
-        return Observable.from( node ).subscribeOn( Schedulers.io() ).map( new Func1<Id, Id>() {
+        return Observable.from( node ).map( new Func1<Id, Id>() {
             @Override
             public Id call( final Id id ) {