InputFormat for streaming data (typically based on a query) from ElasticSearch.OutputFormat (old and new API) for adding data to an index inside ElasticSearch.MapWritable expect that it uses a LinkedHashMap underneath to preserve insertion order (and thus its structure).