use of org.apache.atlas.model.AtlasBaseModelObject in project atlas by apache.
the class DataAccess method load.
public <T extends AtlasBaseModelObject> Iterable<T> load(final Iterable<T> objects) throws AtlasBaseException {
Objects.requireNonNull(objects, "Objects to load");
AtlasPerfTracer perf = null;
try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DataAccess.multiLoad()");
}
List<AtlasBaseModelObject> ret = new ArrayList<>();
for (T object : objects) {
try {
ret.add(load(object));
} catch (AtlasBaseException e) {
// In case of bulk load, some entities might be in deleted state causing an exception to be thrown
// by the single load API call
LOG.warn("Bulk load encountered an error.", e);
}
}
return (Iterable<T>) ret;
} finally {
AtlasPerfTracer.log(perf);
}
}
Aggregations