@Override
  public void copyFromLocalFile(File srcFile, URI dstUri)
      throws Exception {
    if (srcFile.isDirectory()) {
      throw new IllegalArgumentException(srcFile.getAbsolutePath() + " is a directory");
    }
    _hadoopFS.copyFromLocalFile(new Path(srcFile.toURI()), new Path(dstUri));
  }
@Test
  public void testCopyFromLocalFile()
      throws Exception {
    String baseDir = TMP_DIR + "/testCopyFromLocalFile";
    URI baseURI = URI.create(baseDir);
    try (HadoopPinotFS hadoopFS = new HadoopPinotFS()) {
      new File(baseDir + "/src").mkdirs();
      new File(baseDir + "/src/dir").mkdirs();
      new File(baseDir + "/src/dir/1").createNewFile();
      new File(baseDir + "/src/dir/2").createNewFile();
      hadoopFS.init(new PinotConfiguration());
      String[] srcFiles = hadoopFS.listFiles(new Path(baseURI.getPath(), "src").toUri(), true);
      Assert.assertEquals(srcFiles.length, 3);
      hadoopFS.copyFromLocalDir(new File(baseDir + "/src"), new Path(baseURI.getPath(), "dest").toUri());
      Assert.assertTrue(hadoopFS.exists(new Path(baseURI.getPath(), "dest").toUri()));
      Assert.assertTrue(hadoopFS.exists(new Path(baseURI.getPath(), "dest/dir").toUri()));
      Assert.assertTrue(hadoopFS.exists(new Path(baseURI.getPath(), "dest/dir/1").toUri()));
      Assert.assertTrue(hadoopFS.exists(new Path(baseURI.getPath(), "dest/dir/2").toUri()));
      String[] destFiles = hadoopFS.listFiles(new Path(baseURI.getPath(), "dest").toUri(), true);
      Assert.assertEquals(destFiles.length, 3);
      hadoopFS.delete(baseURI, true);
    }
  }