Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Felix Seibert
xtreemfs_client
Commits
0efff6d3
Commit
0efff6d3
authored
Jan 14, 2018
by
Felix Seibert
Browse files
try out 3
parent
25f9bda9
Changes
2
Hide whitespace changes
Inline
Side-by-side
xtreemfs_client/OSDManager.py
View file @
0efff6d3
...
...
@@ -190,8 +190,10 @@ class OSDManager(object):
if
remote_source
is
not
None
:
shutil
.
rmtree
(
sshfs_mount_dir
)
if
self
.
debug
:
print
(
"OSDManager: random_osd_assignment: "
+
str
(
random_osd_assignment
))
new_assignments
=
self
.
distribution
.
add_folders
(
new_folders
,
random_osd_assignment
)
new_assignments
=
self
.
distribution
.
add_folders
(
new_folders
,
random_osd_assignment
=
random_osd_assignment
)
if
apply_layout
:
self
.
apply_osd_assignments
(
new_assignments
)
elif
self
.
debug
:
...
...
xtreemfs_client/dataDistribution.py
View file @
0efff6d3
...
...
@@ -80,6 +80,8 @@ class DataDistribution(object):
else
:
new_folders
.
append
(
folder
)
print
(
"dataDistribution: random_osd_assignment: "
+
str
(
random_osd_assignment
))
osds_for_new_folders
=
[]
# totally random OSD assignment, even ignoring OSD capacities
...
...
@@ -88,7 +90,7 @@ class DataDistribution(object):
print
(
"using random osd assignment"
)
for
folder
in
new_folders
:
osds_for_new_folders
.
append
((
folder
.
id
,
random
.
choice
(
self
.
OSDs
.
values
())))
random
.
choice
(
list
(
self
.
OSDs
.
values
())))
)
return
osds_for_new_folders
# balanced deterministic OSD assignment
...
...
Write
Preview
Supports
Markdown
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