@Override public void shutdown() { cluster.shutdown(); } }
@Override public FileSystem getFileSystem() throws IOException { return cluster.getFileSystem(0); }
@Override public long getHedgedReadWins() { return this.dfsHedgedReadMetrics == null? 0: this.dfsHedgedReadMetrics.getHedgedReadWins(); }
@Override public void evaluate() throws Throwable { try { System.setProperty(TEST_BUILD_DATA, "target/test/data"); hadoopConf = hadoopConfSupplier.get(); dfscluster = new MiniDFSCluster.Builder(hadoopConf).numDataNodes(3).build(); dfscluster.waitActive(); } finally { if (dfscluster != null) { dfscluster.shutdown(); } System.clearProperty(TEST_BUILD_DATA); } } };
@AfterClass public static void destroyHDFS() throws Exception { if (hdfsCluster != null) { hdfsCluster.getFileSystem().delete(new org.apache.hadoop.fs.Path(basePath.toUri()), true); hdfsCluster.shutdown(); } }
@Before public void setup() throws IOException { conf.set(CommonConfigurationKeys.IPC_PING_INTERVAL_KEY, "5000"); fs = dfsClusterRule.getDfscluster().getFileSystem(); assert fs.mkdirs(filesDir); assert fs.mkdirs(locksDir); }
@Before public void setup() throws Exception { fs = dfsClusterRule.getDfscluster().getFileSystem(); hdfsURI = fs.getUri() + "/"; }
@After public void shutDown() throws IOException { fs.close(); }
public InstrumentedHDFSFileSystem() { super(SCHEME, new DistributedFileSystem()); } }
@Override public boolean evaluate() throws Exception { return dfs.isFileClosed(localFile) && dfs.isFileClosed(remoteFile); }
@Override public long getHedgedReadOps() { return this.dfsHedgedReadMetrics == null? 0: this.dfsHedgedReadMetrics.getHedgedReadOps(); }
@AfterClass public static void destroyHDFS() throws Exception { if (hdfsCluster != null) { hdfsCluster.getFileSystem().delete(new org.apache.hadoop.fs.Path(basePath.toUri()), true); hdfsCluster.shutdown(); } }
@AfterClass public static void destroyHDFS() { if (hdfsCluster != null) { hdfsCluster.shutdown(); } hdfsCluster = null; hdfsRootPath = null; }
@Before public void setup() throws IOException { conf.set(CommonConfigurationKeys.IPC_PING_INTERVAL_KEY, "5000"); fs = dfsClusterRule.getDfscluster().getFileSystem(); assert fs.mkdirs(dir); }
@After public void shutDown() throws IOException { fs.close(); }
@AfterClass public static void destroyHDFS() { if (hdfsCluster != null) { hdfsCluster.shutdown(); } hdfsCluster = null; hdfsRootPath = null; }
@Before public void setUp() throws IOException { conf.set(CommonConfigurationKeys.IPC_PING_INTERVAL_KEY, "5000"); fs = DFS_CLUSTER_RULE.getDfscluster().getFileSystem(); assert fs.mkdirs(locksDir); }
@AfterClass public static void teardownClass() throws IOException { fs.close(); }
@AfterClass public static void destroyHDFS() { if (hdfsCluster != null) { hdfsCluster.shutdown(); } hdfsCluster = null; hdfsRootPath = null; }
@After public void shutDown() throws IOException { fs.close(); }