/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { igfs.clear(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { igfs.clear(); }
/** * Test format operation on empty file system. * * @throws Exception If failed. */ @Test public void testFormatEmpty() throws Exception { igfs.clear(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); igfs.clear(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); // Clean up secondary file system. igfsSec.clear(); }
/** {@inheritDoc} */ @Override protected Void run(VisorIgfsFormatTaskArg arg) { try { ignite.fileSystem(arg.getIgfsName()).clear(); } catch (IllegalArgumentException iae) { throw new IgniteException("Failed to format IGFS: " + arg.getIgfsName(), iae); } return null; }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { grid(0).fileSystem(HadoopAbstractSelfTest.igfsName).clear(); setupLockFile.delete(); mapLockFile.delete(); reduceLockFile.delete(); super.afterTest(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { grid(0).fileSystem("igfs").clear(); } }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { if (NODES_CNT <= 0) return; // Initialize FS. fs = grid(0).fileSystem("igfs"); // Cleanup FS. fs.clear(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { grid(0).fileSystem(igfsName).clear(); }
/** * @throws Exception If failed. */ private void beforeJob() throws Exception { IgniteFileSystem igfs = grid(0).fileSystem(HadoopAbstractSelfTest.igfsName); igfs.clear(); igfs.mkdirs(new IgfsPath(PATH_INPUT)); try (BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(igfs.create( new IgfsPath(PATH_INPUT + "/test.file"), true)))) { bw.write("word"); } }
igfs.clear();
/** * Test format operation on non-empty file system. * * @throws Exception If failed. */ @Test public void testFormatNonEmpty() throws Exception { String dirPath = "/A/B/C"; igfs.mkdirs(path(dirPath)); String filePath = "/someFile"; create(filePath, false, "Some text."); igfs.clear(); assert !igfs.exists(path(dirPath)); assert !igfs.exists(path(filePath)); GridTestUtils.waitForCondition(new GridAbsPredicate() { @Override public boolean apply() { int metaSize = 0; for (Object metaId : grid(0).cachex(igfs.configuration().getMetaCacheConfiguration().getName()) .keySet()) { if (!IgfsUtils.isRootOrTrashId((IgniteUuid)metaId)) metaSize++; } return metaSize == 0; } }, 5000); }
igfs.clear();
/** {@inheritDoc} */ @Override protected Void run(VisorIgfsFormatTaskArg arg) { try { ignite.fileSystem(arg.getIgfsName()).clear(); } catch (IllegalArgumentException iae) { throw new IgniteException("Failed to format IGFS: " + arg.getIgfsName(), iae); } return null; }
assertEquals(0, m.filesOpenedForWrite()); fs.clear();