Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit #3494

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,29 @@ public void repairEntityIndex(@PathParam("guid") String guid) throws AtlasBaseEx
}
}

@POST
@Path("/guid/bulk/repairindex")
public void repairEntityIndexBulk(Set<String> guids) throws AtlasBaseException {

AtlasAuthorizationUtils.verifyAccess(new AtlasAdminAccessRequest(AtlasPrivilege.ADMIN_REPAIR_INDEX), "Admin Repair Index");

AtlasPerfTracer perf = null;

try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.repairEntityIndexBulk(" + guids.size() + ")");
}
RepairIndex repairIndex = new RepairIndex();
repairIndex.setupGraph();

repairIndex.restoreByIds(guids);
} catch (Exception e) {
LOG.error("Exception while repairEntityIndexBulk ", e);
throw new AtlasBaseException(e);
} finally {
AtlasPerfTracer.log(perf);
}
}

@POST
@Path("/repairindex/{typename}")
Expand Down
Loading