HBASE-23746 [Flakey Tests] Caused by: org.apache.hadoop.hbase.util.CommonFSUtils$StreamLacksCapabilityException: hflush and hsync
This commit is contained in:
parent
e836f5684f
commit
92a4a1d7b7
|
@ -33,6 +33,7 @@ import org.apache.hadoop.hbase.regionserver.TestHRegionServerBulkLoad;
|
|||
import org.apache.hadoop.hbase.testclassification.IOTests;
|
||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.hbase.util.CommonFSUtils;
|
||||
import org.apache.hadoop.hbase.util.FSUtils;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
|
@ -64,6 +65,8 @@ public class TestHFilePrettyPrinter {
|
|||
@Before
|
||||
public void setup() throws Exception {
|
||||
conf = UTIL.getConfiguration();
|
||||
// Runs on local filesystem. Test does not need sync. Turn off checks.
|
||||
conf.setBoolean(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE, false);
|
||||
fs = UTIL.getTestFileSystem();
|
||||
stream = new ByteArrayOutputStream();
|
||||
ps = new PrintStream(stream);
|
||||
|
|
|
@ -29,6 +29,10 @@ import org.apache.hadoop.hbase.util.CommonFSUtils;
|
|||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
|
||||
/**
|
||||
* This runs on local filesystem. hsync and hflush are not supported. May lose data!
|
||||
* Only use where data loss is not of consequence.
|
||||
*/
|
||||
public class RegionProcedureStoreTestBase {
|
||||
|
||||
protected HBaseCommonTestingUtility htu;
|
||||
|
@ -46,6 +50,8 @@ public class RegionProcedureStoreTestBase {
|
|||
public void setUp() throws IOException {
|
||||
htu = new HBaseCommonTestingUtility();
|
||||
htu.getConfiguration().setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
|
||||
// Runs on local filesystem. Test does not need sync. Turn off checks.
|
||||
htu.getConfiguration().setBoolean(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE, false);
|
||||
configure(htu.getConfiguration());
|
||||
Path testDir = htu.getDataTestDir();
|
||||
CommonFSUtils.setWALRootDir(htu.getConfiguration(), testDir);
|
||||
|
|
|
@ -78,6 +78,8 @@ public class TestRegionProcedureStoreMigration {
|
|||
htu = new HBaseCommonTestingUtility();
|
||||
Configuration conf = htu.getConfiguration();
|
||||
conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
|
||||
// Runs on local filesystem. Test does not need sync. Turn off checks.
|
||||
htu.getConfiguration().setBoolean(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE, false);
|
||||
Path testDir = htu.getDataTestDir();
|
||||
CommonFSUtils.setWALRootDir(conf, testDir);
|
||||
walStore = new WALProcedureStore(conf, new LeaseRecovery() {
|
||||
|
|
|
@ -72,6 +72,8 @@ public class TestRegionProcedureStoreWALCleaner {
|
|||
htu = new HBaseCommonTestingUtility();
|
||||
Configuration conf = htu.getConfiguration();
|
||||
conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
|
||||
// Runs on local filesystem. Test does not need sync. Turn off checks.
|
||||
htu.getConfiguration().setBoolean(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE, false);
|
||||
Path testDir = htu.getDataTestDir();
|
||||
fs = testDir.getFileSystem(conf);
|
||||
CommonFSUtils.setWALRootDir(conf, testDir);
|
||||
|
|
Loading…
Reference in New Issue