usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject usergrid git commit: Changes to get tools building with latest code in 2.1.1 branch
Date Tue, 03 May 2016 12:47:29 GMT
Repository: usergrid
Updated Branches:
  refs/heads/release-2.1.1 f4c8a01cd -> 55251a06a


Changes to get tools building with latest code in 2.1.1 branch


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

Branch: refs/heads/release-2.1.1
Commit: 55251a06a6992282eb36090fe575dcababe813fc
Parents: f4c8a01
Author: Dave Johnson <snoopdave@apache.org>
Authored: Tue May 3 08:47:01 2016 -0400
Committer: Dave Johnson <snoopdave@apache.org>
Committed: Tue May 3 08:47:01 2016 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/usergrid/tools/Cli.java      |  2 +-
 .../main/java/org/apache/usergrid/tools/EntityUpdate.java |  3 ++-
 .../main/java/org/apache/usergrid/tools/ExportApp.java    |  2 +-
 .../src/main/java/org/apache/usergrid/tools/Import.java   | 10 +++++-----
 .../src/main/java/org/apache/usergrid/tools/ToolBase.java |  3 ++-
 5 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/55251a06/stack/tools/src/main/java/org/apache/usergrid/tools/Cli.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/Cli.java b/stack/tools/src/main/java/org/apache/usergrid/tools/Cli.java
index 511dcaa..cbdafcf 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/Cli.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/Cli.java
@@ -96,7 +96,7 @@ public class Cli extends ToolBase {
                 applicationId = UUIDUtils.tryExtractUUID( s );
                 if ( applicationId == null ) {
                     try {
-                        applicationId = emf.lookupApplication( s.trim() ).get();
+                        applicationId = emf.lookupApplication( s.trim() );
                     }
                     catch ( Exception e ) {
                     }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/55251a06/stack/tools/src/main/java/org/apache/usergrid/tools/EntityUpdate.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/EntityUpdate.java b/stack/tools/src/main/java/org/apache/usergrid/tools/EntityUpdate.java
index 04789c0..cbf524f 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/EntityUpdate.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/EntityUpdate.java
@@ -132,7 +132,8 @@ public class EntityUpdate extends ToolBase {
 
         Results results = entityManager.searchCollection( entityManager.getApplicationRef(),
collectionName, query );
 
-        PagingResultsIterator itr = new PagingResultsIterator( results, Query.Level.ALL_PROPERTIES
);
+        PagingResultsIterator itr =
+                new PagingResultsIterator( results, Query.Level.ALL_PROPERTIES, Query.Level.ALL_PROPERTIES
);
 
         long count = 0;
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/55251a06/stack/tools/src/main/java/org/apache/usergrid/tools/ExportApp.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/ExportApp.java b/stack/tools/src/main/java/org/apache/usergrid/tools/ExportApp.java
index 9a9c522..985c5f0 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/ExportApp.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/ExportApp.java
@@ -125,7 +125,7 @@ public class ExportApp extends ExportingToolBase {
 
         startSpring();
 
-        UUID applicationId = emf.lookupApplication( applicationName ).get();
+        UUID applicationId = emf.lookupApplication( applicationName );
         if (applicationId == null) {
             throw new RuntimeException( "Cannot find application " + applicationName );
         }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/55251a06/stack/tools/src/main/java/org/apache/usergrid/tools/Import.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/Import.java b/stack/tools/src/main/java/org/apache/usergrid/tools/Import.java
index 0861a0a..d651c86 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/Import.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/Import.java
@@ -367,10 +367,10 @@ public class Import extends ToolBase {
         // Retrieve the namepsace for this collection. It's part of the name
         String applicationName = getApplicationFromColllection( collectionFileName );
 
-        Optional<UUID> appId = emf.lookupApplication( applicationName );
+        UUID appId = emf.lookupApplication( applicationName );
 
         //no org in path, this is a pre public beta so we need to create the new path
-        if ( !appId.isPresent() && !applicationName.contains( "/" ) ) {
+        if ( appId != null && !applicationName.contains( "/" ) ) {
             String fileName = collectionFileName.replace( "collections", "application" );
 
             File applicationFile = new File( importDir, fileName );
@@ -414,7 +414,7 @@ public class Import extends ToolBase {
         }
 
 
-        if ( !appId.isPresent() ) {
+        if ( appId == null ) {
             logger.error( "Unable to find application with name {}.  Skipping collections",
applicationName );
             return;
         }
@@ -425,10 +425,10 @@ public class Import extends ToolBase {
 
         JsonParser jp = getJsonParserForFile( collectionFile );
 
-        jp.nextToken(); // START_OBJECT this is the outter hashmap
+        jp.nextToken(); // START_OBJECT this is the outer hashmap
 
 
-        EntityManager em = emf.getEntityManager( appId.get() );
+        EntityManager em = emf.getEntityManager( appId );
 
         while ( jp.nextToken() != JsonToken.END_OBJECT ) {
             importEntitysStuff( jp, em );

http://git-wip-us.apache.org/repos/asf/usergrid/blob/55251a06/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java b/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
index 9725dda..521e229 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
@@ -194,7 +194,8 @@ public abstract class ToolBase {
 
         Setup setup = ( (CpEntityManagerFactory) emf ).getSetup();
         logger.info( "Setting up Usergrid schema" );
-        setup.initSubsystems();
+        setup.initSchema();
+        setup.initMgmtApp();
         logger.info( "Usergrid schema setup" );
 
         logger.info( "Setting up Usergrid management services" );


Mime
View raw message