public synchronized WriteableIndexerModel getIndexerModel() throws ZkConnectException, InterruptedException, KeeperException {
if (indexerModel == null) {
switch (mode) {
case EMBED:
JavaServiceManager serviceMgr = lilyServerTestUtility.getRuntime().getJavaServiceManager();
indexerModel = (WriteableIndexerModel) serviceMgr.getService(WriteableIndexerModel.class);
break;
case CONNECT:
Configuration conf = HBaseIndexerConfiguration.create();
indexerModel = new IndexerModelImpl(new ZooKeeperItfAdapter(getZooKeeper()), conf.get(ConfKeys.ZK_ROOT_NODE));
break;