Merge branch 'cassandra-1.2' into trunk

Conflicts:
        src/java/org/apache/cassandra/config/DatabaseDescriptor.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6043812a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6043812a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6043812a

Branch: refs/heads/trunk
Commit: 6043812a1e252850f4746946f5421ce18cb3f349
Parents: cd85daf 681983a
Author: Aleksey Yeschenko <[email protected]>
Authored: Thu Jul 18 15:27:28 2013 +0300
Committer: Aleksey Yeschenko <[email protected]>
Committed: Thu Jul 18 15:27:28 2013 +0300

----------------------------------------------------------------------
 src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6043812a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 7e55feb,7df2b2f..3ef264e
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@@ -477,20 -517,43 +477,20 @@@ public class DatabaseDescripto
          return conf.dynamic_snitch ? new DynamicEndpointSnitch(snitch) : 
snitch;
      }
  
 -    /** load keyspace (table) definitions, but do not initialize the table 
instances. */
 -    public static void loadSchemas() throws IOException
 +    /** load keyspace (keyspace) definitions, but do not initialize the 
keyspace instances. */
 +    public static void loadSchemas()
      {
 -        ColumnFamilyStore schemaCFS = 
SystemTable.schemaCFS(SystemTable.SCHEMA_KEYSPACES_CF);
 +        ColumnFamilyStore schemaCFS = 
SystemKeyspace.schemaCFS(SystemKeyspace.SCHEMA_KEYSPACES_CF);
  
 -        // if table with definitions is empty try loading the old way
 +        // if keyspace with definitions is empty try loading the old way
          if (schemaCFS.estimateKeys() == 0)
          {
 -            // we can load tables from local storage if a version is set in 
the system table and that actually maps to
 -            // real data in the definitions table.  If we do end up loading 
from xml, store the definitions so that we
 -            // don't load from xml anymore.
 -            UUID uuid = MigrationManager.getLastMigrationId();
 -
 -            if (uuid == null)
 -            {
 -                logger.info("Couldn't detect any schema definitions in local 
storage.");
 -                // peek around the data directories to see if anything is 
there.
 -                if (hasExistingNoSystemTables())
 -                    logger.info("Found table data in data directories. 
Consider using cqlsh to define your schema.");
 -                else
 -                    logger.info("To create keyspaces and column families, see 
'help create' in cqlsh.");
 -            }
 +            logger.info("Couldn't detect any schema definitions in local 
storage.");
 +            // peek around the data directories to see if anything is there.
 +            if (hasExistingNoSystemTables())
 +                logger.info("Found keyspace data in data directories. 
Consider using cqlsh to define your schema.");
              else
-                 logger.info("To create keyspaces and column families, see 
'help create keyspace' in cqlsh.");
 -            {
 -                logger.info("Loading schema version " + uuid.toString());
 -                Collection<KSMetaData> tableDefs = 
DefsTable.loadFromStorage(uuid);
 -
 -                // happens when someone manually deletes all tables and 
restarts.
 -                if (tableDefs.size() == 0)
 -                {
 -                    logger.warn("No schema definitions were found in local 
storage.");
 -                }
 -                else // if non-system tables where found, trying to load them
 -                {
 -                    Schema.instance.load(tableDefs);
 -                }
 -            }
++                logger.info("To create keyspaces and column families, see 
'help create' in cqlsh.");
          }
          else
          {

Reply via email to