use of org.apache.rya.export.api.store.RemoveStatementException in project incubator-rya by apache.
the class AccumuloRyaStatementStore method updateStatement.
@Override
public void updateStatement(final RyaStatement original, final RyaStatement update) throws UpdateStatementException {
try {
removeStatement(original);
addStatement(update);
} catch (final AddStatementException | RemoveStatementException e) {
throw new UpdateStatementException("Unable to update the Rya Statement", e);
}
}
use of org.apache.rya.export.api.store.RemoveStatementException in project incubator-rya by apache.
the class MemoryTimeMerger method runJob.
@Override
public void runJob() {
final Optional<MergeParentMetadata> metadata = parentStore.getParentMetadata();
// check the parent for a parent metadata repo
if (metadata.isPresent()) {
LOG.info("Merging statements...");
final MergeParentMetadata parentMetadata = metadata.get();
if (parentMetadata.getRyaInstanceName().equals(ryaInstanceName)) {
try {
importStatements(parentMetadata);
} catch (AddStatementException | ContainsStatementException | RemoveStatementException | FetchStatementException e) {
LOG.error("Failed to import statements.", e);
}
}
} else {
try {
LOG.info("Cloning statements...");
export();
} catch (final ParentMetadataExistsException | FetchStatementException e) {
LOG.error("Failed to export statements.", e);
}
}
}
Aggregations