From 578ea5580fe75962faae5298e100bfa0f291102b Mon Sep 17 00:00:00 2001 From: Konstantin Boudnik Date: Tue, 18 May 2010 23:16:20 +0000 Subject: [PATCH] HADOOP-6752. Remote cluster control functionality needs JavaDocs improvement. Contributed by Balaji Rajagopalan. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@945949 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 ++ .../test/system/AbstractDaemonClient.java | 31 +++++++++---------- .../test/system/AbstractDaemonCluster.java | 3 +- .../system/process/ClusterProcessManager.java | 11 +++---- .../test/system/process/RemoteProcess.java | 9 +++--- 5 files changed, 29 insertions(+), 28 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 33914ad021..ef54ea2036 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,9 @@ Hadoop Change Log Trunk (unreleased changes) IMPROVEMENTS + HADOOP-6752. Remote cluster control functionality needs JavaDocs + improvement (Balaji Rajagopalan via cos). + HADOOP-6627. "Bad Connection to FS" message in FSShell should print message from the exception (boryas) diff --git a/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonClient.java b/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonClient.java index bb2528b185..2abc8436a4 100644 --- a/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonClient.java +++ b/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonClient.java @@ -47,7 +47,7 @@ public abstract class AbstractDaemonClient { * @param conf client to be used by proxy to connect to Daemon. * @param process the Daemon process to manage the particular daemon. * - * @throws IOException + * @throws IOException on RPC error */ public AbstractDaemonClient(Configuration conf, RemoteProcess process) throws IOException { @@ -71,7 +71,7 @@ protected void setConnected(boolean connected) { /** * Create an RPC proxy to the daemon
* - * @throws IOException + * @throws IOException on RPC error */ public abstract void connect() throws IOException; @@ -110,7 +110,7 @@ public String getHostName() { * Gets if the Daemon is ready to accept RPC connections.
* * @return true if daemon is ready. - * @throws IOException + * @throws IOException on RPC error */ public boolean isReady() throws IOException { return getProxy().isReady(); @@ -118,7 +118,7 @@ public boolean isReady() throws IOException { /** * Kills the Daemon process
- * @throws IOException + * @throws IOException on RPC error */ public void kill() throws IOException { process.kill(); @@ -126,8 +126,7 @@ public void kill() throws IOException { /** * Checks if the Daemon process is alive or not
- * - * @throws IOException + * @throws IOException on RPC error */ public void ping() throws IOException { getProxy().ping(); @@ -135,7 +134,7 @@ public void ping() throws IOException { /** * Start up the Daemon process.
- * @throws IOException + * @throws IOException on RPC error */ public void start() throws IOException { process.start(); @@ -146,7 +145,7 @@ public void start() throws IOException { * * @return returns system level view of the Daemon process. * - * @throws IOException + * @throws IOException on RPC error. */ public ProcessInfo getProcessInfo() throws IOException { return getProxy().getProcessInfo(); @@ -175,7 +174,7 @@ public FileStatus getFileStatus(String path, boolean local) throws IOException { * @param local * whether the path is local or not * @return the statuses of the files/directories in the given patch - * @throws IOException + * @throws IOException on RPC error. */ public FileStatus[] listStatus(String path, boolean local) throws IOException { @@ -193,7 +192,7 @@ public FileStatus[] listStatus(String path, boolean local) * @param recursive * whether to recursively get the status * @return the statuses of the files/directories in the given patch - * @throws IOException + * @throws IOException is thrown on RPC error. */ public FileStatus[] listStatus(String path, boolean local, boolean recursive) throws IOException { @@ -239,7 +238,7 @@ public int getNumberOfFatalStatementsInLog(String [] excludeExpList) * Pattern used for searching is ERROR.
* @param excludeExpList list of exception to exclude * @return number of occurrence of error message. - * @throws IOException + * @throws IOException is thrown on RPC error. */ public int getNumberOfErrorStatementsInLog(String[] excludeExpList) throws IOException { @@ -254,7 +253,7 @@ public int getNumberOfErrorStatementsInLog(String[] excludeExpList) * Pattern used for searching is WARN.
* @param excludeExpList list of exception to exclude * @return number of occurrence of warning message. - * @throws IOException + * @throws IOException thrown on RPC error. */ public int getNumberOfWarnStatementsInLog(String[] excludeExpList) throws IOException { @@ -269,7 +268,7 @@ public int getNumberOfWarnStatementsInLog(String[] excludeExpList) * @param e exception class. * @param excludeExpList list of exceptions to exclude. * @return number of exceptions in log - * @throws IOException + * @throws IOException is thrown on RPC error. */ public int getNumberOfExceptionsInLog(Exception e, String[] excludeExpList) throws IOException { @@ -283,7 +282,7 @@ public int getNumberOfExceptionsInLog(Exception e, *
* @param excludeExpList list of exceptions to exclude. * @return number of times exception in log file. - * @throws IOException + * @throws IOException is thrown on RPC error. */ public int getNumberOfConcurrentModificationExceptionsInLog( String[] excludeExpList) throws IOException { @@ -299,7 +298,7 @@ public int getNumberOfConcurrentModificationExceptionsInLog( * Populate the initial exception counts to be used to assert once a testcase * is done there was no exception in the daemon when testcase was run. * @param excludeExpList list of exceptions to exclude - * @throws IOException + * @throws IOException is thrown on RPC error. */ protected void populateExceptionCount(String [] excludeExpList) throws IOException { @@ -320,7 +319,7 @@ protected void populateExceptionCount(String [] excludeExpList) * Pre-req for the method is that populateExceptionCount() has * to be called before calling this method. * @param excludeExpList list of exceptions to exclude - * @throws IOException + * @throws IOException is thrown on RPC error. */ protected void assertNoExceptionsOccurred(String [] excludeExpList) throws IOException { diff --git a/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java b/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java index 5a137ecd8d..60dadaa3a4 100644 --- a/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java +++ b/src/test/system/java/org/apache/hadoop/test/system/AbstractDaemonCluster.java @@ -232,8 +232,7 @@ public void setUp() throws Exception { * that will be excluded. * @param excludeExpList list of exceptions to exclude */ - public void setExcludeExpList(String [] excludeExpList) - { + public void setExcludeExpList(String [] excludeExpList) { this.excludeExpList = excludeExpList; } diff --git a/src/test/system/java/org/apache/hadoop/test/system/process/ClusterProcessManager.java b/src/test/system/java/org/apache/hadoop/test/system/process/ClusterProcessManager.java index 5f31dd2f43..70dd414615 100644 --- a/src/test/system/java/org/apache/hadoop/test/system/process/ClusterProcessManager.java +++ b/src/test/system/java/org/apache/hadoop/test/system/process/ClusterProcessManager.java @@ -62,16 +62,15 @@ public interface ClusterProcessManager { /** * Starts the daemon from the user specified conf dir. * @param newConfLocation the dir where the new conf files reside. - * @throws IOException + * @throws IOException if start from new conf fails. */ void start(String newConfLocation) throws IOException; /** * Stops the daemon running from user specified conf dir. * - * @param newConfLocation - * the dir where ther new conf files reside. - * @throws IOException + * @param newConfLocation the dir where the new conf files reside. + * @throws IOException if stop from new conf fails. */ void stop(String newConfLocation) throws IOException; @@ -86,7 +85,7 @@ public interface ClusterProcessManager { * Gets if multi-user support is enabled for this cluster. *
* @return true if multi-user support is enabled. - * @throws IOException + * @throws IOException if RPC returns error. */ boolean isMultiUserSupported() throws IOException; @@ -94,7 +93,7 @@ public interface ClusterProcessManager { * The pushConfig is used to push a new config to the daemons. * @param localDir * @return is the remoteDir location where config will be pushed - * @throws IOException + * @throws IOException if pushConfig fails. */ String pushConfig(String localDir) throws IOException; } diff --git a/src/test/system/java/org/apache/hadoop/test/system/process/RemoteProcess.java b/src/test/system/java/org/apache/hadoop/test/system/process/RemoteProcess.java index c309855b2d..d0afe16b26 100644 --- a/src/test/system/java/org/apache/hadoop/test/system/process/RemoteProcess.java +++ b/src/test/system/java/org/apache/hadoop/test/system/process/RemoteProcess.java @@ -40,7 +40,7 @@ public interface RemoteProcess { /** * Starts a daemon from user specified conf dir. * @param newConfLocation is dir where new conf resides. - * @throws IOException + * @throws IOException if start of process fails from new location. */ void start(String newConfLocation) throws IOException; /** @@ -53,8 +53,8 @@ public interface RemoteProcess { /** * Stops a given daemon running from user specified * conf dir.
- * @throws IOException * @param newConfLocation dir location where new conf resides. + * @throws IOException if kill fails from new conf location. */ void kill(String newConfLocation) throws IOException; /** @@ -66,8 +66,9 @@ public interface RemoteProcess { /** * Pushed the configuration to new configuration directory - * @param localDir - * @throws IOException + * @param localDir The local directory which has config files that will be + * pushed to the remote location + * @throws IOException is thrown if the pushConfig results in a error. */ void pushConfig(String localDir) throws IOException; }