-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use xrootd servers as specified in siteconf.
Also implement some unit tests for the task running script. Fixes #619.
- Loading branch information
Showing
5 changed files
with
161 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
*.pyc | ||
*.swp | ||
*.swo | ||
*~ | ||
Session.vim | ||
Lobster.egg-info | ||
dist/ | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<!-- storage.xml for T3_US_NotreDame | ||
Storage element: deepthought.crc.nd.edu | ||
Storage software: bestman 2.2.1.2 | ||
Phedex host: deepthought.crc.nd.edu | ||
All CMS data are stored using the /store convention | ||
Therefore we only need to map: | ||
/+store/(.*) | ||
--> | ||
<storage-mapping> | ||
|
||
<!-- Translation rules for LFN to PFN (Logical File Name to Physical File Name | ||
Bestman does not support the srm v1 protocol so we fudge it with a file result | ||
--> | ||
|
||
<lfn-to-pfn protocol="file" destination-match=".*" path-match="/+store/(.*)" result="file:/hadoop/store/$1"/> | ||
<lfn-to-pfn protocol="direct" destination-match=".*" path-match="/+store/(.*)" result="/hadoop/store/$1"/> | ||
<!-- Old bestman configuration. Replaced with gsiftp | ||
<lfn-to-pfn protocol="srmv2" destination-match=".*" path-match="/+store/(.*)" result="srm://deepthought.crc.nd.edu:8443/srm/v2/server?SFN=/hadoop/store/$1"/> | ||
--> | ||
<lfn-to-pfn protocol="srmv2" destination-match=".*" path-match="/+store/(.*)" result="gsiftp://deepthought.crc.nd.edu/store/$1"/> | ||
<lfn-to-pfn protocol="gsiftp" destination-match=".*" path-match="/+store/(.*)" result="gsiftp://deepthought.crc.nd.edu/store/$1"/> | ||
<!-- Xrootd fallback rules --> | ||
<lfn-to-pfn protocol="xrootd" destination-match=".*" path-match="/+store/(.*)" result="root://ndcms.crc.nd.edu//store/$1"/> | ||
<lfn-to-pfn protocol="xrootd-fallback1" destination-match=".*" path-match="/+store/(.*)" result="root://cmsxrootd.fnal.gov//store/$1"/> | ||
<!-- Hadoop protocol rules--> | ||
<lfn-to-pfn protocol="hadoop" destination-match=".*" path-match="//+store/(.*)" result="/hadoop/store/$1"/> | ||
<lfn-to-pfn protocol="hadoop" destination-match=".*" path-match="//+store/user/(.*)" result="/hadoop/store/user/$1"/> | ||
|
||
<!-- Translation rules for PFN to LFN (Physical File Name to Logical File Name --> | ||
|
||
<pfn-to-lfn protocol="file" destination-match=".*" path-match="file:/hadoop/store/(.*)" result="/store/$1"/> | ||
<pfn-to-lfn protocol="direct" destination-match=".*" path-match="/hadoop/store/(.*)" result="/store/$1"/> | ||
<pfn-to-lfn protocol="srm" destination-match=".*" path-match="file:/hadoop/store/(.*)" result="/store/$1"/> | ||
<!-- Old bestman configuration. Replaced with gsiftp | ||
<pfn-to-lfn protocol="srmv2" destination-match=".*" path-match=".*\?SFN=/hadoop/store/(.*)" result="/store/$1"/> | ||
--> | ||
<pfn-to-lfn protocol="srmv2" destination-match=".*" path-match="gsiftp://deepthought.crc.nd.edu/store/(.*)" result="/store/$1"/> | ||
<pfn-to-lfn protocol="gsiftp" destination-match=".*" path-match="gsiftp://deepthought.crc.nd.edu/store/(.*)" result="/store/$1"/> | ||
<pfn-to-lfn protocol="hadoop" destination-match=".*" path-match="/hadoop/store/(.*)" result="/store/$1"/> | ||
|
||
</storage-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
|
||
from lobster.core.data import task | ||
|
||
|
||
class TestCommands(object): | ||
|
||
def test_expansion(self): | ||
cmd = ["foo", "@inputfiles", "--some-flag"] | ||
args = ["-a"] | ||
infiles = ["bar", "baz"] | ||
outfiles = [] | ||
result = ["foo", "bar", "baz", "--some-flag"] | ||
assert task.expand_command(cmd, args, infiles, outfiles) == result | ||
|
||
|
||
class TestDiscovery(object): | ||
|
||
def test_xrootd_server(self): | ||
fn = os.path.join(os.path.dirname(__file__), 'data', 'siteconf', 'PhEDEx', 'storage.xml') | ||
assert task.find_xrootd_server(fn) == 'root://ndcms.crc.nd.edu/' |