Github user patrickstuedi commented on a diff in the pull request:
https://github.com/apache/incubator-crail/pull/6#discussion_r170575242
--- Diff: namenode/src/main/java/org/apache/crail/namenode/TableBlocks.java
---
@@ -34,6 +35,10 @@ public AbstractNode putChild(AbstractNode child) throws
Exception {
throw new Exception("Attempt to create key/value pair
in container other than a table");
}
- return children.put(child.getComponent(), child);
+ AbstractNode oldNode = children.put(child.getComponent(),
child);
+ if (child.isEnumerable()) {
+
child.setDirOffset(dirOffsetCounter.getAndAdd(CrailConstants.DIRECTORY_RECORD));
--- End diff --
I'm also not a big fan of protected variable, but in this case I prefer the
protected over adding another method that has a similar name and similar
functionality than setDirOffset that already exists.
---