client = new RestRepository(settings);
}
try {
if (!client.indexExists(false)) {
client.close();
throw new EsHadoopIllegalArgumentException(String.format("Target index [%s] does not exist and auto-creation is disabled [setting '%s' is '%s']",
settings.getResourceWrite(), ConfigurationOptions.ES_INDEX_AUTO_CREATE, settings.getIndexAutoCreate()));
}
} catch (IOException ex) {
throw new EsHadoopIllegalStateException("Cannot check index existance", ex);
}