usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [01/50] incubator-usergrid git commit: Remove incorrect AWS key check, and allow for entities without UUIDs.
Date Mon, 16 Feb 2015 19:05:52 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/USERGRID-273 84b048e6d -> 4d5e5e6b9


Remove incorrect AWS key check, and allow for entities without UUIDs.


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

Branch: refs/heads/USERGRID-273
Commit: e4187dd3ac33fedddfdacdea98dffa8b7b319759
Parents: a4270d8
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Wed Feb 11 07:12:57 2015 -0500
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Wed Feb 11 07:12:57 2015 -0500

----------------------------------------------------------------------
 .../applications/imports/ImportsResource.java             |  5 ++---
 .../usergrid/management/importer/ImportServiceImpl.java   | 10 ++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e4187dd3/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/imports/ImportsResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/imports/ImportsResource.java
b/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/imports/ImportsResource.java
index e54cc5e..8fc2ffc 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/imports/ImportsResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/applications/imports/ImportsResource.java
@@ -145,12 +145,11 @@ public class ImportsResource extends ServiceResource {
             throw new NullPointerException( "Could not find field 'storage_info'" );
         }
 
-
         String bucketName = ( String ) storage_info.get( "bucket_location" );
 
         //check to make sure that access key and secret key are there.
-        uac.getAWSAccessKeyIdJson( storage_info );
-        uac.getAWSSecretKeyJson( storage_info );
+//        uac.getAWSAccessKeyIdJson( storage_info );
+//        uac.getAWSSecretKeyJson( storage_info );
 
         if ( bucketName == null ) {
             throw new NullPointerException( "Could not find field 'bucketName'" );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e4187dd3/stack/services/src/main/java/org/apache/usergrid/management/importer/ImportServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/importer/ImportServiceImpl.java
b/stack/services/src/main/java/org/apache/usergrid/management/importer/ImportServiceImpl.java
index 1f43e7e..e0dede5 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/importer/ImportServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/importer/ImportServiceImpl.java
@@ -800,7 +800,6 @@ public class ImportServiceImpl implements ImportService {
                 logger.debug("Writing imported entity {}:{} into app {}",
                     new Object[]{entityType, entityUuid, em.getApplication().getUuid()});
 
-
                 em.create(entityUuid, entityType, properties);
 
                 tracker.entityWritten();
@@ -972,8 +971,11 @@ public class ImportServiceImpl implements ImportService {
 
                             Map<String, Object> entityMap = jp.readValueAs( HashMap.class
);
 
-                            UUID uuid = UUID.fromString( ( String ) entityMap.get( "uuid"
) );
-                            lastEntity = new SimpleEntityRef( entityType, uuid );
+                            UUID uuid = null;
+                            if ( entityMap.get( "uuid" ) != null ) {
+                                uuid = UUID.fromString((String) entityMap.get("uuid"));
+                                lastEntity = new SimpleEntityRef(entityType, uuid);
+                            }
 
                             if ( entitiesOnly ) {
                                 //logger.debug("{}Got entity with uuid {}", indent, lastEntity);
@@ -983,7 +985,7 @@ public class ImportServiceImpl implements ImportService {
                             }
                             objectStartStack.pop();
                         }
-                        else if ( "connections".equals( name ) ) {
+                        else if ( "connections".equals(name) ) {
 
                             Map<String, Object> connectionMap = jp.readValueAs( HashMap.class
);
 


Mime
View raw message