예제 #1
0
def getUserLogicalShardId(id):
    global logicalShardIdMask
    return guoid_hash(id) & logicalShardIdMask
예제 #2
0
def getWorkerIdFor(ip):
    global workerIdMask
    return guoid_hash(ip) & workerIdMask