guluo2016 commented on code in PR #8333:
URL: https://github.com/apache/hbase/pull/8333#discussion_r3395401160
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestPrefetchPersistence.java:
##########
@@ -138,14 +142,8 @@ public void cleanup() {
public void readStoreFile(Path storeFilePath) throws Exception {
// Open the file
HFile.Reader reader = HFile.createReader(fs, storeFilePath, cacheConf,
true, conf);
- int retries = 0;
- while (
- !reader.prefetchComplete()
- && !bucketCache.fullyCachedFiles.containsKey(storeFilePath.getName())
&& retries < 5
- ) {
- Thread.sleep(500);
- retries++;
- }
+ Waiter.waitFor(conf, 30000, () -> reader.prefetchComplete()
+ || bucketCache.fullyCachedFiles.containsKey(storeFilePath.getName()));
Review Comment:
Nit: the polling interval is 100ms now by default
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]