HDFS-4903. Merge 1503570 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1503572 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2013-07-16 06:49:05 +00:00
parent f4f14c079e
commit ecf57540da
4 changed files with 10 additions and 4 deletions

View File

@ -89,7 +89,10 @@ public class TrashPolicyDefault extends TrashPolicy {
this.emptierInterval = (long)(conf.getFloat( this.emptierInterval = (long)(conf.getFloat(
FS_TRASH_CHECKPOINT_INTERVAL_KEY, FS_TRASH_CHECKPOINT_INTERVAL_DEFAULT) FS_TRASH_CHECKPOINT_INTERVAL_KEY, FS_TRASH_CHECKPOINT_INTERVAL_DEFAULT)
* MSECS_PER_MINUTE); * 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) { private Path makeTrashRelativePath(Path basePath, Path rmFilePath) {
return Path.mergePaths(basePath, rmFilePath); return Path.mergePaths(basePath, rmFilePath);

View File

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

View File

@ -561,7 +561,7 @@ public class NameNode {
if (trashInterval == 0) { if (trashInterval == 0) {
return; return;
} else if (trashInterval < 0) { } 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."); + " Set " + FS_TRASH_INTERVAL_KEY + " to a positive value.");
} }

View File

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