public Map<String, Object> readSupervisorStormConfImpl(Map<String, Object> conf, String stormId) throws IOException { String stormRoot = supervisorStormDistRoot(conf, stormId); String confPath = supervisorStormConfPath(stormRoot); return readSupervisorStormConfGivenPath(conf, confPath); }
static boolean doRequiredTopoFilesExist(Map<String, Object> conf, String stormId) throws IOException { String stormroot = ConfigUtils.supervisorStormDistRoot(conf, stormId); String stormjarpath = ConfigUtils.supervisorStormJarPath(stormroot); String stormcodepath = ConfigUtils.supervisorStormCodePath(stormroot); String stormconfpath = ConfigUtils.supervisorStormConfPath(stormroot); if (!Utils.checkFileExists(stormroot)) { return false; } if (!Utils.checkFileExists(stormcodepath)) { return false; } if (!Utils.checkFileExists(stormconfpath)) { return false; } if (ConfigUtils.isLocalMode(conf) || Utils.checkFileExists(stormjarpath)) { return true; } return false; }
public Map<String, Object> readSupervisorStormConfImpl(Map<String, Object> conf, String stormId) throws IOException { String stormRoot = supervisorStormDistRoot(conf, stormId); String confPath = supervisorStormConfPath(stormRoot); return readSupervisorStormConfGivenPath(conf, confPath); }
String stormConfKey = ConfigUtils.masterStormConfKey(_topologyId); File codePath = new File(ConfigUtils.supervisorStormCodePath(tmproot.getAbsolutePath())); File confPath = new File(ConfigUtils.supervisorStormConfPath(tmproot.getAbsolutePath())); BlobStore blobStore = Utils.getNimbusBlobStore(_conf, null); try {
protected void downloadBaseBlobs(File tmproot) throws Exception { String stormJarKey = ConfigUtils.masterStormJarKey(_topologyId); String stormCodeKey = ConfigUtils.masterStormCodeKey(_topologyId); String stormConfKey = ConfigUtils.masterStormConfKey(_topologyId); String jarPath = ConfigUtils.supervisorStormJarPath(tmproot.getAbsolutePath()); String codePath = ConfigUtils.supervisorStormCodePath(tmproot.getAbsolutePath()); String confPath = ConfigUtils.supervisorStormConfPath(tmproot.getAbsolutePath()); _fsOps.forceMkdir(tmproot); _fsOps.restrictDirectoryPermissions(tmproot); ClientBlobStore blobStore = Utils.getClientBlobStoreForSupervisor(_conf); try { Utils.downloadResourcesAsSupervisor(stormJarKey, jarPath, blobStore); Utils.downloadResourcesAsSupervisor(stormCodeKey, codePath, blobStore); Utils.downloadResourcesAsSupervisor(stormConfKey, confPath, blobStore); } finally { blobStore.shutdown(); } Utils.extractDirFromJar(jarPath, ConfigUtils.RESOURCES_SUBDIR, tmproot); }
static boolean doRequiredTopoFilesExist(Map<String, Object> conf, String stormId) throws IOException { String stormroot = ConfigUtils.supervisorStormDistRoot(conf, stormId); String stormjarpath = ConfigUtils.supervisorStormJarPath(stormroot); String stormcodepath = ConfigUtils.supervisorStormCodePath(stormroot); String stormconfpath = ConfigUtils.supervisorStormConfPath(stormroot); if (!Utils.checkFileExists(stormroot)) return false; if (!Utils.checkFileExists(stormcodepath)) return false; if (!Utils.checkFileExists(stormconfpath)) return false; if (ConfigUtils.isLocalMode(conf) || Utils.checkFileExists(stormjarpath)) return true; return false; }