org.apache.hadoop.fs.contract.ContractOptions Java Examples

The following examples show how to use org.apache.hadoop.fs.contract.ContractOptions. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LocalFSContract.java    From hadoop with Apache License 2.0 5 votes vote down vote up
/**
 *  tweak some of the contract parameters based on the local system
 *  state
 */
protected void adjustContractToLocalEnvironment() {
  if (Shell.WINDOWS) {
    //NTFS doesn't do case sensitivity, and its permissions are ACL-based
    getConf().setBoolean(getConfKey(ContractOptions.IS_CASE_SENSITIVE), false);
    getConf().setBoolean(getConfKey(ContractOptions.SUPPORTS_UNIX_PERMISSIONS), false);
  } else if (ContractTestUtils.isOSX()) {
    //OSX HFS+ is not case sensitive
    getConf().setBoolean(getConfKey(ContractOptions.IS_CASE_SENSITIVE),
                         false);
  }
}
 
Example #2
Source File: LocalFSContract.java    From big-c with Apache License 2.0 5 votes vote down vote up
/**
 *  tweak some of the contract parameters based on the local system
 *  state
 */
protected void adjustContractToLocalEnvironment() {
  if (Shell.WINDOWS) {
    //NTFS doesn't do case sensitivity, and its permissions are ACL-based
    getConf().setBoolean(getConfKey(ContractOptions.IS_CASE_SENSITIVE), false);
    getConf().setBoolean(getConfKey(ContractOptions.SUPPORTS_UNIX_PERMISSIONS), false);
  } else if (ContractTestUtils.isOSX()) {
    //OSX HFS+ is not case sensitive
    getConf().setBoolean(getConfKey(ContractOptions.IS_CASE_SENSITIVE),
                         false);
  }
}
 
Example #3
Source File: CephFSContract.java    From cephfs-hadoop with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 *  tweak some of the contract parameters based on the local system
 *  state
 */
protected void adjustContractToLocalEnvironment() {
  if (Shell.WINDOWS) {
    //NTFS doesn't do case sensitivity, and its permissions are ACL-based
    getConf().setBoolean(getConfKey(ContractOptions.IS_CASE_SENSITIVE), false);
    getConf().setBoolean(getConfKey(ContractOptions.SUPPORTS_UNIX_PERMISSIONS), false);
  } else if (ContractTestUtils.isOSX()) {
    //OSX HFS+ is not case sensitive
    getConf().setBoolean(getConfKey(ContractOptions.IS_CASE_SENSITIVE),
                         false);
  }
}
 
Example #4
Source File: HDFSContract.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public void init() throws IOException {
  super.init();
  Assert.assertTrue("contract options not loaded",
                    isSupported(ContractOptions.IS_CASE_SENSITIVE, false));
}
 
Example #5
Source File: HDFSContract.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public void init() throws IOException {
  super.init();
  Assert.assertTrue("contract options not loaded",
                    isSupported(ContractOptions.IS_CASE_SENSITIVE, false));
}