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
0a275f6c
Commit
0a275f6c
authored
Jul 24, 2018
by
Felix Seibert
Browse files
print out current OSD capacities and usage if no suitable OSD can be found for a new folder<
parent
d633ecc8
Changes
1
Show whitespace changes
Inline
Side-by-side
xtreemfs_client/dataDistribution.py
View file @
0a275f6c
...
...
@@ -120,6 +120,12 @@ class DataDistribution(object):
total_bandwidth
+=
one_osd
.
bandwidth
return
total_bandwidth
def
get_total_capacity
(
self
):
total_capacity
=
0
for
one_osd
in
self
.
OSDs
.
values
():
total_capacity
+=
one_osd
.
capacity
return
total_capacity
def
get_average_folder_size
(
self
):
"""
get the average folder size of all folders of all OSDs.
...
...
@@ -474,7 +480,10 @@ class DataDistribution(object):
for
one_osd
in
self
.
OSDs
.
values
():
if
one_osd
.
capacity
-
one_osd
.
total_folder_size
-
folder_size
>=
0
:
suitable_osds
.
append
(
one_osd
)
if
len
(
suitable_osds
)
==
0
:
print
(
"no suitable OSD found!"
)
print
(
"total OSD capacity: "
+
str
(
self
.
get_total_capacity
()))
print
(
"current total folder size: "
+
str
(
self
.
get_total_folder_size
()))
return
suitable_osds
def
get_lpt_osd
(
self
,
folder_size
):
...
...
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