[15/50] [abbrv] hadoop git commit: HADOOP-11600. Fix up source codes to be compiled with Guava 17.0. (ozawa)

2015-02-18 Thread zjshen
HADOOP-11600. Fix up source codes to be compiled with Guava 17.0. (ozawa)


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

Branch: refs/heads/YARN-2928
Commit: 2f0f756b26ea83e142a5b9379fa75862c2fc6ad5
Parents: cf4b7f5
Author: Tsuyoshi Ozawa oz...@apache.org
Authored: Tue Feb 17 21:56:20 2015 +0900
Committer: Tsuyoshi Ozawa oz...@apache.org
Committed: Tue Feb 17 21:56:20 2015 +0900

--
 hadoop-common-project/hadoop-common/CHANGES.txt   |  2 ++
 .../java/org/apache/hadoop/fs/shell/XAttrCommands.java| 10 --
 .../hdfs/tools/offlineImageViewer/PBImageTextWriter.java  |  2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/2f0f756b/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 51305bb..c3aafe8 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -605,6 +605,8 @@ Release 2.7.0 - UNRELEASED
 HADOOP-11589. NetUtils.createSocketAddr should trim the input URI.
 (Rakesh R via ozawa)
 
+HADOOP-11600. Fix up source codes to be compiled with Guava 17.0. (ozawa)
+
   OPTIMIZATIONS
 
 HADOOP-11323. WritableComparator#compare keeps reference to byte array.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2f0f756b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
--
diff --git 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
index 44e970b..4efda87 100644
--- 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
+++ 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.fs.shell;
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.LinkedList;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 
@@ -77,9 +78,14 @@ class XAttrCommands extends FsCommand {
   name = StringUtils.popOptionWithArgument(-n, args);
   String en = StringUtils.popOptionWithArgument(-e, args);
   if (en != null) {
-encoding = enValueOfFunc.apply(en.toUpperCase());
+try {
+  encoding = enValueOfFunc.apply(en.toUpperCase(Locale.ENGLISH));
+} catch (IllegalArgumentException e) {
+  throw new IllegalArgumentException(
+  Invalid/unsupported encoding option specified:  + en);
+}
 Preconditions.checkArgument(encoding != null,
-  Invalid/unsupported encoding option specified:  + en);
+Invalid/unsupported encoding option specified:  + en);
   }
 
   boolean r = StringUtils.popOption(-R, args);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2f0f756b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
index 0da263d..d228920 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
@@ -19,7 +19,6 @@ package org.apache.hadoop.hdfs.tools.offlineImageViewer;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
-import com.google.common.io.LimitInputStream;
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.permission.PermissionStatus;
@@ -33,6 +32,7 @@ import 
org.apache.hadoop.hdfs.server.namenode.FsImageProto.INodeSection;
 import org.apache.hadoop.hdfs.server.namenode.FsImageProto.INodeSection.INode;
 import org.apache.hadoop.hdfs.server.namenode.INodeId;
 import org.apache.hadoop.io.IOUtils;
+import org.apache.hadoop.util.LimitInputStream;
 import org.apache.hadoop.util.Time;
 import org.fusesource.leveldbjni.JniDBFactory;
 import 

hadoop git commit: HADOOP-11600. Fix up source codes to be compiled with Guava 17.0. (ozawa)

2015-02-17 Thread ozawa
Repository: hadoop
Updated Branches:
  refs/heads/trunk cf4b7f506 - 2f0f756b2


HADOOP-11600. Fix up source codes to be compiled with Guava 17.0. (ozawa)


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

Branch: refs/heads/trunk
Commit: 2f0f756b26ea83e142a5b9379fa75862c2fc6ad5
Parents: cf4b7f5
Author: Tsuyoshi Ozawa oz...@apache.org
Authored: Tue Feb 17 21:56:20 2015 +0900
Committer: Tsuyoshi Ozawa oz...@apache.org
Committed: Tue Feb 17 21:56:20 2015 +0900

--
 hadoop-common-project/hadoop-common/CHANGES.txt   |  2 ++
 .../java/org/apache/hadoop/fs/shell/XAttrCommands.java| 10 --
 .../hdfs/tools/offlineImageViewer/PBImageTextWriter.java  |  2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/2f0f756b/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 51305bb..c3aafe8 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -605,6 +605,8 @@ Release 2.7.0 - UNRELEASED
 HADOOP-11589. NetUtils.createSocketAddr should trim the input URI.
 (Rakesh R via ozawa)
 
+HADOOP-11600. Fix up source codes to be compiled with Guava 17.0. (ozawa)
+
   OPTIMIZATIONS
 
 HADOOP-11323. WritableComparator#compare keeps reference to byte array.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2f0f756b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
