Bug: Replace Guava Supplier with Java8+ Supplier in hdfs
Status: Resolved | Priority: Major | Resolution: Implemented
Created: 30/Jun/20 15:49

Replacing Usage of Guava supplier are in Unit tests {{GenereicTestUtils.waitFor()}} in hadoop-hdfs-project subdirectory.
{code:java}
Targets
    Occurrences of 'com.google.common.base.Supplier' in directory hadoop-hdfs-project with mask '*.java'
Found Occurrences  (99 usages found)
    org.apache.hadoop.fs  (1 usage found)
        TestEnhancedByteBufferAccess.java  (1 usage found)
            75 import com.google.common.base.Supplier;
    org.apache.hadoop.fs.viewfs  (1 usage found)
        TestViewFileSystemWithTruncate.java  (1 usage found)
            23 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs  (20 usages found)
        DFSTestUtil.java  (1 usage found)
            79 import com.google.common.base.Supplier;
        MiniDFSCluster.java  (1 usage found)
            78 import com.google.common.base.Supplier;
        TestBalancerBandwidth.java  (1 usage found)
            29 import com.google.common.base.Supplier;
        TestClientProtocolForPipelineRecovery.java  (1 usage found)
            30 import com.google.common.base.Supplier;
        TestDatanodeRegistration.java  (1 usage found)
            44 import com.google.common.base.Supplier;
        TestDataTransferKeepalive.java  (1 usage found)
            47 import com.google.common.base.Supplier;
        TestDeadNodeDetection.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestDecommission.java  (1 usage found)
            41 import com.google.common.base.Supplier;
        TestDFSShell.java  (1 usage found)
            37 import com.google.common.base.Supplier;
        TestEncryptedTransfer.java  (1 usage found)
            35 import com.google.common.base.Supplier;
        TestEncryptionZonesWithKMS.java  (1 usage found)
            22 import com.google.common.base.Supplier;
        TestFileCorruption.java  (1 usage found)
            21 import com.google.common.base.Supplier;
        TestLeaseRecovery2.java  (1 usage found)
            32 import com.google.common.base.Supplier;
        TestLeaseRecoveryStriped.java  (1 usage found)
            21 import com.google.common.base.Supplier;
        TestMaintenanceState.java  (1 usage found)
            63 import com.google.common.base.Supplier;
        TestPread.java  (1 usage found)
            61 import com.google.common.base.Supplier;
        TestQuota.java  (1 usage found)
            39 import com.google.common.base.Supplier;
        TestReplaceDatanodeOnFailure.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestReplication.java  (1 usage found)
            27 import com.google.common.base.Supplier;
        TestSafeMode.java  (1 usage found)
            62 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.client.impl  (2 usages found)
        TestBlockReaderLocalMetrics.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestLeaseRenewer.java  (1 usage found)
            20 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.qjournal  (1 usage found)
        MiniJournalCluster.java  (1 usage found)
            31 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.qjournal.client  (1 usage found)
        TestIPCLoggerChannel.java  (1 usage found)
            43 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.qjournal.server  (1 usage found)
        TestJournalNodeSync.java  (1 usage found)
            20 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.blockmanagement  (7 usages found)
        TestBlockManagerSafeMode.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestBlockReportRateLimiting.java  (1 usage found)
            25 import com.google.common.base.Supplier;
        TestNameNodePrunesMissingStorages.java  (1 usage found)
            21 import com.google.common.base.Supplier;
        TestPendingInvalidateBlock.java  (1 usage found)
            43 import com.google.common.base.Supplier;
        TestPendingReconstruction.java  (1 usage found)
            34 import com.google.common.base.Supplier;
        TestRBWBlockInvalidation.java  (1 usage found)
            49 import com.google.common.base.Supplier;
        TestSlowDiskTracker.java  (1 usage found)
            48 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.datanode  (13 usages found)
        DataNodeTestUtils.java  (1 usage found)
            40 import com.google.common.base.Supplier;
        TestBlockRecovery.java  (1 usage found)
            120 import com.google.common.base.Supplier;
        TestBlockScanner.java  (1 usage found)
            43 import com.google.common.base.Supplier;
        TestBPOfferService.java  (1 usage found)
            92 import com.google.common.base.Supplier;
        TestCorruptMetadataFile.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestDataNodeLifeline.java  (1 usage found)
            74 import com.google.common.base.Supplier;
        TestDataNodeMetrics.java  (1 usage found)
            37 import com.google.common.base.Supplier;
        TestDataNodeMetricsLogger.java  (1 usage found)
            57 import com.google.common.base.Supplier;
        TestDataNodeMultipleRegistrations.java  (1 usage found)
            33 import com.google.common.base.Supplier;
        TestDataNodeMXBean.java  (1 usage found)
            31 import com.google.common.base.Supplier;
        TestDatanodeProtocolRetryPolicy.java  (1 usage found)
            32 import com.google.common.base.Supplier;
        TestDataNodeVolumeFailure.java  (1 usage found)
            94 import com.google.common.base.Supplier;
        TestDiskError.java  (1 usage found)
            31 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.datanode.checker  (1 usage found)
        TestThrottledAsyncChecker.java  (1 usage found)
            21 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.datanode.fsdataset.impl  (7 usages found)
        TestCacheByPmemMappableBlockLoader.java  (1 usage found)
            65 import com.google.common.base.Supplier;
        TestFsDatasetCache.java  (1 usage found)
            94 import com.google.common.base.Supplier;
        TestFsDatasetImpl.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestFsVolumeList.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestLazyPersistLockedMemory.java  (1 usage found)
            22 import com.google.common.base.Supplier;
        TestPmemCacheRecovery.java  (1 usage found)
            65 import com.google.common.base.Supplier;
        TestSpaceReservation.java  (1 usage found)
            21 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.datanode.metrics  (1 usage found)
        TestDataNodeOutlierDetectionViaMetrics.java  (1 usage found)
            21 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.datanode.web.webhdfs  (1 usage found)
        TestDataNodeUGIProvider.java  (1 usage found)
            54 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.diskbalancer  (2 usages found)
        TestDiskBalancer.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestDiskBalancerWithMockMover.java  (1 usage found)
            23 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.federation  (1 usage found)
        FederationTestUtils.java  (1 usage found)
            95 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.federation.router  (4 usages found)
        TestRouterAdminCLI.java  (1 usage found)
            67 import com.google.common.base.Supplier;
        TestRouterQuota.java  (1 usage found)
            77 import com.google.common.base.Supplier;
        TestRouterRpc.java  (1 usage found)
            131 import com.google.common.base.Supplier;
        TestRouterRPCClientRetries.java  (1 usage found)
            57 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.mover  (1 usage found)
        TestMover.java  (1 usage found)
            98 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.namenode  (17 usages found)
        TestAddStripedBlockInFBR.java  (1 usage found)
            43 import com.google.common.base.Supplier;
        TestBackupNode.java  (1 usage found)
            59 import com.google.common.base.Supplier;
        TestCacheDirectives.java  (1 usage found)
            99 import com.google.common.base.Supplier;
        TestCheckpoint.java  (1 usage found)
            98 import com.google.common.base.Supplier;
        TestDeadDatanode.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestEditLogAutoroll.java  (1 usage found)
            49 import com.google.common.base.Supplier;
        TestEditLogRace.java  (1 usage found)
            41 import com.google.common.base.Supplier;
        TestFsck.java  (1 usage found)
            62 import com.google.common.base.Supplier;
        TestFSNamesystemLock.java  (1 usage found)
            21 import com.google.common.base.Supplier;
        TestMetaSave.java  (1 usage found)
            33 import com.google.common.base.Supplier;
        TestNameNodeMetadataConsistency.java  (1 usage found)
            33 import com.google.common.base.Supplier;
        TestNameNodeMetricsLogger.java  (1 usage found)
            21 import com.google.common.base.Supplier;
        TestNameNodeMXBean.java  (1 usage found)
            21 import com.google.common.base.Supplier;
        TestNameNodeStatusMXBean.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestPersistentStoragePolicySatisfier.java  (1 usage found)
            40 import com.google.common.base.Supplier;
        TestReencryption.java  (1 usage found)
            34 import com.google.common.base.Supplier;
        TestUpgradeDomainBlockPlacementPolicy.java  (1 usage found)
            52 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.namenode.ha  (11 usages found)
        HATestUtil.java  (1 usage found)
            64 import com.google.common.base.Supplier;
        TestBootstrapStandby.java  (1 usage found)
            30 import com.google.common.base.Supplier;
        TestDNFencing.java  (1 usage found)
            32 import com.google.common.base.Supplier;
        TestDNFencingWithReplication.java  (1 usage found)
            39 import com.google.common.base.Supplier;
        TestEditLogTailer.java  (1 usage found)
            65 import com.google.common.base.Supplier;
        TestHASafeMode.java  (1 usage found)
            75 import com.google.common.base.Supplier;
        TestPendingCorruptDnMessages.java  (1 usage found)
            44 import com.google.common.base.Supplier;
        TestPipelinesFailover.java  (1 usage found)
            65 import com.google.common.base.Supplier;
        TestStandbyCheckpoints.java  (1 usage found)
            20 import com.google.common.base.Supplier;
        TestStandbyInProgressTail.java  (1 usage found)
            52 import com.google.common.base.Supplier;
        TestStandbyIsHot.java  (1 usage found)
            46 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.namenode.snapshot  (1 usage found)
        TestRandomOpsWithSnapshots.java  (1 usage found)
            20 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.namenode.sps  (1 usage found)
        TestStoragePolicySatisfierWithStripedFile.java  (1 usage found)
            55 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.server.sps  (1 usage found)
        TestExternalStoragePolicySatisfier.java  (1 usage found)
            101 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.shortcircuit  (1 usage found)
        TestShortCircuitCache.java  (1 usage found)
            93 import com.google.common.base.Supplier;
    org.apache.hadoop.hdfs.tools  (2 usages found)
        TestDFSAdmin.java  (1 usage found)
            28 import com.google.common.base.Supplier;
        TestDFSZKFailoverController.java  (1 usage found)
            58 import com.google.common.base.Supplier;


{code}