Package org.elasticsearch

Examples of org.elasticsearch.ElasticSearchIllegalStateException


            assert encoded[encoded.length - 1] == '=';
            assert encoded[encoded.length - 2] == '=';
            // we always have padding of two at the end, encode it differently
            return new String(encoded, 0, encoded.length - 2, Base64.PREFERRED_ENCODING);
        } catch (IOException e) {
            throw new ElasticSearchIllegalStateException("should not be thrown");
        }
    }
View Full Code Here


        try {
            for (Entry entry : entries) {
                entry.reader().reset();
            }
        } catch (IOException e) {
            throw new ElasticSearchIllegalStateException("should not happen");
        }
        it = entries.iterator();
        if (it.hasNext()) {
            current = it.next();
            itsSeparatorTime = true;
View Full Code Here

    public static byte[] decodeHex(char[] data) throws ElasticSearchIllegalStateException {

        int len = data.length;

        if ((len & 0x01) != 0) {
            throw new ElasticSearchIllegalStateException("Odd number of characters.");
        }

        byte[] out = new byte[len >> 1];

        // two characters form the hex value.
View Full Code Here

    }

    protected static int toDigit(char ch, int index) throws ElasticSearchIllegalStateException {
        int digit = Character.digit(ch, 16);
        if (digit == -1) {
            throw new ElasticSearchIllegalStateException("Illegal hexadecimal character " + ch + " at index " + index);
        }
        return digit;
    }
View Full Code Here

        public long version() {
            return this.version;
        }

        @Override public BytesHolder readSource(BytesStreamInput in) throws IOException {
            throw new ElasticSearchIllegalStateException("trying to read doc source from delete operation");
        }
View Full Code Here

        public String[] types() {
            return this.types;
        }

        @Override public BytesHolder readSource(BytesStreamInput in) throws IOException {
            throw new ElasticSearchIllegalStateException("trying to read doc source from delete_by_query operation");
        }
View Full Code Here

    protected Response newInstance() {
        try {
            return responseConstructor.newInstance();
        } catch (Exception e) {
            throw new ElasticSearchIllegalStateException("Failed to create a new instance");
        }
    }
View Full Code Here

        }
    }

    public static synchronized void addAddressType(TransportAddress address) throws Exception {
        if (addressConstructors.containsKey(address.uniqueAddressTypeId())) {
            throw new ElasticSearchIllegalStateException("Address [" + address.uniqueAddressTypeId() + "] already bound");
        }
        Constructor<? extends TransportAddress> constructor = address.getClass().getDeclaredConstructor();
        constructor.setAccessible(true);
        addressConstructors = newMapBuilder(addressConstructors).put(address.uniqueAddressTypeId(), constructor).immutableMap();
    }
View Full Code Here

            case FLOAT:
                return NumberType.FLOAT;
            case DOUBLE:
                return NumberType.DOUBLE;
        }
        throw new ElasticSearchIllegalStateException("No matching token for number_type [" + numberType + "]");
    }
View Full Code Here

            case END_ARRAY:
                return Token.END_ARRAY;
            case VALUE_EMBEDDED_OBJECT:
                return Token.VALUE_EMBEDDED_OBJECT;
        }
        throw new ElasticSearchIllegalStateException("No matching token for json_token [" + token + "]");
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.ElasticSearchIllegalStateException

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.