HADOOP-8819 Merging change 1386451 from trunk
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1386452 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
002c001d71
commit
bb240319ad
|
@ -366,6 +366,9 @@ Release 2.0.2-alpha - 2012-09-07
|
|||
|
||||
HADOOP-8801. ExitUtil#terminate should capture the exception stack trace. (eli)
|
||||
|
||||
HADOOP-8819. Incorrectly & is used instead of && in some file system
|
||||
implementations. (Brandon Li via suresh)
|
||||
|
||||
BUG FIXES
|
||||
|
||||
HADOOP-8372. NetUtils.normalizeHostName() incorrectly handles hostname
|
||||
|
|
|
@ -488,7 +488,7 @@ public class FTPFileSystem extends FileSystem {
|
|||
if (created) {
|
||||
String parentDir = parent.toUri().getPath();
|
||||
client.changeWorkingDirectory(parentDir);
|
||||
created = created & client.makeDirectory(pathName);
|
||||
created = created && client.makeDirectory(pathName);
|
||||
}
|
||||
} else if (isFile(client, absolute)) {
|
||||
throw new IOException(String.format(
|
||||
|
|
|
@ -77,7 +77,7 @@ public class FTPInputStream extends FSInputStream {
|
|||
if (byteRead >= 0) {
|
||||
pos++;
|
||||
}
|
||||
if (stats != null & byteRead >= 0) {
|
||||
if (stats != null && byteRead >= 0) {
|
||||
stats.incrementBytesRead(1);
|
||||
}
|
||||
return byteRead;
|
||||
|
@ -93,7 +93,7 @@ public class FTPInputStream extends FSInputStream {
|
|||
if (result > 0) {
|
||||
pos += result;
|
||||
}
|
||||
if (stats != null & result > 0) {
|
||||
if (stats != null && result > 0) {
|
||||
stats.incrementBytesRead(result);
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ class S3InputStream extends FSInputStream {
|
|||
pos++;
|
||||
}
|
||||
}
|
||||
if (stats != null & result >= 0) {
|
||||
if (stats != null && result >= 0) {
|
||||
stats.incrementBytesRead(1);
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -707,7 +707,7 @@ public class ViewFileSystem extends FileSystem {
|
|||
@Override
|
||||
public boolean mkdirs(Path dir, FsPermission permission)
|
||||
throws AccessControlException, FileAlreadyExistsException {
|
||||
if (theInternalDir.isRoot & dir == null) {
|
||||
if (theInternalDir.isRoot && dir == null) {
|
||||
throw new FileAlreadyExistsException("/ already exits");
|
||||
}
|
||||
// Note dir starts with /
|
||||
|
|
|
@ -750,7 +750,7 @@ public class ViewFs extends AbstractFileSystem {
|
|||
public void mkdir(final Path dir, final FsPermission permission,
|
||||
final boolean createParent) throws AccessControlException,
|
||||
FileAlreadyExistsException {
|
||||
if (theInternalDir.isRoot & dir == null) {
|
||||
if (theInternalDir.isRoot && dir == null) {
|
||||
throw new FileAlreadyExistsException("/ already exits");
|
||||
}
|
||||
throw readOnlyMountTable("mkdir", dir);
|
||||
|
|
Loading…
Reference in New Issue