Skip to content

Commit f9518cc

Browse files
authored
HBASE-27530 Fix comment syntax errors (apache#4910)
Signed-off-by: Duo Zhang <[email protected]>
1 parent 8b4e134 commit f9518cc

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutput.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
* An asynchronous HDFS output stream implementation which fans out data to datanode and only
8585
* supports writing file with only one block.
8686
* <p>
87-
* Use the createOutput method in {@link FanOutOneBlockAsyncDFSOutputHelper} to create. The mainly
87+
* Use the createOutput method in {@link FanOutOneBlockAsyncDFSOutputHelper} to create. The main
8888
* usage of this class is implementing WAL, so we only expose a little HDFS configurations in the
8989
* method. And we place it here under io package because we want to make it independent of WAL
9090
* implementation thus easier to move it to HDFS project finally.
@@ -104,8 +104,8 @@
104104
@InterfaceAudience.Private
105105
public class FanOutOneBlockAsyncDFSOutput implements AsyncFSOutput {
106106

107-
// The MAX_PACKET_SIZE is 16MB but it include the header size and checksum size. So here we set a
108-
// smaller limit for data size.
107+
// The MAX_PACKET_SIZE is 16MB, but it includes the header size and checksum size. So here we set
108+
// a smaller limit for data size.
109109
private static final int MAX_DATA_LEN = 12 * 1024 * 1024;
110110

111111
private final Configuration conf;
@@ -173,7 +173,7 @@ public Callback(CompletableFuture<Long> future, long ackedLength,
173173
private long nextPacketOffsetInBlock = 0L;
174174

175175
// the length of the trailing partial chunk, this is because the packet start offset must be
176-
// aligned with the length of checksum chunk so we need to resend the same data.
176+
// aligned with the length of checksum chunk, so we need to resend the same data.
177177
private int trailingPartialChunkLength = 0;
178178

179179
private long nextPacketSeqno = 0L;
@@ -437,7 +437,7 @@ private void flushBuffer(CompletableFuture<Long> future, ByteBuf dataBuf,
437437
checksumBuf.release();
438438
headerBuf.release();
439439

440-
// This method takes ownership of the dataBuf so we need release it before returning.
440+
// This method takes ownership of the dataBuf, so we need release it before returning.
441441
dataBuf.release();
442442
return;
443443
}

hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/util/RecoverLeaseFSUtils.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ public static void recoverFileLease(FileSystem fs, Path p, Configuration conf,
7272
* file's primary node. If all is well, it should return near immediately. But, as is common, it
7373
* is the very primary node that has crashed and so the namenode will be stuck waiting on a socket
7474
* timeout before it will ask another datanode to start the recovery. It does not help if we call
75-
* recoverLease in the meantime and in particular, subsequent to the socket timeout, a
76-
* recoverLease invocation will cause us to start over from square one (possibly waiting on socket
77-
* timeout against primary node). So, in the below, we do the following: 1. Call recoverLease. 2.
78-
* If it returns true, break. 3. If it returns false, wait a few seconds and then call it again.
79-
* 4. If it returns true, break. 5. If it returns false, wait for what we think the datanode
80-
* socket timeout is (configurable) and then try again. 6. If it returns true, break. 7. If it
81-
* returns false, repeat starting at step 5. above. If HDFS-4525 is available, call it every
82-
* second and we might be able to exit early.
75+
* recoverLease in the meantime and in particular, after the socket timeout, a recoverLease
76+
* invocation will cause us to start over from square one (possibly waiting on socket timeout
77+
* against primary node). So, in the below, we do the following: 1. Call recoverLease. 2. If it
78+
* returns true, break. 3. If it returns false, wait a few seconds and then call it again. 4. If
79+
* it returns true, break. 5. If it returns false, wait for what we think the datanode socket
80+
* timeout is (configurable) and then try again. 6. If it returns true, break. 7. If it returns
81+
* false, repeat starting at step 5. above. If HDFS-4525 is available, call it every second, and
82+
* we might be able to exit early.
8383
*/
8484
private static boolean recoverDFSFileLease(final DistributedFileSystem dfs, final Path p,
8585
final Configuration conf, final CancelableProgressable reporter) throws IOException {
@@ -89,10 +89,10 @@ private static boolean recoverDFSFileLease(final DistributedFileSystem dfs, fina
8989
// usually needs 10 minutes before marking the nodes as dead. So we're putting ourselves
9090
// beyond that limit 'to be safe'.
9191
long recoveryTimeout = conf.getInt("hbase.lease.recovery.timeout", 900000) + startWaiting;
92-
// This setting should be a little bit above what the cluster dfs heartbeat is set to.
92+
// This setting should be a little above what the cluster dfs heartbeat is set to.
9393
long firstPause = conf.getInt("hbase.lease.recovery.first.pause", 4000);
9494
// This should be set to how long it'll take for us to timeout against primary datanode if it
95-
// is dead. We set it to 64 seconds, 4 second than the default READ_TIMEOUT in HDFS, the
95+
// is dead. We set it to 64 seconds, 4 seconds than the default READ_TIMEOUT in HDFS, the
9696
// default value for DFS_CLIENT_SOCKET_TIMEOUT_KEY. If recovery is still failing after this
9797
// timeout, then further recovery will take liner backoff with this base, to avoid endless
9898
// preemptions when this value is not properly configured.
@@ -118,7 +118,7 @@ private static boolean recoverDFSFileLease(final DistributedFileSystem dfs, fina
118118
Thread.sleep(firstPause);
119119
} else {
120120
// Cycle here until (subsequentPause * nbAttempt) elapses. While spinning, check
121-
// isFileClosed if available (should be in hadoop 2.0.5... not in hadoop 1 though.
121+
// isFileClosed if available (should be in hadoop 2.0.5... not in hadoop 1 though).
122122
long localStartWaiting = EnvironmentEdgeManager.currentTime();
123123
while (
124124
(EnvironmentEdgeManager.currentTime() - localStartWaiting)

hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@
5050
import org.apache.hbase.thirdparty.com.google.common.collect.Sets;
5151

5252
/**
53-
* The base class for load balancers. It provides the the functions used to by
54-
* {@code AssignmentManager} to assign regions in the edge cases. It doesn't provide an
55-
* implementation of the actual balancing algorithm.
53+
* The base class for load balancers. It provides the functions used to by {@code AssignmentManager}
54+
* to assign regions in the edge cases. It doesn't provide an implementation of the actual balancing
55+
* algorithm.
5656
* <p/>
5757
* Since 3.0.0, all the balancers will be wrapped inside a {@code RSGroupBasedLoadBalancer}, it will
5858
* be in charge of the synchronization of balancing and configuration changing, so we do not need to
59-
* synchronized by ourselves.
59+
* synchronize by ourselves.
6060
*/
6161
@InterfaceAudience.Private
6262
public abstract class BaseLoadBalancer implements LoadBalancer {
@@ -297,7 +297,7 @@ public Map<ServerName, List<RegionInfo>> retainAssignment(Map<RegionInfo, Server
297297
return Collections.singletonMap(servers.get(0), new ArrayList<>(regions.keySet()));
298298
}
299299

300-
// Group all of the old assignments by their hostname.
300+
// Group all the old assignments by their hostname.
301301
// We can't group directly by ServerName since the servers all have
302302
// new start-codes.
303303

@@ -484,7 +484,7 @@ private ServerName randomAssignment(BalancerClusterState cluster, RegionInfo reg
484484
}
485485

486486
/**
487-
* Round robin a list of regions to a list of servers
487+
* Round-robin a list of regions to a list of servers
488488
*/
489489
private void roundRobinAssignment(BalancerClusterState cluster, List<RegionInfo> regions,
490490
List<ServerName> servers, Map<ServerName, List<RegionInfo>> assignments) {

0 commit comments

Comments
 (0)