Commit 163c8049 authored by Felix Seibert's avatar Felix Seibert
Browse files

add max_files_in_progress as command-line argument

parent f0636fad
......@@ -122,7 +122,9 @@ class OSDManager(object):
f = open(path_to_config, "wb")
pickle.dump(self.distribution, f)
def create_distribution_from_existing_files(self, fix_layout_internally=True, apply_layout=True,
def create_distribution_from_existing_files(self,
fix_layout_internally=True, max_files_in_progress=10000,
apply_layout=True,
environment='LOCAL'):
"""
create a good data distribution out of data already present in the file system.
......@@ -171,7 +173,7 @@ class OSDManager(object):
start_time = time.time()
if fix_layout_internally:
self.fix_physical_layout_internally()
self.fix_physical_layout_internally(max_files_in_progress=max_files_in_progress)
else:
if environment == 'SLURM':
osd_list = self.distribution.get_osd_list()
......
......@@ -62,6 +62,8 @@ parser.add_argument("--fix-internally", action='store_const', const=True, defaul
'layout. otherwise files will be temporarily located outside xtreemfs,'
'increasing the chance for data loss.')
parser.add_argument("--max-files-in-progress", nargs=1)
args = parser.parse_args()
if args.debug:
......@@ -106,4 +108,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)
environment=args.environment,
max_files_in_progress=int(args.max_files_in_progress[0]))
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