Search in sources :

Example 1 with IgniteHadoopIgfsSecondaryFileSystem

use of org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem in project ignite by apache.

the class HadoopAbstractMapReduceTest method igfsConfiguration.

/** {@inheritDoc} */
@Override
public FileSystemConfiguration igfsConfiguration() throws Exception {
    FileSystemConfiguration fsCfg = super.igfsConfiguration();
    secondaryFs = new IgniteHadoopIgfsSecondaryFileSystem(SECONDARY_URI, SECONDARY_CFG);
    fsCfg.setSecondaryFileSystem(secondaryFs);
    return fsCfg;
}
Also used : IgniteHadoopIgfsSecondaryFileSystem(org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem) FileSystemConfiguration(org.apache.ignite.configuration.FileSystemConfiguration)

Example 2 with IgniteHadoopIgfsSecondaryFileSystem

use of org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem in project ignite by apache.

the class Hadoop1DualAbstractTest method createSecondaryFileSystemStack.

/**
     * Creates secondary filesystems.
     * @return IgfsSecondaryFileSystem
     * @throws Exception On failure.
     */
@Override
protected IgfsSecondaryFileSystem createSecondaryFileSystemStack() throws Exception {
    startUnderlying();
    prepareConfiguration();
    KerberosUserNameMapper mapper1 = new KerberosUserNameMapper();
    mapper1.setRealm("TEST.COM");
    TestUserNameMapper mapper2 = new TestUserNameMapper();
    ChainedUserNameMapper mapper = new ChainedUserNameMapper();
    mapper.setMappers(mapper1, mapper2);
    CachingHadoopFileSystemFactory factory = new CachingHadoopFileSystemFactory();
    factory.setUri(secondaryUri);
    factory.setConfigPaths(secondaryConfFullPath);
    factory.setUserNameMapper(mapper);
    IgniteHadoopIgfsSecondaryFileSystem second = new IgniteHadoopIgfsSecondaryFileSystem();
    second.setFileSystemFactory(factory);
    igfsSecondary = new HadoopIgfsSecondaryFileSystemTestAdapter(factory);
    return second;
}
Also used : KerberosUserNameMapper(org.apache.ignite.hadoop.util.KerberosUserNameMapper) CachingHadoopFileSystemFactory(org.apache.ignite.hadoop.fs.CachingHadoopFileSystemFactory) IgniteHadoopIgfsSecondaryFileSystem(org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem) ChainedUserNameMapper(org.apache.ignite.hadoop.util.ChainedUserNameMapper)

Example 3 with IgniteHadoopIgfsSecondaryFileSystem

use of org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem in project ignite by apache.

the class IgniteHadoopFileSystemAbstractSelfTest method igfsConfiguration.

/**
     * Gets IGFS configuration.
     *
     * @param igniteInstanceName Ignite instance name.
     * @return IGFS configuration.
     */
protected FileSystemConfiguration igfsConfiguration(String igniteInstanceName) throws IgniteCheckedException {
    FileSystemConfiguration cfg = new FileSystemConfiguration();
    cfg.setDataCacheConfiguration(dataCacheConfiguration(igniteInstanceName));
    cfg.setMetaCacheConfiguration(metaCacheConfiguration(igniteInstanceName));
    cfg.setName("igfs");
    cfg.setPrefetchBlocks(1);
    cfg.setDefaultMode(mode);
    if (mode != PRIMARY) {
        CachingHadoopFileSystemFactory fac = new CachingHadoopFileSystemFactory();
        fac.setUri(SECONDARY_URI);
        fac.setConfigPaths(SECONDARY_CFG_PATH);
        IgniteHadoopIgfsSecondaryFileSystem sec = new IgniteHadoopIgfsSecondaryFileSystem();
        sec.setFileSystemFactory(fac);
        sec.setDefaultUserName(SECONDARY_FS_USER);
        // NB: start() will be invoked upon IgfsImpl init.
        cfg.setSecondaryFileSystem(sec);
    }
    cfg.setIpcEndpointConfiguration(primaryIpcEndpointConfiguration(igniteInstanceName));
    cfg.setManagementPort(-1);
    // Together with group blocks mapper will yield 64M per node groups.
    cfg.setBlockSize(512 * 1024);
    return cfg;
}
Also used : CachingHadoopFileSystemFactory(org.apache.ignite.hadoop.fs.CachingHadoopFileSystemFactory) IgniteHadoopIgfsSecondaryFileSystem(org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem) FileSystemConfiguration(org.apache.ignite.configuration.FileSystemConfiguration)

