HADOOP-13502. Split fs.contract.is-blobstore flag into more descriptive flags for use by contract tests. Contributed by Chris Nauroth.
This commit is contained in:
parent
9cad3e2350
commit
1f8490a5ba
|
@ -30,6 +30,7 @@ yarnregistry.pdf
|
||||||
hadoop-tools/hadoop-aws/src/test/resources/auth-keys.xml
|
hadoop-tools/hadoop-aws/src/test/resources/auth-keys.xml
|
||||||
hadoop-tools/hadoop-aws/src/test/resources/contract-test-options.xml
|
hadoop-tools/hadoop-aws/src/test/resources/contract-test-options.xml
|
||||||
hadoop-tools/hadoop-azure/src/test/resources/azure-auth-keys.xml
|
hadoop-tools/hadoop-azure/src/test/resources/azure-auth-keys.xml
|
||||||
|
hadoop-tools/hadoop-openstack/src/test/resources/auth-keys.xml
|
||||||
patchprocess/
|
patchprocess/
|
||||||
hadoop-tools/hadoop-aliyun/src/test/resources/auth-keys.xml
|
hadoop-tools/hadoop-aliyun/src/test/resources/auth-keys.xml
|
||||||
hadoop-tools/hadoop-aliyun/src/test/resources/contract-test-options.xml
|
hadoop-tools/hadoop-aliyun/src/test/resources/contract-test-options.xml
|
||||||
|
|
|
@ -121,7 +121,7 @@ public abstract class AbstractContractCreateTest extends
|
||||||
try {
|
try {
|
||||||
assertIsDirectory(path);
|
assertIsDirectory(path);
|
||||||
} catch (AssertionError failure) {
|
} catch (AssertionError failure) {
|
||||||
if (isSupported(IS_BLOBSTORE)) {
|
if (isSupported(CREATE_OVERWRITES_DIRECTORY)) {
|
||||||
// file/directory hack surfaces here
|
// file/directory hack surfaces here
|
||||||
throw new AssumptionViolatedException(failure.toString(), failure);
|
throw new AssumptionViolatedException(failure.toString(), failure);
|
||||||
}
|
}
|
||||||
|
@ -137,10 +137,10 @@ public abstract class AbstractContractCreateTest extends
|
||||||
FileStatus status = getFileSystem().getFileStatus(path);
|
FileStatus status = getFileSystem().getFileStatus(path);
|
||||||
|
|
||||||
boolean isDir = status.isDirectory();
|
boolean isDir = status.isDirectory();
|
||||||
if (!isDir && isSupported(IS_BLOBSTORE)) {
|
if (!isDir && isSupported(CREATE_OVERWRITES_DIRECTORY)) {
|
||||||
// object store: downgrade to a skip so that the failure is visible
|
// For some file systems, downgrade to a skip so that the failure is
|
||||||
// in test results
|
// visible in test results.
|
||||||
skip("Object store allows a file to overwrite a directory");
|
skip("This Filesystem allows a file to overwrite a directory");
|
||||||
}
|
}
|
||||||
fail("write of file over dir succeeded");
|
fail("write of file over dir succeeded");
|
||||||
} catch (FileAlreadyExistsException expected) {
|
} catch (FileAlreadyExistsException expected) {
|
||||||
|
@ -170,10 +170,10 @@ public abstract class AbstractContractCreateTest extends
|
||||||
1024)) {
|
1024)) {
|
||||||
if (!getFileSystem().exists(path)) {
|
if (!getFileSystem().exists(path)) {
|
||||||
|
|
||||||
if (isSupported(IS_BLOBSTORE)) {
|
if (isSupported(CREATE_VISIBILITY_DELAYED)) {
|
||||||
// object store: downgrade to a skip so that the failure is visible
|
// For some file systems, downgrade to a skip so that the failure is
|
||||||
// in test results
|
// visible in test results.
|
||||||
skip("Filesystem is an object store and newly created files are not immediately visible");
|
skip("This Filesystem delays visibility of newly created files");
|
||||||
}
|
}
|
||||||
assertPathExists("expected path to be visible before anything written",
|
assertPathExists("expected path to be visible before anything written",
|
||||||
path);
|
path);
|
||||||
|
|
|
@ -36,17 +36,34 @@ public interface ContractOptions {
|
||||||
*/
|
*/
|
||||||
String FS_CONTRACT_KEY = "fs.contract.";
|
String FS_CONTRACT_KEY = "fs.contract.";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag to indicate that a newly created file may overwrite a pre-existing
|
||||||
|
* directory.
|
||||||
|
* {@value}
|
||||||
|
*/
|
||||||
|
String CREATE_OVERWRITES_DIRECTORY = "create-overwrites-directory";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag to indicate that a newly created file is not made visible in the
|
||||||
|
* namespace immediately. Instead, the file becomes visible at a later point
|
||||||
|
* in the file creation lifecycle, such as when the client closes it.
|
||||||
|
* {@value}
|
||||||
|
*/
|
||||||
|
String CREATE_VISIBILITY_DELAYED = "create-visibility-delayed";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is a filesystem case sensitive.
|
* Is a filesystem case sensitive.
|
||||||
* Some of the filesystems that say "no" here may mean
|
* Some of the filesystems that say "no" here may mean
|
||||||
* that it varies from platform to platform -the localfs being the key
|
* that it varies from platform to platform -the localfs being the key
|
||||||
* example.
|
* example.
|
||||||
|
* {@value}
|
||||||
*/
|
*/
|
||||||
String IS_CASE_SENSITIVE = "is-case-sensitive";
|
String IS_CASE_SENSITIVE = "is-case-sensitive";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Blobstore flag. Implies it's not a real directory tree and
|
* Blobstore flag. Implies it's not a real directory tree and
|
||||||
* consistency is below that which Hadoop expects
|
* consistency is below that which Hadoop expects
|
||||||
|
* {@value}
|
||||||
*/
|
*/
|
||||||
String IS_BLOBSTORE = "is-blobstore";
|
String IS_BLOBSTORE = "is-blobstore";
|
||||||
|
|
||||||
|
@ -196,6 +213,7 @@ public interface ContractOptions {
|
||||||
/**
|
/**
|
||||||
* Limit for #of random seeks to perform.
|
* Limit for #of random seeks to perform.
|
||||||
* Keep low for remote filesystems for faster tests
|
* Keep low for remote filesystems for faster tests
|
||||||
|
* {@value}
|
||||||
*/
|
*/
|
||||||
String TEST_RANDOM_SEEK_COUNT = "test.random-seek-count";
|
String TEST_RANDOM_SEEK_COUNT = "test.random-seek-count";
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,6 @@
|
||||||
<value>false</value>
|
<value>false</value>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
<property>
|
|
||||||
<name>fs.contract.is-blobstore</name>
|
|
||||||
<value>false</value>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property>
|
<property>
|
||||||
<name>fs.contract.is-case-sensitive</name>
|
<name>fs.contract.is-case-sensitive</name>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
|
|
|
@ -37,6 +37,11 @@
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<property>
|
||||||
|
<name>fs.contract.create-visibility-delayed</name>
|
||||||
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
<property>
|
<property>
|
||||||
<name>fs.contract.is-case-sensitive</name>
|
<name>fs.contract.is-case-sensitive</name>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
|
|
|
@ -37,6 +37,16 @@
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<property>
|
||||||
|
<name>fs.contract.create-overwrites-directory</name>
|
||||||
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<property>
|
||||||
|
<name>fs.contract.create-visibility-delayed</name>
|
||||||
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
<property>
|
<property>
|
||||||
<name>fs.contract.is-case-sensitive</name>
|
<name>fs.contract.is-case-sensitive</name>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
|
|
|
@ -37,6 +37,16 @@
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
<property>
|
||||||
|
<name>fs.contract.create-overwrites-directory</name>
|
||||||
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<property>
|
||||||
|
<name>fs.contract.create-visibility-delayed</name>
|
||||||
|
<value>true</value>
|
||||||
|
</property>
|
||||||
|
|
||||||
<property>
|
<property>
|
||||||
<name>fs.contract.is-case-sensitive</name>
|
<name>fs.contract.is-case-sensitive</name>
|
||||||
<value>true</value>
|
<value>true</value>
|
||||||
|
|
Loading…
Reference in New Issue