You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by Mengying Wang <wa...@usc.edu> on 2014/10/28 18:11:58 UTC

[File Manager] Users could ingest the same file multiple times, but error occurs if they delete the file more than once

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

Re: [File Manager] Users could ingest the same file multiple times, but error occurs if they delete the file more than once

Posted by "Mattmann, Chris A (3980)" <ch...@jpl.nasa.gov>.
Thanks Angela. I think that¹s the intended behavior. Since you
are deleting the product by ID (which is unique), deleting the
same file (with the same name) more than 1x fails (even though they
have different product IDs). Does that make sense?

Cheers,
Chris


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Chief Architect
Instrument Software and Science Data Systems Section (398)
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 168-519, Mailstop: 168-527
Email: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++






-----Original Message-----
From: Mengying Wang <wa...@usc.edu>
Reply-To: "dev@oodt.apache.org" <de...@oodt.apache.org>
Date: Tuesday, October 28, 2014 at 10:11 AM
To: "dev@oodt.apache.org" <de...@oodt.apache.org>
Subject: [File Manager] Users could ingest the same file multiple times,
but error occurs if they delete the file more than once

>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