Package com.asakusafw.runtime.io

Examples of com.asakusafw.runtime.io.ModelOutput


        DirectDataSource datasource = repository.getRelatedDataSource(path);
        String basePath = repository.getComponentPath(path);
        String resourcePath = variables.parse(group.getResourcePath());

        Counter counter = new Counter();
        ModelOutput output = datasource.openOutput(outputContext, definition, basePath, resourcePath, counter);

        long records = 0;
        try {
            for (Union union : values) {
                Object object = union.getObject();
                output.write(object);
                records++;
            }
        } finally {
            output.close();
        }
        recordCounter.increment(records);
        context.getCounter(COUNTER_GROUP, id + ".files").increment(1);
        context.getCounter(COUNTER_GROUP, id + ".records").increment(records);
        context.getCounter(COUNTER_GROUP, id + ".size").increment(counter.get());
View Full Code Here

TOP

Related Classes of com.asakusafw.runtime.io.ModelOutput

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.