Github user asqasq commented on a diff in the pull request:
https://github.com/apache/incubator-crail/pull/6#discussion_r170576296
--- 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 would prefer to keep it simple and keep it protected, instead of adding a
new method for two reasons:
- A new method would increase code complexity
- The new method would also be inherited, either explicitly "protected" or
implicitly "package", so there would not be much of a gain, but comes at the
cost of higher code complexity.
---