Ejemplo n.º 1
0
 /**
  * Load a cluster spec then validate it
  *
  * @param fileSystem FS
  * @param clusterSpecPath path to cspec
  * @return the cluster spec
  * @throws IOException IO problems
  * @throws HoyaException cluster location, spec problems
  */
 public static ClusterDescription loadAndValidateClusterSpec(
     FileSystem filesystem, Path clusterSpecPath) throws IOException, HoyaException {
   ClusterDescription clusterSpec = ClusterDescription.load(filesystem, clusterSpecPath);
   // spec is loaded, just look at its state;
   verifySpecificationValidity(filesystem, clusterSpecPath, clusterSpec);
   return clusterSpec;
 }