sheetalshah1007 commented on code in PR #490:
URL: https://github.com/apache/atlas/pull/490#discussion_r3039554246


##########
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java:
##########


Review Comment:
   `AtlasTypeDefGraphStoreV2.init()` — change log messages from 
AtlasTypeDefGraphStoreV1 to V2 



##########
intg/src/main/java/org/apache/atlas/AtlasErrorCode.java:
##########
@@ -259,7 +259,9 @@ public enum AtlasErrorCode {
     IMPORT_REGISTRATION_FAILED(500, "ATLAS-500-00-020", "Failed to register 
import request"),
     IMPORT_FAILED(500, "ATLAS-500-00-021", "Import with id {0} failed"),
     ABORT_IMPORT_FAILED(500, "ATLAS-500-00-022", "Failed to abort import with 
id {0}"),
-    IMPORT_QUEUEING_FAILED(500, "ATLAS-500-00-023", "Failed to add import with 
id {0} to request queue, please try again later");
+    IMPORT_QUEUEING_FAILED(500, "ATLAS-500-00-023", "Failed to add import with 
id {0} to request queue, please try again later"),
+
+    NON_INDEXABLE_BM_DELETE_NOT_ALLOWED(400, "ATLAS-400-00-106", "Deletion not 
allowed for non-indexable Business Metadata ''{0}'' without force=true. 
Non-indexable attributes cannot be validated efficiently for references; use 
force=true to skip validation and delete (warning: orphaned references may 
remain).");

Review Comment:
   **`ATLAS-400-00-106 `is already used** by `INVALID_RELATIONSHIP_LABEL`. 
Please move `NON_INDEXABLE_BM_DELETE_NOT_ALLOWED` into the `400` section and 
use` ATLAS-400-00-107` (or the **next free** 400 id), not a duplicate 106.



##########
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java:
##########
@@ -405,19 +407,24 @@ public AtlasTypesDef updateAtlasTypeDefs(final 
AtlasTypesDef typesDef) throws At
      * @HTTP 204 On successful deletion of the requested type definitions
      * @HTTP 400 On validation failure for any type definitions
      */
+    public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef) throws 
AtlasBaseException {
+        deleteAtlasTypeDefs(typesDef, false);
+    }
+
     @DELETE
     @Path("/typedefs")
     @Experimental
     @Timed
-    public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef) throws 
AtlasBaseException {
+    public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef,

Review Comment:
   Add JavaDoc to `deleteAtlasTypeDefs` (the @`DELETE` method with `force`) —` 
@param forceDelete` and BM semantics match `deleteAtlasTypeByName`; the REST 
endpoint currently has no class-level docs for force.
   
   



##########
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java:
##########
@@ -405,19 +407,24 @@ public AtlasTypesDef updateAtlasTypeDefs(final 
AtlasTypesDef typesDef) throws At
      * @HTTP 204 On successful deletion of the requested type definitions
      * @HTTP 400 On validation failure for any type definitions
      */
+    public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef) throws 
AtlasBaseException {

Review Comment:
   Consider keeping only the `@DELETE` bulk-delete method (with `force`), and 
drop the extra overload that only passes `false`, so tests and Java callers use 
`deleteAtlasTypeDefs(typesDef, false) `explicitly—same idea as delete-by-name.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to