From 90ffefe721865d2e7201d4766919c972b6752247 Mon Sep 17 00:00:00 2001 From: Laszlo Bodor Date: Mon, 27 May 2024 15:23:45 +0200 Subject: [PATCH] TezClient null check --- tez-api/src/main/java/org/apache/tez/client/TezClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tez-api/src/main/java/org/apache/tez/client/TezClient.java b/tez-api/src/main/java/org/apache/tez/client/TezClient.java index 5bd8a14e47..937346cacd 100644 --- a/tez-api/src/main/java/org/apache/tez/client/TezClient.java +++ b/tez-api/src/main/java/org/apache/tez/client/TezClient.java @@ -1288,10 +1288,10 @@ public static ApplicationId appIdfromString(String appIdStr) { } public String getAmHost() { - return frameworkClient.getAmHost(); + return frameworkClient == null ? null : frameworkClient.getAmHost(); } public int getAmPort() { - return frameworkClient.getAmPort(); + return frameworkClient == null ? -1 : frameworkClient.getAmPort(); } }