Class Hasher

java.lang.Object
com.linkedin.feathr.common.Hasher

public class Hasher extends Object
Generate hash for a tensor based on column types and values stored in the tensor. This hash should be same for all tensor instances with same column types and values even if they are implemented differently under the hood.
  • Field Details

    • INSTANCE

      public static final Hasher INSTANCE
  • Constructor Details

    • Hasher

      public Hasher()
  • Method Details

    • apply

      public int apply(TensorData tensorData, boolean dimOnly)
      Get hash for tensorData optionally excluding value columns
      Parameters:
      tensorData - input tensorData for hash is to be computed
      dimOnly - if true, only dimensions (non-value columns) are use in computation
      Returns:
      hash for the tensor
    • getHash

      public static int getHash(ReadableTuple readableTuple, int numCols)