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

Revert "PLT-2782 | Janus optimisation" #3802

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ private void setPolicyItems(RangerPolicy rangerPolicy, AtlasEntityHeader atlasPo

List<String> users = (List<String>) atlasPolicy.getAttribute("policyUsers");
List<String> groups = (List<String>) atlasPolicy.getAttribute("policyGroups");

List<String> roles = (List<String>) atlasPolicy.getAttribute("policyRoles");

List<RangerPolicyItemAccess> accesses = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,6 @@ public void recordMetric(MetricRecorder recorder) {
}
}

public void recordMetricWithInvocations(MetricRecorder recorder, long count) {
if (recorder != null) {
final String name = recorder.name;
final long timeTaken = recorder.getElapsedTime();

Metric metric = metrics.get(name);

if (metric == null) {
metric = new Metric(name);

metrics.put(name, metric);
}

metric.invocations += count;
metric.totalTimeMSecs += timeTaken;
}
}

public void clear() {
metrics.clear();
}
Expand Down Expand Up @@ -147,6 +129,7 @@ public String getName() {
public long getInvocations() {
return invocations;
}

public void setTotalTimeMSecs(long totalTimeMSecs) {
this.totalTimeMSecs = totalTimeMSecs;
}
Expand Down
4 changes: 1 addition & 3 deletions intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ public enum AtlasConfiguration {
ATLAS_INDEXSEARCH_QUERY_SIZE_MAX_LIMIT("atlas.indexsearch.query.size.max.limit", 100000),
ATLAS_INDEXSEARCH_LIMIT_UTM_TAGS("atlas.indexsearch.limit.ignore.utm.tags", ""),
ATLAS_INDEXSEARCH_ENABLE_API_LIMIT("atlas.indexsearch.enable.api.limit", false),
ATLAS_INDEXSEARCH_ENABLE_JANUS_OPTIMISATION("atlas.indexsearch.enable.janus.optimization", false),
ATLAS_INDEXSEARCH_ENABLE_FETCHING_NON_PRIMITIVE_ATTRIBUTES("atlas.indexsearch.enable.fetching.non.primitive.attributes", false),
ATLAS_INDEXSEARCH_ATTRIBUTES_MIN_LIMIT("atlas.indexsearch.attributes.min.limit", 8),

ATLAS_MAINTENANCE_MODE("atlas.maintenance.mode", false),

ATLAS_UD_RELATIONSHIPS_MAX_COUNT("atlas.ud.relationship.max.count", 100);
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ public final class AccessControlUtils {
public static final String ATTR_PERSONA_USERS = "personaUsers";
public static final String ATTR_PERSONA_GROUPS = "personaGroups";

public static final String ATTR_SERVICE_SERVICE_TYPE = "authServiceType";
public static final String ATTR_SERVICE_TAG_SERVICE = "tagService";
public static final String ATTR_SERVICE_IS_ENABLED = "authServiceIsEnabled";
public static final String ATTR_SERVICE_LAST_SYNC = "authServicePolicyLastSync";

public static final String ATTR_PURPOSE_CLASSIFICATIONS = "purposeClassifications";

public static final String ATTR_POLICY_TYPE = "policyType";
Expand Down
7 changes: 0 additions & 7 deletions server-api/src/main/java/org/apache/atlas/RequestContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,6 @@ public void endMetricRecord(MetricRecorder recorder) {
}
}

public void endMetricRecordWithInvocations(MetricRecorder recorder, long invocationCount) {
if (metrics != null && recorder != null) {
metrics.recordMetricWithInvocations(recorder, invocationCount);
}
}


public void recordEntityGuidUpdate(AtlasEntity entity, String guidInRequest) {
recordEntityGuidUpdate(new EntityGuidPair(entity, guidInRequest));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,6 @@ public AtlasSearchResult indexSearch(@Context HttpServletRequest servletRequest,
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DiscoveryREST.indexSearch(" + parameters + ")");
}

RequestContext.get().endMetricRecordWithInvocations(RequestContext.get().startMetricRecord("dslSize"), parameters.getQuerySize());
RequestContext.get().endMetricRecordWithInvocations(RequestContext.get().startMetricRecord("attributeSize"), parameters.getAttributes().size());
if (AtlasConfiguration.ATLAS_INDEXSEARCH_ENABLE_API_LIMIT.getBoolean() && parameters.getQuerySize() > AtlasConfiguration.ATLAS_INDEXSEARCH_QUERY_SIZE_MAX_LIMIT.getLong()) {
if(CollectionUtils.isEmpty(parameters.getUtmTags())) {
throw new AtlasBaseException(AtlasErrorCode.INVALID_DSL_QUERY_SIZE, String.valueOf(AtlasConfiguration.ATLAS_INDEXSEARCH_QUERY_SIZE_MAX_LIMIT.getLong()));
Expand Down
Loading