You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Shilun Fan (Jira)" <ji...@apache.org> on 2024/01/28 07:43:00 UTC

[jira] [Updated] (HDFS-16838) Fix NPE in testAddRplicaProcessorForAddingReplicaInMap

     [ https://issues.apache.org/jira/browse/HDFS-16838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shilun Fan updated HDFS-16838:
------------------------------
    Component/s: test

> Fix NPE in testAddRplicaProcessorForAddingReplicaInMap
> ------------------------------------------------------
>
>                 Key: HDFS-16838
>                 URL: https://issues.apache.org/jira/browse/HDFS-16838
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>            Reporter: ZanderXu
>            Assignee: ZanderXu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>
> There is a NPE in org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.TestFsVolumeList#testAddRplicaProcessorForAddingReplicaInMap if we run this UT individually. And the related bug as bellow:
>  
> {code:java}
> public void testAddRplicaProcessorForAddingReplicaInMap() throws Exception {
>   // BUG here
>   BlockPoolSlice.reInitializeAddReplicaThreadPool();
>   Configuration cnf = new Configuration();
>   int poolSize = 5; 
>   ...
> }{code}
>  
> _addReplicaThreadPool_ may not have been initialized and is null, if we run testAddRplicaProcessorForAddingReplicaInMap unit test as an individual unit test.
> {code:java}
> @VisibleForTesting
> public static void reInitializeAddReplicaThreadPool() {
>   addReplicaThreadPool.shutdown();
>   addReplicaThreadPool = null;
> }{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org