This is an automated email from the ASF dual-hosted git repository.
csy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/auron.git
The following commit(s) were added to refs/heads/master by this push:
new ab6e5b7f [AURON #1766] Improve memory log readability in NativeHelper
(#1767)
ab6e5b7f is described below
commit ab6e5b7f8ba4944bd402aa667f4b9c96c7dd3efa
Author: Thomas <[email protected]>
AuthorDate: Thu Dec 18 12:00:47 2025 +0800
[AURON #1766] Improve memory log readability in NativeHelper (#1767)
# Which issue does this PR close?
Closes #1766
# Rationale for this change
# What changes are included in this PR?
# Are there any user-facing changes?
# How was this patch tested?
Master:
<img width="797" height="112" alt="Pasted Graphic 3"
src="https://github.com/user-attachments/assets/8e3d2d79-0c19-4986-9352-570da27dc847"
/>
PR:
<img width="747" height="139" alt="Pasted Graphic 4"
src="https://github.com/user-attachments/assets/7f87a729-df4c-490b-9bf6-e427866858ff"
/>
---
.../src/main/scala/org/apache/spark/sql/auron/NativeHelper.scala | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeHelper.scala
b/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeHelper.scala
index 8c6288cf..3ae7669e 100644
---
a/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeHelper.scala
+++
b/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeHelper.scala
@@ -37,7 +37,7 @@ import
org.apache.spark.sql.execution.auron.columnar.ColumnarHelper
import org.apache.spark.sql.execution.metric.SQLMetric
import org.apache.spark.sql.execution.metric.SQLMetrics
import org.apache.spark.sql.types.StructType
-import org.apache.spark.util.CompletionIterator
+import org.apache.spark.util.{CompletionIterator, Utils}
import org.apache.auron.jni.AuronAdaptor
import org.apache.auron.metric.SparkMetricNode
@@ -73,7 +73,8 @@ object NativeHelper extends Logging {
val nativeMemory: Long = {
val heapMemory = Runtime.getRuntime.maxMemory()
val offheapMemory = totalMemory - heapMemory
- logWarning(s"memory total: $totalMemory, onheap: $heapMemory, offheap:
$offheapMemory")
+ logWarning(s"memory total: ${Utils.bytesToString(totalMemory)}, onheap:
${Utils.bytesToString(
+ heapMemory)}, offheap: ${Utils.bytesToString(offheapMemory)}")
offheapMemory
}