Commit d07e740f authored by Felix Seibert's avatar Felix Seibert
Browse files

add movement_strategy to command line arguments

parent 2f28c327
......@@ -126,7 +126,8 @@ class OSDManager(object):
def create_distribution_from_existing_files(self,
fix_layout_internally=True, max_files_in_progress=10000,
apply_layout=True,
environment='LOCAL'):
environment='LOCAL',
movement_strategy='osd_balanced'):
"""
create a good data distribution out of data already present in the file system.
the created data distribution will then be transferred to the physical layer,
......@@ -177,7 +178,7 @@ class OSDManager(object):
placement_realizer = \
physicalPlacementRealizer.PhysicalPlacementRealizer(self, debug=self.debug,
max_files_in_progress=max_files_in_progress)
placement_realizer.realize_placement()
placement_realizer.realize_placement(strategy=movement_strategy)
else:
if environment == 'SLURM':
osd_list = self.distribution.get_osd_list()
......
......@@ -58,6 +58,7 @@ parser.add_argument("--fix-internally", action='store_const', const=True, defaul
'increasing the chance for data loss.')
parser.add_argument("--max-files-in-progress", nargs=1)
parser.add_argument("--movement-strategy", nargs=1)
args = parser.parse_args()
......@@ -104,4 +105,5 @@ elif args.update:
elif args.create_from_existing_files:
x_man.create_distribution_from_existing_files(fix_layout_internally=args.fix_internally,
environment=args.environment,
max_files_in_progress=int(args.max_files_in_progress[0]))
max_files_in_progress=int(args.max_files_in_progress[0]),
movement_strategy=args.movement_strategy[0])
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