Hi Everyone, Users could use the filemgr-client script to ingest the same file multiple times, which leads to several records in the query_tool result. However, if you delete the same file more than once, then error occurs. Below is the scenario:
Step 1: Ingest the test.txt file twice. $ ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM GenericFile" Oct 28, 2014 12:23:07 AM org.apache.oodt.cas.filemgr.system.XmlRpcFileManager complexQuery INFO: Query returned 2 results /Users/AngelaWang/files/test.txt,text/plain,text,plain,Flat,9caff30e-5ae3-11e4-ada3-4d034e11a919,GenericFile,2014-10-23T11:37:16.085-07:00,test.txt,test.txt /Users/AngelaWang/files/test.txt,text/plain,text,plain,Flat,77e80905-476d-11e4-83cb-fd04a1088b13,GenericFile,2014-09-28T17:13:41.669-07:00,test.txt,test.txt Step 2: Succeed in deleting the test.txt file for the first time $ ./filemgr-client --op --dbyid --productId 9caff30e-5ae3-11e4-ada3-4d034e11a919 --url http://localhost:9000 Oct 28, 2014 12:28:25 AM org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient <init> INFO: Loading File Manager Configuration Properties from: [../etc/filemgr.properties] Oct 28, 2014 12:28:25 AM org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient <init> INFO: Loading File Manager Configuration Properties from: [../etc/filemgr.properties] Successfully deleted product 'test.txt' Step 3: Failed in deleting the test.txt file for the second time. $ ./filemgr-client --op --dbyid --productId 77e80905-476d-11e4-83cb-fd04a1088b13 --url http://localhost:9000 Oct 28, 2014 12:31:50 AM org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient <init> INFO: Loading File Manager Configuration Properties from: [../etc/filemgr.properties] Oct 28, 2014 12:31:50 AM org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient <init> INFO: Loading File Manager Configuration Properties from: [../etc/filemgr.properties] ERROR: Failed to delete product 'org.apache.oodt.cas.filemgr.structs.Product@2226a790' : Failed to delete file 'file:/Users/AngelaWang/files/test.txt/test.txt' You have to manually create the test.txt file under the archive directory, then you could successfully delete the test.txt file once again. Thanks. Mengying (Angela) Wang
