Package com.asakusafw.compiler.flow

Examples of com.asakusafw.compiler.flow.Location


        source.write(ex1);
        source.close();

        assertThat(tester.runStages(info), is(true));

        Location resultLocation = etable.getSources().get(0);
        assertThat(resultLocation.isPrefix(), is(true));
        List<Ex1> results = tester.getList(Ex1.class, resultLocation);
        assertThat(results.size(), is(3));
        assertThat(results.get(0).getValue(), is(3));
        assertThat(results.get(1).getValue(), is(1));
        assertThat(results.get(2).getValue(), is(2));
View Full Code Here


        source.write(ex1);
        source.close();

        assertThat(tester.runStages(info), is(true));

        Location resultLocation = etable.getSources().get(0);
        assertThat(resultLocation.isPrefix(), is(true));
        List<Ex1> results = tester.getList(Ex1.class, resultLocation);
        assertThat(results.size(), is(3));
        assertThat(results.get(0).getValue(), is(3));
        assertThat(results.get(1).getValue(), is(1));
        assertThat(results.get(2).getValue(), is(2));
View Full Code Here

        String name = path.getName();
        return name.equals(FileOutputCommitter.SUCCEEDED_FILE_NAME) || name.equals("_logs");
    }

    private String computeInputPath(FileSystem fs, String tableName) {
        Location location = FlowPartDriverUtils.createInputLocation(driverContext, tableName);
        String path = new Path(fs.getWorkingDirectory(), location.toPath('/')).toString();
        return resolvePath(path);
    }
View Full Code Here

        String path = new Path(fs.getWorkingDirectory(), location.toPath('/')).toString();
        return resolvePath(path);
    }

    private String computeOutputPath(FileSystem fs, String tableName) {
        Location location = FlowPartDriverUtils.createOutputLocation(driverContext, tableName);
        String path = new Path(fs.getWorkingDirectory(), location.toPath('/')).toString();
        return resolvePath(path);
    }
View Full Code Here

            List<String> targetColumns = split(get(p, name + P_TSV_COLUMNS, true));
            String searchConditionOrNull = get(p, name + P_SEARCH_CONDITION, false);
            String cacheId = get(p, name + P_CACHE_ID, false);
            LockType lockType = LockType.idOf(get(p, name + P_LOCK_TYPE, true));
            LockedOperation lockedOperation = LockedOperation.idOf(get(p, name + P_LOCKED_OPERATION, true));
            Location destination = fromPath(get(p, name + P_DESTINATION, true));
            return new ImportTable(
                    modelClass,
                    name,
                    targetColumns,
                    searchConditionOrNull,
View Full Code Here

                valid = false;
                getEnvironment().error(
                        "{0}のパスが指定されていません",
                        desc.getClass().getName());
            } else {
                Location location = Location.fromPath(pathPrefix, '/');
                if (location.isPrefix() == false) {
                    valid = false;
                    getEnvironment().error(
                            "{0}はパスの接尾辞(-*)でなければなりません: {1}",
                            desc.getClass().getName(),
                            pathPrefix);
                }
                if (location.getParent() == null) {
                    valid = false;
                    getEnvironment().error(
                            "{0}には最低ひとつのディレクトリの指定が必要です: {1}",
                            desc.getClass().getName(),
                            pathPrefix);
                }
                if (VALID_OUTPUT_NAME.matcher(location.getName()).matches() == false) {
                    valid = false;
                    getEnvironment().error(
                            "{0}のファイル名(末尾のセグメント)は英数字のみ利用できます: {1}",
                            desc.getClass().getName(),
                            pathPrefix);
View Full Code Here

    @Override
    public SourceInfo getInputInfo(InputDescription description) {
        FileImporterDescription desc = extract(description);
        if (isCacheTarget(desc)) {
            String outputName = getProcessedInputName(description);
            Location location = getEnvironment().getPrologueLocation(MODULE_NAME).append(outputName).asPrefix();
            return new SourceInfo(Collections.singleton(location), TemporaryInputFormat.class);
        } else {
            return getOrifinalInputInfo(desc);
        }
    }
View Full Code Here

                return o1.getName().compareTo(o2.getName());
            }
        });
        for (Output output : context.getOutputs()) {
            FileExporterDescription desc = extract(output.getDescription());
            Location path = Location.fromPath(desc.getPathPrefix(), '/');
            Location parent = path.getParent();
            Maps.addToList(results, parent, toSlot(output, path.getName()));
        }
        return results;
    }
View Full Code Here

            throw new IllegalArgumentException("targetName must not be null"); //$NON-NLS-1$
        }
        if (tableName == null) {
            throw new IllegalArgumentException("tableName must not be null"); //$NON-NLS-1$
        }
        return new Location(null, "thundergate")
            .append("cache")
            .append(targetName)
            .append(tableName)
            .append(cacheId);
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.flow.Location

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.