use of org.apache.ignite.internal.processors.hadoop.delegate.HadoopFileSystemFactoryDelegate in project ignite by apache.
the class HadoopSecondaryFileSystemConfigurationTest method before.
/**
* Executes before each test.
* @throws Exception If failed.
*/
private void before() throws Exception {
initSecondary();
if (passPrimaryConfiguration) {
Configuration primaryFsCfg = configuration(primaryCfgScheme, primaryCfgAuthority, skipEmbed, skipLocShmem);
primaryConfFullPath = writeConfiguration(primaryFsCfg, PRIMARY_CFG_PATH);
} else
primaryConfFullPath = null;
CachingHadoopFileSystemFactory fac = new CachingHadoopFileSystemFactory();
fac.setConfigPaths(primaryConfFullPath);
fac.setUri(primaryFsUriStr);
HadoopFileSystemFactoryDelegate facDelegate = HadoopDelegateUtils.fileSystemFactoryDelegate(getClass().getClassLoader(), fac);
facDelegate.start();
//provider.createFileSystem(null);
primaryFs = (FileSystem) facDelegate.get(null);
primaryFsUri = primaryFs.getUri();
}
use of org.apache.ignite.internal.processors.hadoop.delegate.HadoopFileSystemFactoryDelegate in project ignite by apache.
the class KerberosHadoopFileSystemFactorySelfTest method checkParameters.
/**
* Check parameters.
*
* @param keyTab Key tab.
* @param keyTabPrincipal Key tab principal.
* @param reloginInterval Re-login interval.
*/
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
private void checkParameters(String keyTab, String keyTabPrincipal, long reloginInterval) {
final KerberosHadoopFileSystemFactory fac = new KerberosHadoopFileSystemFactory();
fac.setKeyTab(keyTab);
fac.setKeyTabPrincipal(keyTabPrincipal);
fac.setReloginInterval(reloginInterval);
GridTestUtils.assertThrows(null, new Callable<Object>() {
@Override
public Object call() throws Exception {
HadoopFileSystemFactoryDelegate delegate = HadoopDelegateUtils.fileSystemFactoryDelegate(getClass().getClassLoader(), fac);
delegate.start();
return null;
}
}, IllegalArgumentException.class, null);
}
Aggregations