hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1550809 - in /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics: SchemaConfigured.java SchemaMetrics.java
Date Fri, 13 Dec 2013 19:03:07 GMT
Author: tedyu
Date: Fri Dec 13 19:03:07 2013
New Revision: 1550809

URL: http://svn.apache.org/r1550809
Log:
HBASE-10089 Metrics intern table names cause eventual permgen OOM in 0.94


Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaMetrics.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java?rev=1550809&r1=1550808&r2=1550809&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaConfigured.java
Fri Dec 13 19:03:07 2013
@@ -123,10 +123,8 @@ public class SchemaConfigured implements
           // This is probably a compaction or flush output file. We will set
           // the real CF name later.
           cfName = null;
-        } else {
-          cfName = cfName.intern();
         }
-        tableName = splits[splits.length - 4].intern();
+        tableName = splits[splits.length - 4];
         return;
       }
     }
@@ -153,13 +151,13 @@ public class SchemaConfigured implements
   public SchemaConfigured(Configuration conf, String tableName, String cfName)
   {
     this(conf);
-    this.tableName = tableName != null ? tableName.intern() : tableName;
-    this.cfName = cfName != null ? cfName.intern() : cfName;
+    this.tableName = tableName;
+    this.cfName = cfName;
   }
 
   public SchemaConfigured(SchemaAware that) {
-    tableName = that.getTableName().intern();
-    cfName = that.getColumnFamilyName().intern();
+    tableName = that.getTableName();
+    cfName = that.getColumnFamilyName();
     schemaMetrics = that.getSchemaMetrics();
   }
 
@@ -210,8 +208,8 @@ public class SchemaConfigured implements
           target.schemaConfAsJSON());
     }
 
-    target.tableName = tableName.intern();
-    target.cfName = cfName.intern();
+    target.tableName = tableName;
+    target.cfName = cfName;
     target.schemaMetrics = schemaMetrics;
     target.schemaConfigurationChanged();
   }

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaMetrics.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaMetrics.java?rev=1550809&r1=1550808&r2=1550809&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaMetrics.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/metrics/SchemaMetrics.java
Fri Dec 13 19:03:07 2013
@@ -295,7 +295,7 @@ public class SchemaMetrics {
           sb.append(metricType);
 
           int i = getBlockMetricIndex(blockCategory, isCompaction, metricType);
-          blockMetricNames[i] = sb.toString().intern();
+          blockMetricNames[i] = sb.toString();
           blockMetricTimeVarying[i] = metricType.timeVarying;
         }
       }



Mime
View raw message