throw new RuntimeException(t);
}
}
protected static PersistenceManagerBuilder withPersistenceManagerBuilder(DataModel model, String... ksMap) {
PersistenceManagerBuilder builder = PersistenceManagerBuilder.newBuilder().
withModel(model).
withCluster(cluster).
withDefaultKeyspace("default_ks").
withMappedKeyspace("lookup", "lookup_ks");
for (int i = 0; i < ksMap.length; i += 2) {
builder.withMappedKeyspace(ksMap[i], ksMap[i + 1]);
}
return builder;
}