Commit fbb244c2 by Abhishek Kadam Committed by apoorvnaik

ATLAS-2815: UI Slow loading enhancements

1. Updated REST APIs that read entities with an option to include only minimum attributes for referred entities 2. UI changes for minExtInfo Change-Id: I633b46cc79de8ec807236719d8b5828aef537208 Signed-off-by: 's avatarapoorvnaik <apoorvnaik@apache.org>
parent 651ecd9e
......@@ -43,7 +43,17 @@ define(['require',
*************************/
getEntity: function(token, options) {
var url = UrlLinks.entitiesApiUrl(token);
var url = UrlLinks.entitiesApiUrl({ guid: token });
options = _.extend({
contentType: 'application/json',
dataType: 'json'
}, options);
return this.constructor.nonCrudOperation.call(this, url, 'GET', options);
},
getEntityHeader: function(token, options) {
var url = UrlLinks.entityHeaderApiUrl(token);
options = _.extend({
contentType: 'application/json',
......@@ -80,4 +90,4 @@ define(['require',
}
}, {});
return VEntity;
});
});
\ No newline at end of file
......@@ -41,7 +41,7 @@ define(['require',
* Non - CRUD operations
*************************/
getEntity: function(id, options) {
var url = UrlLinks.entitiesApiUrl(id);
var url = UrlLinks.entitiesApiUrl({guid: id});
options = _.extend({
contentType: 'application/json',
......
......@@ -41,7 +41,7 @@ define(['require',
* Non - CRUD operations
*************************/
deleteAssociation: function(guid, name, options) {
var url = UrlLinks.entitiesApiUrl(guid, name);
var url = UrlLinks.entitiesApiUrl({ guid: guid, name: name });
options = _.extend({
contentType: 'application/json',
dataType: 'json'
......@@ -66,4 +66,4 @@ define(['require',
}
}, {});
return VTag;
});
});
\ No newline at end of file
......@@ -125,7 +125,7 @@ define([
'id': id,
'value': paramObj
}, that.preFetchedCollectionLists, that.sharedObj)));
this.entityCollection.url = UrlLinks.entitiesApiUrl(id);
this.entityCollection.url = UrlLinks.entitiesApiUrl({ guid: id, minExtInfo: true });
this.entityCollection.fetch({ reset: true });
});
}
......
......@@ -81,11 +81,11 @@ define(['require', 'utils/Utils', 'modules/Modal', 'utils/Messages', 'utils/Enum
var table = "",
fetchInputOutputValue = function(id) {
var that = this;
scope.entityModel.getEntity(id, {
scope.entityModel.getEntityHeader(id, {
success: function(serverData) {
var value = "",
deleteButton = "",
data = serverData.entity;
data = serverData;
value = Utils.getName(data);
var id = "";
if (data.guid) {
......
......@@ -48,16 +48,28 @@ define(['require', 'utils/Enums', 'utils/Utils', 'underscore'], function(require
return defApiUrl.defs + '?excludeInternalTypesAndReferences=true&type=' + type;
}
},
entitiesApiUrl: function(guid, name) {
entitiesApiUrl: function(options) {
var entitiesUrl = this.baseUrlV2 + '/entity';
if (guid && name) {
return entitiesUrl + '/guid/' + guid + '/classification/' + name;
} else if (guid && !name) {
return entitiesUrl + '/guid/' + guid;
} else {
if (options) {
var guid = options.guid,
name = options.name,
minExtInfo = options.minExtInfo;
if (guid && name) {
entitiesUrl += '/guid/' + guid + '/classification/' + name;
} else if (guid && !name) {
entitiesUrl += '/guid/' + guid;
}
}
if (!minExtInfo) {
return entitiesUrl;
} else {
return entitiesUrl += '?minExtInfo=' + (minExtInfo);
}
},
entityHeaderApiUrl: function(guid) {
return this.entitiesApiUrl({ guid: guid }) + "/header"
},
entitiesTraitsApiUrl: function(token) {
if (token) {
return this.baseUrlV2 + '/entity/guid/' + token + '/classifications';
......@@ -69,6 +81,9 @@ define(['require', 'utils/Enums', 'utils/Utils', 'underscore'], function(require
entityCollectionaudit: function(guid) {
return this.baseUrlV2 + '/entity/' + guid + '/audit';
},
replicationCollectionaudit: function(name) {
return this.baseUrl + '/admin/cluster/audit/' + name;
},
classicationApiUrl: function(name, guid) {
var typeUrl = this.typedefsUrl();
if (name) {
......
......@@ -184,7 +184,7 @@ define(['require',
},
fetchCollections: function() {
if (this.guid) {
this.collection.url = UrlLinks.entitiesApiUrl(this.guid);
this.collection.url = UrlLinks.entitiesApiUrl({ guid: this.guid });
this.collection.fetch({ reset: true });
} else {
this.entityCollectionList();
......@@ -212,7 +212,7 @@ define(['require',
_.each(attrObj, function(obj) {
if (obj.guid && !referredEntities[obj.guid]) {
++that.asyncReferEntityCounter;
that.collection.url = UrlLinks.entitiesApiUrl(obj.guid);
that.collection.url = UrlLinks.entitiesApiUrl({ guid: obj.guid });
that.collection.fetch({
success: function(data, response) {
referredEntities[obj.guid] = response.entity;
......
......@@ -21,6 +21,7 @@ import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.instance.AtlasClassification;
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.AtlasObjectId;
import org.apache.atlas.model.instance.EntityMutationResponse;
import org.apache.atlas.repository.store.graph.v2.EntityStream;
......@@ -51,6 +52,23 @@ public interface AtlasEntityStore {
AtlasEntityWithExtInfo getById(String guid) throws AtlasBaseException;
/**
*
* Get entity definition by its guid
* @param guid
* @param isMinExtInfo
* @return AtlasEntity
*/
AtlasEntityWithExtInfo getById(String guid, boolean isMinExtInfo) throws AtlasBaseException;
/**
* Get entity header for the given GUID
* @param guid
* @return
* @throws AtlasBaseException
*/
AtlasEntityHeader getHeaderById(String guid) throws AtlasBaseException;
/**
* Batch GET to retrieve entities by their ID
* @param guid
* @return
......@@ -59,6 +77,15 @@ public interface AtlasEntityStore {
AtlasEntitiesWithExtInfo getByIds(List<String> guid) throws AtlasBaseException;
/**
* Batch GET to retrieve entities by their ID
* @param guid
* @param isMinExtInfo
* @return
* @throws AtlasBaseException
*/
AtlasEntitiesWithExtInfo getByIds(List<String> guid, boolean isMinExtInfo) throws AtlasBaseException;
/**
*
* Get an eneity by its unique attribute
* @param entityType type of the entity
......@@ -69,6 +96,17 @@ public interface AtlasEntityStore {
throws AtlasBaseException;
/**
*
* Get an eneity by its unique attribute
* @param entityType type of the entity
* @param uniqAttributes Attributes that uniquely identify the entity
* @param isMinExtInfo
* @return EntityMutationResponse details of the updates performed by this call
*/
AtlasEntityWithExtInfo getByUniqueAttributes(AtlasEntityType entityType, Map<String, Object> uniqAttributes, boolean isMinExtInfo)
throws AtlasBaseException;
/**
* Create or update entities in the stream
* @param entityStream AtlasEntityStream
* @return EntityMutationResponse Entity mutations operations with the corresponding set of entities on which these operations were performed
......@@ -130,7 +168,7 @@ public interface AtlasEntityStore {
* @throws AtlasBaseException
*/
EntityMutationResponse deleteByUniqueAttributes(AtlasEntityType entityType, Map<String, Object> uniqAttributes)
throws AtlasBaseException;
throws AtlasBaseException;
/**
*
* Get an entity guid by its unique attributes
......
......@@ -101,57 +101,98 @@ public class AtlasEntityStoreV2 implements AtlasEntityStore {
@Override
@GraphTransaction
public AtlasEntityWithExtInfo getById(String guid) throws AtlasBaseException {
return getById(guid, false);
}
@Override
public AtlasEntityWithExtInfo getById(final String guid, final boolean isMinExtInfo) throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> getById({})", guid);
LOG.debug("==> getById({}, {})", guid, isMinExtInfo);
}
AtlasEntityWithExtInfo ret = entityRetriever.toAtlasEntityWithExtInfo(guid);
EntityGraphRetriever entityRetriever = new EntityGraphRetriever(typeRegistry);
AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_READ, new AtlasEntityHeader(ret.getEntity())), "read entity: guid=", guid);
AtlasEntityWithExtInfo ret = entityRetriever.toAtlasEntityWithExtInfo(guid, isMinExtInfo);
if (ret == null) {
throw new AtlasBaseException(AtlasErrorCode.INSTANCE_GUID_NOT_FOUND, guid);
}
if (LOG.isDebugEnabled()) {
LOG.debug("<== getById({}): {}", guid, ret);
LOG.debug("<== getById({}, {}): {}", guid, isMinExtInfo, ret);
}
return ret;
}
@Override
@GraphTransaction
public AtlasEntitiesWithExtInfo getByIds(List<String> guids) throws AtlasBaseException {
public AtlasEntityHeader getHeaderById(final String guid) throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> getByIds({})", guids);
LOG.debug("==> getHeaderById({})", guid);
}
AtlasEntitiesWithExtInfo ret = entityRetriever.toAtlasEntitiesWithExtInfo(guids);
EntityGraphRetriever entityRetriever = new EntityGraphRetriever(typeRegistry);
// verify authorization to read the entities
if(ret != null){
for(String guid : guids){
AtlasEntity entity = ret.getEntity(guid);
AtlasEntityHeader ret = entityRetriever.toAtlasEntityHeader(guid);
AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_READ, new AtlasEntityHeader(entity)), "read entity: guid=", guid);
}
if (ret == null) {
throw new AtlasBaseException(AtlasErrorCode.INSTANCE_GUID_NOT_FOUND, guid);
}
if (LOG.isDebugEnabled()) {
LOG.debug("<== getHeaderById({}): {}", guid, ret);
}
return ret;
}
@Override
public AtlasEntitiesWithExtInfo getByIds(List<String> guids) throws AtlasBaseException {
return getByIds(guids, false);
}
@Override
@GraphTransaction
public AtlasEntitiesWithExtInfo getByIds(List<String> guids, boolean isMinExtInfo) throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> getByIds({}, {})", guids, isMinExtInfo);
}
EntityGraphRetriever entityRetriever = new EntityGraphRetriever(typeRegistry);
AtlasEntitiesWithExtInfo ret = entityRetriever.toAtlasEntitiesWithExtInfo(guids, isMinExtInfo);
if (LOG.isDebugEnabled()) {
LOG.debug("<== getByIds({}): {}", guids, ret);
LOG.debug("<== getByIds({}, {}): {}", guids, isMinExtInfo, ret);
}
return ret;
}
@Override
public AtlasEntityWithExtInfo getByUniqueAttributes(AtlasEntityType entityType, Map<String, Object> uniqAttributes)
throws AtlasBaseException {
return getByUniqueAttributes(entityType, uniqAttributes, false);
}
@Override
@GraphTransaction
public AtlasEntityWithExtInfo getByUniqueAttributes(AtlasEntityType entityType, Map<String, Object> uniqAttributes) throws AtlasBaseException {
public AtlasEntityWithExtInfo getByUniqueAttributes(AtlasEntityType entityType, Map<String, Object> uniqAttributes, boolean isMinExtInfo)
throws AtlasBaseException {
if (LOG.isDebugEnabled()) {
LOG.debug("==> getByUniqueAttribute({}, {})", entityType.getTypeName(), uniqAttributes);
}
AtlasVertex entityVertex = AtlasGraphUtilsV2.getVertexByUniqueAttributes(entityType, uniqAttributes);
AtlasEntityWithExtInfo ret = entityRetriever.toAtlasEntityWithExtInfo(entityVertex);
AtlasVertex entityVertex = AtlasGraphUtilsV2.getVertexByUniqueAttributes(entityType, uniqAttributes);
AtlasAuthorizationUtils.verifyAccess(new AtlasEntityAccessRequest(typeRegistry, AtlasPrivilege.ENTITY_READ, new AtlasEntityHeader(ret.getEntity())), "read entity: typeName=", entityType.getTypeName(), ", uniqueAttributes=", uniqAttributes);
EntityGraphRetriever entityRetriever = new EntityGraphRetriever(typeRegistry);
AtlasEntityWithExtInfo ret = entityRetriever.toAtlasEntityWithExtInfo(entityVertex, isMinExtInfo);
if (ret == null) {
throw new AtlasBaseException(AtlasErrorCode.INSTANCE_BY_UNIQUE_ATTRIBUTE_NOT_FOUND, entityType.getTypeName(),
uniqAttributes.toString());
}
if (LOG.isDebugEnabled()) {
LOG.debug("<== getByUniqueAttribute({}, {}): {}", entityType.getTypeName(), uniqAttributes, ret);
......
......@@ -18,18 +18,15 @@
package org.apache.atlas.web.rest;
import org.apache.atlas.AtlasErrorCode;
import org.apache.atlas.EntityAuditEvent;
import org.apache.atlas.model.audit.EntityAuditEventV2;
import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.TypeCategory;
import org.apache.atlas.model.instance.AtlasClassification;
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.ClassificationAssociateRequest;
import org.apache.atlas.model.instance.EntityMutationResponse;
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
import org.apache.atlas.repository.audit.EntityAuditRepository;
import org.apache.atlas.repository.converters.AtlasInstanceConverter;
import org.apache.atlas.repository.store.graph.AtlasEntityStore;
import org.apache.atlas.repository.store.graph.v2.AtlasEntityStream;
import org.apache.atlas.repository.store.graph.v2.EntityStream;
......@@ -42,22 +39,12 @@ import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.ArrayList;
......@@ -74,24 +61,17 @@ import java.util.Map;
@Singleton
@Service
public class EntityREST {
private static final Logger LOG = LoggerFactory.getLogger(EntityREST.class);
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.EntityREST");
public static final String PREFIX_ATTR = "attr:";
private final AtlasTypeRegistry typeRegistry;
private final AtlasEntityStore entitiesStore;
private final EntityAuditRepository auditRepository;
private final AtlasInstanceConverter instanceConverter;
private final AtlasTypeRegistry typeRegistry;
private final AtlasEntityStore entitiesStore;
@Inject
public EntityREST(AtlasTypeRegistry typeRegistry, AtlasEntityStore entitiesStore,
EntityAuditRepository auditRepository, AtlasInstanceConverter instanceConverter) {
this.typeRegistry = typeRegistry;
this.entitiesStore = entitiesStore;
this.auditRepository = auditRepository;
this.instanceConverter = instanceConverter;
public EntityREST(AtlasTypeRegistry typeRegistry, AtlasEntityStore entitiesStore) {
this.typeRegistry = typeRegistry;
this.entitiesStore = entitiesStore;
}
/**
......@@ -104,17 +84,43 @@ public class EntityREST {
@Path("/guid/{guid}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEntityWithExtInfo getById(@PathParam("guid") String guid) throws AtlasBaseException {
public AtlasEntityWithExtInfo getById(@PathParam("guid") String guid, @QueryParam("minExtInfo") @DefaultValue("false") boolean minExtInfo) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid);
AtlasPerfTracer perf = null;
try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.getById(" + guid + ")");
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.getById(" + guid + ", " + minExtInfo + " )");
}
return entitiesStore.getById(guid);
return entitiesStore.getById(guid, minExtInfo);
} finally {
AtlasPerfTracer.log(perf);
}
}
/**
* Get entity header given its GUID.
* @param guid GUID for the entity
* @return AtlasEntity
* @throws AtlasBaseException
*/
@GET
@Path("/guid/{guid}/header")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEntityHeader getHeaderById(@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.getHeaderById(" + guid + ")");
}
return entitiesStore.getHeaderById(guid);
} finally {
AtlasPerfTracer.log(perf);
}
......@@ -141,7 +147,7 @@ public class EntityREST {
@Path("/uniqueAttribute/type/{typeName}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEntityWithExtInfo getByUniqueAttributes(@PathParam("typeName") String typeName,
public AtlasEntityWithExtInfo getByUniqueAttributes(@PathParam("typeName") String typeName, @QueryParam("minExtInfo") @DefaultValue("false") boolean minExtInfo,
@Context HttpServletRequest servletRequest) throws AtlasBaseException {
Servlets.validateQueryParamLength("typeName", typeName);
......@@ -158,7 +164,7 @@ public class EntityREST {
validateUniqueAttribute(entityType, attributes);
return entitiesStore.getByUniqueAttributes(entityType, attributes);
return entitiesStore.getByUniqueAttributes(entityType, attributes, minExtInfo);
} finally {
AtlasPerfTracer.log(perf);
}
......@@ -359,7 +365,7 @@ public class EntityREST {
}
}
/**
/**
* Gets the list of classifications for a given entity represented by a guid.
* @param guid globally unique identifier for the entity
* @return a list of classifications for the given entity guid
......@@ -585,7 +591,7 @@ public class EntityREST {
@Path("/bulk")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEntitiesWithExtInfo getByGuids(@QueryParam("guid") List<String> guids) throws AtlasBaseException {
public AtlasEntitiesWithExtInfo getByGuids(@QueryParam("guid") List<String> guids, @QueryParam("minExtInfo") @DefaultValue("false") boolean minExtInfo) throws AtlasBaseException {
if (CollectionUtils.isNotEmpty(guids)) {
for (String guid : guids) {
Servlets.validateQueryParamLength("guid", guid);
......@@ -603,7 +609,7 @@ public class EntityREST {
throw new AtlasBaseException(AtlasErrorCode.INSTANCE_GUID_NOT_FOUND, guids);
}
return entitiesStore.getByIds(guids);
return entitiesStore.getByIds(guids, minExtInfo);
} finally {
AtlasPerfTracer.log(perf);
}
......@@ -623,7 +629,7 @@ public class EntityREST {
try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.createOrUpdate(entityCount=" +
(CollectionUtils.isEmpty(entities.getEntities()) ? 0 : entities.getEntities().size()) + ")");
(CollectionUtils.isEmpty(entities.getEntities()) ? 0 : entities.getEntities().size()) + ")");
}
EntityStream entityStream = new AtlasEntityStream(entities);
......@@ -693,38 +699,6 @@ public class EntityREST {
}
}
@GET
@Path("{guid}/audit")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public List<EntityAuditEventV2> getAuditEvents(@PathParam("guid") String guid, @QueryParam("startKey") String startKey,
@QueryParam("count") @DefaultValue("100") short count) throws AtlasBaseException {
AtlasPerfTracer perf = null;
try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "EntityREST.getAuditEvents(" + guid + ", " + startKey + ", " + count + ")");
}
List events = auditRepository.listEvents(guid, startKey, count);
List<EntityAuditEventV2> ret = new ArrayList<>();
for (Object event : events) {
if (event instanceof EntityAuditEventV2) {
ret.add((EntityAuditEventV2) event);
} else if (event instanceof EntityAuditEvent) {
ret.add(instanceConverter.toV2AuditEvent((EntityAuditEvent) event));
} else {
LOG.warn("unknown entity-audit event type {}. Ignored", event != null ? event.getClass().getCanonicalName() : "null");
}
}
return ret;
} finally {
AtlasPerfTracer.log(perf);
}
}
private AtlasEntityType ensureEntityType(String typeName) throws AtlasBaseException {
AtlasEntityType ret = typeRegistry.getEntityTypeByName(typeName);
......
......@@ -165,7 +165,7 @@ public class TestEntitiesREST {
@Test(dependsOnMethods = "testCreateOrUpdateEntities")
public void testGetEntities() throws Exception {
final AtlasEntitiesWithExtInfo response = entityREST.getByGuids(createdGuids);
final AtlasEntitiesWithExtInfo response = entityREST.getByGuids(createdGuids, false);
final List<AtlasEntity> entities = response.getEntities();
Assert.assertNotNull(entities);
......
......@@ -99,7 +99,7 @@ public class TestEntityREST {
@Test
public void testGetEntityById() throws Exception {
createTestEntity();
AtlasEntityWithExtInfo response = entityREST.getById(dbEntity.getGuid());
AtlasEntityWithExtInfo response = entityREST.getById(dbEntity.getGuid(), false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.getEntity());
......@@ -183,7 +183,7 @@ public class TestEntityREST {
@Test(dependsOnMethods = "testAddAndGetClassification")
public void testGetEntityWithAssociations() throws Exception {
AtlasEntityWithExtInfo entity = entityREST.getById(dbEntity.getGuid());
AtlasEntityWithExtInfo entity = entityREST.getById(dbEntity.getGuid(), false);
final List<AtlasClassification> retrievedClassifications = entity.getEntity().getClassifications();
Assert.assertNotNull(retrievedClassifications);
......@@ -315,7 +315,7 @@ public class TestEntityREST {
Assert.assertEquals(response.getEntitiesByOperation(EntityMutations.EntityOperation.PARTIAL_UPDATE).get(0).getGuid(), dbGuid);
//Get By unique attribute
AtlasEntityWithExtInfo entity = entityREST.getByUniqueAttributes(TestUtilsV2.DATABASE_TYPE, toHttpServletRequest(TestUtilsV2.NAME, updatedDBName));
AtlasEntityWithExtInfo entity = entityREST.getByUniqueAttributes(TestUtilsV2.DATABASE_TYPE, false, toHttpServletRequest(TestUtilsV2.NAME, updatedDBName));
Assert.assertNotNull(entity);
Assert.assertNotNull(entity.getEntity().getGuid());
Assert.assertEquals(entity.getEntity().getGuid(), dbGuid);
......@@ -340,7 +340,7 @@ public class TestEntityREST {
Assert.assertEquals(response.getEntitiesByOperation(EntityMutations.EntityOperation.PARTIAL_UPDATE).get(0).getGuid(), dbGuid);
//Get By unique attribute
AtlasEntityWithExtInfo entity = entityREST.getByUniqueAttributes(TestUtilsV2.DATABASE_TYPE, toHttpServletRequest(TestUtilsV2.NAME, updatedDBName));
AtlasEntityWithExtInfo entity = entityREST.getByUniqueAttributes(TestUtilsV2.DATABASE_TYPE, false, toHttpServletRequest(TestUtilsV2.NAME, updatedDBName));
Assert.assertNotNull(entity);
Assert.assertNotNull(entity.getEntity().getGuid());
Assert.assertEquals(entity.getEntity().getGuid(), dbGuid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment