public static void closeQuietly(Closeable res) { try { if (res != null) { res.close(); } } catch (IOException ioe) { LOG.warn("Exception closing reader " + res + ": " + ioe.getMessage()); } }
public static File getParquetFile( String name, String version, String module, boolean failIfNotExist) throws IOException { File parquetFile = new File("../" + version + "/target/parquet/", getParquetFileName(name, module)); parquetFile.getParentFile().mkdirs(); if (!parquetFile.exists()) { String msg = "File " + parquetFile.getAbsolutePath() + " does not exist"; if (failIfNotExist) { throw new IOException(msg); } LOG.warn(msg); } return parquetFile; }