Package com.pearson.entech.elasticsearch.plugin.approx.BytesRefUtils

Examples of com.pearson.entech.elasticsearch.plugin.approx.BytesRefUtils.Procedure


     * Switch from exact counting to estimation.
     */
    private void tip() {
        if(!_tipped) {
            _estimator = _builder.build();
            process(_counter, new Procedure() {
                @Override
                public void consume(final BytesRef ref) {
                    _estimator.offerHashed(__luceneMurmurHash.hash(ref));
                }
            });
View Full Code Here


            out.writeInt(_tippingPoint);
            out.writeObject(_builder);
            out.writeInt(_counter.size());
            out.writeInt(_longestBytesRefSize);

            process(_counter, new Procedure() {
                @Override
                public void consume(final BytesRef ref) throws IOException {
                    out.writeInt(ref.length);
                    out.write(ref.bytes, ref.offset, ref.length);
                }
View Full Code Here

            if(untippedSize > 0) {

                merged = untipped.get(0);
                for(int i = 1; i < untippedSize; i++) {
                    final CountThenEstimateBytes cte = untipped.get(i);
                    process(cte._counter, new Procedure() {
                        @Override
                        public void consume(final BytesRef ref) throws Exception {
                            merged.offerBytesRef(ref);
                        }
                    });
View Full Code Here

TOP

Related Classes of com.pearson.entech.elasticsearch.plugin.approx.BytesRefUtils.Procedure

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.