You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/06/29 19:41:01 UTC
[49/50] [abbrv] incubator-usergrid git commit: remove system app id
remove system app id
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/5731a017
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/5731a017
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/5731a017
Branch: refs/heads/USERGRID-703
Commit: 5731a017ff1cfb598983fb9bb83a9da1290fe14a
Parents: 4b41ae7
Author: Shawn Feldman <sf...@apache.org>
Authored: Fri Jun 26 16:17:37 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Fri Jun 26 16:17:37 2015 -0600
----------------------------------------------------------------------
.../migration/AppInfoMigrationPlugin.java | 14 +++++---------
.../rx/impl/AllApplicationsObservableImpl.java | 8 ++++----
.../usergrid/corepersistence/util/CpNamingUtils.java | 3 ---
.../migration/AppInfoMigrationPluginTest.java | 4 ++--
4 files changed, 11 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5731a017/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
index 0a6d47e..21383aa 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
@@ -61,6 +61,10 @@ import static org.apache.usergrid.persistence.Schema.*;
* https://issues.apache.org/jira/browse/USERGRID-448
*/
public class AppInfoMigrationPlugin implements MigrationPlugin {
+
+ /** Old and deprecated SYSTEM_APP */
+ public static final UUID SYSTEM_APP_ID = UUID.fromString( "b6768a08-b5d5-11e3-a495-10ddb1de66c3" );
+
private static final Logger logger = LoggerFactory.getLogger(AppInfoMigrationPlugin.class);
public static String PLUGIN_NAME = "appinfo-migration";
@@ -205,14 +209,6 @@ public class AppInfoMigrationPlugin implements MigrationPlugin {
return appInfo;
}
- private void deleteOldAppInfo(UUID uuid) {
- final ApplicationScope systemAppScope = getApplicationScope(CpNamingUtils.SYSTEM_APP_ID );
- final EntityCollectionManager systemCollectionManager =
- entityCollectionManagerFactory.createCollectionManager( systemAppScope );
- systemCollectionManager.mark( new SimpleId( uuid, "appinfos" ) ).toBlocking().last();
- }
-
-
/**
* TODO: Use Graph to get application_info for an specified Application.
*/
@@ -259,7 +255,7 @@ public class AppInfoMigrationPlugin implements MigrationPlugin {
*/
public Observable<org.apache.usergrid.persistence.model.entity.Entity> getOldAppInfos( ) {
- final ApplicationScope systemAppScope = getApplicationScope(CpNamingUtils.SYSTEM_APP_ID);
+ final ApplicationScope systemAppScope = getApplicationScope(SYSTEM_APP_ID);
final EntityCollectionManager systemCollectionManager =
entityCollectionManagerFactory.createCollectionManager(systemAppScope);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5731a017/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AllApplicationsObservableImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AllApplicationsObservableImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AllApplicationsObservableImpl.java
index fbabbee..b130ac6 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AllApplicationsObservableImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AllApplicationsObservableImpl.java
@@ -68,15 +68,15 @@ public class AllApplicationsObservableImpl implements AllApplicationsObservable
+
+
@Override
public Observable<ApplicationScope> getData() {
//emit our hard coded applications that are used the manage the system first.
//this way consumers can perform whatever work they need to on the root system first
- final Observable<ApplicationScope> systemIds = Observable.from(
- Arrays.asList(
- getApplicationScope( CpNamingUtils.MANAGEMENT_APPLICATION_ID ),
- getApplicationScope( CpNamingUtils.SYSTEM_APP_ID ))); // still need deprecated system app here
+ final Observable<ApplicationScope> systemIds = Observable.just(
+ getApplicationScope( CpNamingUtils.MANAGEMENT_APPLICATION_ID ));
final ApplicationScope appScope = getApplicationScope( CpNamingUtils.MANAGEMENT_APPLICATION_ID );
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5731a017/stack/core/src/main/java/org/apache/usergrid/corepersistence/util/CpNamingUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/util/CpNamingUtils.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/util/CpNamingUtils.java
index 41631b3..c812180 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/util/CpNamingUtils.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/util/CpNamingUtils.java
@@ -69,9 +69,6 @@ public class CpNamingUtils {
/** App where we store management info */
public static final UUID MANAGEMENT_APPLICATION_ID = UUID.fromString( "b6768a08-b5d5-11e3-a495-11ddb1de66c8" );
- /** Old and deprecated SYSTEM_APP */
- public static final UUID SYSTEM_APP_ID = UUID.fromString( "b6768a08-b5d5-11e3-a495-10ddb1de66c3" );
-
/**
* Information about applications is stored in the management app using these types
*/
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5731a017/stack/services/src/test/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPluginTest.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPluginTest.java b/stack/services/src/test/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPluginTest.java
index f242318..98d73f9 100644
--- a/stack/services/src/test/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPluginTest.java
+++ b/stack/services/src/test/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPluginTest.java
@@ -130,9 +130,9 @@ public class AppInfoMigrationPluginTest {
List<Entity> deletedApps = new ArrayList<>();
setup.getEmf().initializeApplicationV2(
- CassandraService.DEFAULT_ORGANIZATION, CpNamingUtils.SYSTEM_APP_ID, "systemapp", null);
+ CassandraService.DEFAULT_ORGANIZATION, AppInfoMigrationPlugin.SYSTEM_APP_ID, "systemapp", null);
- EntityManager systemAppEm = setup.getEmf().getEntityManager( CpNamingUtils.SYSTEM_APP_ID );
+ EntityManager systemAppEm = setup.getEmf().getEntityManager( AppInfoMigrationPlugin.SYSTEM_APP_ID );
int count = 0;