HDFS-4903. Print trash configuration and trash emptier state in namenode log. Contributed by Arpit Agarwal.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1503570 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2013-07-16 06:33:40 +00:00
parent 8f8be404a7
commit afaec5f52d
4 changed files with 10 additions and 4 deletions

View File

@ -89,8 +89,11 @@ public void initialize(Configuration conf, FileSystem fs, Path home) {
this.emptierInterval = (long)(conf.getFloat(
FS_TRASH_CHECKPOINT_INTERVAL_KEY, FS_TRASH_CHECKPOINT_INTERVAL_DEFAULT)
* MSECS_PER_MINUTE);
}
LOG.info("Namenode trash configuration: Deletion interval = " +
this.deletionInterval + " minutes, Emptier interval = " +
this.emptierInterval + " minutes.");
}
private Path makeTrashRelativePath(Path basePath, Path rmFilePath) {
return Path.mergePaths(basePath, rmFilePath);
}

View File

@ -440,6 +440,9 @@ Release 2.1.0-beta - 2013-07-02
HDFS-4912. Cleanup FSNamesystem#startFileInternal. (suresh)
HDFS-4903. Print trash configuration and trash emptier state in
namenode log. (Arpit Agarwal via suresh)
OPTIMIZATIONS
HDFS-4465. Optimize datanode ReplicasMap and ReplicaInfo. (atm)

View File

@ -559,7 +559,7 @@ private void startTrashEmptier(final Configuration conf) throws IOException {
if (trashInterval == 0) {
return;
} else if (trashInterval < 0) {
throw new IOException("Cannot start tresh emptier with negative interval."
throw new IOException("Cannot start trash emptier with negative interval."
+ " Set " + FS_TRASH_INTERVAL_KEY + " to a positive value.");
}

View File

@ -57,7 +57,7 @@ public void testFailureToTransitionCausesShutdown() throws IOException {
fail("Transitioned to active but should not have been able to.");
} catch (ExitException ee) {
assertExceptionContains(
"Cannot start tresh emptier with negative interval", ee);
"Cannot start trash emptier with negative interval", ee);
}
} finally {
if (cluster != null) {