Examples of HadoopDataSourceProfile


Examples of com.asakusafw.runtime.directio.hadoop.HadoopDataSourceProfile

        conf.set(HadoopDataSourceUtil.KEY_SYSTEM_DIR, folder.newFolder("system").getAbsoluteFile().toURI().toString());
        temporary = folder.newFolder("temp").getCanonicalFile();
        production1 = folder.newFolder("p1").getCanonicalFile();
        production2 = folder.newFolder("p2").getCanonicalFile();

        HadoopDataSourceProfile profile1 = new HadoopDataSourceProfile(
                conf, "t1", "c1",
                new Path(production1.toURI()),
                new Path(new File(temporary, "t1").toURI()));
        HadoopDataSourceProfile profile2 = new HadoopDataSourceProfile(
                conf, "t2", "c2",
                new Path(production2.toURI()),
                new Path(new File(temporary, "t2").toURI()));
        repo = new DirectDataSourceRepository(Arrays.asList(
                new MockProvider(profile1),
View Full Code Here

Examples of com.asakusafw.runtime.directio.hadoop.HadoopDataSourceProfile

                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        Configuration conf = new Configuration();
        HadoopDataSourceProfile result = HadoopDataSourceProfile.convert(profile, conf);

        assertThat(result.getId(), is("testing"));
        assertThat(result.getContextPath(), is("context"));
        assertThat(result.getFileSystem().getUri().getScheme(), is("file"));
        assertThat(new File(result.getFileSystemPath().toUri()), is(folder.getRoot()));
        assertThat(new File(result.getTemporaryFileSystemPath().getParent().toUri()), is(folder.getRoot()));

        assertThat(result.isOutputStaging(), is(true));
        assertThat(result.isOutputStreaming(), is(true));
        assertThat(result.isCombineBlocks(), is(true));
        assertThat(result.isSplitBlocks(), is(true));
        assertThat(result.getKeepAliveInterval(), is(0L));
    }
View Full Code Here

Examples of com.asakusafw.runtime.directio.hadoop.HadoopDataSourceProfile

                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        Configuration conf = new Configuration();
        HadoopDataSourceProfile result = HadoopDataSourceProfile.convert(profile, conf);

        FileSystem defaultFs = FileSystem.get(conf);
        Path path = defaultFs.makeQualified(new Path(defaultFs.getWorkingDirectory(), "relative"));
        assertThat(result.getFileSystem().getCanonicalServiceName(), is(defaultFs.getCanonicalServiceName()));
        assertThat(result.getFileSystemPath(), is(path));
    }
View Full Code Here

Examples of com.asakusafw.runtime.directio.hadoop.HadoopDataSourceProfile

                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        Configuration conf = new Configuration();
        HadoopDataSourceProfile result = HadoopDataSourceProfile.convert(profile, conf);

        assertThat(result.getId(), is("testing"));
        assertThat(result.getContextPath(), is("context"));
        assertThat(result.getFileSystem().getUri().getScheme(), is("file"));
        assertThat(new File(result.getFileSystemPath().toUri()), is(prod));
        assertThat(new File(result.getTemporaryFileSystemPath().toUri()), is(temp));

        assertThat(result.getMinimumFragmentSize(new MockFormat(9999, -1)), is(123L));
        assertThat(result.getMinimumFragmentSize(new MockFormat(100, -1)), is(100L));
        assertThat(result.getMinimumFragmentSize(new MockFormat(-1, -1)), is(lessThan(0L)));

        assertThat(result.getPreferredFragmentSize(new MockFormat(9999, -1)), is(1234L));
        assertThat(result.getPreferredFragmentSize(new MockFormat(9999, 234)), is(234L));
        assertThat(result.getPreferredFragmentSize(new MockFormat(-1, -1)), is(lessThan(0L)));

        assertThat(result.isOutputStaging(), is(false));
        assertThat(result.isOutputStreaming(), is(false));
        assertThat(result.isCombineBlocks(), is(false));
        assertThat(result.isSplitBlocks(), is(false));
        assertThat(result.getKeepAliveInterval(), is(12345L));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.