Commit 25f9bda9 authored by Felix Seibert's avatar Felix Seibert
Browse files

changing imports

parent 7506125f
......@@ -6,10 +6,10 @@ import urllib.error
import shutil
import time
import xtreemfs_client.dataDistribution as dataDistribution
import xtreemfs_client.div_util as div_util
import xtreemfs_client.folder as folder
import xtreemfs_client.dir_status_page_parser as dir_status_page_parser
import dataDistribution
import div_util
import folder
import dir_status_page_parser
'''
xOSDManager - a python module to manage OSD selection in XtreemFS
......
......@@ -2,9 +2,13 @@ import argparse
import sys
import xtreemfs_client
from xtreemfs_client import OSDManager
import xtreemfs_client.verify as verify
#import .xtreemfs_client.OSDManager as OSDManager
#import .xtreemfs_client.verify as verify
#from .OSDManager import OSDManager
import OSDManager
#from .xtreemfs_client import verify
import verify
"""
das - data add script. basically a command line wrapper for xOSDManager.
......
import random
import xtreemfs_client.osd as osd
import osd
"""
class to keep track of the osd (object storage device) locations of different folders, i.e.,
......@@ -85,9 +85,11 @@ class DataDistribution(object):
# totally random OSD assignment, even ignoring OSD capacities
# (might lead to I/O errors when too many groups are assigned to an OSD)
if random_osd_assignment:
print("using random osd assignment")
for folder in new_folders:
osds_for_new_folders.append((folder.id,
random.choice(self.OSDs.values())))
return osds_for_new_folders
# balanced deterministic OSD assignment
# (following largest processing time first or post-greedy approach)
......
Supports Markdown
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