Partition oldTmpPart = null;
if (olditr.hasNext()) {
oldTmpPart = olditr.next();
}
else {
throw new InvalidOperationException("failed to alterpartitions");
}
for (MetaStoreEventListener listener : listeners) {
AlterPartitionEvent alterPartitionEvent =
new AlterPartitionEvent(oldTmpPart, tmpPart, true, this);
listener.onAlterPartition(alterPartitionEvent);
}
}
} catch (InvalidObjectException e) {
ex = e;
throw new InvalidOperationException(e.getMessage());
} catch (AlreadyExistsException e) {
ex = e;
throw new InvalidOperationException(e.getMessage());
} catch (Exception e) {
ex = e;
if (e instanceof MetaException) {
throw (MetaException) e;
} else if (e instanceof InvalidOperationException) {