return mVersion.getSchemaVersion();
}
public void setSentryVersion(String newVersion, String verComment)
throws SentryNoSuchObjectException, SentryAccessDeniedException {
MSentryVersion mVersion;
boolean rollbackTransaction = true;
PersistenceManager pm = null;
try {
mVersion = getMSentryVersion();
if (newVersion.equals(mVersion.getSchemaVersion())) {
// specified version already in there
return;
}
} catch (SentryNoSuchObjectException e) {
// if the version doesn't exist, then create it
mVersion = new MSentryVersion();
}
mVersion.setSchemaVersion(newVersion);
mVersion.setVersionComment(verComment);
try {
pm = openTransaction();
pm.makePersistent(mVersion);
rollbackTransaction = false;
commitTransaction(pm);