Example 4 with IgniteHadoopIgfsSecondaryFileSystem

use of org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem in project ignite by apache.

the class HadoopIgfs20FileSystemAbstractSelfTest method igfsConfiguration.

/**
     * Gets IGFS configuration.
     *
     * @param igniteInstanceName Ignite instance name.
     * @return IGFS configuration.
     */
protected FileSystemConfiguration igfsConfiguration(String igniteInstanceName) throws IgniteCheckedException {
    FileSystemConfiguration cfg = new FileSystemConfiguration();
    cfg.setName("igfs");
    cfg.setPrefetchBlocks(1);
    cfg.setDefaultMode(mode);
    cfg.setMetaCacheConfiguration(metaCacheConfiguration(igniteInstanceName));
    cfg.setDataCacheConfiguration(dataCacheConfiguration(igniteInstanceName));
    if (mode != PRIMARY)
        cfg.setSecondaryFileSystem(new IgniteHadoopIgfsSecondaryFileSystem(secondaryFileSystemUriPath(), secondaryFileSystemConfigPath(), SECONDARY_FS_USER));
    cfg.setIpcEndpointConfiguration(primaryIpcEndpointConfiguration(igniteInstanceName));
    cfg.setManagementPort(-1);
    // Together with group blocks mapper will yield 64M per node groups.
    cfg.setBlockSize(512 * 1024);
    return cfg;
}
Also used : IgniteHadoopIgfsSecondaryFileSystem(org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem) FileSystemConfiguration(org.apache.ignite.configuration.FileSystemConfiguration)

Example 5 with IgniteHadoopIgfsSecondaryFileSystem

use of org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem in project ignite by apache.

the class HadoopIgfsDualAbstractSelfTest method beforeTestsStarted.

/** {@inheritDoc} */
@Override
protected void beforeTestsStarted() throws Exception {
    chunk = new byte[128];
    for (int i = 0; i < chunk.length; i++) chunk[i] = (byte) i;
    Ignite igniteSecondary = startGridWithIgfs("grid-secondary", "igfs-secondary", PRIMARY, null, SECONDARY_REST_CFG);
    IgfsSecondaryFileSystem hadoopFs = new IgniteHadoopIgfsSecondaryFileSystem(SECONDARY_URI, SECONDARY_CFG);
    Ignite ignite = startGridWithIgfs("grid", "igfs", mode, hadoopFs, PRIMARY_REST_CFG);
    igfsSecondary = (IgfsImpl) igniteSecondary.fileSystem("igfs-secondary");
    igfs = (IgfsImpl) ignite.fileSystem("igfs");
}
Also used : IgniteHadoopIgfsSecondaryFileSystem(org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem) IgfsSecondaryFileSystem(org.apache.ignite.igfs.secondary.IgfsSecondaryFileSystem) IgniteHadoopIgfsSecondaryFileSystem(org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem) Ignite(org.apache.ignite.Ignite)

Aggregations

IgniteHadoopIgfsSecondaryFileSystem (org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem)7 FileSystemConfiguration (org.apache.ignite.configuration.FileSystemConfiguration)5 CachingHadoopFileSystemFactory (org.apache.ignite.hadoop.fs.CachingHadoopFileSystemFactory)3 Configuration (org.apache.hadoop.conf.Configuration)1 Ignite (org.apache.ignite.Ignite)1 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)1 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)1 ChainedUserNameMapper (org.apache.ignite.hadoop.util.ChainedUserNameMapper)1 KerberosUserNameMapper (org.apache.ignite.hadoop.util.KerberosUserNameMapper)1 IgfsIpcEndpointConfiguration (org.apache.ignite.igfs.IgfsIpcEndpointConfiguration)1 IgfsSecondaryFileSystem (org.apache.ignite.igfs.secondary.IgfsSecondaryFileSystem)1