use of org.elasticsearch.action.admin.indices.warmer.delete.DeleteWarmerRequest in project LinkAgent by shulieTech.
the class DeleteWarmerRequestIndexRename method reindex0.
@Override
public List<String> reindex0(Object target) {
DeleteWarmerRequest req = (DeleteWarmerRequest) target;
String[] indices = req.indices();
for (int i = 0, len = indices.length; i < len; i++) {
String index = indices[i];
/**
* 如果在白名单中则不允许写
*/
if (GlobalConfig.getInstance().getSearchWhiteList().contains(index)) {
throw new PressureMeasureError("Cluster Test request can't delete index template ! " + index);
}
if (!Pradar.isClusterTestPrefix(index)) {
index = Pradar.addClusterTestPrefixLower(index);
indices[i] = index;
}
}
req.indices(indices);
return Arrays.asList(indices);
}
Aggregations