Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #122 from vrushalic/memory_nullfying
Browse files Browse the repository at this point in the history
Issue #121 Consider assigning null to variables during processing
  • Loading branch information
jrottinghuis committed Sep 29, 2014
2 parents 797477b + 1fd17f2 commit 9da2239
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ protected void map(
long submitTimeMillis = JobHistoryFileParserBase.getSubmitTimeMillisFromJobHistory(
jobhistoryraw);
context.progress();
// explicitly setting the byte array to null to free up memory
jobhistoryraw = null;

if (submitTimeMillis == 0L) {
LOG.info("NOTE: Since submitTimeMillis from job history is 0, now attempting to "
Expand Down Expand Up @@ -205,6 +207,8 @@ protected void map(

historyFileParser.parse(historyFileContents, jobKey);
context.progress();
// set the byte array to null to help free up memory sooner
historyFileContents = null;

puts = historyFileParser.getJobPuts();
if (puts == null) {
Expand Down

0 comments on commit 9da2239

Please sign in to comment.