HDFS-6162. Merge r1582181 from trunk.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1582182 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b78ad887ed
commit
88dc6c1ed3
|
@ -33,6 +33,9 @@ Release 2.5.0 - UNRELEASED
|
||||||
HDFS-3087. Decomissioning on NN restart can complete without blocks being
|
HDFS-3087. Decomissioning on NN restart can complete without blocks being
|
||||||
replicated. (Rushabh S Shah via kihwal)
|
replicated. (Rushabh S Shah via kihwal)
|
||||||
|
|
||||||
|
HDFS-6162. Format strings should use platform independent line separator.
|
||||||
|
(suresh)
|
||||||
|
|
||||||
Release 2.4.0 - UNRELEASED
|
Release 2.4.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -801,7 +801,7 @@ implements ByteBufferReadable, CanSetDropBehind, CanSetReadahead,
|
||||||
// got a EOS from reader though we expect more data on it.
|
// got a EOS from reader though we expect more data on it.
|
||||||
throw new IOException("Unexpected EOS from the reader");
|
throw new IOException("Unexpected EOS from the reader");
|
||||||
}
|
}
|
||||||
if (dfsClient.stats != null && result != -1) {
|
if (dfsClient.stats != null) {
|
||||||
dfsClient.stats.incrementBytesRead(result);
|
dfsClient.stats.incrementBytesRead(result);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -4985,7 +4985,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
if (blockSafe < blockThreshold) {
|
if (blockSafe < blockThreshold) {
|
||||||
msg += String.format(
|
msg += String.format(
|
||||||
"The reported blocks %d needs additional %d"
|
"The reported blocks %d needs additional %d"
|
||||||
+ " blocks to reach the threshold %.4f of total blocks %d.\n",
|
+ " blocks to reach the threshold %.4f of total blocks %d.%n",
|
||||||
blockSafe, (blockThreshold - blockSafe) + 1, threshold, blockTotal);
|
blockSafe, (blockThreshold - blockSafe) + 1, threshold, blockTotal);
|
||||||
thresholdsMet = false;
|
thresholdsMet = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -4995,7 +4995,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
if (numLive < datanodeThreshold) {
|
if (numLive < datanodeThreshold) {
|
||||||
msg += String.format(
|
msg += String.format(
|
||||||
"The number of live datanodes %d needs an additional %d live "
|
"The number of live datanodes %d needs an additional %d live "
|
||||||
+ "datanodes to reach the minimum number %d.\n",
|
+ "datanodes to reach the minimum number %d.%n",
|
||||||
numLive, (datanodeThreshold - numLive), datanodeThreshold);
|
numLive, (datanodeThreshold - numLive), datanodeThreshold);
|
||||||
thresholdsMet = false;
|
thresholdsMet = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -583,7 +583,7 @@ public class CacheAdmin extends Configured implements Tool {
|
||||||
tableListing.addRow(row.toArray(new String[0]));
|
tableListing.addRow(row.toArray(new String[0]));
|
||||||
numEntries++;
|
numEntries++;
|
||||||
}
|
}
|
||||||
System.out.print(String.format("Found %d entr%s\n",
|
System.out.print(String.format("Found %d entr%s%n",
|
||||||
numEntries, numEntries == 1 ? "y" : "ies"));
|
numEntries, numEntries == 1 ? "y" : "ies"));
|
||||||
if (numEntries > 0) {
|
if (numEntries > 0) {
|
||||||
System.out.print(tableListing);
|
System.out.print(tableListing);
|
||||||
|
@ -968,7 +968,7 @@ public class CacheAdmin extends Configured implements Tool {
|
||||||
System.err.println(prettifyException(e));
|
System.err.println(prettifyException(e));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
System.out.print(String.format("Found %d result%s.\n", numResults,
|
System.out.print(String.format("Found %d result%s.%n", numResults,
|
||||||
(numResults == 1 ? "" : "s")));
|
(numResults == 1 ? "" : "s")));
|
||||||
if (numResults > 0) {
|
if (numResults > 0) {
|
||||||
System.out.print(listing);
|
System.out.print(listing);
|
||||||
|
|
|
@ -159,7 +159,7 @@ final class LsrPBImage {
|
||||||
INodeFile f = inode.getFile();
|
INodeFile f = inode.getFile();
|
||||||
PermissionStatus p = FSImageFormatPBINode.Loader.loadPermission(
|
PermissionStatus p = FSImageFormatPBINode.Loader.loadPermission(
|
||||||
f.getPermission(), stringTable);
|
f.getPermission(), stringTable);
|
||||||
out.print(String.format("-%s %2s %8s %10s %10s %10d %s%s\n", p
|
out.print(String.format("-%s %2s %8s %10s %10s %10d %s%s%n", p
|
||||||
.getPermission().toString(), f.getReplication(), p.getUserName(), p
|
.getPermission().toString(), f.getReplication(), p.getUserName(), p
|
||||||
.getGroupName(), f.getModificationTime(), getFileSize(f), parent,
|
.getGroupName(), f.getModificationTime(), getFileSize(f), parent,
|
||||||
inode.getName().toStringUtf8()));
|
inode.getName().toStringUtf8()));
|
||||||
|
@ -169,7 +169,7 @@ final class LsrPBImage {
|
||||||
INodeDirectory d = inode.getDirectory();
|
INodeDirectory d = inode.getDirectory();
|
||||||
PermissionStatus p = FSImageFormatPBINode.Loader.loadPermission(
|
PermissionStatus p = FSImageFormatPBINode.Loader.loadPermission(
|
||||||
d.getPermission(), stringTable);
|
d.getPermission(), stringTable);
|
||||||
out.print(String.format("d%s - %8s %10s %10s %10d %s%s\n", p
|
out.print(String.format("d%s - %8s %10s %10s %10d %s%s%n", p
|
||||||
.getPermission().toString(), p.getUserName(), p.getGroupName(), d
|
.getPermission().toString(), p.getUserName(), p.getGroupName(), d
|
||||||
.getModificationTime(), 0, parent, inode.getName().toStringUtf8()));
|
.getModificationTime(), 0, parent, inode.getName().toStringUtf8()));
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ final class LsrPBImage {
|
||||||
INodeSymlink d = inode.getSymlink();
|
INodeSymlink d = inode.getSymlink();
|
||||||
PermissionStatus p = FSImageFormatPBINode.Loader.loadPermission(
|
PermissionStatus p = FSImageFormatPBINode.Loader.loadPermission(
|
||||||
d.getPermission(), stringTable);
|
d.getPermission(), stringTable);
|
||||||
out.print(String.format("-%s - %8s %10s %10s %10d %s%s -> %s\n", p
|
out.print(String.format("-%s - %8s %10s %10s %10d %s%s -> %s%n", p
|
||||||
.getPermission().toString(), p.getUserName(), p.getGroupName(), d
|
.getPermission().toString(), p.getUserName(), p.getGroupName(), d
|
||||||
.getModificationTime(), 0, parent, inode.getName().toStringUtf8(),
|
.getModificationTime(), 0, parent, inode.getName().toStringUtf8(),
|
||||||
d.getTarget().toStringUtf8()));
|
d.getTarget().toStringUtf8()));
|
||||||
|
|
Loading…
Reference in New Issue