Skip to content

Commit

Permalink
Meta server: normalize fsck parameter names. Keep old parameter names…
Browse files Browse the repository at this point in the history
… for backward compatibility.

Annotated configuration files: document meta server fack parameters.
  • Loading branch information
mikeov committed Jul 31, 2017
1 parent ab018c3 commit 02dd8c0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
18 changes: 18 additions & 0 deletions conf/MetaServer.prp
Expand Up @@ -1352,6 +1352,24 @@ chunkServer.msgLogWriter.logLevel = NOTICE
# Read RPC request size limit.
# metaServer.dataStore.maxReadSize = 2097152

# ======================= FSCK =================================================

# Maximum number of files to include in FSCK report.
# Default is 128K
# metaServer.maxFsckFiles = 131072

# Maximum FSCK run time.
# FSCK stopped if / when run time exceeds the maximum and partial report
# produces..
# Default is 1140 seconds (19 minutes)
# metaServer.maxFsckTime = 1140

# Abandoned file timeout.
# Files with 0 logical size and 1 or more blocks are reported by FSCK if / when
# modification time plus timeout is less than the FSCK start time.
# Default is 1000 seconds.
# metaServer.fsckAbandonedFileTimeout = 1000

# ==================== Meta Server Viewstamped Replication (VR) ================

# Configuring replicated meta server group / cluster consists of the following
Expand Down
9 changes: 8 additions & 1 deletion src/cc/meta/LayoutManager.cc
Expand Up @@ -2368,14 +2368,21 @@ LayoutManager::SetParameters(const Properties& props, int clientPort)
"metaServer.sortCandidatesByLoadAvg",
mSortCandidatesByLoadAvgFlag ? 1 : 0) != 0;

// The following two parameter names are for backward compatibility.
mMaxFsckFiles = props.getValue(
"metaServer.maxFsckChunks",
mMaxFsckFiles);
mMaxFsckTime = (int64_t)(props.getValue(
"metaServer.mMaxFsckTime",
mMaxFsckTime * 1e-6) * 1e6);
mMaxFsckFiles = props.getValue(
"metaServer.maxFsckFiles",
mMaxFsckFiles);
mFsckAbandonedFileTimeout = (int64_t)(props.getValue(
"metaServer.fsckAbandonedFileTimeout",
mFsckAbandonedFileTimeout * 1e-6) * 1e6);
mMaxFsckTime = (int64_t)(props.getValue(
"metaServer.mMaxFsckTime",
"metaServer.maxFsckTime",
mMaxFsckTime * 1e-6) * 1e6);
mFullFsckFlag = props.getValue(
"metaServer.fullFsck",
Expand Down

0 comments on commit 02dd8c0

Please sign in to comment.