public void markWorkingIndexes(Set<String> updatedIndexPaths) { indexerCycleCount++; for (String indexPath : updatedIndexPaths){ CorruptIndexInfo info = indexes.remove(indexPath); if (info != null){ log.info("Index at [{}] which was so far failing {} is now working again.", info.path, info.getStats()); } } if (meter != null && !indexes.isEmpty()) { meter.mark(indexes.size()); } }
public void markWorkingIndexes(Set<String> updatedIndexPaths) { indexerCycleCount++; for (String indexPath : updatedIndexPaths){ CorruptIndexInfo info = indexes.remove(indexPath); if (info != null){ log.info("Index at [{}] which was so far failing {} is now working again.", info.path, info.getStats()); } } if (meter != null && !indexes.isEmpty()) { meter.mark(indexes.size()); } }
public void markWorkingIndexes(Set<String> updatedIndexPaths) { indexerCycleCount++; for (String indexPath : updatedIndexPaths){ CorruptIndexInfo info = indexes.remove(indexPath); if (info != null){ log.info("Index at [{}] which was so far failing {} is now working again.", info.path, info.getStats()); } } }
CompositeDataSupport toCompositeData() { Object[] values = new Object[]{ info.path, info.getStats(), info.isMarkedAsCorrupt(), String.format("%tc", info.getCorruptSinceAsCal().getTimeInMillis()), info.getLastException(), }; try { return new CompositeDataSupport(TYPE, FIELD_NAMES, values); } catch (OpenDataException e) { throw new IllegalStateException(e); } } }
CompositeDataSupport toCompositeData() { Object[] values = new Object[]{ info.path, info.getStats(), info.isMarkedAsCorrupt(), String.format("%tc", info.getCorruptSinceAsCal().getTimeInMillis()), info.getLastException(), }; try { return new CompositeDataSupport(TYPE, FIELD_NAMES, values); } catch (OpenDataException e) { throw new IllegalStateException(e); } } }
private void markFailingIndexesAsCorrupt(NodeBuilder builder) { for (Map.Entry<String, CorruptIndexInfo> index : corruptIndexHandler.getCorruptIndexData(name).entrySet()){ NodeBuilder indexBuilder = childBuilder(builder, index.getKey()); CorruptIndexInfo info = index.getValue(); if (!indexBuilder.hasProperty(IndexConstants.CORRUPT_PROPERTY_NAME)){ String corruptSince = ISO8601.format(info.getCorruptSinceAsCal()); indexBuilder.setProperty( PropertyStates.createProperty(IndexConstants.CORRUPT_PROPERTY_NAME, corruptSince, Type.DATE)); log.info("Marking [{}] as corrupt. The index is failing {}", info.getPath(), info.getStats()); } else { log.debug("Failing index at [{}] is already marked as corrupt. The index is failing {}", info.getPath(), info.getStats()); } } }
CompositeDataSupport toCompositeData() { Object[] values = new Object[]{ info.path, info.getStats(), info.isMarkedAsCorrupt(), String.format("%tc", info.getCorruptSinceAsCal().getTimeInMillis()), info.getLastException(), }; try { return new CompositeDataSupport(TYPE, FIELD_NAMES, values); } catch (OpenDataException e) { throw new IllegalStateException(e); } } }
private void markFailingIndexesAsCorrupt(NodeBuilder builder) { for (Map.Entry<String, CorruptIndexInfo> index : corruptIndexHandler.getCorruptIndexData(name).entrySet()){ NodeBuilder indexBuilder = childBuilder(builder, index.getKey()); CorruptIndexInfo info = index.getValue(); if (!indexBuilder.hasProperty(IndexConstants.CORRUPT_PROPERTY_NAME)){ String corruptSince = ISO8601.format(info.getCorruptSinceAsCal()); indexBuilder.setProperty( PropertyStates.createProperty(IndexConstants.CORRUPT_PROPERTY_NAME, corruptSince, Type.DATE)); log.info("Marking [{}] as corrupt. The index is failing {}", info.getPath(), info.getStats()); } else { log.debug("Failing index at [{}] is already marked as corrupt. The index is failing {}", info.getPath(), info.getStats()); } } }
private void markFailingIndexesAsCorrupt(NodeBuilder builder) { for (Map.Entry<String, CorruptIndexInfo> index : corruptIndexHandler.getCorruptIndexData(name).entrySet()){ NodeBuilder indexBuilder = childBuilder(builder, index.getKey()); CorruptIndexInfo info = index.getValue(); if (!indexBuilder.hasProperty(IndexConstants.CORRUPT_PROPERTY_NAME)){ String corruptSince = ISO8601.format(info.getCorruptSinceAsCal()); indexBuilder.setProperty( PropertyStates.createProperty(IndexConstants.CORRUPT_PROPERTY_NAME, corruptSince, Type.DATE)); log.info("Marking [{}] as corrupt. The index is failing {}", info.getPath(), info.getStats()); } else { log.debug("Failing index at [{}] is already marked as corrupt. The index is failing {}", info.getPath(), info.getStats()); } } }
@Override public boolean skippingCorruptIndex(String async, String indexPath, Calendar corruptSince) { CorruptIndexInfo info = getOrCreateInfo(async, indexPath); if (info.skippedIndexing(checkNotNull(corruptSince))) { log.warn("Ignoring corrupt index [{}] which has been marked as corrupt [{}]. This index " + "MUST be reindexed for indexing to work properly", indexPath, info.getStats()); return true; } return false; }
@Override public boolean skippingCorruptIndex(String async, String indexPath, Calendar corruptSince) { CorruptIndexInfo info = getOrCreateInfo(async, indexPath); if (info.skippedIndexing(checkNotNull(corruptSince))) { log.warn("Ignoring corrupt index [{}] which has been marked as corrupt [{}]. This index " + "MUST be reindexed for indexing to work properly", indexPath, info.getStats()); return true; } return false; }
@Override public boolean skippingCorruptIndex(String async, String indexPath, Calendar corruptSince) { CorruptIndexInfo info = getOrCreateInfo(async, indexPath); if (info.skippedIndexing(checkNotNull(corruptSince))) { log.warn("Ignoring corrupt index [{}] which has been marked as corrupt [{}]. This index " + "MUST be reindexed for indexing to work properly", indexPath, info.getStats()); return true; } return false; }