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 2015/11/13 00:28:13 UTC

[1/2] usergrid git commit: Addresses incorrect usages of .subscribe() and removed obsolete TODOs

Repository: usergrid
Updated Branches:
  refs/heads/master 14dd48d39 -> c3c2818e2


Addresses incorrect usages of .subscribe() and removed obsolete TODOs


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

Branch: refs/heads/master
Commit: d4d3ed3ed7e1e1da501b7b886f890c0b5cedffdf
Parents: 6f61b05
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Nov 12 16:27:27 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Thu Nov 12 16:27:27 2015 -0700

----------------------------------------------------------------------
 .../corepersistence/migration/DeDupConnectionDataMigration.java   | 2 +-
 .../persistence/collection/impl/EntityCollectionManagerImpl.java  | 3 +--
 .../persistence/collection/mvcc/stage/write/WriteCommit.java      | 1 -
 .../persistence/collection/mvcc/stage/write/WriteStart.java       | 2 --
 .../serialization/impl/shard/impl/NodeShardAllocationImpl.java    | 1 -
 .../impl/shard/impl/ShardedEdgeSerializationImpl.java             | 3 +--
 .../usergrid/persistence/graph/impl/NodeDeleteListenerTest.java   | 1 -
 .../index/migration/EsIndexMappingMigrationPlugin.java            | 2 +-
 8 files changed, 4 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java
index 77deac8..fc0f8c3 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java
@@ -72,7 +72,7 @@ public class DeDupConnectionDataMigration implements DataMigration {
         } ).doOnNext( total -> {
             logger.info( "Completed de-duping {} edges", total );
             observer.complete();
-        } ).subscribe(); //want this to run through all records
+        } ).toBlocking().lastOrDefault( null ); //want this to run through all records
 
         return migrationVersion;
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/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 8079ad9..ce30568 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
@@ -84,8 +84,7 @@ import rx.functions.Action0;
 
 
 /**
- * Simple implementation.  Should perform  writes, delete and load. <p/> TODO: maybe refactor the stage operations into
- * their own classes for clarity and organization?
+ * Simple implementation.  Should perform  writes, delete and load.
  */
 public class EntityCollectionManagerImpl implements EntityCollectionManager {
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
index fe3f9a9..21570ec 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
@@ -126,7 +126,6 @@ public class WriteCommit implements Func1<CollectionIoEvent<MvccEntity>, Collect
         }
 
         try {
-            // TODO: Async execution
             logMutation.execute();
         }
         catch ( ConnectionException e ) {

http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
index 26ea3cd..7d73b7b 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
@@ -61,7 +61,6 @@ public class WriteStart implements Func1<CollectionIoEvent<Entity>, CollectionIo
 
             final UUID newVersion = UUIDGenerator.newTimeUUID();
 
-            //TODO update this when merged with George's changes
             final MvccLogEntry startEntry = new MvccLogEntryImpl( entityId, newVersion,
                     Stage.ACTIVE, MvccLogEntry.State.COMPLETE);
 
@@ -83,7 +82,6 @@ public class WriteStart implements Func1<CollectionIoEvent<Entity>, CollectionIo
             }
 
             //create the mvcc entity for the next stage
-           //TODO: we need to create a complete or partial update here (or sooner)
 
             return new CollectionIoEvent<>( applicationScope, nextStage );
         }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/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 a849029..374d373 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
@@ -275,7 +275,6 @@ public class NodeShardAllocationImpl implements NodeShardAllocation {
     private boolean isNewNode( DirectedEdgeMeta directedEdgeMeta ) {
 
 
-        //TODO: TN this is broken....
         //The timeout is in milliseconds.  Time for a time uuid is 1/10000 of a milli, so we need to get the units
         // correct
         final long timeoutDelta = graphFig.getShardCacheTimeout();

http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
index 1060495..bc02c8d 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
@@ -72,8 +72,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
 
 
 /**
- * TODO: Rafactor this to use shards only, no shard groups, just collections of shards.  The parent caller can aggregate
- * the results of multiple groups together, this has an impedance mismatch in the API layer.
+ *
  */
 @Singleton
 public class ShardedEdgeSerializationImpl implements ShardedEdgeSerialization {

http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
index 3382507..dd92261 100644
--- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
+++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
@@ -368,7 +368,6 @@ public class NodeDeleteListenerTest {
 
         int count = deleteListener.receive( scope, toDelete, UUIDGenerator.newTimeUUID() ).toBlocking().last();
 
-        //TODO T.N. THIS SHOULD WORK!!!!  It fails intermittently with RX 0.17.1 with too many scheduler threads (which was wrong), try this again after the next release
         assertEquals( edgeCount, count );
 
         //now verify we can't get any of the info back

http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/migration/EsIndexMappingMigrationPlugin.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/migration/EsIndexMappingMigrationPlugin.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/migration/EsIndexMappingMigrationPlugin.java
index de32e0e..e29ed81 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/migration/EsIndexMappingMigrationPlugin.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/migration/EsIndexMappingMigrationPlugin.java
@@ -94,7 +94,7 @@ public class EsIndexMappingMigrationPlugin implements MigrationPlugin {
                     migrationInfoSerialization.setVersion(getName(), getMaxVersion());
                     observer.complete();
                 })
-                .subscribe(); //should run through
+                .toBlocking().lastOrDefault( null ); //should run through
 
 
         }catch (Exception ee){


[2/2] usergrid git commit: Merge branch 'refs/heads/2.1-release'

Posted by to...@apache.org.
Merge branch 'refs/heads/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/c3c2818e
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c3c2818e
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c3c2818e

Branch: refs/heads/master
Commit: c3c2818e27cb4ebe19257e7539923eef709efd85
Parents: 14dd48d d4d3ed3
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Nov 12 16:28:04 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Thu Nov 12 16:28:04 2015 -0700

----------------------------------------------------------------------
 .../corepersistence/migration/DeDupConnectionDataMigration.java   | 2 +-
 .../persistence/collection/impl/EntityCollectionManagerImpl.java  | 3 +--
 .../persistence/collection/mvcc/stage/write/WriteCommit.java      | 1 -
 .../persistence/collection/mvcc/stage/write/WriteStart.java       | 2 --
 .../serialization/impl/shard/impl/NodeShardAllocationImpl.java    | 1 -
 .../impl/shard/impl/ShardedEdgeSerializationImpl.java             | 3 +--
 .../usergrid/persistence/graph/impl/NodeDeleteListenerTest.java   | 1 -
 .../index/migration/EsIndexMappingMigrationPlugin.java            | 2 +-
 8 files changed, 4 insertions(+), 11 deletions(-)
----------------------------------------------------------------------