예제 #1
0
 public static void closeQuietly(Closeable res) {
   try {
     if (res != null) {
       res.close();
     }
   } catch (IOException ioe) {
     LOG.warn("Exception closing reader " + res + ": " + ioe.getMessage());
   }
 }
예제 #2
0
 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;
 }