From e8c193bf243a0bb401fa9d19e5e2d2a4f403fd32 Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Fri, 7 Sep 2012 03:09:53 +0000 Subject: [PATCH] HADOOP-8754. Deprecate all the RPC.getServer() variants. Contributed by Brandon Li git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1381845 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop-common/CHANGES.txt | 3 +++ .../main/java/org/apache/hadoop/ipc/RPC.java | 26 ++++++++++++++----- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 44df787ed4..029c03259b 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -328,6 +328,9 @@ Branch-2 ( Unreleased changes ) HADOOP-8748. Refactor DFSClient retry utility methods to a new class in org.apache.hadoop.io.retry. (Arun C Murthy via szetszwo) + HADOOP-8754. Deprecate all the RPC.getServer() variants. (Brandon Li + via szetszwo) + BUG FIXES HADOOP-8372. NetUtils.normalizeHostName() incorrectly handles hostname diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java index 550b04719d..46f787b402 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java @@ -629,7 +629,7 @@ public static void stopProxy(Object proxy) { /** Construct a server for a protocol implementation instance listening on a * port and address. - * @deprecated protocol interface should be passed. + * @deprecated Please use {@link Builder} to build the {@link Server} */ @Deprecated public static Server getServer(final Object instance, final String bindAddress, final int port, Configuration conf) @@ -639,7 +639,7 @@ public static Server getServer(final Object instance, final String bindAddress, /** Construct a server for a protocol implementation instance listening on a * port and address. - * @deprecated protocol interface should be passed. + * @deprecated Please use {@link Builder} to build the {@link Server} */ @Deprecated public static Server getServer(final Object instance, final String bindAddress, final int port, @@ -651,7 +651,10 @@ public static Server getServer(final Object instance, final String bindAddress, null); } - /** Construct a server for a protocol implementation instance. */ + /** Construct a server for a protocol implementation instance. + * @deprecated Please use {@link Builder} to build the {@link Server} + */ + @Deprecated public static Server getServer(Class protocol, Object instance, String bindAddress, int port, Configuration conf) @@ -661,7 +664,7 @@ public static Server getServer(Class protocol, } /** Construct a server for a protocol implementation instance. - * @deprecated secretManager should be passed. + * @deprecated Please use {@link Builder} to build the {@link Server} */ @Deprecated public static Server getServer(Class protocol, @@ -674,7 +677,10 @@ public static Server getServer(Class protocol, conf, null, null); } - /** Construct a server for a protocol implementation instance. */ + /** Construct a server for a protocol implementation instance. + * @deprecated Please use {@link Builder} to build the {@link Server} + */ + @Deprecated public static Server getServer(Class protocol, Object instance, String bindAddress, int port, int numHandlers, @@ -685,6 +691,10 @@ public static Server getServer(Class protocol, conf, secretManager, null); } + /** + * @deprecated Please use {@link Builder} to build the {@link Server} + */ + @Deprecated public static Server getServer(Class protocol, Object instance, String bindAddress, int port, int numHandlers, @@ -697,8 +707,10 @@ public static Server getServer(Class protocol, verbose, conf, secretManager, portRangeConfig); } - /** Construct a server for a protocol implementation instance. */ - + /** Construct a server for a protocol implementation instance. + * @deprecated Please use {@link Builder} to build the {@link Server} + */ + @Deprecated public static Server getServer(Class protocol, IMPL instance, String bindAddress, int port,