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 2014/08/22 16:15:51 UTC
[55/95] [abbrv] git commit: alternative way of skipping entities
alternative way of skipping entities
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/1e3315b3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/1e3315b3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/1e3315b3
Branch: refs/heads/import-feature
Commit: 1e3315b3d234900450e783224277ede43a04af78
Parents: 3c9eef6
Author: Pooja Jain <Ap...@Pooja-Jains-MacBook-Pro.local>
Authored: Thu Jul 24 14:59:59 2014 -0700
Committer: Pooja Jain <Ap...@Pooja-Jains-MacBook-Pro.local>
Committed: Thu Jul 24 14:59:59 2014 -0700
----------------------------------------------------------------------
.../usergrid/management/importUG/ImportServiceImpl.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1e3315b3/stack/services/src/main/java/org/apache/usergrid/management/importUG/ImportServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/importUG/ImportServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/importUG/ImportServiceImpl.java
index 5e435db..e47087e 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/importUG/ImportServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/importUG/ImportServiceImpl.java
@@ -473,13 +473,9 @@ public class ImportServiceImpl implements ImportService {
while(!jp.getText().equals(lastUpdatedUUID)) {
jp.nextToken();
}
+
// skip the last one and start from teh next one
- // to avoid connections
- while(jp.getCurrentToken() != JsonToken.START_OBJECT) {
- jp.nextToken();
- }
- // to avoid dictionaries
- while(jp.getCurrentToken() != JsonToken.START_OBJECT) {
+ while(!(jp.getCurrentToken()==JsonToken.END_OBJECT && jp.nextToken() == JsonToken.START_OBJECT)) {
jp.nextToken();
}
}
@@ -497,7 +493,6 @@ public class ImportServiceImpl implements ImportService {
}
jp.close();
}
-
// mark file as completed
((Map<String,Object>)fileNames.get(i)).put("completed",true);
rootEm.update(importUG);