-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support incremental formatting #288
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,33 @@ percent=$2 | |
chunkfile_size=$3 | ||
chunkfile_pool_dir=$4 | ||
chunkfile_pool_meta_path=$5 | ||
increment_format=$6 | ||
|
||
mkdir -p $chunkfile_pool_dir | ||
$binary \ | ||
-allocatePercent=$percent \ | ||
-fileSize=$chunkfile_size \ | ||
-filePoolDir=$chunkfile_pool_dir \ | ||
-filePoolMetaPath=$chunkfile_pool_meta_path \ | ||
-fileSystemPath=$chunkfile_pool_dir | ||
|
||
if [ $increment_format == "true" ] | ||
then | ||
rootdir=$(dirname $chunkfile_pool_dir) | ||
used_percent=$(df $rootdir --output=pcent|tail -n 1|sed 's/%//'|xargs) | ||
let minus=$percent-$used_percent | ||
|
||
if [ $minus -gt 0 ] | ||
then | ||
$binary \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it not works, do you have test it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
-allocatePercent=$minus \ | ||
-fileSize=$chunkfile_size \ | ||
-filePoolDir=$chunkfile_pool_dir \ | ||
-filePoolMetaPath=$chunkfile_pool_meta_path \ | ||
-fileSystemPath=$chunkfile_pool_dir | ||
fi | ||
else | ||
$binary \ | ||
-allocatePercent=$percent \ | ||
-fileSize=$chunkfile_size \ | ||
-filePoolDir=$chunkfile_pool_dir \ | ||
-filePoolMetaPath=$chunkfile_pool_meta_path \ | ||
-fileSystemPath=$chunkfile_pool_dir | ||
fi | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The parameters of curve_format is incremental precent default and seems to be unnecessary to modify the script. |
||
` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be we can use playbook
playbook.STOP_SERVICE
.for example:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done