/** * Check that ExportSnapshot will fail if we inject failure more times than MR will retry. */ @Test public void testExportFailure() throws Exception { Path copyDir = getLocalDestinationDir(); FileSystem fs = FileSystem.get(copyDir.toUri(), new Configuration()); copyDir = copyDir.makeQualified(fs); Configuration conf = new Configuration(TEST_UTIL.getConfiguration()); conf.setBoolean(ExportSnapshot.Testing.CONF_TEST_FAILURE, true); conf.setInt(ExportSnapshot.Testing.CONF_TEST_FAILURE_COUNT, 4); conf.setInt("mapreduce.map.maxattempts", 3); testExportFileSystemState(conf, tableName, snapshotName, snapshotName, tableNumFiles, TEST_UTIL.getDefaultRootDirPath(), copyDir, true, getBypassRegionPredicate(), false); }
/** * Check that ExportSnapshot will succeed if something fails but the retry succeed. */ @Test public void testExportRetry() throws Exception { Path copyDir = getLocalDestinationDir(); FileSystem fs = FileSystem.get(copyDir.toUri(), new Configuration()); copyDir = copyDir.makeQualified(fs); Configuration conf = new Configuration(TEST_UTIL.getConfiguration()); conf.setBoolean(ExportSnapshot.Testing.CONF_TEST_FAILURE, true); conf.setInt(ExportSnapshot.Testing.CONF_TEST_FAILURE_COUNT, 2); conf.setInt("mapreduce.map.maxattempts", 3); testExportFileSystemState(conf, tableName, snapshotName, snapshotName, tableNumFiles, TEST_UTIL.getDefaultRootDirPath(), copyDir, true, getBypassRegionPredicate(), true); }
@Test public void testConsecutiveExports() throws Exception { Path copyDir = getLocalDestinationDir(); testExportFileSystemState(tableName, snapshotName, snapshotName, tableNumFiles, copyDir, false); testExportFileSystemState(tableName, snapshotName, snapshotName, tableNumFiles, copyDir, true); removeExportDir(copyDir); }
/** * Check that ExportSnapshot will succeed if something fails but the retry succeed. */ @Test public void testExportRetry() throws Exception { Path copyDir = getLocalDestinationDir(); FileSystem fs = FileSystem.get(copyDir.toUri(), new Configuration()); copyDir = copyDir.makeQualified(fs); Configuration conf = new Configuration(TEST_UTIL.getConfiguration()); conf.setBoolean(ExportSnapshot.Testing.CONF_TEST_FAILURE, true); conf.setInt(ExportSnapshot.Testing.CONF_TEST_FAILURE_COUNT, 2); conf.setInt("mapreduce.map.maxattempts", 3); testExportFileSystemState(conf, tableName, snapshotName, snapshotName, tableNumFiles, TEST_UTIL.getDefaultRootDirPath(), copyDir, true, getBypassRegionPredicate(), true); }
/** * Check that ExportSnapshot will succeed if something fails but the retry succeed. */ @Test public void testExportRetry() throws Exception { Path copyDir = getLocalDestinationDir(); FileSystem fs = FileSystem.get(copyDir.toUri(), new Configuration()); copyDir = copyDir.makeQualified(fs); Configuration conf = new Configuration(TEST_UTIL.getConfiguration()); conf.setBoolean(ExportSnapshot.Testing.CONF_TEST_FAILURE, true); conf.setInt(ExportSnapshot.Testing.CONF_TEST_FAILURE_COUNT, 2); conf.setInt("mapreduce.map.maxattempts", 3); testExportFileSystemState(conf, tableName, snapshotName, snapshotName, tableNumFiles, TEST_UTIL.getDefaultRootDirPath(), copyDir, true, getBypassRegionPredicate(), true); }
/** * Check that ExportSnapshot will fail if we inject failure more times than MR will retry. */ @Test public void testExportFailure() throws Exception { Path copyDir = getLocalDestinationDir(); FileSystem fs = FileSystem.get(copyDir.toUri(), new Configuration()); copyDir = copyDir.makeQualified(fs); Configuration conf = new Configuration(TEST_UTIL.getConfiguration()); conf.setBoolean(ExportSnapshot.Testing.CONF_TEST_FAILURE, true); conf.setInt(ExportSnapshot.Testing.CONF_TEST_FAILURE_COUNT, 4); conf.setInt("mapreduce.map.maxattempts", 3); testExportFileSystemState(conf, tableName, snapshotName, snapshotName, tableNumFiles, TEST_UTIL.getDefaultRootDirPath(), copyDir, true, getBypassRegionPredicate(), false); }
/** * Check that ExportSnapshot will fail if we inject failure more times than MR will retry. */ @Test public void testExportFailure() throws Exception { Path copyDir = getLocalDestinationDir(); FileSystem fs = FileSystem.get(copyDir.toUri(), new Configuration()); copyDir = copyDir.makeQualified(fs); Configuration conf = new Configuration(TEST_UTIL.getConfiguration()); conf.setBoolean(ExportSnapshot.Testing.CONF_TEST_FAILURE, true); conf.setInt(ExportSnapshot.Testing.CONF_TEST_FAILURE_COUNT, 4); conf.setInt("mapreduce.map.maxattempts", 3); testExportFileSystemState(conf, tableName, snapshotName, snapshotName, tableNumFiles, TEST_UTIL.getDefaultRootDirPath(), copyDir, true, getBypassRegionPredicate(), false); }
@Test public void testConsecutiveExports() throws Exception { Path copyDir = getLocalDestinationDir(); testExportFileSystemState(tableName, snapshotName, snapshotName, tableNumFiles, copyDir, false); testExportFileSystemState(tableName, snapshotName, snapshotName, tableNumFiles, copyDir, true); removeExportDir(copyDir); }
@Test public void testConsecutiveExports() throws Exception { Path copyDir = getLocalDestinationDir(); testExportFileSystemState(tableName, snapshotName, snapshotName, tableNumFiles, copyDir, false); testExportFileSystemState(tableName, snapshotName, snapshotName, tableNumFiles, copyDir, true); removeExportDir(copyDir); }