<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'><font face="times new roman, new york, times, serif" size="3">I'd like to find a way to define different staging methods on a file-by-file basis. In some cases it would make sense to use dd to copy a file to the work directory. In other situations it may be better to create a symlink pointing to what you need.</font><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;">I'm thinking of something along these lines (names will probably get changed):</div><div><font face="times new roman, new york, times, serif"><br></font></div><div><font face="times new roman, new york, times, serif">file data <"file-direct:///home/davidkelly999/staging/dd-absolute/data.txt">; // Will stage the data to the work directory</font></div><div style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><div><div>file data2 <"file-indirect:///home/davidkelly999/staging/dd-absolute/data2.txt">; // Will create a symlink</div><div><br></div><div>Then based on the prefix you define, _swiftwrap.wrapperstaging can know exactly how to stage the file. </div><div><br></div><div>Is it possible to create data provider aliases, making file-direct:// and file-indirect:// work exactly like file:// until it gets passed to the wrapper?</div><div><br></div><div>Thanks,</div><div>David</div><div><br><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Mihael Hategan" <hategan@mcs.anl.gov><br><b>To: </b>"David Kelly" <davidk@ci.uchicago.edu><br><b>Cc: </b>"Swift Devel" <swift-devel@ci.uchicago.edu><br><b>Sent: </b>Wednesday, May 8, 2013 12:46:45 PM<br><b>Subject: </b>Re: Wrapper staging<br><br>I'm a bit busy today and this week, so I might not get to fixing these<br>until the weekend, but I'll try to answer some of your questions.<br><br>On Wed, 2013-05-08 at 10:53 -0500, David Kelly wrote:<br>> Hello, <br>> <br>> <br>> Just a few random questions about wrapper staging: <br>> <br>> <br>> How can I make gsiftp:// URIs get sent to _swiftwrap.wrapperstaging? I<br>> have wrapper staging enabled, but Swift is trying to connect to the<br>> server and retrieve the file, rather than just passing the URI to the<br>> wrapper script. <br><br>With wrapper staging enabled, swift should not try to *transfer* files,<br>but mappers might connect to the server to figure out what files are<br>there (i.e. to complete calls to Mapper.existing()).<br><br>> <br>> What does the property wrapper.staging.local.server do? <br><br>It specifies what url prefix to pass to the wrapper for local files<br>(i.e. accessible directly by swift). <br><br>> <br>> <br>> From within _swiftwrap.wrapperstaging, how can I know the current<br>> working directory of the user? I think I need this information to<br>> handle relative path names. <br><br>The wrapper should get a -urlprefix argument containing the CWD. The<br>value of that arg is constructed as: ${wrapper.staging.local.server} +<br>${CWD}.<br><br>> <br>> <br>> I believe in trunk, filenames passed as arguments to Swift apps being<br>> prepended with "__root__". What does this mean, and should swiftwrap<br>> strip this out? <br><br>No. There is a mapping from local file names to remote file names. It<br>used to be that absolute files are mapped simply by removing the leading<br>slash. So "/dir/file" on the swift side would become "dir/file" on the<br>remote side. But then if there was a local "dir/file", it would also be<br>"dir/file" on the remote side, causing a conflict.<br><br>At some point in trunk, I changed that (and also the handling of "/../")<br>in response to a bug that, I believe, Ketan submitted. The change<br>involved mapping a leading slash to "__root__" and parent dir references<br>to "__parent__". They have no special meaning as far as the wrapper or<br>the application is concerned. They get the proper path through @filename<br>and the likes, and swift stages the files in the places pointed by<br>@filename.<br><br>Mihael<br><br></blockquote><br></div></div></div></div></body></html>