You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "zeroflag (via GitHub)" <gi...@apache.org> on 2023/04/25 09:34:22 UTC

[GitHub] [knox] zeroflag commented on a diff in pull request #750: KNOX-2901 - Deleting a descriptor/provider via hadoop xml resource

zeroflag commented on code in PR #750:
URL: https://github.com/apache/knox/pull/750#discussion_r1176260086


##########
gateway-topology-hadoop-xml/src/main/java/org/apache/knox/gateway/topology/hadoop/xml/HadoopXmlResourceMonitor.java:
##########
@@ -97,6 +100,19 @@ private void processClouderaManagerDescriptor(String descriptorFilePath, String
     final HadoopXmlResourceParserResult result = hadoopXmlResourceParser.parse(descriptorFilePath, topologyName);
     processSharedProviders(result);
     processDescriptors(result);
+    processDeleted(descriptorsDir, result.getDeletedDescriptors(), ".json");
+    processDeleted(topologiesDir, result.getDeletedDescriptors(), ".xml");

Review Comment:
   I checked it again, and the topology was indeed deleted from the file system. I'll remove the explicit `processDeleted` on the xml topology.
   
   ```2023-04-25 11:31:51,989  INFO  knox.gateway (HadoopXmlResourceParser.java:logParserResult(129)) - Found deleted descriptors deleted in /Users/attilamagyar/development/test/conf/descriptors/test.hxr
   2023-04-25 11:31:51,992  INFO  knox.gateway (HadoopXmlResourceMonitor.java:lambda$processDescriptors$2(143)) - Ignoring topology3 Knox descriptor update because it did not change.
   2023-04-25 11:31:53,783  INFO  knox.gateway (HadoopXmlResourceMonitor.java:processDeleted(111)) - Deleting file /Users/attilamagyar/development/test/conf/descriptors/deleted.json
   2023-04-25 11:31:55,399  INFO  knox.gateway (DescriptorsMonitor.java:onFileDelete(73)) - Deleting topology deleted.xml because the associated descriptor deleted.json was deleted.
   2023-04-25 11:31:55,888  INFO  knox.gateway (GatewayServer.java:handleDeleteDeployment(990)) - Deleting topology deleted
   2023-04-25 11:31:55,890  INFO  knox.gateway (GatewayServer.java:internalDeactivateTopology(934)) - Deactivating topology deleted
   2023-04-25 11:31:55,892  INFO  knox.gateway (GatewayServer.java:handleDeleteDeployment(997)) - Deleting deployed topology /Users/attilamagyar/development/test/data/deployments/deleted.topo.187b7c0a360
   ```



-- 
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: dev-unsubscribe@knox.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org