You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tez.apache.org by GitBox <gi...@apache.org> on 2021/02/08 20:08:12 UTC

[GitHub] [tez] belugabehr commented on a change in pull request #95: TEZ-4275: Use Google Guava Intern Facility

belugabehr commented on a change in pull request #95:
URL: https://github.com/apache/tez/pull/95#discussion_r572336225



##########
File path: tez-dag/src/main/java/org/apache/tez/dag/app/DAGAppMaster.java
##########
@@ -866,10 +866,11 @@ protected synchronized void handle(DAGAppMasterEvent event) {
       taskCommunicatorManager.dagComplete(cleanupEvent.getDag());
       nodes.dagComplete(cleanupEvent.getDag());
       containers.dagComplete(cleanupEvent.getDag());
-      TezTaskAttemptID.clearCache();
-      TezTaskID.clearCache();
-      TezVertexID.clearCache();
-      TezDAGID.clearCache();
+
+      // Hint to the JVM to clean up anything no longer needed; be ready for the next DAG
+      System.gc();
+      System.runFinalization();
+

Review comment:
       I'm not sure if it is helpful to role this change into this ticket or not.  However, the `clearCache` stuff is pretty useless.  All it does is make the map entries available for garbage collection,... which they already are by design.
   
   However, this here will hint to the JDK to actually clean up that stuff.  Hinting to the JDK at this points seems like a reasonable thing to do between DAGs, but I'm not sure if it's worthwhile.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org