try {
usersTracker.start();
final String currentLayoutId = mLayoutUpdateHandler.getCurrentLayoutId();
LOG.info("Table {} has current layout ID {}.", mTableURI, currentLayoutId);
if (!Objects.equal(currentLayoutId, currentLayout.getDesc().getLayoutId())) {
throw new InternalKijiError(String.format(
"Inconsistency between meta-table and ZooKeeper: "
+ "meta-table layout has ID %s while ZooKeeper has layout ID %s.",
currentLayout.getDesc().getLayoutId(), currentLayoutId));
}
final String consistentLayoutId = waitForConsistentView();
if ((consistentLayoutId != null) && !Objects.equal(consistentLayoutId, currentLayoutId)) {
throw new InternalKijiError(String.format(
"Consistent layout ID %s does not match current layout %s for table %s.",
consistentLayoutId, currentLayout, mTableURI));
}
writeMetaTable(update);