public BucketId toBucketId() {
        /*
         * Explanation time: since Java was designed so mankind could suffer,
         * shift ops on bytes have an implicit int conversion with sign-extend.
         * When a byte is negative, you end up with an int/long with a 0xFFFFFF
         * prefix, in turn causing your other friendly bitwise ORs to act
         * pretty far from what was originally intended.
         * To get around this, we explicitly sign extend before the compiler can
         * do so for us and make sure to OR away any sign extensions.
         */
        long location = ((long)raw[0] & 0xFF)
                | (((long)raw[1] & 0xFF) << 8)
                | (((long)raw[2] & 0xFF) << 16)
                | (((long)raw[3] & 0xFF) << 24);
        long md5 = 0;
        for (int i = 4, j = 0; i < LENGTH; i++, j += 8) {
            md5 |= ((long)raw[i] & 0xFF) << j;
        }
        // Drumroll: this is why 'location' is of type long. Otherwise, the
        // ORing would sign-extend it and cause havoc when its MSB is set.
        long rawBucketId = (md5 & 0xFFFFFFFF00000000L) | location;
        return new BucketId(58, rawBucketId);
    }
Returns the raw byte array that constitutes this global id.
The returned value MUST NOT be modified.
document/src/main/java/com/yahoo/document/GlobalId.java