File tree Expand file tree Collapse file tree
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -735,14 +735,11 @@ public void join() {
735735 Thread .currentThread ().interrupt ();
736736 }
737737
738- // Destroy the Thread Group for the executors
739- // TODO: Fix. #join is not place to destroy resources.
740- try {
741- threadGroup .destroy ();
742- } catch (IllegalThreadStateException e ) {
743- LOG .error ("ThreadGroup {} contains running threads; {}: See STDOUT" , this .threadGroup , e );
744- // This dumps list of threads on STDOUT.
745- this .threadGroup .list ();
738+ // log the still active threads, ThreadGroup.destroy is deprecated in JDK17 and it is not
739+ // necessary for us to must destroy it here, so we just do a check and log
740+ if (threadGroup .activeCount () > 0 ) {
741+ LOG .error ("There are still active thread in group {}, see STDOUT" , threadGroup );
742+ threadGroup .list ();
746743 }
747744
748745 // reset the in-memory state for testing
You can’t perform that action at this time.
0 commit comments