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.IOTests;
|
||||||
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
import org.apache.hadoop.hbase.testclassification.SmallTests;
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
|
import org.apache.hadoop.hbase.util.CommonFSUtils;
|
||||||
import org.apache.hadoop.hbase.util.FSUtils;
|
import org.apache.hadoop.hbase.util.FSUtils;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
@ -64,6 +65,8 @@ public class TestHFilePrettyPrinter {
|
||||||
@Before
|
@Before
|
||||||
public void setup() throws Exception {
|
public void setup() throws Exception {
|
||||||
conf = UTIL.getConfiguration();
|
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();
|
fs = UTIL.getTestFileSystem();
|
||||||
stream = new ByteArrayOutputStream();
|
stream = new ByteArrayOutputStream();
|
||||||
ps = new PrintStream(stream);
|
ps = new PrintStream(stream);
|
||||||
|
|
|
@ -29,6 +29,10 @@ import org.apache.hadoop.hbase.util.CommonFSUtils;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
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 {
|
public class RegionProcedureStoreTestBase {
|
||||||
|
|
||||||
protected HBaseCommonTestingUtility htu;
|
protected HBaseCommonTestingUtility htu;
|
||||||
|
@ -46,6 +50,8 @@ public class RegionProcedureStoreTestBase {
|
||||||
public void setUp() throws IOException {
|
public void setUp() throws IOException {
|
||||||
htu = new HBaseCommonTestingUtility();
|
htu = new HBaseCommonTestingUtility();
|
||||||
htu.getConfiguration().setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
|
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());
|
configure(htu.getConfiguration());
|
||||||
Path testDir = htu.getDataTestDir();
|
Path testDir = htu.getDataTestDir();
|
||||||
CommonFSUtils.setWALRootDir(htu.getConfiguration(), testDir);
|
CommonFSUtils.setWALRootDir(htu.getConfiguration(), testDir);
|
||||||
|
|
|
@ -78,6 +78,8 @@ public class TestRegionProcedureStoreMigration {
|
||||||
htu = new HBaseCommonTestingUtility();
|
htu = new HBaseCommonTestingUtility();
|
||||||
Configuration conf = htu.getConfiguration();
|
Configuration conf = htu.getConfiguration();
|
||||||
conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
|
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();
|
Path testDir = htu.getDataTestDir();
|
||||||
CommonFSUtils.setWALRootDir(conf, testDir);
|
CommonFSUtils.setWALRootDir(conf, testDir);
|
||||||
walStore = new WALProcedureStore(conf, new LeaseRecovery() {
|
walStore = new WALProcedureStore(conf, new LeaseRecovery() {
|
||||||
|
|
|
@ -72,6 +72,8 @@ public class TestRegionProcedureStoreWALCleaner {
|
||||||
htu = new HBaseCommonTestingUtility();
|
htu = new HBaseCommonTestingUtility();
|
||||||
Configuration conf = htu.getConfiguration();
|
Configuration conf = htu.getConfiguration();
|
||||||
conf.setBoolean(MemStoreLAB.USEMSLAB_KEY, false);
|
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();
|
Path testDir = htu.getDataTestDir();
|
||||||
fs = testDir.getFileSystem(conf);
|
fs = testDir.getFileSystem(conf);
|
||||||
CommonFSUtils.setWALRootDir(conf, testDir);
|
CommonFSUtils.setWALRootDir(conf, testDir);
|
||||||
|
|
Loading…
Reference in New Issue