There is problem with get data from a Yarn ResourceManager that is configured as High Availability (RM1 and RM2). Im using scala like this:
import org.apache.hadoop.yarn.client.api.YarnClient
import org.apache.hadoop.yarn.conf.YarnConfiguration
val conf: YarnConfiguration = new YarnConfiguration()
val yarnClient: YarnClient = YarnClient.createYarnClient()
yarnClient.init(conf)
yarnClient.start()
val apps = yarnClient.getApplications()
I'm getting an error on the last line:
java.net.ConnectionException connection refused from "my host" to "RM1 host"
Before that occurs, the process is trying to connect to RM for a really long time.
Currently RM1 is not active, and RM2 is active. Property of YarnConfiguration like yarn.resourcemanager.address.RM1/RM2 is correspond to real addresses.
I dont understand why my process is trying to connect to not active RM?
yarn-site.xml
from the cluster and put it in yourHADOOP_CONF_DIR
folder? If you have more than one RM, you need to connect to a nameservice, not a particular host/port