Commit 519a5cb8 authored by Chrysostomos Nanakos's avatar Chrysostomos Nanakos Committed by Christos Stavrakakis
Browse files

pithos: Use new Archipelago conffile for mapper

parent ecf35e9d
......@@ -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'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment