# Migrating snappy compressed \_state files

**URL:** <https://discuss.elastic.co/t/migrating-snappy-compressed--state-files/15104>\
**Category:** Elasticsearch\
**Created:** [January 4, 2014, 1:25am UTC](https://discuss.elastic.co/t/migrating-snappy-compressed--state-files/15104 "2014-01-04T01:25:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_Holtzman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/josh_holtzman/32/1890_2.png) [@Josh\_Holtzman](https://discuss.elastic.co/u/Josh_Holtzman)\
**Post date:** [January 4, 2014, 1:25am UTC](https://discuss.elastic.co/t/migrating-snappy-compressed--state-files/15104/1 "2014-01-04T01:25:28Z")

</div>

I am upgrading a 0.19.9 cluster, first to 0.20.6, then to 0.90.9 in  
anticipation of the 1.0 release. The upgrade to 0.20.6 is smooth, but when  
starting up 0.90.9 my cluster loads some indices but not others. A  
representative stack trace is below.

It looks like the mappings are stored in \_state files using snappy  
compression. When 0.90.9 attempts to read these, it interprets these files  
as XContentType.SMILE binary format. A breakpoint at IndexMetaData  
fromXContent(XContentParser parser) shows the mapping looks like this:

snappyÄÄ ı™ 1{"_default_":{"analyzer":"myanalyzer","properties":{}}}

I've tried setting compress.default.type: lzf in 0.20.6, then flushing and  
optimizing before starting up 0.90.9, but these do not have any effect. I  
know snappy compression is no longer supported. Is there any way to  
migrate these state files to 0.90.9?

[2014-01-03 16:57:19,473][DEBUG][gateway.local.state.meta] [Anubis]  
[myindex]: failed to read  
[/path/to/elastic/cluster\_name/nodes/0/indices/myindex/\_state/state-403],  
ignoring...  
org.elasticsearch.common.jackson.core.JsonParseException: Invalid UTF-8  
start byte 0x80  
at [Source: [B@18c07930; line: 1, column: 9]  
at  
org.elasticsearch.common.jackson.core.JsonParser.\_constructError(JsonParser.java:1524)  
at  
org.elasticsearch.common.jackson.core.base.ParserMinimalBase.\_reportError(ParserMinimalBase.java:557)  
at  
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser.\_reportInvalidInitial(UTF8StreamJsonParser.java:3111)  
at  
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser.\_decodeCharForError(UTF8StreamJsonParser.java:2857)  
at  
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser.\_reportInvalidToken(UTF8StreamJsonParser.java:3089)  
at  
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser.\_handleUnexpectedValue(UTF8StreamJsonParser.java:2340)  
at  
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser.\_nextTokenNotInObject(UTF8StreamJsonParser.java:818)  
at  
org.elasticsearch.common.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:698)  
at  
org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:50)  
at  
org.elasticsearch.common.xcontent.support.AbstractXContentParser.readMap(AbstractXContentParser.java:194)  
at  
org.elasticsearch.common.xcontent.support.AbstractXContentParser.readOrderedMap(AbstractXContentParser.java:187)  
at  
org.elasticsearch.common.xcontent.support.AbstractXContentParser.mapOrdered(AbstractXContentParser.java:142)  
at  
org.elasticsearch.common.xcontent.support.AbstractXContentParser.mapOrderedAndClose(AbstractXContentParser.java:157)  
at  
org.elasticsearch.cluster.metadata.MappingMetaData.(MappingMetaData.java:275)  
at  
org.elasticsearch.cluster.metadata.IndexMetaData$Builder.fromXContent(IndexMetaData.java:650)  
at  
org.elasticsearch.gateway.local.state.meta.LocalGatewayMetaState.loadIndex(LocalGatewayMetaState.java:495)  
at  
org.elasticsearch.gateway.local.state.meta.LocalGatewayMetaState.loadState(LocalGatewayMetaState.java:455)  
at  
org.elasticsearch.gateway.local.state.meta.LocalGatewayMetaState.(LocalGatewayMetaState.java:145)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7b61c136-5dbd-4bcc-86c7-6c9bd972c281%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7b61c136-5dbd-4bcc-86c7-6c9bd972c281%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:58am UTC](https://discuss.elastic.co/t/migrating-snappy-compressed--state-files/15104/2 "2017-07-06T01:58:23Z")

</div>

Closed on July 6, 2017, 1:58am UTC


