This is an automated email from the ASF dual-hosted git repository. pinal pushed a commit to branch ATLAS-5227 in repository https://gitbox.apache.org/repos/asf/atlas.git
commit 4aed8279a8e15c12d6403e8aae766023da202c21 Author: Pinal Shah <[email protected]> AuthorDate: Sun Mar 1 20:05:31 2026 +0530 ATLAS-5227: Support disabling composite index --- .../repository/graphdb/AtlasGraphManagement.java | 8 ++ .../graphdb/janus/AtlasJanusGraphManagement.java | 96 ++++++++++++++-------- .../janus/AtlasJanusGraphManagementTest.java | 9 +- .../apache/atlas/model/typedef/AtlasStructDef.java | 1 + .../bootstrap/AtlasTypeDefStoreInitializer.java | 32 ++++++-- .../AtlasTypeDefStoreInitializerTest.java | 22 ++--- 6 files changed, 106 insertions(+), 62 deletions(-) diff --git a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphManagement.java b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphManagement.java index ba0abf464..d3a8eb642 100644 --- a/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphManagement.java +++ b/graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphManagement.java @@ -166,6 +166,14 @@ public interface AtlasGraphManagement extends AutoCloseable { */ void updateSchemaStatus(); + /** + * Drops the index with the given name. + * + * @param indexName + * @throws Exception + */ + void disableIndex(String indexName) throws Exception; + /*** * Re-index elements. * @param indexName: Name of the index that needs to be operated on. diff --git a/graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphManagement.java b/graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphManagement.java index 9148051b9..f4cd8ee7b 100644 --- a/graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphManagement.java +++ b/graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphManagement.java @@ -44,6 +44,7 @@ import org.janusgraph.core.schema.JanusGraphManagement.IndexBuilder; import org.janusgraph.core.schema.Mapping; import org.janusgraph.core.schema.Parameter; import org.janusgraph.core.schema.PropertyKeyMaker; +import org.janusgraph.core.schema.SchemaAction; import org.janusgraph.core.schema.SchemaStatus; import org.janusgraph.diskstorage.BackendTransaction; import org.janusgraph.diskstorage.indexing.IndexEntry; @@ -68,9 +69,10 @@ import java.util.Set; import java.util.concurrent.ExecutionException; import static com.google.common.base.Preconditions.checkArgument; +import static org.janusgraph.core.schema.SchemaAction.DISABLE_INDEX; import static org.janusgraph.core.schema.SchemaAction.ENABLE_INDEX; +import static org.janusgraph.core.schema.SchemaStatus.DISABLED; import static org.janusgraph.core.schema.SchemaStatus.ENABLED; -import static org.janusgraph.core.schema.SchemaStatus.INSTALLED; import static org.janusgraph.core.schema.SchemaStatus.REGISTERED; /** @@ -94,55 +96,77 @@ public class AtlasJanusGraphManagement implements AtlasGraphManagement { this.graph = graph; } - public static void updateSchemaStatus(JanusGraphManagement mgmt, JanusGraph graph, Class<? extends Element> elementType) { + public void updateSchemaStatus(JanusGraphManagement mgmt, JanusGraph graph, Class<? extends Element> elementType) { LOG.info("updating SchemaStatus for {}: Starting...", elementType.getSimpleName()); + int count = 0; - int count = 0; Iterable<JanusGraphIndex> iterable = mgmt.getGraphIndexes(elementType); for (JanusGraphIndex index : iterable) { - if (index.isCompositeIndex()) { - PropertyKey[] propertyKeys = index.getFieldKeys(); - SchemaStatus status = index.getIndexStatus(propertyKeys[0]); - String indexName = index.name(); - - try { - if (status == REGISTERED) { - JanusGraphManagement management = null; + enableIndex(index.name()); + count++; + } - try { - management = graph.openManagement(); + LOG.info("updating SchemaStatus for {}: {}: Done!", elementType.getSimpleName(), count); + } - JanusGraphIndex indexToUpdate = management.getGraphIndex(indexName); + public void disableIndex(String propertyName) { + updateIndex(propertyName, DISABLE_INDEX); + } - management.updateIndex(indexToUpdate, ENABLE_INDEX).get(); - } finally { - if (management != null) { - management.commit(); - } - } + public void enableIndex(String propertyName) { + updateIndex(propertyName, ENABLE_INDEX); + } - GraphIndexStatusReport report = ManagementSystem.awaitGraphIndexStatus(graph, indexName).status(ENABLED).call(); + private void updateIndex(String indexName, SchemaAction action) { + try { + JanusGraphManagement management = null; + JanusGraph janusGraph = this.graph.getGraph(); + SchemaStatus waitForStatus = null; + SchemaStatus currentStatus = null; + + try { + management = janusGraph.openManagement(); + JanusGraphIndex indexToUpdate = management.getGraphIndex(indexName); + + if (indexToUpdate != null && indexToUpdate.isCompositeIndex()) { + PropertyKey[] propertyKeys = indexToUpdate.getFieldKeys(); + currentStatus = indexToUpdate.getIndexStatus(propertyKeys[0]); + + if (action == ENABLE_INDEX && currentStatus == REGISTERED) { + waitForStatus = ENABLED; + management.updateIndex(indexToUpdate, action).get(); + } else if (action == DISABLE_INDEX && (currentStatus == ENABLED || currentStatus == REGISTERED)) { + waitForStatus = DISABLED; + management.updateIndex(indexToUpdate, action).get(); + } else { + LOG.warn("SchemaStatus {} found for index: {}, cannot {}", currentStatus, indexToUpdate.name(), action); + return; + } + } else { + LOG.warn("Index: {} not found or not a composite index, cannot {} for index: {}", indexName, action, indexToUpdate != null ? indexToUpdate : "null"); + } + } finally { + if (management != null) { + management.commit(); + } + } - if (!report.getConvergedKeys().isEmpty() && report.getConvergedKeys().containsKey(indexName)) { - LOG.info("SchemaStatus updated for index: {}, from {} to {}.", index.name(), REGISTERED, ENABLED); + if (currentStatus != null && waitForStatus != null) { + GraphIndexStatusReport report = ManagementSystem.awaitGraphIndexStatus(janusGraph, indexName).status(waitForStatus).call(); - count++; - } else if (!report.getNotConvergedKeys().isEmpty() && report.getNotConvergedKeys().containsKey(indexName)) { - LOG.error("SchemaStatus failed to update index: {}, from {} to {}.", index.name(), REGISTERED, ENABLED); - } - } else if (status == INSTALLED) { - LOG.warn("SchemaStatus {} found for index: {}", INSTALLED, indexName); - } - } catch (InterruptedException e) { - LOG.error("IllegalStateException for indexName : {}, Exception: ", indexName, e); - } catch (ExecutionException e) { - LOG.error("ExecutionException for indexName : {}, Exception: ", indexName, e); + if (!report.getConvergedKeys().isEmpty() && report.getConvergedKeys().containsKey(indexName)) { + LOG.info("SchemaStatus updated for index: {}, from {} to {}.", indexName, currentStatus, waitForStatus); + } + else if (!report.getNotConvergedKeys().isEmpty() && report.getNotConvergedKeys().containsKey(indexName)) { + LOG.error("SchemaStatus failed to update index: {}, from {} to {}.", indexName, currentStatus, waitForStatus); } } + } catch (InterruptedException e) { + LOG.error("InterruptedException for indexName : {}, Exception: ", indexName, e); + } catch (ExecutionException e) { + LOG.error("ExecutionException for indexName : {}, Exception: ", indexName, e); } - - LOG.info("updating SchemaStatus for {}: {}: Done!", elementType.getSimpleName(), count); } @Override diff --git a/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphManagementTest.java b/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphManagementTest.java index 0c9d1dc69..5cebb35aa 100644 --- a/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphManagementTest.java +++ b/graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphManagementTest.java @@ -607,13 +607,6 @@ public class AtlasJanusGraphManagementTest { management.printIndexRecoveryStats(null); } - @Test - public void testUpdateSchemaStatusStaticMethod() { - // Test the static method - AtlasJanusGraphManagement.updateSchemaStatus(mockJanusManagement, mockJanusGraph, Vertex.class); - AtlasJanusGraphManagement.updateSchemaStatus(mockJanusManagement, mockJanusGraph, org.apache.tinkerpop.gremlin.structure.Edge.class); - } - @Test public void testStaticUpdateSchemaStatusWithRegisteredIndex() { JanusGraphIndex mockIndex = mock(JanusGraphIndex.class); @@ -646,7 +639,7 @@ public class AtlasJanusGraphManagementTest { when(mockJanusManagement.getGraphIndexes(Vertex.class)).thenReturn(Collections.singletonList(mockIndex)); // Should handle INSTALLED status without attempting to update - AtlasJanusGraphManagement.updateSchemaStatus(mockJanusManagement, mockJanusGraph, Vertex.class); + management.updateSchemaStatus(mockJanusManagement, mockJanusGraph, Vertex.class); // Verify no inner management was opened for INSTALLED status verify(mockJanusGraph, never()).openManagement(); diff --git a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java index bd69a6461..1d17bffe9 100644 --- a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java +++ b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java @@ -268,6 +268,7 @@ public class AtlasStructDef extends AtlasBaseTypeDef implements Serializable { public static final int DEFAULT_SEARCHWEIGHT = -1; public static final String SEARCH_WEIGHT_ATTR_NAME = "searchWeight"; public static final String INDEX_TYPE_ATTR_NAME = "indexType"; + public static final String IS_INDEXABLE_ATTR_NAME = "isIndexable"; public static final String ATTRDEF_OPTION_SOFT_REFERENCE = "isSoftReference"; public static final String ATTRDEF_OPTION_APPEND_ON_PARTIAL_UPDATE = "isAppendOnPartialUpdate"; public static final int COUNT_NOT_SET = -1; diff --git a/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java b/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java index 8ce7ca706..23775fdf6 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java @@ -44,6 +44,7 @@ import org.apache.atlas.model.typedef.AtlasTypesDef; import org.apache.atlas.repository.Constants; import org.apache.atlas.repository.graph.GraphBackedSearchIndexer; import org.apache.atlas.repository.graphdb.AtlasGraph; +import org.apache.atlas.repository.graphdb.AtlasGraphManagement; import org.apache.atlas.repository.patches.AddMandatoryAttributesPatch; import org.apache.atlas.repository.patches.AtlasPatchManager; import org.apache.atlas.repository.patches.AtlasPatchRegistry; @@ -461,7 +462,7 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler { new RemoveLegacyRefAttributesPatchHandler(typeDefStore, typeRegistry), new UpdateTypeDefOptionsPatchHandler(typeDefStore, typeRegistry), new SetServiceTypePatchHandler(typeDefStore, typeRegistry), - new UpdateAttributeMetadataHandler(typeDefStore, typeRegistry), + new UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph), new AddSuperTypePatchHandler(typeDefStore, typeRegistry), new AddMandatoryAttributePatchHandler(typeDefStore, typeRegistry) }; @@ -1179,8 +1180,11 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler { } static class UpdateAttributeMetadataHandler extends PatchHandler { - public UpdateAttributeMetadataHandler(AtlasTypeDefStore typeDefStore, AtlasTypeRegistry typeRegistry) { + public final AtlasGraph graph; + + public UpdateAttributeMetadataHandler(AtlasTypeDefStore typeDefStore, AtlasTypeRegistry typeRegistry, AtlasGraph graph) { super(typeDefStore, typeRegistry, new String[] {"UPDATE_ATTRIBUTE_METADATA"}); + this.graph = graph; } @Override @@ -1198,7 +1202,7 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler { if (typeDef.getClass().equals(AtlasEntityDef.class)) { AtlasEntityDef entityDef = new AtlasEntityDef((AtlasEntityDef) typeDef); - updateAttributeMetadata(patch, entityDef.getAttributeDefs()); + updateAttributeMetadata(patch.getTypeName(), patch, entityDef.getAttributeDefs()); entityDef.setTypeVersion(patch.getUpdateToVersion()); @@ -1208,7 +1212,7 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler { } else if (typeDef.getClass().equals(AtlasStructDef.class)) { AtlasStructDef updatedDef = new AtlasStructDef((AtlasStructDef) typeDef); - updateAttributeMetadata(patch, updatedDef.getAttributeDefs()); + updateAttributeMetadata(patch.getTypeName(), patch, updatedDef.getAttributeDefs()); updatedDef.setTypeVersion(patch.getUpdateToVersion()); @@ -1227,15 +1231,15 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler { return ret; } - private void updateAttributeMetadata(TypeDefPatch patch, List<AtlasAttributeDef> attributeDefsFromEntity) { + private void updateAttributeMetadata(String typeName, TypeDefPatch patch, List<AtlasAttributeDef> attributeDefsFromEntity) { for (AtlasAttributeDef attributeDef : attributeDefsFromEntity) { if (attributeDef.getName().equalsIgnoreCase(patch.getAttributeName())) { - updateAttribute(attributeDef, patch.getParams()); + updateAttribute(typeName, attributeDef, patch.getParams()); } } } - private void updateAttribute(AtlasAttributeDef atlasAttributeDef, Map<String, Object> params) { + private void updateAttribute(String typeName, AtlasAttributeDef atlasAttributeDef, Map<String, Object> params) { if (!params.isEmpty()) { for (Map.Entry<String, Object> entry : params.entrySet()) { try { @@ -1270,6 +1274,20 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler { throw new RuntimeException(msg); } } + } else if (AtlasAttributeDef.IS_INDEXABLE_ATTR_NAME.equalsIgnoreCase(entry.getKey())) { + boolean isIndexable = (Boolean) entry.getValue(); + if (!isIndexable && atlasAttributeDef.getIsIndexable()) { + AtlasEntityType type = typeRegistry.getEntityTypeByName(typeName); + String propertyName = type.getVertexPropertyName(atlasAttributeDef.getName()); + + LOG.info("Updating Model attribute {}'s property {} to {}.", propertyName, entry.getKey(), entry.getValue()); + try (AtlasGraphManagement mgmt = graph.getManagementSystem()) { + mgmt.disableIndex(propertyName); + } + atlasAttributeDef.setIsIndexable(isIndexable); + } else { + LOG.info("Model attribute {}'s property {} is already set to {}. No update needed.", atlasAttributeDef.getName(), entry.getKey(), entry.getValue()); + } } else { //sanity exception //more attributes can be added as needed. diff --git a/repository/src/test/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializerTest.java b/repository/src/test/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializerTest.java index 626025d8f..99cab83ab 100644 --- a/repository/src/test/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializerTest.java +++ b/repository/src/test/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializerTest.java @@ -929,7 +929,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerComprehensive() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestEntity", "1.0", "2.0"); @@ -954,7 +954,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerForStructDef() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestStruct", "1.0", "2.0"); @@ -976,7 +976,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerWithInvalidType() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestEnum", "1.0", "2.0"); @@ -1140,7 +1140,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerSearchWeightValidation() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestEntity", "1.0", "2.0"); @@ -1166,7 +1166,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerSearchWeightSuccess() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestEntity", "1.0", "2.0"); @@ -1192,7 +1192,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerIndexTypeValidation() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestEntity", "1.0", "2.0"); @@ -1213,7 +1213,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerIndexTypeSuccess() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestEntity", "1.0", "2.0"); @@ -1235,7 +1235,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerEmptyIndexType() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestEntity", "1.0", "2.0"); @@ -1258,7 +1258,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerUnknownProperty() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestEntity", "1.0", "2.0"); @@ -1280,7 +1280,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerExceptionHandling() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestEntity", "1.0", "2.0"); AtlasEntityDef entityDef = new AtlasEntityDef("TestEntity", "desc", "1.0"); @@ -1301,7 +1301,7 @@ public class AtlasTypeDefStoreInitializerTest { @Test public void testUpdateAttributeMetadataHandlerEmptyParams() throws Exception { - AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry); + AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler handler = new AtlasTypeDefStoreInitializer.UpdateAttributeMetadataHandler(typeDefStore, typeRegistry, graph); Object patch = createMockTypeDefPatch("UPDATE_ATTRIBUTE_METADATA", "TestEntity", "1.0", "2.0");
