hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aajis...@apache.org
Subject hadoop git commit: HADOOP-8818. Use equals instead == in MD5MD5CRC32FileChecksum and TFileDumper. Contributed by Brandon Li.
Date Fri, 26 Feb 2016 16:27:21 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 03afcdd39 -> b1d497a7d


HADOOP-8818. Use equals instead == in MD5MD5CRC32FileChecksum and TFileDumper. Contributed
by Brandon Li.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1385374 13f79535-47bb-0310-9956-ffa450edef68
(cherry picked from commit 0c53ed4cd122f87b2b041d670b9b59e27da5439c)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b1d497a7
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b1d497a7
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b1d497a7

Branch: refs/heads/branch-2
Commit: b1d497a7de81c1344a1b6324f9d59c8c63566e52
Parents: 03afcdd
Author: Suresh Srinivas <suresh@apache.org>
Authored: Sun Sep 16 21:10:39 2012 +0000
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Sat Feb 27 01:27:00 2016 +0900

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                   | 3 +++
 .../main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java   | 2 +-
 .../main/java/org/apache/hadoop/io/file/tfile/TFileDumper.java    | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b1d497a7/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 25f4fd9..6eadf55 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -1170,6 +1170,9 @@ Release 2.7.3 - UNRELEASED
     HADOOP-12792. TestUserGroupInformation#testGetServerSideGroups fails in
     chroot (Eric Badger via jlowe)
 
+    HADOOP-8818. Use equals instead == in MD5MD5CRC32FileChecksum
+    and TFileDumper. (Brandon Li via suresh)
+
 Release 2.7.2 - 2016-01-25
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b1d497a7/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
index 4da7851..21f56ed 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/MD5MD5CRC32FileChecksum.java
@@ -134,7 +134,7 @@ public class MD5MD5CRC32FileChecksum extends FileChecksum {
 
     try {
       // old versions don't support crcType.
-      if (crcType == null || crcType == "") {
+      if (crcType == null || crcType.equals("")) {
         finalCrcType = DataChecksum.Type.CRC32;
       } else {
         finalCrcType = DataChecksum.Type.valueOf(crcType);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b1d497a7/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFileDumper.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFileDumper.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFileDumper.java
index 5f94f9d..aabdf57 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFileDumper.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/file/tfile/TFileDumper.java
@@ -126,7 +126,7 @@ class TFileDumper {
           dataSizeUncompressed += region.getRawSize();
         }
         properties.put("Data Block Bytes", Long.toString(dataSize));
-        if (reader.readerBCF.getDefaultCompressionName() != "none") {
+        if (!reader.readerBCF.getDefaultCompressionName().equals("none")) {
           properties.put("Data Block Uncompressed Bytes", Long
               .toString(dataSizeUncompressed));
           properties.put("Data Block Compression Ratio", String.format(


Mime
View raw message