public static Path extractImagePath(CoreFileSystem fs, MapOperations internalOptions) throws SliderException, IOException { Path imagePath; String imagePathOption = internalOptions.get(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH); String appHomeOption = internalOptions.get(InternalKeys.INTERNAL_APPLICATION_HOME); if (!isUnset(imagePathOption)) { if (!isUnset(appHomeOption)) { throw new BadClusterStateException( ErrorStrings.E_BOTH_IMAGE_AND_HOME_DIR_SPECIFIED); } imagePath = fs.createPathThatMustExist(imagePathOption); } else { imagePath = null; if (isUnset(appHomeOption)) { throw new BadClusterStateException( ErrorStrings.E_NO_IMAGE_OR_HOME_DIR_SPECIFIED); } } return imagePath; }
public static Path extractImagePath(CoreFileSystem fs, MapOperations internalOptions) throws SliderException, IOException { Path imagePath; String imagePathOption = internalOptions.get(InternalKeys.INTERNAL_APPLICATION_IMAGE_PATH); String appHomeOption = internalOptions.get(InternalKeys.INTERNAL_APPLICATION_HOME); if (!isUnset(imagePathOption)) { if (!isUnset(appHomeOption)) { throw new BadClusterStateException( ErrorStrings.E_BOTH_IMAGE_AND_HOME_DIR_SPECIFIED); } imagePath = fs.createPathThatMustExist(imagePathOption); } else { imagePath = null; if (isUnset(appHomeOption)) { throw new BadClusterStateException( ErrorStrings.E_NO_IMAGE_OR_HOME_DIR_SPECIFIED); } } return imagePath; }