code: @Override
      public Integer getMasterPartition(byte[] key) {
          return abs(hash.hash(key)) % (Math.max(1, this.partitionToNode.length));
      }
docs: Obtain the master partition for a given key
  
  @param key
  @return master partition id