Package org.elasticsearch.common.compress.lzf

Examples of org.elasticsearch.common.compress.lzf.LZFOutputStream


            try {
                File stateFile = new File(location, "metadata-" + version);
                OutputStream fos = new FileOutputStream(stateFile);
                if (compress) {
                    fos = new LZFOutputStream(fos);
                }
                LocalGatewayMetaState stateToWrite = builder.build();
                XContentBuilder xContentBuilder = XContentFactory.contentBuilder(XContentType.JSON, fos);
                if (prettyPrint) {
                    xContentBuilder.prettyPrint();
View Full Code Here


        final String newMetaData = "metadata-" + (currentIndex + 1);
        try {
            FastByteArrayOutputStream out = new FastByteArrayOutputStream();
            OutputStream os = out;
            if (compress) {
                os = new LZFOutputStream(os);
            }
            XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON, os);
            builder.startObject();
            MetaData.Builder.toXContent(metaData, builder, ToXContent.EMPTY_PARAMS);
            builder.endObject();
View Full Code Here

        @Override public void run() {
            try {
                File stateFile = new File(location, "shards-" + event.state().version());
                OutputStream fos = new FileOutputStream(stateFile);
                if (compress) {
                    fos = new LZFOutputStream(fos);
                }

                XContentBuilder xContentBuilder = XContentFactory.contentBuilder(XContentType.JSON, fos);
                if (prettyPrint) {
                    xContentBuilder.prettyPrint();
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.compress.lzf.LZFOutputStream

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.