HBASE-27485 HBaseTestingUtility minicluster requires log4j2 (#4941)
Signed-off-by: Rajeshbabu Chintaguntla <rajeshbabu@apache.org>
Reviewed-by: SiCheng-Zheng <643463623@qq.com>
(cherry picked from commit 3f1087fe82
)
This commit is contained in:
parent
3ffa435df0
commit
2fdefdc273
|
@ -46,11 +46,13 @@ logger.MetricsConfig.level = WARN
|
|||
logger.MetricsSinkAdapter.name = org.apache.hadoop.metrics2.impl.MetricsSinkAdapter
|
||||
logger.MetricsSinkAdapter.level = WARN
|
||||
|
||||
# These two settings are workarounds against spurious logs from the minicluster.
|
||||
# See HBASE-4709
|
||||
logger.MetricsSystemImpl.name = org.apache.hadoop.metrics2.impl.MetricsSystemImpl
|
||||
logger.MetricsSystemImpl.level = WARN
|
||||
logger.MetricsSystemImpl.level = ERROR
|
||||
|
||||
logger.MBeans.name = org.apache.hadoop.metrics2.util.MBeans
|
||||
logger.MBeans.level = WARN
|
||||
logger.MBeans.level = ERROR
|
||||
|
||||
logger.directory.name = org.apache.directory
|
||||
logger.directory.level = WARN
|
||||
|
@ -68,3 +70,7 @@ logger.RSRpcServices.level = DEBUG
|
|||
|
||||
logger.TestJul2Slf4j.name = org.apache.hadoop.hbase.logging.TestJul2Slf4j
|
||||
logger.TestJul2Slf4j.level = DEBUG
|
||||
|
||||
# Avoid log flooded with chore execution time, see HBASE-24646 for more details.
|
||||
logger.ScheduledChore.name = org.apache.hadoop.hbase.ScheduledChore
|
||||
logger.ScheduledChore.level = INFO
|
||||
|
|
|
@ -681,11 +681,6 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
|
|||
createDirsAndSetProperties();
|
||||
EditLogFileOutputStream.setShouldSkipFsyncForTesting(true);
|
||||
|
||||
// Error level to skip some warnings specific to the minicluster. See HBASE-4709
|
||||
Log4jUtils.setLogLevel(org.apache.hadoop.metrics2.util.MBeans.class.getName(), "ERROR");
|
||||
Log4jUtils.setLogLevel(org.apache.hadoop.metrics2.impl.MetricsSystemImpl.class.getName(),
|
||||
"ERROR");
|
||||
|
||||
this.dfsCluster =
|
||||
new MiniDFSCluster(0, this.conf, servers, true, true, true, null, racks, hosts, null);
|
||||
this.dfsClusterFixer = new FsDatasetAsyncDiskServiceFixer(dfsCluster);
|
||||
|
@ -707,10 +702,6 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
|
|||
|
||||
public MiniDFSCluster startMiniDFSClusterForTestWAL(int namenodePort) throws IOException {
|
||||
createDirsAndSetProperties();
|
||||
// Error level to skip some warnings specific to the minicluster. See HBASE-4709
|
||||
Log4jUtils.setLogLevel(org.apache.hadoop.metrics2.util.MBeans.class.getName(), "ERROR");
|
||||
Log4jUtils.setLogLevel(org.apache.hadoop.metrics2.impl.MetricsSystemImpl.class.getName(),
|
||||
"ERROR");
|
||||
dfsCluster =
|
||||
new MiniDFSCluster(namenodePort, conf, 5, false, true, true, null, null, null, null);
|
||||
this.dfsClusterFixer = new FsDatasetAsyncDiskServiceFixer(dfsCluster);
|
||||
|
@ -1183,9 +1174,6 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
|
|||
conf.setInt(ServerManager.WAIT_ON_REGIONSERVERS_MAXTOSTART, option.getNumRegionServers());
|
||||
}
|
||||
|
||||
// Avoid log flooded with chore execution time, see HBASE-24646 for more details.
|
||||
Log4jUtils.setLogLevel(org.apache.hadoop.hbase.ScheduledChore.class.getName(), "INFO");
|
||||
|
||||
Configuration c = new Configuration(this.conf);
|
||||
this.hbaseCluster = new MiniHBaseCluster(c, option.getNumMasters(),
|
||||
option.getNumAlwaysStandByMasters(), option.getNumRegionServers(), option.getRsPorts(),
|
||||
|
|
Loading…
Reference in New Issue