Skip to content

Commit

Permalink
nit: make all namings descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
sumandas0 committed Jun 5, 2024
1 parent 269d78c commit a029480
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.atlas.model.instance.AtlasEntity.AtlasEntitiesWithExtInfo;
import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo;
import org.apache.atlas.model.instance.AtlasEntityHeader;
import org.apache.atlas.model.instance.AtlasEntityHeaders;
import org.apache.atlas.model.instance.AtlasObjectId;
import org.apache.atlas.model.instance.AtlasHasLineageRequests;
import org.apache.atlas.model.instance.EntityMutationResponse;
Expand Down Expand Up @@ -364,6 +363,6 @@ EntityMutationResponse deleteByUniqueAttributes(List<AtlasObjectId> objectIds)

void repairMeaningAttributeForTerms(List<String> termGuids) throws AtlasBaseException;

public void repairAlias(String guid) throws AtlasBaseException;
void repairAccesscontrolAlias(String guid) throws AtlasBaseException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -2709,7 +2709,7 @@ private void repairMeanings(AtlasVertex assetVertex) {

}
@Override
public void repairAlias(String guid) throws AtlasBaseException {
public void repairAccesscontrolAlias(String guid) throws AtlasBaseException {
AtlasPerfMetrics.MetricRecorder metric = RequestContext.get().startMetricRecord("repairAlias");
// Fetch accesscontrolEntity with extInfo
AtlasEntity.AtlasEntityWithExtInfo accesscontrolEntity = entityRetriever.toAtlasEntityWithExtInfo(guid);
Expand Down
24 changes: 21 additions & 3 deletions webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
Original file line number Diff line number Diff line change
Expand Up @@ -1932,9 +1932,27 @@ public void repairIndexByTypeName(@PathParam("typename") String typename, @Query
}

@POST
@Path("/repairalias/{guid}")
@Path("/repairAccesscontrolAlias/{guid}")
@Timed
public void repairAlias(@PathParam("guid") String guid) throws AtlasBaseException {
entitiesStore.repairAlias(guid);
public void repairAccessControlAlias(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid);

AtlasPerfTracer perf = null;


try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.repairAccessControlAlias");
}

entitiesStore.repairAccesscontrolAlias(guid);

LOG.info("Repaired access control alias for entity with guid {}", guid);

} finally {
AtlasPerfTracer.log(perf);
}


}
}

0 comments on commit a029480

Please sign in to comment.