[ 
https://issues.apache.org/jira/browse/KNOX-2901?focusedWorklogId=858882&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-858882
 ]

ASF GitHub Bot logged work on KNOX-2901:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Apr/23 09:34
            Start Date: 25/Apr/23 09:34
    Worklog Time Spent: 10m 
      Work Description: 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
   ```





Issue Time Tracking
-------------------

    Worklog Id:     (was: 858882)
    Time Spent: 0.5h  (was: 20m)

> Deleting a descriptor/provider from hadoop xml resource
> -------------------------------------------------------
>
>                 Key: KNOX-2901
>                 URL: https://issues.apache.org/jira/browse/KNOX-2901
>             Project: Apache Knox
>          Issue Type: Task
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>         Attachments: Screenshot 2023-04-19 at 13.23.04.png
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Currently one can only delete provider config parameters using the following 
> syntax:
> {code}
> authentication.param.remove=main.pamRealm.service 
> {code}
> But there is no way to remove an entire provider or descriptor.
> Proposed syntax:
>  !Screenshot 2023-04-19 at 13.23.04.png! 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to