List<String> indices = zkClient.getChildren(oldIndicesPath);
LOG.info("found " + indices.size() + " old indices");
for (String indexName : indices) {
net.sf.katta.index.IndexMetaData oldIndexMD = zkClientForWriables.readData(oldIndicesPath + "/" + indexName);
IndexMetaData newIndexMD = new IndexMetaData(indexName, oldIndexMD.getPath(), oldIndexMD.getReplicationLevel());
IndexReinitializeOperation deployOperation = new IndexReinitializeOperation(newIndexMD);
protocol.addMasterOperation(deployOperation);
protocol.publishIndex(newIndexMD);
}
zkClientForWriables.close();