HBASE-2992 [replication] MalformedObjectNameException in ReplicationMetrics
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1001016 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
da611388b4
commit
b05d9ac937
|
@ -539,6 +539,7 @@ Release 0.21.0 - Unreleased
|
||||||
HBASE-3002 Fix zookeepers.sh to work properly with strange JVM options
|
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-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-2989 [replication] RSM won't cleanup after locking if 0 peers
|
||||||
|
HBASE-2992 [replication] MalformedObjectNameException in ReplicationMetrics
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-1760 Cleanup TODOs in HTable
|
HBASE-1760 Cleanup TODOs in HTable
|
||||||
|
|
|
@ -18,6 +18,9 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hbase.replication.regionserver;
|
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.hbase.metrics.MetricsRate;
|
||||||
import org.apache.hadoop.metrics.MetricsContext;
|
import org.apache.hadoop.metrics.MetricsContext;
|
||||||
import org.apache.hadoop.metrics.MetricsRecord;
|
import org.apache.hadoop.metrics.MetricsRecord;
|
||||||
|
@ -73,6 +76,11 @@ public class ReplicationSourceMetrics implements Updater {
|
||||||
metricsRecord = MetricsUtil.createRecord(context, "replication");
|
metricsRecord = MetricsUtil.createRecord(context, "replication");
|
||||||
metricsRecord.setTag("RegionServer", name);
|
metricsRecord.setTag("RegionServer", name);
|
||||||
context.registerUpdater(this);
|
context.registerUpdater(this);
|
||||||
|
try {
|
||||||
|
id = URLEncoder.encode(id, "UTF8");
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
id = "CAN'T ENCODE UTF8";
|
||||||
|
}
|
||||||
// export for JMX
|
// export for JMX
|
||||||
new ReplicationStatistics(this.registry, "ReplicationSource for " + id);
|
new ReplicationStatistics(this.registry, "ReplicationSource for " + id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue