* @param ctx
*/
@Override
public void initialize(final LoggerInitCallback cb, Object ctx) throws LoggerException {
TSOServerConfig config = ((BookKeeperStateBuilder.Context) ctx).config;
/*
* Create new ledger for adding records
*/
try {
bk = new BookKeeper(new ClientConfiguration(), zk);
} catch (Exception e) {
LOG.error("Exception while initializing bookkeeper", e);
throw new LoggerException.BKOpFailedException();
}
bk.asyncCreateLedger(config.getEnsembleSize(), config.getQuorumSize(), BookKeeper.DigestType.CRC32,
"flavio was here".getBytes(), new CreateCallback() {
@Override
public void createComplete(int rc, LedgerHandle lh, Object ctx) {
if (rc == BKException.Code.OK) {
try {