Generate the next valid block group ID by incrementing the maximum block
group ID allocated so far, with the first 2^10 block group IDs reserved.
HDFS-EC introduces a hierarchical protocol to name blocks and groups:
Contiguous: {reserved block IDs | flag | block ID}
Striped: {reserved block IDs | flag | block group ID | index in group}
Following n bits of reserved block IDs, The (n+1)th bit in an ID
distinguishes contiguous (0) and striped (1) blocks. For a striped block,
bits (n+2) to (64-m) represent the ID of its block group, while the last m
bits represent its index of the group. The value m is determined by the
maximum number of blocks in a group (MAX_BLOCKS_IN_GROUP).
Note that the
nextValue() methods requires external lock to
guarantee IDs have no conflicts.