Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[AMBARI-25197] NullPointerException if there is no proper HDP/HDF rep… (
  • Loading branch information
apappu authored and ncole committed Mar 20, 2019
1 parent eb73c48 commit 2bc4779a1e6aabe638101fc8b0e28cd1963d6b13
Showing 1 changed file with 9 additions and 4 deletions.
@@ -88,10 +88,15 @@ public void process() throws AmbariException {

StackId stackId = repositoryVersion.getStackId();
StackInfo stack = stackManager.getStack(stackId.getStackName(), stackId.getStackVersion());

if (updateRepoVersion(stack, repositoryVersion)) {
repositoryVersionDao.merge(repositoryVersion);
}

if (stack !=null) {
if (updateRepoVersion(stack, repositoryVersion)) {
repositoryVersionDao.merge(repositoryVersion);
}
} else {
throw new AmbariException(String.format("Stack %s %s was not found on the file system. In the event that it was removed, " +
"please ensure that it exists before starting Ambari Server.", stackId.getStackName(), stackId.getStackVersion()));
}
}
}
}

0 comments on commit 2bc4779

Please sign in to comment.