HBASE-17344 The regionserver web UIs miss the coprocessors of RegionServerCoprocessorHost (ChiaPing Tsai)
This commit is contained in:
parent
97d1ba4015
commit
b9689808eb
|
@ -2806,6 +2806,7 @@ public class HRegionServer extends HasThread implements
|
|||
LOG.debug("Exception details for failure to fetch wal coprocessor information.", exception);
|
||||
}
|
||||
}
|
||||
coprocessors.addAll(rsHost.getCoprocessors());
|
||||
return coprocessors.toArray(new String[coprocessors.size()]);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,8 +29,10 @@ import org.apache.commons.logging.LogFactory;
|
|||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
|
||||
import org.apache.hadoop.hbase.testclassification.MediumTests;
|
||||
import org.apache.hadoop.hbase.util.JVMClusterUtil;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Assert;
|
||||
import static org.junit.Assert.fail;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
@ -92,5 +94,20 @@ public class TestJMXListener {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetRegionServerCoprocessors() throws Exception {
|
||||
for (JVMClusterUtil.RegionServerThread rs : UTIL.getHBaseCluster().getRegionServerThreads()) {
|
||||
boolean find = false;
|
||||
for (String s : rs.getRegionServer().getRegionServerCoprocessors()) {
|
||||
if (s.equals(JMXListener.class.getSimpleName())) {
|
||||
find = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!find) {
|
||||
fail("where is the JMXListener?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue