Refine search
public void cleanDir() throws IOException { File destDirFile = new File(destDir); FileUtils.forceMkdir(destDirFile); FileUtils.cleanDirectory(destDirFile); }
@Override public File newDir(String name) { File dir = new File(tempDir, name); try { FileUtils.forceMkdir(dir); } catch (IOException e) { throw new IllegalStateException("Failed to create temp directory - " + dir, e); } return dir; }
public static void local_mkdirs(String path) throws IOException { LOG.debug("Making dirs at" + path); FileUtils.forceMkdir(new File(path)); }
public static void local_mkdirs(String path) throws IOException { LOG.debug("Making dirs at" + path); FileUtils.forceMkdir(new File(path)); }
public static void cleanRocksDbLocalDir(String rocksDbDir) throws IOException { File file = new File(rocksDbDir); if (file.exists()) { FileUtils.cleanDirectory(file); } else { FileUtils.forceMkdir(file); } } }
public static String default_worker_shared_dir(Map conf) throws IOException { String ret = String.valueOf(conf.get(Config.STORM_LOCAL_DIR)) + FILE_SEPERATEOR + WORKER_DATA_SUBDIR; FileUtils.forceMkdir(new File(ret)); return ret; }
private static String drpc_local_dir(Map conf) throws IOException { String ret = String.valueOf(conf.get(Config.STORM_LOCAL_DIR)) + FILE_SEPERATEOR + "drpc"; FileUtils.forceMkdir(new File(ret)); return ret; }
public static String worker_root(Map conf) throws IOException { String ret = String.valueOf(conf.get(Config.STORM_LOCAL_DIR)) + FILE_SEPERATEOR + "workers"; FileUtils.forceMkdir(new File(ret)); return ret; }
private static String supervisor_local_dir(Map conf) throws IOException { String ret = String.valueOf(conf.get(Config.STORM_LOCAL_DIR)) + FILE_SEPERATEOR + "supervisor"; FileUtils.forceMkdir(new File(ret)); return ret; }
public static String masterLocalDir(Map conf) throws IOException { String ret = String.valueOf(conf.get(Config.STORM_LOCAL_DIR)) + FILE_SEPERATEOR + "nimbus"; try { FileUtils.forceMkdir(new File(ret)); } catch (IOException e) { LOG.error("Failed to create dir " + ret, e); throw e; } return ret; }
public static String metricLocalDir(Map conf) throws IOException { String ret = String.valueOf(conf.get(Config.STORM_LOCAL_DIR)) + FILE_SEPERATEOR + "metrics"; try { FileUtils.forceMkdir(new File(ret)); } catch (IOException e) { LOG.error("Failed to create dir " + ret, e); throw e; } return ret; }
private File getDataFile(String destination) { File destinationMetaDir = new File(dataDir, destination); if (!destinationMetaDir.exists()) { try { FileUtils.forceMkdir(destinationMetaDir); } catch (IOException e) { throw new CanalMetaManagerException(e); } } return new File(destinationMetaDir, dataFileName); }
TmpFileSegmentWriteOutMedium(File outDir) throws IOException { File tmpOutputFilesDir = new File(outDir, "tmpOutputFiles"); FileUtils.forceMkdir(tmpOutputFilesDir); closer.register(() -> FileUtils.deleteDirectory(tmpOutputFilesDir)); this.dir = tmpOutputFilesDir; }
private File getDataFile(String destination) { File destinationMetaDir = new File(dataDir, destination); if (!destinationMetaDir.exists()) { try { FileUtils.forceMkdir(destinationMetaDir); } catch (IOException e) { throw new CanalMetaManagerException(e); } } String dataFileName = "parse.dat"; return new File(destinationMetaDir, dataFileName); }
public static String masterLocalDir(Map<String, Object> conf) throws IOException { String ret = ConfigUtils.absoluteStormLocalDir(conf) + FILE_SEPARATOR + "nimbus"; FileUtils.forceMkdir(new File(ret)); return ret; }
public static String masterInbox(Map<String, Object> conf) throws IOException { String ret = masterLocalDir(conf) + FILE_SEPARATOR + "inbox"; FileUtils.forceMkdir(new File(ret)); return ret; }
public static String supervisorTmpDir(Map<String, Object> conf) throws IOException { String ret = ConfigUtils.supervisorLocalDir(conf) + FILE_SEPARATOR + "tmp"; FileUtils.forceMkdir(new File(ret)); return ret; }
public static String worker_heartbeats_root(Map conf, String id) throws IOException { String ret = worker_root(conf, id) + FILE_SEPERATEOR + "heartbeats"; FileUtils.forceMkdir(new File(ret)); return ret; }
public static String masterInimbus(Map conf) throws IOException { String ret = masterLocalDir(conf) + FILE_SEPERATEOR + "ininumbus"; try { FileUtils.forceMkdir(new File(ret)); } catch (IOException e) { LOG.error("Failed to create dir " + ret, e); throw e; } return ret; }
public static String supervisorTmpDir(Map conf) throws IOException { String ret = null; try { ret = supervisor_local_dir(conf) + FILE_SEPERATEOR + "tmp"; FileUtils.forceMkdir(new File(ret)); } catch (IOException e) { LOG.error("Failed to create dir " + ret, e); throw e; } return ret; }