Package org.apache.hadoop.hdfs.tools

Examples of org.apache.hadoop.hdfs.tools.FastCopy.shutdown()


      Map<DatanodeInfo, Integer> dnErrors = fastCopy.getDatanodeErrors();
      assertEquals(1, dnErrors.size());
      int errors = dnErrors.values().iterator().next();
      assertTrue(errors >= conf.getInt("dfs.fastcopy.max.datanode.errors", 3) + 1);
    } finally {
      fastCopy.shutdown();
    }
  }
}
View Full Code Here


    } catch (ExecutionException e) {
      System.out.println("Expected exception : " + e);
      assertEquals(IOException.class, e.getCause().getClass());
      return;
    } finally {
      fastCopy.shutdown();
    }
    fail("No exception thrown");
  }
}
View Full Code Here

    FastCopy fastCopy = new FastCopy(conf);
    try {
      fastCopy.copy(filename, filename + "dst", (DistributedFileSystem) fs,
          (DistributedFileSystem) fs);
    } finally {
      fastCopy.shutdown();
    }
  }
}
View Full Code Here

      }
    } catch (Exception e) {
      LOG.error("Fast Copy failed with exception : ", e);
      fail("Fast Copy failed");
    } finally {
      fastCopy.shutdown();
    }
    assertTrue(pass);
  }

  public void testFastCopyOldAPI(boolean hardlink) throws Exception {
View Full Code Here

      }
    } catch (Exception e) {
      LOG.error("Fast Copy failed with exception : ", e);
      fail("Fast Copy failed");
    } finally {
      fastCopy.shutdown();
    }
    assertTrue(pass);
  }

  public void testFastCopyMultiple(boolean hardlink) throws Exception {
View Full Code Here

      }
    } catch (Exception e) {
      LOG.error("Fast Copy failed with exception : ", e);
      fail("Fast Copy failed");
    } finally {
      fastCopy.shutdown();
    }
    assertTrue(pass);
  }

  private void verifyFileStatus(String file, NameNode namenode,
View Full Code Here

      }
    } catch (Exception e) {
      LOG.error("Fast Copy failed with exception : ", e);
      fail("Fast Copy failed");
    } finally {
      fastCopy.shutdown();
    }
    assertTrue(pass);
  }

  public void testInterFileSystemFastCopyMultiple(boolean hardlink)
View Full Code Here

      }
    } catch (Exception e) {
      LOG.error("Fast Copy failed with exception : ", e);
      fail("Fast Copy failed");
    } finally {
      fastCopy.shutdown();
    }
    assertTrue(pass);
  }

  public void testFastCopyShellMultiple(boolean hardlink, String extraargs[])
View Full Code Here

      for (String fileName : util.getFileNames(topDir)) {
        fastCopy.copy(fileName, fileName + "dst", (DistributedFileSystem) fs,
            (DistributedFileSystem) fs);
      }
    } finally {
      fastCopy.shutdown();
    }

    // Make sure no errors are reported.
    Map<DatanodeInfo, Integer> dnErrors = fastCopy.getDatanodeErrors();
    assertEquals(0, dnErrors.size());
View Full Code Here

    FastCopy fastCopy = new FastCopy(conf);
    try {
      fastCopy.copy(filename, filename + "dst", (DistributedFileSystem) fs,
          (DistributedFileSystem) fs);
    } finally {
      fastCopy.shutdown();
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.