Skip to content

Commit

Permalink
Merge pull request #3494 from atlanhq/bulk-reindex-guids
Browse files Browse the repository at this point in the history
Initial commit
  • Loading branch information
nikhilbonte21 authored Sep 9, 2024
2 parents d21f19f + 8083237 commit 460c0b5
Showing 1 changed file with 23 additions and 0 deletions.
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

0 comments on commit 460c0b5

Please sign in to comment.