File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2 Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -694,15 +694,11 @@ public void join() {
694
694
worker .awaitTermination ();
695
695
}
696
696
697
- // Destroy the Thread Group for the executors
698
- // TODO: Fix. #join is not place to destroy resources.
699
- try {
700
- threadGroup .destroy ();
701
- } catch (IllegalThreadStateException e ) {
702
- LOG .error ("ThreadGroup {} contains running threads; {}: See STDOUT" , this .threadGroup ,
703
- e .getMessage ());
704
- // This dumps list of threads on STDOUT.
705
- this .threadGroup .list ();
697
+ // log the still active threads, ThreadGroup.destroy is deprecated in JDK17 and it is not
698
+ // necessary for us to must destroy it here, so we just do a check and log
699
+ if (threadGroup .activeCount () > 0 ) {
700
+ LOG .error ("There are still active thread in group {}, see STDOUT" , threadGroup );
701
+ threadGroup .list ();
706
702
}
707
703
708
704
// reset the in-memory state for testing
You can’t perform that action at this time.
0 commit comments