protected static Long convertUuidToLong(UUID uuid){
  if (uuid == null) {
    return null;
  }
  Long convertedUuid;
  if (uuid.version() == 1) {
    convertedUuid=uuid.timestamp();
  }
 else {
    convertedUuid=uuid.getMostSignificantBits();
  }
  return convertedUuid;
}

protected static Long convertUuidToLong ( UUID uuid ) { if ( uuid == null ) { return null ; } Long convertedUuid ; if ( uuid . version ( ) == 1 ) { convertedUuid = uuid . timestamp ( ) ; } else { convertedUuid = uuid . getMostSignificantBits ( ) ; } return convertedUuid ; }
converts a uuid to a long for bucketing purposes . order of input and output values is preserved as long .
