use of com.thinkbiganalytics.server.upgrade.UpgradeException in project kylo by Teradata.
the class UpgradeAction method moveNode.
private void moveNode(Session session, Node node, Node parentNode) {
try {
if ((node != null) && (parentNode != null)) {
// Path may not be accurate if parent node moved recently
final String srcPath = node.getParent().getPath() + "/" + StringUtils.substringAfterLast(node.getPath(), "/");
session.move(srcPath, parentNode.getPath() + "/" + node.getName());
}
} catch (RepositoryException e) {
throw new UpgradeException("Failed to moved node " + node + " under parent " + parentNode, e);
}
}
use of com.thinkbiganalytics.server.upgrade.UpgradeException in project kylo by Teradata.
the class VersionableFeedUpgradeAction method upgradeTo.
@Override
public void upgradeTo(final KyloVersion startingVersion) {
log.info("Upgrading feeds as versionable for version: {}", startingVersion);
feedProvider.getFeeds().forEach(feed -> {
JcrFeed jcrFeed = (JcrFeed) feed;
Node summaryNode = jcrFeed.getFeedSummary().get().getNode();
try {
summaryNode.addMixin("mix:versionable");
} catch (Exception e) {
log.error("Failed to set a feed as versionable: {}", feed.getName(), e);
;
throw new UpgradeException("Failed to set a feed summary node as versionable: " + summaryNode, e);
}
});
}
Aggregations