Created
August 7, 2009 23:03
-
-
Save jmhodges/164219 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is what boots Cassandra for the hadoop stuff | |
private void startKeyspace() throws IOException | |
{ | |
CalloutManager.instance().onStart(); | |
LogUtil.init(); | |
if (keyspace == null) { | |
throw new RuntimeException("you forgot to set the keyspace with KeyspaceInputFormat.setKeyspace()"); | |
} | |
keyspace = DatabaseDescriptor.getTable(keyspace); | |
if (keyspace == null) { | |
throw new RuntimeException("that keyspace doesn't exist in cassandra!"); | |
} | |
Set<String> tables = DatabaseDescriptor.getTableToColumnFamilyMap().keySet(); | |
for (String table : tables) | |
{ | |
Table tbl = Table.open(table); | |
tbl.onStart(); | |
} | |
RecoveryManager recoveryMgr = RecoveryManager.instance(); | |
recoveryMgr.doRecovery(); | |
StorageService.instance().start(); // NPE is here. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.NullPointerException | |
at org.apache.cassandra.db.SystemTable.initMetadata(SystemTable.java:112) | |
at org.apache.cassandra.service.StorageService.start(StorageService.java:252) | |
at org.apache.cassandra.hadoop.KeyspaceInputFormat.startKeyspace(KeyspaceInputFormat.java:144) | |
at org.apache.cassandra.hadoop.KeyspaceInputFormat.getSplits(KeyspaceInputFormat.java:65) | |
at org.apache.hadoop.mapred.LocalJobRunner.getRawSplits(LocalJobRunner.java:65) | |
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:144) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment