Examples of HashFunction


Examples of lupos.engine.operators.multiinput.join.HashFunction

    this.operators = operators;
    this.col = col;
    for (final MultiInputOperator join : operators) {
      join.setSucceedingOperator(new OperatorIDTuple(col, 0));
    }
    this.hashFun = new HashFunction();
    this.threadList = new ArrayList<ParallelJoiner>(operators.size());
    this.optional = optional;
  }
View Full Code Here

Examples of orestes.bloomfilter.HashProvider.HashFunction

    public static void testDistribution(HashMethod hm, int hashesPerRound, int m, int k, int rounds,
                                        List<List<byte[]>> hashData, StringBuilder chi, StringBuilder pvalue) {
        DescriptiveStatistics pValues = new DescriptiveStatistics();
        DescriptiveStatistics xs = new DescriptiveStatistics();

        HashFunction hf = hm.getHashFunction();
        int hashRounds = hashesPerRound / k;

        for (int i = 0; i < rounds; i++) {
            List<byte[]> data = hashData.get(i);

            long[] observed = new long[m];
            for (int j = 0; j < hashRounds; j++) {
                int[] hashes = hf.hash(data.get(j), m, k);
                for (int h : hashes) {
                    observed[h]++;
                }
            }
            //MemoryBFTest.plotHistogram(observed, hm.toString());
View Full Code Here

Examples of orestes.bloomfilter.HashProvider.HashFunction

  }

  public static String testSpeed(HashMethod hm, List<List<byte[]>> hashData, int hashesPerRound, int m, int k, int rounds) {
    DescriptiveStatistics speed = new DescriptiveStatistics();

        HashFunction hf = hm.getHashFunction();
        int hashRounds = hashesPerRound / k;

    Random r = new Random();
    for (int i = 0; i < rounds; i++) {
      List<byte[]> data = hashData.get(i);

      long start_hash = System.nanoTime();
      for (int i1 = 0; i1 < hashRounds; i1++) {
        int[] hashes = hf.hash(data.get(i1), m, k);
      }
      long end_hash = System.nanoTime();

      speed.addValue((1.0 * end_hash - start_hash) / 1000000);
    }
View Full Code Here

Examples of org.apache.hadoop.util.bloom.HashFunction

   */
  protected Filter(final int vectorSize, final int nbHash, final int hashType) {
    this.vectorSize = vectorSize;
    this.nbHash = nbHash;
    this.hashType = hashType;
    this.hash = new HashFunction(this.vectorSize, this.nbHash, this.hashType);
  }
View Full Code Here

Examples of org.apache.hadoop.util.bloom.HashFunction

      this.hashType = in.readByte();
    } else {
      throw new IOException("Unsupported version: " + ver);
    }
    this.vectorSize = in.readInt();
    this.hash = new HashFunction(this.vectorSize, this.nbHash, this.hashType);
  }
View Full Code Here

Examples of org.apache.hadoop.util.bloom.HashFunction

   */
  protected Filter(int vectorSize, int nbHash, int hashType) {
    this.vectorSize = vectorSize;
    this.nbHash = nbHash;
    this.hashType = hashType;
    this.hash = new HashFunction(this.vectorSize, this.nbHash, this.hashType);
  }
View Full Code Here

Examples of org.apache.hadoop.util.bloom.HashFunction

      this.hashType = in.readByte();
    } else {
      throw new IOException("Unsupported version: " + ver);
    }
    this.vectorSize = in.readInt();
    this.hash = new HashFunction(this.vectorSize, this.nbHash, this.hashType);
  }
View Full Code Here

Examples of org.apache.hadoop.util.bloom.HashFunction

   */
  protected Filter(int vectorSize, int nbHash, int hashType) {
    this.vectorSize = vectorSize;
    this.nbHash = nbHash;
    this.hashType = hashType;
    this.hash = new HashFunction(this.vectorSize, this.nbHash, this.hashType);
  }
View Full Code Here

Examples of org.apache.hadoop.util.bloom.HashFunction

      this.hashType = in.readByte();
    } else {
      throw new IOException("Unsupported version: " + ver);
    }
    this.vectorSize = in.readInt();
    this.hash = new HashFunction(this.vectorSize, this.nbHash, this.hashType);
  }
View Full Code Here

Examples of org.elasticsearch.cluster.routing.operation.hash.HashFunction

    }

    private int shardId(ClusterState clusterState, String index, String type, String id, @Nullable String routing) {
        final IndexMetaData indexMetaData = indexMetaData(clusterState, index);
        final Version createdVersion = indexMetaData.getCreationVersion();
        final HashFunction hashFunction = indexMetaData.getRoutingHashFunction();
        final boolean useType = indexMetaData.getRoutingUseType();

        final int hash;
        if (routing == null) {
            if (!useType) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.