Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
519a5cb8
Commit
519a5cb8
authored
Jan 28, 2014
by
Chrysostomos Nanakos
Committed by
Christos Stavrakakis
Mar 31, 2014
Browse files
pithos: Use new Archipelago conffile for mapper
parent
ecf35e9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagomapper.py
View file @
519a5cb8
...
...
@@ -35,6 +35,7 @@ from binascii import hexlify
import
os
import
re
import
ctypes
import
ConfigParser
import
logging
from
context_archipelago
import
ArchipelagoObject
...
...
@@ -66,11 +67,10 @@ class ArchipelagoMapper(object):
self
.
params
=
params
self
.
namelen
=
params
[
'namelen'
]
cfg
=
{}
bcfg
=
open
(
glue
.
WorkerGlue
.
ArchipelagoConfFile
).
read
()
cfg
[
'blockerm'
]
=
re
.
search
(
'
\'
blockerm_port
\'
\s*:\s*\d+'
,
bcfg
).
group
(
0
).
split
(
':'
)[
1
]
cfg
[
'mapperd'
]
=
re
.
search
(
'
\'
mapper_port
\'
\s*:\s*\d+'
,
bcfg
).
group
(
0
).
split
(
':'
)[
1
]
bcfg
=
ConfigParser
.
ConfigParser
()
bcfg
.
readfp
(
open
(
glue
.
WorkerGlue
.
ArchipelagoConfFile
))
cfg
[
'blockerm'
]
=
bcfg
.
getint
(
'mapperd'
,
'blockerm_port'
)
cfg
[
'mapperd'
]
=
bcfg
.
getint
(
'vlmcd'
,
'mapper_port'
)
self
.
ioctx_pool
=
glue
.
WorkerGlue
().
ioctx_pool
self
.
dst_port
=
int
(
cfg
[
'blockerm'
])
self
.
mapperd_port
=
int
(
cfg
[
'mapperd'
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment