more inventory logs

This commit is contained in:
Xavier Léauté 2014-12-15 13:19:47 -08:00
parent 9c6e32fc3f
commit e166260f80
2 changed files with 6 additions and 4 deletions

View File

@ -263,12 +263,13 @@ public class CuratorInventoryManager<ContainerClass, InventoryClass>
final ContainerClass container = strategy.deserializeContainer(child.getData());
ContainerHolder oldContainer = containers.get(containerKey);
if (oldContainer == null) {
log.info("Container[%s] updated.", child.getPath());
ContainerHolder holder = containers.get(containerKey);
if (holder == null) {
log.warn("Container update[%s], but the old container didn't exist!? Ignoring.", child.getPath());
} else {
synchronized (oldContainer) {
oldContainer.setContainer(strategy.updateContainer(oldContainer.getContainer(), container));
synchronized (holder) {
holder.setContainer(strategy.updateContainer(holder.getContainer(), container));
}
}

View File

@ -121,6 +121,7 @@ public class BatchDataSegmentAnnouncer extends AbstractDataSegmentAnnouncer
{
final SegmentZNode segmentZNode = segmentLookup.remove(segment);
if (segmentZNode == null) {
log.warn("No path to unannounce segment[%s]", segment.getIdentifier());
return;
}