private static <TNode extends AvlNode> TNode rotateRight(TNode p) {
      TNode q = (TNode) p.avlLeft;
      p.avlLeft = q.avlRight;
      q.avlRight = p;
      fixHeight(p);
      fixHeight(q);
      return q;
    }
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