HADOOP-11600. Fix up source codes to be compiled with Guava 17.0. (ozawa)
(cherry picked from commit 2f0f756b26
)
This commit is contained in:
parent
005e1df540
commit
00fb0710b6
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 org.iq80.leveldb.DB;
|
||||
|
|
Loading…
Reference in New Issue