private static <TNode extends AvlNode> int height(TNode node) {
      return node != null ? node.avlHeight : 0;
    }
Visit each node of the tree
@param root    the current root of the tree
@param visitor the AvlNodeVisitor instance
hbase-common/src/main/java/org/apache/hadoop/hbase/util/AvlUtil.java