if (conf.isStandalone()) {
tm = new TrivialOwnAllTopicManager(conf, scheduler);
} else {
try {
if (conf.isMetadataManagerBasedTopicManagerEnabled()) {
tm = new MMTopicManager(conf, zk, mm, scheduler);
} else {
if (!(mm instanceof ZkMetadataManagerFactory)) {
throw new IOException("Uses " + mm.getClass().getName() + " to store hedwig metadata, "
+ "but uses zookeeper ephemeral znodes to store topic ownership. "
+ "Check your configuration as this could lead to scalability issues.");