Skip to content

Commit 608ee97

Browse files
authored
add plasma java client metrics api (#7)
1 parent 104e918 commit 608ee97

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

java/plasma/src/main/java/org/apache/arrow/plasma/ObjectStoreLink.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,9 @@ default byte[] get(byte[] objectId, int timeoutMs, boolean isMetadata) {
128128
* List all objects in the PlasmaStore.
129129
*/
130130
List<byte[]> list();
131+
132+
/**
133+
* Get metrics in the PlasmaStore.
134+
*/
135+
int metrics(long[] metrics);
131136
}

java/plasma/src/main/java/org/apache/arrow/plasma/PlasmaClient.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,14 @@ public void delete(byte[] objectId) {
181181
public boolean contains(byte[] objectId) {
182182
return PlasmaClientJNI.contains(conn, objectId);
183183
}
184+
185+
/**
186+
* Get metrics in the PlasmaStore.
187+
*
188+
* @param metrics used to return metrics, array size is 4, elements are: total memory size,
189+
* used memory size, total external size, used external size.
190+
*/
191+
public int metrics(long[] metrics) {
192+
return PlasmaClientJNI.metrics(conn, metrics);
193+
}
184194
}

0 commit comments

Comments
 (0)