Revert "HADOOP-11589. NetUtils.createSocketAddr should trim the input URI. Contributed by Rakesh R."
This reverts commit e082992e2a
.
This commit is contained in:
parent
e082992e2a
commit
481124bd61
|
@ -197,9 +197,6 @@ Release 2.7.0 - UNRELEASED
|
||||||
HADOOP-9869. Configuration.getSocketAddr()/getEnum() should use
|
HADOOP-9869. Configuration.getSocketAddr()/getEnum() should use
|
||||||
getTrimmed(). (Tsuyoshi Ozawa via aajisaka)
|
getTrimmed(). (Tsuyoshi Ozawa via aajisaka)
|
||||||
|
|
||||||
HADOOP-11589. NetUtils.createSocketAddr should trim the input URI.
|
|
||||||
(Rakesh R via ozawa)
|
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HADOOP-11323. WritableComparator#compare keeps reference to byte array.
|
HADOOP-11323. WritableComparator#compare keeps reference to byte array.
|
||||||
|
|
|
@ -189,7 +189,6 @@ public class NetUtils {
|
||||||
throw new IllegalArgumentException("Target address cannot be null." +
|
throw new IllegalArgumentException("Target address cannot be null." +
|
||||||
helpText);
|
helpText);
|
||||||
}
|
}
|
||||||
target = target.trim();
|
|
||||||
boolean hasScheme = target.contains("://");
|
boolean hasScheme = target.contains("://");
|
||||||
URI uri = null;
|
URI uri = null;
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1355,16 +1355,6 @@ public class TestConfiguration extends TestCase {
|
||||||
// it's expected behaviour.
|
// it's expected behaviour.
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testTrimCreateSocketAddress() {
|
|
||||||
Configuration conf = new Configuration();
|
|
||||||
NetUtils.addStaticResolution("host", "127.0.0.1");
|
|
||||||
final String defaultAddr = "host:1 ";
|
|
||||||
|
|
||||||
InetSocketAddress addr = NetUtils.createSocketAddr(defaultAddr);
|
|
||||||
conf.setSocketAddr("myAddress", addr);
|
|
||||||
assertEquals(defaultAddr.trim(), NetUtils.getHostPortString(addr));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] argv) throws Exception {
|
public static void main(String[] argv) throws Exception {
|
||||||
junit.textui.TestRunner.main(new String[]{
|
junit.textui.TestRunner.main(new String[]{
|
||||||
TestConfiguration.class.getName()
|
TestConfiguration.class.getName()
|
||||||
|
|
Loading…
Reference in New Issue