hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1386723 - in /hadoop/common/branches/branch-1: CHANGES.txt src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java src/core/org/apache/hadoop/fs/ftp/FTPInputStream.java src/core/org/apache/hadoop/fs/s3/S3InputStream.java
Date Mon, 17 Sep 2012 17:10:41 GMT
Author: suresh
Date: Mon Sep 17 17:10:41 2012
New Revision: 1386723

URL: http://svn.apache.org/viewvc?rev=1386723&view=rev
Log:
HADOOP-8819. Incorrectly & is used instead of && in some file system implementations.
Contributed by Brandon Li.

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java
    hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/ftp/FTPInputStream.java
    hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/s3/S3InputStream.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1386723&r1=1386722&r2=1386723&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Mon Sep 17 17:10:41 2012
@@ -228,6 +228,9 @@ Release 1.2.0 - unreleased
     HADOOP-8767. Secondary namenode is started on slave nodes instead of
     master nodes. (Giovanni Delussu via suresh)
 
+    HADOOP-8819. Incorrectly & is used instead of && in some file system 
+    implementations. (Brandon Li via suresh)
+
 Release 1.1.0 - unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java?rev=1386723&r1=1386722&r2=1386723&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java (original)
+++ hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java Mon
Sep 17 17:10:41 2012
@@ -477,7 +477,7 @@ public class FTPFileSystem extends FileS
       if (created) {
         String parentDir = parent.toUri().getPath();
         client.changeWorkingDirectory(parentDir);
-        created = created & client.makeDirectory(pathName);
+        created = client.makeDirectory(pathName);
       }
     } else if (isFile(client, absolute)) {
       throw new IOException(String.format(

Modified: hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/ftp/FTPInputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/ftp/FTPInputStream.java?rev=1386723&r1=1386722&r2=1386723&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/ftp/FTPInputStream.java
(original)
+++ hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/ftp/FTPInputStream.java
Mon Sep 17 17:10:41 2012
@@ -69,7 +69,7 @@ public class FTPInputStream extends FSIn
     if (byteRead >= 0) {
       pos++;
     }
-    if (stats != null & byteRead >= 0) {
+    if (stats != null && byteRead >= 0) {
       stats.incrementBytesRead(1);
     }
     return byteRead;
@@ -84,7 +84,7 @@ public class FTPInputStream extends FSIn
     if (result > 0) {
       pos += result;
     }
-    if (stats != null & result > 0) {
+    if (stats != null && result > 0) {
       stats.incrementBytesRead(result);
     }
 

Modified: hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/s3/S3InputStream.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/s3/S3InputStream.java?rev=1386723&r1=1386722&r2=1386723&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/s3/S3InputStream.java (original)
+++ hadoop/common/branches/branch-1/src/core/org/apache/hadoop/fs/s3/S3InputStream.java Mon
Sep 17 17:10:41 2012
@@ -103,7 +103,7 @@ class S3InputStream extends FSInputStrea
         pos++;
       }
     }
-    if (stats != null & result >= 0) {
+    if (stats != null && result >= 0) {
       stats.incrementBytesRead(1);
     }
     return result;



Mime
View raw message