if (admin.tableExists("kite_example_user_profiles")) {
admin.disableTable("kite_example_user_profiles");
admin.deleteTable("kite_example_user_profiles");
}
HBaseDatasetRepository repo = new HBaseDatasetRepository.Builder()
.configuration(conf).build();
// TODO: change to use namespace (CDK-140)
DatasetDescriptor userProfileDatasetDescriptor =
new DatasetDescriptor.Builder().schema(UserProfileModel2.SCHEMA$).build();
userProfileDataset = repo.create("default", "kite_example_user_profiles.UserProfileModel2",
userProfileDatasetDescriptor);
DatasetDescriptor userActionsDatasetDescriptor =
new DatasetDescriptor.Builder().schema(UserActionsModel2.SCHEMA$).build();
userActionsDataset = repo.create("default", "kite_example_user_profiles.UserActionsModel2",
userActionsDatasetDescriptor);
DatasetDescriptor userProfileActionsDatasetDescriptor =
new DatasetDescriptor.Builder().schema(UserProfileActionsModel2.SCHEMA$).build();
userProfileActionsDataset = repo.create("default", "kite_example_user_profiles.UserProfileActionsProtocol2",
userProfileActionsDatasetDescriptor);
}