Search in sources :

Example 1 with HadoopFileSystemFactoryDelegate

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();
}
Also used : IgfsIpcEndpointConfiguration(org.apache.ignite.igfs.IgfsIpcEndpointConfiguration) Configuration(org.apache.hadoop.conf.Configuration) FileSystemConfiguration(org.apache.ignite.configuration.FileSystemConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) CacheConfiguration(org.apache.ignite.configuration.CacheConfiguration) CachingHadoopFileSystemFactory(org.apache.ignite.hadoop.fs.CachingHadoopFileSystemFactory) HadoopFileSystemFactoryDelegate(org.apache.ignite.internal.processors.hadoop.delegate.HadoopFileSystemFactoryDelegate)

Example 2 with HadoopFileSystemFactoryDelegate

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);
}
Also used : HadoopFileSystemFactoryDelegate(org.apache.ignite.internal.processors.hadoop.delegate.HadoopFileSystemFactoryDelegate) KerberosHadoopFileSystemFactory(org.apache.ignite.hadoop.fs.KerberosHadoopFileSystemFactory)

Aggregations

HadoopFileSystemFactoryDelegate (org.apache.ignite.internal.processors.hadoop.delegate.HadoopFileSystemFactoryDelegate)2 Configuration (org.apache.hadoop.conf.Configuration)1 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)1 FileSystemConfiguration (org.apache.ignite.configuration.FileSystemConfiguration)1 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)1 CachingHadoopFileSystemFactory (org.apache.ignite.hadoop.fs.CachingHadoopFileSystemFactory)1 KerberosHadoopFileSystemFactory (org.apache.ignite.hadoop.fs.KerberosHadoopFileSystemFactory)1 IgfsIpcEndpointConfiguration (org.apache.ignite.igfs.IgfsIpcEndpointConfiguration)1