Package com.asakusafw.runtime.directio

Examples of com.asakusafw.runtime.directio.DirectDataSourceProfile


                } else {
                    pathToKey.put(path, key);
                }
                Class<? extends AbstractDirectDataSource> aClass = conf.getClassByName(className)
                    .asSubclass(AbstractDirectDataSource.class);
                results.add(new DirectDataSourceProfile(key, aClass, path, config));
            }
            return results;
        } catch (ClassNotFoundException e) {
            throw new IllegalStateException(e);
        }
View Full Code Here


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

     * @throws Exception if failed
     */
    @Test(expected = IOException.class)
    public void convert_nopath() throws Exception {
        Map<String, String> attributes = new HashMap<String, String>();
        DirectDataSourceProfile profile = new DirectDataSourceProfile(
                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        Configuration conf = new Configuration();
View Full Code Here

     */
    @Test
    public void convert_relpath() throws Exception {
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put(KEY_PATH, "relative");
        DirectDataSourceProfile profile = new DirectDataSourceProfile(
                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        Configuration conf = new Configuration();
View Full Code Here

        attributes.put(KEY_OUTPUT_STAGING, "false");
        attributes.put(KEY_OUTPUT_STREAMING, "false");
        attributes.put(KEY_SPLIT_BLOCKS, "false");
        attributes.put(KEY_COMBINE_BLOCKS, "false");
        attributes.put(KEY_KEEPALIVE_INTERVAL, "12345");
        DirectDataSourceProfile profile = new DirectDataSourceProfile(
                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        Configuration conf = new Configuration();
View Full Code Here

        Configuration conf = new Configuration();
        conf.setClass("fs.mock.impl", MockFs.class, FileSystem.class);
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put(KEY_PATH, folder.getRoot().toURI().toString());
        attributes.put(KEY_TEMP, "mock://" + folder.getRoot().toURI().toString());
        DirectDataSourceProfile profile = new DirectDataSourceProfile(
                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        HadoopDataSourceProfile.convert(profile, conf);
View Full Code Here

    @Test(expected = IOException.class)
    public void convert_minSize_notInt() throws Exception {
        Configuration conf = new Configuration();
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put(KEY_MIN_FRAGMENT, "INVALID");
        DirectDataSourceProfile profile = new DirectDataSourceProfile(
                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        HadoopDataSourceProfile.convert(profile, conf);
View Full Code Here

    @Test(expected = IOException.class)
    public void convert_minSize_zero() throws Exception {
        Configuration conf = new Configuration();
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put(KEY_MIN_FRAGMENT, "0");
        DirectDataSourceProfile profile = new DirectDataSourceProfile(
                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        HadoopDataSourceProfile.convert(profile, conf);
View Full Code Here

    @Test(expected = IOException.class)
    public void convert_prefSize_notInt() throws Exception {
        Configuration conf = new Configuration();
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put(KEY_PREF_FRAGMENT, "INVALID");
        DirectDataSourceProfile profile = new DirectDataSourceProfile(
                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        HadoopDataSourceProfile.convert(profile, conf);
View Full Code Here

    @Test(expected = IOException.class)
    public void convert_prefSize_zero() throws Exception {
        Configuration conf = new Configuration();
        Map<String, String> attributes = new HashMap<String, String>();
        attributes.put(KEY_PREF_FRAGMENT, "0");
        DirectDataSourceProfile profile = new DirectDataSourceProfile(
                "testing",
                HadoopDataSource.class,
                "context",
                attributes);
        HadoopDataSourceProfile.convert(profile, conf);
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.