Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

utilize the quota_reset hdfs constant #1255

Merged
merged 1 commit into from
Aug 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions cookbooks/bcpc-hadoop/files/default/create_dirs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ def string2long(s)

# set space quota
if quotas[dir]
max_quota = HdfsConstants::QUOTA_DONT_SET
quota = if quotas[dir] == 'NO_QUOTA'
max_quota - 1
else
string2long(quotas[dir])
end
max_quota = HdfsConstants::QUOTA_RESET
quota =
if quotas[dir] == 'NO_QUOTA'
max_quota
else
string2long(quotas[dir])
end
fs.setQuota(path, max_quota, quota)
end
end
Expand Down