/** * Locate a cluster specification in the FS. This includes a check to verify that the file is * there. * * @param filesystem filesystem * @param clustername name of the cluster * @return the path to the spec. * @throws IOException IO problems * @throws HoyaException if the path isn't there */ public static Path locateClusterSpecification(FileSystem filesystem, String clustername) throws IOException, HoyaException { Path clusterDirectory = buildHoyaClusterDirPath(filesystem, clustername); Path clusterSpecPath = new Path(clusterDirectory, HoyaKeys.CLUSTER_SPECIFICATION_FILE); ClusterDescription.verifyClusterSpecExists(clustername, filesystem, clusterSpecPath); return clusterSpecPath; }