From 2cc47ccfa2b018deb2c642c0422c501c118a76cb Mon Sep 17 00:00:00 2001 From: xunxunmimi5577 <52647492+xunxunmimi5577@users.noreply.github.com> Date: Sun, 18 Sep 2022 20:24:04 +0800 Subject: [PATCH] DeviceMonitor init failed because of NPE. (#608) --- .../main/scala/com/aliyun/emr/rss/common/meta/DeviceInfo.scala | 2 +- .../rss/service/deploy/worker/storage/DeviceMonitorSuite.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/scala/com/aliyun/emr/rss/common/meta/DeviceInfo.scala b/common/src/main/scala/com/aliyun/emr/rss/common/meta/DeviceInfo.scala index db8e5c5ce..ae407ec05 100644 --- a/common/src/main/scala/com/aliyun/emr/rss/common/meta/DeviceInfo.scala +++ b/common/src/main/scala/com/aliyun/emr/rss/common/meta/DeviceInfo.scala @@ -151,7 +151,7 @@ object DeviceInfo { val deviceNameToDeviceInfo = new util.HashMap[String, DeviceInfo]() val mountPointToDeviceInfo = new util.HashMap[String, DeviceInfo]() - val dfResult = runCommand("df -h").trim + val dfResult = runCommand("df -ah").trim logger.info(s"df result $dfResult") // (/dev/vdb, /mnt/disk1) val fsMounts = dfResult diff --git a/server-worker/src/test/scala/com/aliyun/emr/rss/service/deploy/worker/storage/DeviceMonitorSuite.scala b/server-worker/src/test/scala/com/aliyun/emr/rss/service/deploy/worker/storage/DeviceMonitorSuite.scala index 4abe1fb96..f2bcd16ff 100644 --- a/server-worker/src/test/scala/com/aliyun/emr/rss/service/deploy/worker/storage/DeviceMonitorSuite.scala +++ b/server-worker/src/test/scala/com/aliyun/emr/rss/service/deploy/worker/storage/DeviceMonitorSuite.scala @@ -35,7 +35,7 @@ import com.aliyun.emr.rss.common.protocol.StorageInfo import com.aliyun.emr.rss.common.util.Utils class DeviceMonitorSuite extends AnyFunSuite { - val dfCmd = "df -h" + val dfCmd = "df -ah" val dfOut = """ |Filesystem Size Used Avail Use% Mounted on