--
diff --git 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
index 44e970b..4efda87 100644
--- 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
+++ 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.fs.shell;
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.LinkedList;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 
@@ -77,9 +78,14 @@ class XAttrCommands extends FsCommand {
   name = StringUtils.popOptionWithArgument(-n, args);
   String en = StringUtils.popOptionWithArgument(-e, args);
   if (en != null) {
-encoding = enValueOfFunc.apply(en.toUpperCase());
+try {
+  encoding = enValueOfFunc.apply(en.toUpperCase(Locale.ENGLISH));
+} catch (IllegalArgumentException e) {
+  throw new IllegalArgumentException(
+  Invalid/unsupported encoding option specified:  + en);
+}
 Preconditions.checkArgument(encoding != null,
-  Invalid/unsupported encoding option specified:  + en);
+Invalid/unsupported encoding option specified:  + en);
   }
 
   boolean r = StringUtils.popOption(-R, args);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/2f0f756b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
index 0da263d..d228920 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
@@ -19,7 +19,6 @@ package org.apache.hadoop.hdfs.tools.offlineImageViewer;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
-import com.google.common.io.LimitInputStream;
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.permission.PermissionStatus;
@@ -33,6 +32,7 @@ import 
org.apache.hadoop.hdfs.server.namenode.FsImageProto.INodeSection;
 import org.apache.hadoop.hdfs.server.namenode.FsImageProto.INodeSection.INode;
 import org.apache.hadoop.hdfs.server.namenode.INodeId;
 import org.apache.hadoop.io.IOUtils;
+import org.apache.hadoop.util.LimitInputStream;
 import 

hadoop git commit: HADOOP-11600. Fix up source codes to be compiled with Guava 17.0. (ozawa)

2015-02-17 Thread ozawa
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 005e1df54 - 00fb0710b


HADOOP-11600. Fix up source codes to be compiled with Guava 17.0. (ozawa)

(cherry picked from commit 2f0f756b26ea83e142a5b9379fa75862c2fc6ad5)


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

Branch: refs/heads/branch-2
Commit: 00fb0710b6e0dce149c41eb9227ff94494c41b92
Parents: 005e1df
Author: Tsuyoshi Ozawa oz...@apache.org
Authored: Tue Feb 17 21:56:20 2015 +0900
Committer: Tsuyoshi Ozawa oz...@apache.org
Committed: Tue Feb 17 21:57:58 2015 +0900

--
 hadoop-common-project/hadoop-common/CHANGES.txt   |  2 ++
 .../java/org/apache/hadoop/fs/shell/XAttrCommands.java| 10 --
 .../hdfs/tools/offlineImageViewer/PBImageTextWriter.java  |  2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hadoop/blob/00fb0710/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 f3ab6f7..4871f45 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -200,6 +200,8 @@ Release 2.7.0 - UNRELEASED
 HADOOP-11589. NetUtils.createSocketAddr should trim the input URI.
 (Rakesh R via ozawa)
 
+HADOOP-11600. Fix up source codes to be compiled with Guava 17.0. (ozawa)
+
   OPTIMIZATIONS
 
 HADOOP-11323. WritableComparator#compare keeps reference to byte array.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/00fb0710/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
--
diff --git 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
index 44e970b..4efda87 100644
--- 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
+++ 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/XAttrCommands.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.fs.shell;
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.LinkedList;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
 
@@ -77,9 +78,14 @@ class XAttrCommands extends FsCommand {
   name = StringUtils.popOptionWithArgument(-n, args);
   String en = StringUtils.popOptionWithArgument(-e, args);
   if (en != null) {
-encoding = enValueOfFunc.apply(en.toUpperCase());
+try {
+  encoding = enValueOfFunc.apply(en.toUpperCase(Locale.ENGLISH));
+} catch (IllegalArgumentException e) {
+  throw new IllegalArgumentException(
+  Invalid/unsupported encoding option specified:  + en);
+}
 Preconditions.checkArgument(encoding != null,
-  Invalid/unsupported encoding option specified:  + en);
+Invalid/unsupported encoding option specified:  + en);
   }
 
   boolean r = StringUtils.popOption(-R, args);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/00fb0710/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
--
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
index 0da263d..d228920 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/offlineImageViewer/PBImageTextWriter.java
@@ -19,7 +19,6 @@ package org.apache.hadoop.hdfs.tools.offlineImageViewer;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.Lists;
-import com.google.common.io.LimitInputStream;
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.permission.PermissionStatus;
@@ -33,6 +32,7 @@ import 
org.apache.hadoop.hdfs.server.namenode.FsImageProto.INodeSection;
 import org.apache.hadoop.hdfs.server.namenode.FsImageProto.INodeSection.INode;
 import org.apache.hadoop.hdfs.server.namenode.INodeId;
 import org.apache.hadoop.io.IOUtils;
+import