You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by gr...@apache.org on 2015/06/26 17:55:12 UTC

incubator-usergrid git commit: Added some comments on what I should be doing next for the Migration tool

Repository: incubator-usergrid
Updated Branches:
  refs/heads/MigrationTool ad9a656f2 -> 4484c8719


Added some comments on what I should be doing next for the Migration tool


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

Branch: refs/heads/MigrationTool
Commit: 4484c871950eee6d8b072a2d871052a05bea6494
Parents: ad9a656
Author: GERey <gr...@apigee.com>
Authored: Fri Jun 26 08:55:15 2015 -0700
Committer: GERey <gr...@apigee.com>
Committed: Fri Jun 26 08:55:15 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/usergrid/tools/Migration.java    | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4484c871/stack/tools/src/main/java/org/apache/usergrid/tools/Migration.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/Migration.java b/stack/tools/src/main/java/org/apache/usergrid/tools/Migration.java
index 39a0306..47abd51 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/Migration.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/Migration.java
@@ -26,6 +26,7 @@ import org.apache.commons.cli.Options;
 import org.apache.usergrid.management.OrganizationInfo;
 import org.apache.usergrid.persistence.*;
 import org.apache.usergrid.persistence.Results.Level;
+import org.apache.usergrid.persistence.cassandra.CassandraService;
 import org.apache.usergrid.persistence.entities.Application;
 import org.apache.usergrid.utils.JsonUtils;
 import org.apache.usergrid.utils.StringUtils;
@@ -89,6 +90,15 @@ public class Migration extends ExportingToolBase {
         outputDir = createOutputParentDir();
         logger.info( "Export directory: " + outputDir.getAbsolutePath() );
 
+
+        //TODO: reset the keyspace to be whatever we specify in the tool
+        //if it is not that keyspace then just use the default keyspaces.
+        //properties.setProperty( "cassandra.system.keyspace",);
+        properties.setProperty( "cassandra.application.keyspace", "Bobgrid_Apps");
+
+        //Then reinitialize the bootstraped cassandra service to use the new properties.
+        cass.init();
+
         //Define how many threads we should use
         if (StringUtils.isNotEmpty( line.getOptionValue( READ_THREAD_COUNT ) )) {
             try {