diff --git a/.gitignore b/.gitignore index 6cf6407919..c338c03df9 100755 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - +distro # Maven target* dependency-reduced-pom.xml diff --git a/auth-audits/pom.xml b/auth-audits/pom.xml index 73bc59827d..a4bbab3141 100644 --- a/auth-audits/pom.xml +++ b/auth-audits/pom.xml @@ -124,6 +124,12 @@ opentelemetry-logback-appender-1.0 2.10.0-alpha + + com.google.code.gson + gson + 2.10.1 + compile + diff --git a/build.sh b/build.sh index d60c540769..d3f77f5647 100755 --- a/build.sh +++ b/build.sh @@ -24,9 +24,9 @@ unzip -o keycloak-15.0.2.1.zip -d ~/.m2/repository/org echo "Maven Building" if [ "$1" == "build_without_dashboard" ]; then - mvn -pl '!test-tools,!addons/hdfs-model,!addons/hive-bridge,!addons/hive-bridge-shim,!addons/falcon-bridge-shim,!addons/falcon-bridge,!addons/sqoop-bridge,!addons/sqoop-bridge-shim,!addons/hbase-bridge,!addons/hbase-bridge-shim,!addons/hbase-testing-util,!addons/kafka-bridge,!addons/impala-hook-api,!addons/impala-bridge-shim,!addons/impala-bridge,!dashboardv2,!dashboardv3' -Dmaven.test.skip -DskipTests -Drat.skip=true -DskipOverlay -DskipEnunciate=true package -Pdist + mvn -pl '!addons/hdfs-model,!addons/hive-bridge,!addons/hive-bridge-shim,!addons/falcon-bridge-shim,!addons/falcon-bridge,!addons/sqoop-bridge,!addons/sqoop-bridge-shim,!addons/hbase-bridge,!addons/hbase-bridge-shim,!addons/hbase-testing-util,!addons/kafka-bridge,!addons/impala-hook-api,!addons/impala-bridge-shim,!addons/impala-bridge,!dashboardv2,!dashboardv3' -Dmaven.test.skip -DskipTests -Drat.skip=true -DskipOverlay -DskipEnunciate=true package -Pdist else - mvn -pl '!test-tools,!addons/hdfs-model,!addons/hive-bridge,!addons/hive-bridge-shim,!addons/falcon-bridge-shim,!addons/falcon-bridge,!addons/sqoop-bridge,!addons/sqoop-bridge-shim,!addons/hbase-bridge,!addons/hbase-bridge-shim,!addons/hbase-testing-util,!addons/kafka-bridge,!addons/impala-hook-api,!addons/impala-bridge-shim,!addons/impala-bridge' -Dmaven.test.skip -DskipTests -Drat.skip=true -DskipEnunciate=true package -Pdist + mvn -pl '!addons/hdfs-model,!addons/hive-bridge,!addons/hive-bridge-shim,!addons/falcon-bridge-shim,!addons/falcon-bridge,!addons/sqoop-bridge,!addons/sqoop-bridge-shim,!addons/hbase-bridge,!addons/hbase-bridge-shim,!addons/hbase-testing-util,!addons/kafka-bridge,!addons/impala-hook-api,!addons/impala-bridge-shim,!addons/impala-bridge' -Dmaven.test.skip -DskipTests -Drat.skip=true -DskipEnunciate=true package -Pdist fi echo "[DEBUG listing distro/target" diff --git a/common/pom.xml b/common/pom.xml index ff4d502f12..47c274ca4d 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -145,51 +145,7 @@ - - io.netty - netty-all - ${netty4.version} - - - io.netty - netty-handler - ${netty4.version} - - - io.netty - netty-common - ${netty4.version} - - - io.netty - netty-resolver - ${netty4.version} - - - io.netty - netty-codec - ${netty4.version} - - - io.netty - netty-transport - ${netty4.version} - - - io.netty - netty-buffer - ${netty4.version} - - - io.netty - netty-transport-native-epoll - ${netty4.version} - - - io.netty - netty-transport-native-unix-common - ${netty4.version} - + diff --git a/common/src/main/java/org/apache/atlas/service/redis/AbstractRedisService.java b/common/src/main/java/org/apache/atlas/service/redis/AbstractRedisService.java index 9ad5fd904f..8e57c98045 100644 --- a/common/src/main/java/org/apache/atlas/service/redis/AbstractRedisService.java +++ b/common/src/main/java/org/apache/atlas/service/redis/AbstractRedisService.java @@ -129,14 +129,8 @@ Config getLocalConfig() throws AtlasException { Config getProdConfig() throws AtlasException { Config config = initAtlasConfig(); config.useSentinelServers() - .setClientName(ATLAS_METASTORE_SERVICE) .setReadMode(ReadMode.MASTER_SLAVE) .setCheckSentinelsList(false) - .setKeepAlive(true) - .setMasterConnectionMinimumIdleSize(10) - .setMasterConnectionPoolSize(20) - .setSlaveConnectionMinimumIdleSize(10) - .setSlaveConnectionPoolSize(20) .setMasterName(atlasConfig.getString(ATLAS_REDIS_MASTER_NAME)) .addSentinelAddress(formatUrls(atlasConfig.getStringArray(ATLAS_REDIS_SENTINEL_URLS))) .setUsername(atlasConfig.getString(ATLAS_REDIS_USERNAME)) diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java index 666ab376a7..2b41b1c07d 100644 --- a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java +++ b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java @@ -383,9 +383,4 @@ public interface AtlasGraph { * @throws AtlasException when error encountered in creating the client. */ AtlasGraphIndexClient getGraphIndexClient()throws AtlasException; - - - void setEnableCache(boolean enableCache); - - Boolean isCacheEnabled(); } diff --git a/graphdb/janus/pom.xml b/graphdb/janus/pom.xml index 75c9079eee..3c91e4442a 100644 --- a/graphdb/janus/pom.xml +++ b/graphdb/janus/pom.xml @@ -119,10 +119,6 @@ ch.qos.logback * - - io.netty - * - com.codahale.metrics metrics-core @@ -139,6 +135,10 @@ ch.qos.logback * + + cassandra-hadoop-util + * + @@ -212,10 +212,6 @@ org.codehaus.woodstox woodstox-core-asl - - io.netty - * - diff --git a/graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java b/graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java index 6c5e0c9886..b8761a93b3 100644 --- a/graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java +++ b/graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java @@ -128,6 +128,7 @@ public class AtlasJanusGraph implements AtlasGraph directIndexQuery(String query) throws AtlasBaseExcept @Override public Iterator> vertices() { - Iterator> results = query.vertices().iterator(); + Iterator> results = query.vertexStream().iterator(); Function, Result> function = new Function, Result>() { @@ -77,7 +77,7 @@ public Iterator> vertices(int offset, i Iterator> results = query .offset(offset) .limit(limit) - .vertices().iterator(); + .vertexStream().iterator(); Function, Result> function = new Function, Result>() { @@ -100,7 +100,7 @@ public Iterator> vertices(int offset, i .orderBy(sortBy, sortOrder) .offset(offset) .limit(limit) - .vertices().iterator(); + .vertexStream().iterator(); Function, Result> function = new Function, Result>() { diff --git a/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java b/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java index 23c11de301..e462344f99 100644 --- a/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java +++ b/graphdb/janus/src/main/java/org/janusgraph/diskstorage/solr/Solr6Index.java @@ -121,6 +121,7 @@ import org.janusgraph.graphdb.query.condition.Not; import org.janusgraph.graphdb.query.condition.Or; import org.janusgraph.graphdb.query.condition.PredicateCondition; +import org.janusgraph.graphdb.tinkerpop.optimize.step.Aggregation; import org.janusgraph.graphdb.types.ParameterType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -597,6 +598,11 @@ public void restore(Map>> documents, } } + @Override + public Number queryAggregation(IndexQuery indexQuery, KeyInformation.IndexRetriever indexRetriever, BaseTransaction baseTransaction, Aggregation aggregation) throws BackendException { + return null; + } + // This method will create a map of field ids to values. In the case of multiValued fields, // it will consolidate all the values into one List or Set so it can be updated with a single Solr operation private Map collectFieldValues(List content, String collectionName, @@ -672,7 +678,6 @@ public Stream query(IndexQuery query, KeyInformation.IndexRetriever info doc -> doc.getFieldValue(keyIdField).toString()); } - @Override public Long queryCount(IndexQuery query, KeyInformation.IndexRetriever information, BaseTransaction tx) throws BackendException { try { String collection = query.getStore(); @@ -1064,6 +1069,11 @@ public void clearStorage() throws BackendException { } } + @Override + public void clearStore(String s) throws BackendException { + + } + @Override public boolean supports(KeyInformation information, JanusGraphPredicate predicate) { final Class dataType = information.getDataType(); diff --git a/pom.xml b/pom.xml index a4a76ab027..426ffd7430 100644 --- a/pom.xml +++ b/pom.xml @@ -698,7 +698,7 @@ 4.3.0 1.8 3.2.2 - 7.16.2 + 7.17.4 org.apache.atlas.repository.audit.InMemoryEntityAuditRepository 2.13.2 2.18.1 @@ -718,7 +718,7 @@ 4.4.13 2.12.4 2.12.4 - 0.6.03 + 1.0.0 0.5.3 2.3.1 1 @@ -777,12 +777,11 @@ 2C 3.0.0-M5 6.9.4 - 3.5.1 + 3.7.0 5.0.3 3.5.5 3.20.1 1.11.1 - 4.1.61.Final @@ -840,16 +839,6 @@ false - - github - https://maven.pkg.github.com/atlanhq/atlan-janusgraph - - true - - - true - - hortonworks.repo https://repo.hortonworks.com/content/repositories/releases diff --git a/repository/pom.xml b/repository/pom.xml index bbe15338f8..19b2bc239a 100755 --- a/repository/pom.xml +++ b/repository/pom.xml @@ -59,6 +59,18 @@ atlas-graphdb-api + + org.apache.tinkerpop + gremlin-util + ${tinkerpop.version} + + + + org.jctools + jctools-core + 4.0.1 + + org.antlr antlr4-runtime @@ -111,7 +123,7 @@ io.netty - * + netty-handler org.slf4j @@ -404,7 +416,6 @@ org.apache.atlas atlas-testtools ${project.version} - test com.fasterxml.jackson.core diff --git a/repository/src/main/java/org/apache/atlas/repository/graph/IndexRecoveryService.java b/repository/src/main/java/org/apache/atlas/repository/graph/IndexRecoveryService.java index c39876d19c..f6154727ac 100644 --- a/repository/src/main/java/org/apache/atlas/repository/graph/IndexRecoveryService.java +++ b/repository/src/main/java/org/apache/atlas/repository/graph/IndexRecoveryService.java @@ -21,7 +21,6 @@ import org.apache.atlas.ApplicationProperties; import org.apache.atlas.AtlasConstants; import org.apache.atlas.AtlasException; -import org.apache.atlas.RequestContext; import org.apache.atlas.ha.HAConfiguration; import org.apache.atlas.listener.ActiveStateChangeHandler; import org.apache.atlas.repository.graphdb.AtlasGraph; @@ -182,6 +181,7 @@ public void run() { continue; } boolean indexHealthy = isIndexHealthy(); + if (this.txRecoveryObject == null && indexHealthy) { startMonitoring(); } @@ -228,7 +228,6 @@ private void startMonitoring() { try { startTime = recoveryInfoManagement.getStartTime(); Instant newStartTime = Instant.now(); - this.graph.setEnableCache(false); txRecoveryObject = this.graph.getManagementSystem().startIndexRecovery(startTime); recoveryInfoManagement.updateStartTime(newStartTime.toEpochMilli()); diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java index 978ed92e9e..1331ea76ec 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java @@ -1700,7 +1700,7 @@ private void executePreProcessor(EntityMutationContext context) throws AtlasBase private EntityMutationContext preCreateOrUpdate(EntityStream entityStream, EntityGraphMapper entityGraphMapper, boolean isPartialUpdate) throws AtlasBaseException { MetricRecorder metric = RequestContext.get().startMetricRecord("preCreateOrUpdate"); - this.graph.setEnableCache(RequestContext.get().isCacheEnabled()); + EntityGraphDiscovery graphDiscoverer = new AtlasEntityGraphDiscoveryV2(graph, typeRegistry, entityStream, entityGraphMapper); EntityGraphDiscoveryContext discoveryContext = graphDiscoverer.discoverEntities(); EntityMutationContext context = new EntityMutationContext(discoveryContext); diff --git a/repository/src/main/java/org/apache/atlas/services/MetricsService.java b/repository/src/main/java/org/apache/atlas/services/MetricsService.java index 5a8f445348..ef30675df1 100644 --- a/repository/src/main/java/org/apache/atlas/services/MetricsService.java +++ b/repository/src/main/java/org/apache/atlas/services/MetricsService.java @@ -98,7 +98,7 @@ public MetricsService(final AtlasGraph graph, final AtlasTypeRegistry typeRegist @SuppressWarnings("unchecked") @GraphTransaction public AtlasMetrics getMetrics() { - this.atlasGraph.setEnableCache(false); + final AtlasTypesDef typesDef = getTypesDef(); Collection entityDefs = typesDef.getEntityDefs(); diff --git a/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java b/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java index 5544c035e9..41c6d89ad9 100644 --- a/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java +++ b/repository/src/main/java/org/apache/atlas/tasks/TaskRegistry.java @@ -17,8 +17,8 @@ */ package org.apache.atlas.tasks; -import com.datastax.oss.driver.shaded.fasterxml.jackson.core.JsonProcessingException; -import com.datastax.oss.driver.shaded.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.atlas.AtlasConfiguration; import org.apache.atlas.RequestContext; import org.apache.atlas.annotation.GraphTransaction; diff --git a/repository/src/main/java/org/apache/atlas/util/AtlasMetricsUtil.java b/repository/src/main/java/org/apache/atlas/util/AtlasMetricsUtil.java index 971c4d6404..beb90e67b1 100644 --- a/repository/src/main/java/org/apache/atlas/util/AtlasMetricsUtil.java +++ b/repository/src/main/java/org/apache/atlas/util/AtlasMetricsUtil.java @@ -194,11 +194,9 @@ public Map getStats() { private boolean getBackendStoreStatus(){ try { - boolean isCacheEnabled = this.graph.isCacheEnabled(); runWithTimeout(new Runnable() { @Override public void run() { - graph.setEnableCache(isCacheEnabled); graph.query().has(TYPE_NAME_PROPERTY_KEY, TYPE_NAME_INTERNAL).vertices(1); graphCommit(); @@ -219,11 +217,9 @@ private boolean getIndexStoreStatus(){ final String query = AtlasGraphUtilsV2.getIndexSearchPrefix() + "\"" + Constants.TYPE_NAME_PROPERTY_KEY + "\":(" + TYPE_NAME_INTERNAL + ")"; try { - boolean isCacheEnabled = this.graph.isCacheEnabled(); runWithTimeout(new Runnable() { @Override public void run() { - graph.setEnableCache(isCacheEnabled); graph.indexQuery(Constants.VERTEX_INDEX, query).vertices(0, 1); graphCommit(); diff --git a/server-api/src/main/java/org/apache/atlas/RequestContext.java b/server-api/src/main/java/org/apache/atlas/RequestContext.java index 22f6242de3..388cab51a2 100644 --- a/server-api/src/main/java/org/apache/atlas/RequestContext.java +++ b/server-api/src/main/java/org/apache/atlas/RequestContext.java @@ -110,7 +110,6 @@ public class RequestContext { private boolean skipAuthorizationCheck = false; private Set deletedEdgesIdsForResetHasLineage = new HashSet<>(0); private String requestUri; - private boolean cacheEnabled; private boolean delayTagNotifications = false; private Map> deletedClassificationAndVertices = new HashMap<>(); @@ -752,14 +751,6 @@ public String getRequestUri() { return this.requestUri; } - public void setEnableCache(boolean cacheEnabled) { - this.cacheEnabled = cacheEnabled; - } - - public boolean isCacheEnabled() { - return this.cacheEnabled; - } - public boolean isIncludeClassificationNames() { return includeClassificationNames; } diff --git a/webapp/pom.xml b/webapp/pom.xml index 348e71686e..8efe9ddae5 100755 --- a/webapp/pom.xml +++ b/webapp/pom.xml @@ -547,7 +547,6 @@ org.apache.atlas atlas-testtools ${project.version} - test diff --git a/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java index e78e250f87..a5c7171393 100644 --- a/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java +++ b/webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java @@ -812,7 +812,6 @@ public EntityMutationResponse createOrUpdate(AtlasEntitiesWithExtInfo entities, @QueryParam("skipProcessEdgeRestoration") @DefaultValue("false") boolean skipProcessEdgeRestoration ) throws AtlasBaseException { AtlasPerfTracer perf = null; - RequestContext.get().setEnableCache(false); RequestContext.get().setSkipProcessEdgeRestoration(skipProcessEdgeRestoration); try { if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) { diff --git a/webapp/src/main/java/org/apache/atlas/web/service/AtlasDebugMetricsSink.java b/webapp/src/main/java/org/apache/atlas/web/service/AtlasDebugMetricsSink.java index ef24b861ea..ec43d3e141 100644 --- a/webapp/src/main/java/org/apache/atlas/web/service/AtlasDebugMetricsSink.java +++ b/webapp/src/main/java/org/apache/atlas/web/service/AtlasDebugMetricsSink.java @@ -19,6 +19,7 @@ import org.apache.atlas.web.model.DebugMetrics; import org.apache.commons.lang.StringUtils; +import org.apache.hadoop.hbase.shaded.org.apache.commons.configuration2.SubsetConfiguration; import org.apache.hadoop.metrics2.AbstractMetric; import org.apache.hadoop.metrics2.MetricsRecord; import org.apache.hadoop.metrics2.MetricsSink; @@ -58,10 +59,6 @@ public HashMap getMetrics() { return metricStructuredSnapshot; } - @Override - public void init(org.apache.commons.configuration2.SubsetConfiguration subsetConfiguration) { - } - @Override public void flush() { } @@ -112,4 +109,9 @@ private void updateMetricType(DebugMetrics debugMetrics, String metricType, Abst private static String inferMeasureType(String fullName, String nameWithoutMetricType) { return fullName.replaceFirst(nameWithoutMetricType, ""); } + + @Override + public void init(SubsetConfiguration subsetConfiguration) { + + } } \ No newline at end of file diff --git a/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java b/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java index 88c702893e..e30a8e8966 100644 --- a/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java +++ b/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntitiesREST.java @@ -17,22 +17,6 @@ */ package org.apache.atlas.web.adapters; -import static org.apache.atlas.TestUtilsV2.CLASSIFICATION; -import static org.apache.atlas.TestUtilsV2.COLUMN_TYPE; -import static org.apache.atlas.TestUtilsV2.DATABASE_TYPE; -import static org.apache.atlas.TestUtilsV2.FETL_CLASSIFICATION; -import static org.apache.atlas.TestUtilsV2.PHI; -import static org.apache.atlas.TestUtilsV2.PII; -import static org.apache.atlas.TestUtilsV2.TABLE_TYPE; -import static org.apache.atlas.model.discovery.SearchParameters.FilterCriteria.Condition.AND; -import static org.apache.atlas.repository.Constants.CLASSIFICATION_NAMES_KEY; -import static org.apache.atlas.repository.Constants.CUSTOM_ATTRIBUTES_PROPERTY_KEY; -import static org.apache.atlas.repository.Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY; -import static org.apache.atlas.repository.Constants.STATE_PROPERTY_KEY; -import static org.apache.atlas.repository.Constants.TIMESTAMP_PROPERTY_KEY; -import static org.apache.atlas.repository.Constants.TYPE_NAME_PROPERTY_KEY; -import static org.apache.atlas.utils.TestLoadModelUtils.createTypesAsNeeded; - import org.apache.atlas.AtlasClient; import org.apache.atlas.RequestContext; import org.apache.atlas.TestModules; @@ -73,7 +57,6 @@ import org.testng.annotations.Test; import javax.inject.Inject; - import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -84,6 +67,22 @@ import java.util.List; import java.util.Map; +import static org.apache.atlas.TestUtilsV2.CLASSIFICATION; +import static org.apache.atlas.TestUtilsV2.COLUMN_TYPE; +import static org.apache.atlas.TestUtilsV2.DATABASE_TYPE; +import static org.apache.atlas.TestUtilsV2.FETL_CLASSIFICATION; +import static org.apache.atlas.TestUtilsV2.PHI; +import static org.apache.atlas.TestUtilsV2.PII; +import static org.apache.atlas.TestUtilsV2.TABLE_TYPE; +import static org.apache.atlas.model.discovery.SearchParameters.FilterCriteria.Condition.AND; +import static org.apache.atlas.repository.Constants.CLASSIFICATION_NAMES_KEY; +import static org.apache.atlas.repository.Constants.CUSTOM_ATTRIBUTES_PROPERTY_KEY; +import static org.apache.atlas.repository.Constants.MODIFICATION_TIMESTAMP_PROPERTY_KEY; +import static org.apache.atlas.repository.Constants.STATE_PROPERTY_KEY; +import static org.apache.atlas.repository.Constants.TIMESTAMP_PROPERTY_KEY; +import static org.apache.atlas.repository.Constants.TYPE_NAME_PROPERTY_KEY; +import static org.apache.atlas.utils.TestLoadModelUtils.createTypesAsNeeded; + @Guice(modules = {TestModules.TestOnlyModule.class}) public class TestEntitiesREST { @@ -162,7 +161,7 @@ public void testCustomAttributesSearch() throws Exception { dbWithCustomAttr.setCustomAttributes(customAttr); AtlasEntitiesWithExtInfo atlasEntitiesWithExtInfo = new AtlasEntitiesWithExtInfo(dbWithCustomAttr); - EntityMutationResponse response = entityREST.createOrUpdate(atlasEntitiesWithExtInfo, false, false, false); + EntityMutationResponse response = entityREST.createOrUpdate(atlasEntitiesWithExtInfo, false, false, false, false); Assert.assertNotNull(response.getUpdatedEntitiesByTypeName(DATABASE_TYPE)); @@ -646,7 +645,7 @@ public void testUpdateWithSerializedEntities() throws Exception { newEntities.addReferredEntity(serDeserEntity(column)); } - EntityMutationResponse response2 = entityREST.createOrUpdate(newEntities, false, false, false); + EntityMutationResponse response2 = entityREST.createOrUpdate(newEntities, false, false, false, false); List newGuids = response2.getEntitiesByOperation(EntityMutations.EntityOperation.CREATE); Assert.assertNotNull(newGuids); @@ -775,7 +774,7 @@ private void registerEntities() throws Exception { entities.addReferredEntity(column); } - EntityMutationResponse response = entityREST.createOrUpdate(entities, false, false, false); + EntityMutationResponse response = entityREST.createOrUpdate(entities, false, false, false, false); List guids = response.getEntitiesByOperation(EntityMutations.EntityOperation.CREATE); Assert.assertNotNull(guids); diff --git a/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityREST.java b/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityREST.java index 8255b4d448..5821b4de1f 100644 --- a/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityREST.java +++ b/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityREST.java @@ -87,7 +87,7 @@ public void cleanup() throws Exception { private void createTestEntity() throws Exception { AtlasEntity dbEntity = TestUtilsV2.createDBEntity(); - final EntityMutationResponse response = entityREST.createOrUpdate(new AtlasEntitiesWithExtInfo(dbEntity), false, false, false); + final EntityMutationResponse response = entityREST.createOrUpdate(new AtlasEntitiesWithExtInfo(dbEntity), false, false, false, false); Assert.assertNotNull(response); List entitiesMutated = response.getEntitiesByOperation(EntityMutations.EntityOperation.CREATE); @@ -391,7 +391,7 @@ public void testDeleteEntityById() throws Exception { @Test public void testPartialUpdateByUniqueAttribute() throws Exception { AtlasEntity dbEntity = TestUtilsV2.createDBEntity(); - EntityMutationResponse response = entityREST.createOrUpdate(new AtlasEntitiesWithExtInfo(dbEntity), false, false, false); + EntityMutationResponse response = entityREST.createOrUpdate(new AtlasEntitiesWithExtInfo(dbEntity), false, false, false, false); String dbGuid = response.getEntitiesByOperation(EntityMutations.EntityOperation.CREATE).get(0).getGuid(); Assert.assertTrue(AtlasTypeUtil.isAssignedGuid(dbGuid)); @@ -422,7 +422,7 @@ public void testPartialUpdateByUniqueAttribute() throws Exception { @Test public void testUpdateGetDeleteEntityByUniqueAttribute() throws Exception { AtlasEntity dbEntity = TestUtilsV2.createDBEntity(); - EntityMutationResponse response = entityREST.createOrUpdate(new AtlasEntitiesWithExtInfo(dbEntity), false, false, false); + EntityMutationResponse response = entityREST.createOrUpdate(new AtlasEntitiesWithExtInfo(dbEntity), false, false, false, false); String dbGuid = response.getEntitiesByOperation(EntityMutations.EntityOperation.CREATE).get(0).getGuid(); Assert.assertTrue(AtlasTypeUtil.isAssignedGuid(dbGuid)); diff --git a/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityRESTDelete.java b/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityRESTDelete.java index 8b91981221..343bb0143f 100644 --- a/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityRESTDelete.java +++ b/webapp/src/test/java/org/apache/atlas/web/adapters/TestEntityRESTDelete.java @@ -90,7 +90,7 @@ private void createEntities() throws Exception { for (int i = 1; i <= 2; i++) { AtlasEntity dbEntity = TestUtilsV2.createDBEntity(); - final EntityMutationResponse response = entityREST.createOrUpdate(new AtlasEntity.AtlasEntitiesWithExtInfo(dbEntity), false, false, false); + final EntityMutationResponse response = entityREST.createOrUpdate(new AtlasEntity.AtlasEntitiesWithExtInfo(dbEntity), false, false, false, false); assertNotNull(response); List entitiesMutated = response.getEntitiesByOperation(EntityMutations.EntityOperation.CREATE); diff --git a/webapp/src/test/java/org/apache/atlas/web/adapters/TypeDefsRESTTest.java b/webapp/src/test/java/org/apache/atlas/web/adapters/TypeDefsRESTTest.java index fa6705c2c5..58ee135903 100644 --- a/webapp/src/test/java/org/apache/atlas/web/adapters/TypeDefsRESTTest.java +++ b/webapp/src/test/java/org/apache/atlas/web/adapters/TypeDefsRESTTest.java @@ -80,7 +80,7 @@ public void cleanup() throws Exception { private void createTestEntity() throws AtlasBaseException { AtlasEntity dbEntity = TestUtilsV2.createDBEntity(); - final EntityMutationResponse response = entityREST.createOrUpdate(new AtlasEntity.AtlasEntitiesWithExtInfo(dbEntity), false, false, false); + final EntityMutationResponse response = entityREST.createOrUpdate(new AtlasEntity.AtlasEntitiesWithExtInfo(dbEntity), false, false, false, false); Assert.assertNotNull(response); List entitiesMutated = response.getEntitiesByOperation(EntityMutations.EntityOperation.CREATE);