Examples of CountOutputStream


Examples of com.asakusafw.runtime.directio.util.CountOutputStream

                FileSystem fileSystem,
                Path path,
                Counter counter) throws IOException, InterruptedException {
            FileSystem fs = FileSystem.get(path.toUri(), getConf());
            FSDataOutputStream out = fs.create(path);
            return format.createOutput(dataType, path.toString(), new CountOutputStream(out, counter));
        }
View Full Code Here

Examples of com.asakusafw.runtime.directio.util.CountOutputStream

            final Path path,
            Counter counter) throws IOException, InterruptedException {
        FSDataOutputStream stream = fileSystem.create(path);
        boolean succeed = false;
        try {
            CountOutputStream cstream;
            if (LOG.isDebugEnabled()) {
                cstream = new CountOutputStream(stream, counter) {
                    @Override
                    public void close() throws IOException {
                        LOG.debug(MessageFormat.format(
                                "Start closing output (file={0})",
                                path));
                        super.close();
                        LOG.debug(MessageFormat.format(
                                "Finish closing output (file={0})",
                                path));
                    }
                };
            } else {
                cstream = new CountOutputStream(stream, counter);
            }
            ModelOutput<T> output = streamFormat.createOutput(dataType, path.toString(), cstream);
            succeed = true;
            return output;
        } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.