hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject hadoop git commit: HADOOP-12958. PhantomReference for filesystem statistics can trigger OOM. Contributed by Sangjin Lee (cherry picked from commit 9a09200a1f5f752e266d4fb8e0c808073080bde8)
Date Fri, 25 Mar 2016 23:05:58 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.6 160a8c74d -> c092a8c1b


HADOOP-12958. PhantomReference for filesystem statistics can trigger OOM. Contributed by Sangjin
Lee
(cherry picked from commit 9a09200a1f5f752e266d4fb8e0c808073080bde8)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c092a8c1
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c092a8c1
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c092a8c1

Branch: refs/heads/branch-2.6
Commit: c092a8c1bb071fb708e20d9a66ea2fd6195f18e7
Parents: 160a8c7
Author: Jason Lowe <jlowe@apache.org>
Authored: Fri Mar 25 23:05:29 2016 +0000
Committer: Jason Lowe <jlowe@apache.org>
Committed: Fri Mar 25 23:05:29 2016 +0000

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt              | 3 +++
 .../src/main/java/org/apache/hadoop/fs/FileSystem.java       | 8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c092a8c1/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 5782165..39f14ca 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -27,6 +27,9 @@ Release 2.6.5 - UNRELEASED
     HADOOP-12589. Fix intermittent test failure of TestCopyPreserveFlag
     (iwasakims)
 
+    HADOOP-12958. PhantomReference for filesystem statistics can trigger OOM
+    (Sangjin Lee via jlowe)
+
 Release 2.6.4 - 2016-02-11
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c092a8c1/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
index 64efe66..ffee0fd 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java
@@ -20,7 +20,7 @@ package org.apache.hadoop.fs;
 import java.io.Closeable;
 import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.lang.ref.PhantomReference;
+import java.lang.ref.WeakReference;
 import java.lang.ref.ReferenceQueue;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -2889,7 +2889,7 @@ public abstract class FileSystem extends Configured implements Closeable
{
 
     /**
      * Set of all thread-local data areas.  Protected by the Statistics lock.
-     * The references to the statistics data are kept using phantom references
+     * The references to the statistics data are kept using weak references
      * to the associated threads. Proper clean-up is performed by the cleaner
      * thread when the threads are garbage collected.
      */
@@ -2942,11 +2942,11 @@ public abstract class FileSystem extends Configured implements Closeable
{
     }
 
     /**
-     * A phantom reference to a thread that also includes the data associated
+     * A weak reference to a thread that also includes the data associated
      * with that thread. On the thread being garbage collected, it is enqueued
      * to the reference queue for clean-up.
      */
-    private class StatisticsDataReference extends PhantomReference<Thread> {
+    private class StatisticsDataReference extends WeakReference<Thread> {
       private final StatisticsData data;
 
       public StatisticsDataReference(StatisticsData data, Thread thread) {


Mime
View raw message