/** * Build up the path string for a cluster instance -no attempt to * create the directory is made * * @param clustername name of the cluster * @return the path for persistent data */ public Path buildClusterDirPath(String clustername) { Preconditions.checkNotNull(clustername); Path path = getBaseApplicationPath(); return new Path(path, SliderKeys.CLUSTER_DIRECTORY + "/" + clustername); }
/** * Build up the path string for resource install location -no attempt to * create the directory is made * * @return the path for resource */ public Path buildResourcePath(String resourceFolder) { Preconditions.checkNotNull(resourceFolder); Path path = getBaseApplicationPath(); return new Path(path, SliderKeys.RESOURCE_DIR + "/" + resourceFolder); }
/** * Build up the path string for resource install location -no attempt to * create the directory is made * * @return the path for resource */ public Path buildResourcePath(String resourceFolder) { Preconditions.checkNotNull(resourceFolder); Path path = getBaseApplicationPath(); return new Path(path, SliderKeys.RESOURCE_DIR + "/" + resourceFolder); }
/** * Build up the path string for a cluster instance -no attempt to * create the directory is made * * @param clustername name of the cluster * @return the path for persistent data */ public Path buildClusterDirPath(String clustername) { Preconditions.checkNotNull(clustername); Path path = getBaseApplicationPath(); return new Path(path, SliderKeys.CLUSTER_DIRECTORY + "/" + clustername); }
/** * Build up the path string for resource install location -no attempt to * create the directory is made * * @return the path for resource */ public Path buildResourcePath(String dirName, String fileName) { Preconditions.checkNotNull(dirName); Preconditions.checkNotNull(fileName); Path path = getBaseApplicationPath(); return new Path(path, SliderKeys.RESOURCE_DIR + "/" + dirName + "/" + fileName); }
/** * Build up the path string for keytab install location -no attempt to * create the directory is made * * @return the path for keytab */ public Path buildKeytabInstallationDirPath(String keytabFolder) { Preconditions.checkNotNull(keytabFolder); Path path = getBaseApplicationPath(); return new Path(path, SliderKeys.KEYTAB_DIR + "/" + keytabFolder); }
/** * Build up the path string for keytab install location -no attempt to * create the directory is made * * @return the path for keytab */ public Path buildKeytabInstallationDirPath(String keytabFolder) { Preconditions.checkNotNull(keytabFolder); Path path = getBaseApplicationPath(); return new Path(path, SliderKeys.KEYTAB_DIR + "/" + keytabFolder); }
/** * Build up the path string for resource install location -no attempt to * create the directory is made * * @return the path for resource */ public Path buildResourcePath(String dirName, String fileName) { Preconditions.checkNotNull(dirName); Preconditions.checkNotNull(fileName); Path path = getBaseApplicationPath(); return new Path(path, SliderKeys.RESOURCE_DIR + "/" + dirName + "/" + fileName); }
/** * Build up the path string for package install location -no attempt to * create the directory is made * * @return the path for persistent app package */ public Path buildPackageDirPath(String packageName, String packageVersion) { Preconditions.checkNotNull(packageName); Path path = getBaseApplicationPath(); path = new Path(path, SliderKeys.PACKAGE_DIRECTORY + "/" + packageName); if (SliderUtils.isSet(packageVersion)) { path = new Path(path, packageVersion); } return path; }
/** * Build up the path string for package install location -no attempt to * create the directory is made * * @return the path for persistent app package */ public Path buildPackageDirPath(String packageName, String packageVersion) { Preconditions.checkNotNull(packageName); Path path = getBaseApplicationPath(); path = new Path(path, SliderKeys.PACKAGE_DIRECTORY + "/" + packageName); if (SliderUtils.isSet(packageVersion)) { path = new Path(path, packageVersion); } return path; }
Path path = new Path(getBaseApplicationPath(), SliderKeys.CLUSTER_DIRECTORY); log.debug("Looking for all persisted application at {}", path.toString()); if (!fs.exists(path)) {
Path path = new Path(getBaseApplicationPath(), SliderKeys.CLUSTER_DIRECTORY); log.debug("Looking for all persisted application at {}", path.toString()); if (!fs.exists(path)) {