diff --git a/CHANGES.txt b/CHANGES.txt index e10e9487ac6..af4b5991933 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -539,6 +539,7 @@ Release 0.21.0 - Unreleased HBASE-3002 Fix zookeepers.sh to work properly with strange JVM options HBASE-3028 No basescanner means no GC'ing of split, offlined parent regions HBASE-2989 [replication] RSM won't cleanup after locking if 0 peers + HBASE-2992 [replication] MalformedObjectNameException in ReplicationMetrics IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceMetrics.java b/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceMetrics.java index 6c07a2f3c18..c90eb222814 100644 --- a/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceMetrics.java +++ b/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceMetrics.java @@ -18,6 +18,9 @@ * limitations under the License. */ package org.apache.hadoop.hbase.replication.regionserver; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; + import org.apache.hadoop.hbase.metrics.MetricsRate; import org.apache.hadoop.metrics.MetricsContext; import org.apache.hadoop.metrics.MetricsRecord; @@ -73,6 +76,11 @@ public class ReplicationSourceMetrics implements Updater { metricsRecord = MetricsUtil.createRecord(context, "replication"); metricsRecord.setTag("RegionServer", name); context.registerUpdater(this); + try { + id = URLEncoder.encode(id, "UTF8"); + } catch (UnsupportedEncodingException e) { + id = "CAN'T ENCODE UTF8"; + } // export for JMX new ReplicationStatistics(this.registry, "ReplicationSource for " + id); }