Skip to content

Commit 5952934

Browse files
authored
HDFS-16599. Fix typo in hadoop-hdfs-rbf module (#4368). Contributed by fanshilun.
Signed-off-by: Ayush Saxena <[email protected]>
1 parent 21fa693 commit 5952934

35 files changed

Lines changed: 62 additions & 62 deletions

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/rbfbalance/RouterFedBalance.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
* dst sub-namespace with distcp.
6464
*
6565
* 1. Move data from the source path to the destination path with distcp.
66-
* 2. Update the the mount entry.
66+
* 2. Update the mount entry.
6767
* 3. Delete the source path to trash.
6868
*/
6969
public class RouterFedBalance extends Configured implements Tool {
@@ -77,7 +77,7 @@ public class RouterFedBalance extends Configured implements Tool {
7777
private static final String TRASH_PROCEDURE = "trash-procedure";
7878

7979
/**
80-
* This class helps building the balance job.
80+
* This class helps to build the balance job.
8181
*/
8282
private class Builder {
8383
/* Force close all open files while there is no diff. */

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/FederationMBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public interface FederationMBean {
5050

5151
/**
5252
* Get the latest state of all routers.
53-
* @return JSON with all of the known routers or null if failure.
53+
* @return JSON with all the known routers or null if failure.
5454
*/
5555
String getRouters();
5656

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/FederationRPCPerformanceMonitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class FederationRPCPerformanceMonitor implements RouterRpcMonitor {
5252

5353
/** Time for an operation to be received in the Router. */
5454
private static final ThreadLocal<Long> START_TIME = new ThreadLocal<>();
55-
/** Time for an operation to be send to the Namenode. */
55+
/** Time for an operation to be sent to the Namenode. */
5656
private static final ThreadLocal<Long> PROXY_TIME = new ThreadLocal<>();
5757

5858
/** Configuration for the performance monitor. */

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/metrics/RBFMetrics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ public String getMountTable() {
290290

291291
// Dump mount table entries information into JSON
292292
for (MountTable entry : orderedMounts) {
293-
// Sumarize destinations
293+
// Summarize destinations
294294
Set<String> nameservices = new LinkedHashSet<>();
295295
Set<String> paths = new LinkedHashSet<>();
296296
for (RemoteLocation location : entry.getDestinations()) {

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/ConnectionContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ public synchronized void release() {
124124
*/
125125
public synchronized void close(boolean force) {
126126
if (!force && this.numThreads > 0) {
127-
// this is an erroneous case but we have to close the connection
127+
// this is an erroneous case, but we have to close the connection
128128
// anyway since there will be connection leak if we don't do so
129129
// the connection has been moved out of the pool
130130
LOG.error("Active connection with {} handlers will be closed",
131131
this.numThreads);
132132
}
133133
this.closed = true;
134134
Object proxy = this.client.getProxy();
135-
// Nobody should be using this anymore so it should close right away
135+
// Nobody should be using this anymore, so it should close right away
136136
RPC.stopProxy(proxy);
137137
}
138138

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/ConnectionManager.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ public void start() {
135135
this.creator.start();
136136

137137
// Schedule a task to remove stale connection pools and sockets
138-
long recyleTimeMs = Math.min(
138+
long recycleTimeMs = Math.min(
139139
poolCleanupPeriodMs, connectionCleanupPeriodMs);
140140
LOG.info("Cleaning every {} seconds",
141-
TimeUnit.MILLISECONDS.toSeconds(recyleTimeMs));
141+
TimeUnit.MILLISECONDS.toSeconds(recycleTimeMs));
142142
this.cleaner.scheduleAtFixedRate(
143-
new CleanupTask(), 0, recyleTimeMs, TimeUnit.MILLISECONDS);
143+
new CleanupTask(), 0, recycleTimeMs, TimeUnit.MILLISECONDS);
144144

145145
// Mark the manager as running
146146
this.running = true;
@@ -364,9 +364,9 @@ void cleanup(ConnectionPool pool) {
364364
long timeSinceLastActive = Time.now() - pool.getLastActiveTime();
365365
int total = pool.getNumConnections();
366366
// Active is a transient status in many cases for a connection since
367-
// the handler thread uses the connection very quickly. Thus the number
367+
// the handler thread uses the connection very quickly. Thus, the number
368368
// of connections with handlers using at the call time is constantly low.
369-
// Recently active is more lasting status and it shows how many
369+
// Recently active is more lasting status, and it shows how many
370370
// connections have been used with a recent time period. (i.e. 30 seconds)
371371
int active = pool.getNumActiveConnectionsRecently();
372372
float poolMinActiveRatio = pool.getMinActiveRatio();
@@ -376,9 +376,9 @@ void cleanup(ConnectionPool pool) {
376376
// The number should at least be 1
377377
int targetConnectionsCount = Math.max(1,
378378
(int)(poolMinActiveRatio * total) - active);
379-
List<ConnectionContext> conns =
379+
List<ConnectionContext> connections =
380380
pool.removeConnections(targetConnectionsCount);
381-
for (ConnectionContext conn : conns) {
381+
for (ConnectionContext conn : connections) {
382382
conn.close();
383383
}
384384
LOG.debug("Removed connection {} used {} seconds ago. " +

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/FederationUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public static ActiveNamenodeResolver newActiveNamenodeResolver(
231231
}
232232

233233
/**
234-
* Add the the number of children for an existing HdfsFileStatus object.
234+
* Add the number of children for an existing HdfsFileStatus object.
235235
* @param dirStatus HdfsfileStatus object.
236236
* @param children number of children to be added.
237237
* @return HdfsFileStatus with the number of children specified.

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/MountTableRefresherThread.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ public MountTableRefresherThread(MountTableManager manager,
5050

5151
/**
5252
* Refresh mount table cache of local and remote routers. Local and remote
53-
* routers will be refreshed differently. Lets understand what are the
53+
* routers will be refreshed differently. Let's understand what are the
5454
* local and remote routers and refresh will be done differently on these
5555
* routers. Suppose there are three routers R1, R2 and R3. User want to add
5656
* new mount table entry. He will connect to only one router, not all the
5757
* routers. Suppose He connects to R1 and calls add mount table entry through
5858
* API or CLI. Now in this context R1 is local router, R2 and R3 are remote
5959
* routers. Because add mount table entry is invoked on R1, R1 will update the
60-
* cache locally it need not to make RPC call. But R1 will make RPC calls to
60+
* cache locally it need not make RPC call. But R1 will make RPC calls to
6161
* update cache on R2 and R3.
6262
*/
6363
@Override

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RBFConfigKeys.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public class RBFConfigKeys extends CommonConfigurationKeysPublic {
255255
TimeUnit.MINUTES.toMillis(1);
256256
/**
257257
* Remote router mount table cache is updated through RouterClient(RPC call).
258-
* To improve performance, RouterClient connections are cached but it should
258+
* To improve performance, RouterClient connections are cached, but it should
259259
* not be kept in cache forever. This property defines the max time a
260260
* connection can be cached.
261261
*/

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RemoteMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class RemoteMethod {
3636
private static final Logger LOG = LoggerFactory.getLogger(RemoteMethod.class);
3737

3838

39-
/** List of parameters: static and dynamic values, matchings types. */
39+
/** List of parameters: static and dynamic values, matching types. */
4040
private final Object[] params;
4141
/** List of method parameters types, matches parameters. */
4242
private final Class<?>[] types;

0 commit comments

Comments
 (0)