}
@SuppressWarnings("rawtypes")
private boolean retryFailedEntries(InputStream content, TrackingBytesArray data) {
try {
ObjectReader r = JsonFactory.objectReader(mapper, Map.class);
JsonParser parser = mapper.getJsonFactory().createJsonParser(content);
try {
if (ParsingUtils.seek("items", new JacksonJsonParser(parser)) == null) {
// recorded bytes are ack here
stats.bytesAccepted += data.length();
stats.docsAccepted += data.entries();
return false;
}
} finally {
countStreamStats(content);
}
int entryToDeletePosition = 0; // head of the list
for (Iterator<Map> iterator = r.readValues(parser); iterator.hasNext();) {
Map map = iterator.next();
Map values = (Map) map.values().iterator().next();
String error = (String) values.get("error");
if (error != null) {
// status - introduced in 1.0.RC1