Package com.asakusafw.runtime.directio

Examples of com.asakusafw.runtime.directio.DirectDataSourceProfile


    public void convert_unknown_properties() throws Exception {
        Configuration conf = new Configuration();
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put(KEY_PATH, folder.getRoot().getCanonicalFile().toURI().toString());
        attributes.put("__INVALID__", "value");
        DirectDataSourceProfile profile = new DirectDataSourceProfile(
                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        HadoopDataSourceProfile.convert(profile, conf);
View Full Code Here


        conf.set(key("root", "path"), "/");

        List<DirectDataSourceProfile> profiles = HadoopDataSourceUtil.loadProfiles(conf);
        assertThat(profiles.size(), is(1));

        DirectDataSourceProfile profile = find(profiles, "");
        assertThat(profile.getTargetClass(), equalTo((Object) MockHadoopDataSource.class));
        assertThat(profile.getAttributes(), is(map()));
    }
View Full Code Here

        conf.set(key("root", "path"), "example/path");

        List<DirectDataSourceProfile> profiles = HadoopDataSourceUtil.loadProfiles(conf);
        assertThat(profiles.size(), is(1));

        DirectDataSourceProfile profile = find(profiles, "example/path");
        assertThat(profile.getTargetClass(), equalTo((Object) MockHadoopDataSource.class));
        assertThat(profile.getAttributes(), is(map()));
    }
View Full Code Here

        conf.set(key("root", "hello3"), "world3");

        List<DirectDataSourceProfile> profiles = HadoopDataSourceUtil.loadProfiles(conf);
        assertThat(profiles.size(), is(1));

        DirectDataSourceProfile profile = find(profiles, "");
        assertThat(profile.getTargetClass(), equalTo((Object) MockHadoopDataSource.class));
        assertThat(profile.getAttributes(), is(map("hello1", "world1", "hello2", "world2", "hello3", "world3")));
    }
View Full Code Here

        conf.set(key("c", "path"), "ccc");

        List<DirectDataSourceProfile> profiles = HadoopDataSourceUtil.loadProfiles(conf);
        assertThat(profiles.size(), is(3));

        DirectDataSourceProfile a = find(profiles, "aaa");
        assertThat(a.getTargetClass(), equalTo((Object) MockHadoopDataSource.class));
        assertThat(a.getAttributes(), is(map()));

        DirectDataSourceProfile b = find(profiles, "bbb");
        assertThat(b.getTargetClass(), equalTo((Object) MockHadoopDataSource.class));
        assertThat(b.getAttributes(), is(map()));

        DirectDataSourceProfile c = find(profiles, "ccc");
        assertThat(c.getTargetClass(), equalTo((Object) MockHadoopDataSource.class));
        assertThat(c.getAttributes(), is(map()));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.runtime.directio.DirectDataSourceProfile

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.