Package com.asakusafw.runtime.util.hadoop

Examples of com.asakusafw.runtime.util.hadoop.ConfigurationProvider


     * Initializes the test.
     * @throws Exception if some errors were occurred
     */
    @Before
    public void setUp() throws Exception {
        hadoopConf = new ConfigurationProvider().newInstance();
    }
View Full Code Here


     * Initializes the test.
     * @throws Exception if some errors were occurred
     */
    @Before
    public void setUp() throws Exception {
        conf = new ConfigurationProvider().newInstance();
        working = new Path(temp.getRoot().toURI());
        fs = FileSystem.get(working.toUri(), conf);
        Assume.assumeThat(working.toString(), is(not(containsString(" "))));
    }
View Full Code Here

    /**
     * インスタンスを生成する。
     * @return 生成したインスタンス
     */
    public static HadoopDriver createInstance() {
        return new HadoopDriver(new ConfigurationProvider());
    }
View Full Code Here

     * @throws Exception if failed
     */
    @Test
    public void simple() throws Exception {
        File cacheRepo = folder.newFolder();
        Configuration configuration = new ConfigurationProvider().newInstance();
        LockProvider<Path> locks = new LocalFileLockProvider<Path>(folder.newFolder());
        RetryStrategy retrier = new ConstantRetryStrategy();
        HadoopFileCacheRepository cache = new HadoopFileCacheRepository(configuration, path(cacheRepo), locks, retrier);

        File source = put(folder.newFile(), "Hello, world!");
View Full Code Here

     * @throws Exception if failed
     */
    @Test
    public void update() throws Exception {
        File cacheRepo = folder.newFolder();
        Configuration configuration = new ConfigurationProvider().newInstance();
        LockProvider<Path> locks = new LocalFileLockProvider<Path>(folder.newFolder());
        RetryStrategy retrier = new ConstantRetryStrategy();
        HadoopFileCacheRepository cache = new HadoopFileCacheRepository(configuration, path(cacheRepo), locks, retrier);

        File source = put(folder.newFile(), "Hello, world!");
View Full Code Here

     * @throws Exception if failed
     */
    @Test
    public void cached() throws Exception {
        File cacheRepo = folder.newFolder();
        Configuration configuration = new ConfigurationProvider().newInstance();
        LockProvider<Path> locks = new LocalFileLockProvider<Path>(folder.newFolder());
        RetryStrategy retrier = new ConstantRetryStrategy();
        HadoopFileCacheRepository cache = new HadoopFileCacheRepository(configuration, path(cacheRepo), locks, retrier);

        File source = put(folder.newFile(), "Hello, world!");
View Full Code Here

            output.close();
        }

        final Path path = path(source);
        File cacheRepo = folder.newFolder();
        Configuration configuration = new ConfigurationProvider().newInstance();
        LockProvider<Path> locks = new LocalFileLockProvider<Path>(folder.newFolder());
        RetryStrategy retrier = new ConstantRetryStrategy(30, 100, 200);
        final FileCacheRepository cache = new HadoopFileCacheRepository(configuration, path(cacheRepo), locks, retrier);

        List<Future<Path>> futures = new ArrayList<Future<Path>>();
View Full Code Here

     * Simple case for record readers.
     * @throws Exception if failed
     */
    @Test
    public void reader_simple() throws Exception {
        Configuration conf = new ConfigurationProvider().newInstance();
        FileStatus stat = write(conf, 1);
        RecordReader<NullWritable, Text> reader = TemporaryInputFormat.createRecordReader();
        try {
            reader.initialize(
                    new FileSplit(stat.getPath(), 0, stat.getLen(), null),
View Full Code Here

    @SuppressWarnings("deprecation")
    @Before
    public void setUp() throws Exception {
        UnitTestUtil.startUp();
        remote.initialize("target", "tester");
        remote.setConf(new ConfigurationProvider().newInstance());
        ConfigurationLoader.getProperty().setProperty(
                Constants.PROP_KEY_BASE_PATH,
                folder.getRoot().getAbsoluteFile().toURI().toString());
        info1 = new LocalCacheInfo(
                "testing1",
View Full Code Here

    @SuppressWarnings("deprecation")
    @Before
    public void setUp() throws Exception {
        UnitTestUtil.startUp();
        remote.initialize("target", "batch", "flow", "exec", "tester");
        remote.setConf(new ConfigurationProvider().newInstance());
        ConfigurationLoader.getProperty().setProperty(
                Constants.PROP_KEY_BASE_PATH,
                folder.getRoot().getAbsoluteFile().toURI().toString());
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.runtime.util.hadoop.ConfigurationProvider

Copyright © 2018 www.massapicom. 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.