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()); final ContainerClass container = strategy.deserializeContainer(child.getData());
ContainerHolder oldContainer = containers.get(containerKey); log.info("Container[%s] updated.", child.getPath());
if (oldContainer == null) { ContainerHolder holder = containers.get(containerKey);
if (holder == null) {
log.warn("Container update[%s], but the old container didn't exist!? Ignoring.", child.getPath()); log.warn("Container update[%s], but the old container didn't exist!? Ignoring.", child.getPath());
} else { } else {
synchronized (oldContainer) { synchronized (holder) {
oldContainer.setContainer(strategy.updateContainer(oldContainer.getContainer(), container)); holder.setContainer(strategy.updateContainer(holder.getContainer(), container));
} }
} }

View File

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