Package org.elasticsearch.gateway.local.state.meta

Examples of org.elasticsearch.gateway.local.state.meta.CorruptStateException


                        if (VERSION_KEY.equals(currentFieldName)) {
                            version = parser.longValue();
                        } else if (PRIMARY_KEY.equals(currentFieldName)) {
                            primary = parser.booleanValue();
                        } else {
                            throw new CorruptStateException("unexpected field in shard state [" + currentFieldName + "]");
                        }
                    } else {
                        throw new CorruptStateException("unexpected token in shard state [" + token.name() + "]");
                    }
                }
                if (primary == null) {
                    throw new CorruptStateException("missing value for [primary] in shard state");
                }
                if (version == -1) {
                    throw new CorruptStateException("missing value for [version] in shard state");
                }
                return new ShardStateInfo(version, primary);
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.gateway.local.state.meta.CorruptStateException

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.