Package org.apache.hadoop.hive.ql.io.orc.OrcFile

Examples of org.apache.hadoop.hive.ql.io.orc.OrcFile.WriterOptions


    @Override
    public ModelOutput<T> createOutput(
            Class<? extends T> dataType,
            FileSystem fileSystem, Path path,
            Counter counter) throws IOException, InterruptedException {
        WriterOptions options = OrcFile.writerOptions(getConf());
        options.fileSystem(fileSystem);
        options.inspector(new DataModelInspector(getDataModelDescriptor()));

        OrcFormatConfiguration conf = getFormatConfiguration();
        if (LOG.isDebugEnabled()) {
            LOG.debug(MessageFormat.format(
                    "ORCFile output ({0}): {1}",
                    path,
                    conf));
        }
        Version formatVersion = conf.getFormatVersion();
        if (formatVersion != null) {
            options.version(formatVersion);
        }
        CompressionKind compressionKind = conf.getCompressionKind();
        if (compressionKind != null) {
            options.compress(compressionKind);
        }
        Long stripeSize = conf.getStripeSize();
        if (stripeSize != null) {
            options.stripeSize(stripeSize);
        }

        return new OrcFileOutput<T>(getDataModelDescriptor(), path, options, counter);
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.io.orc.OrcFile.WriterOptions

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.