org.apache.flink.streaming.runtime.operators.windowing.KeyMap.getLog2TableCapacity()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中org.apache.flink.streaming.runtime.operators.windowing.KeyMap.getLog2TableCapacity()方法的一些代码示例,展示了KeyMap.getLog2TableCapacity()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyMap.getLog2TableCapacity()方法的具体详情如下:
包路径:org.apache.flink.streaming.runtime.operators.windowing.KeyMap
类名称:KeyMap
方法名:getLog2TableCapacity

KeyMap.getLog2TableCapacity介绍

[英]Gets the base-2 logarithm of the hash table capacity, as returned by #getCurrentTableCapacity().
[中]获取哈希表容量的以2为底的对数,由#getCurrentTableCapacity()返回。

代码示例

代码示例来源:origin: apache/flink

@Override
  public int compare(KeyMap<?, ?> o1, KeyMap<?, ?> o2) {
    // this sorts descending
    int cmp = o2.getLog2TableCapacity() - o1.getLog2TableCapacity();
    if (cmp != 0) {
      return cmp;
    }
    else {
      return o2.size() - o1.size();
    }
  }
}

代码示例来源:origin: apache/flink

assertEquals(6, map.getLog2TableCapacity());
assertEquals(24, map.getShift());
assertEquals(48, map.getRehashThreshold());
assertEquals(6, map.getLog2TableCapacity());
assertEquals(24, map.getShift());
assertEquals(48, map.getRehashThreshold());
assertEquals(6, map.getLog2TableCapacity());
assertEquals(24, map.getShift());
assertEquals(48, map.getRehashThreshold());
assertEquals(6, map.getLog2TableCapacity());
assertEquals(24, map.getShift());
assertEquals(48, map.getRehashThreshold());
assertEquals(6, map.getLog2TableCapacity());
assertEquals(24, map.getShift());
assertEquals(48, map.getRehashThreshold());
assertEquals(7, map.getLog2TableCapacity());
assertEquals(23, map.getShift());
assertEquals(96, map.getRehashThreshold());
assertEquals(9, map.getLog2TableCapacity());
assertEquals(21, map.getShift());
assertEquals(384, map.getRehashThreshold());
assertEquals(7, map.getLog2TableCapacity());

代码示例来源:origin: org.apache.flink/flink-streaming-java_2.10

@Override
  public int compare(KeyMap<?, ?> o1, KeyMap<?, ?> o2) {
    // this sorts descending
    int cmp = o2.getLog2TableCapacity() - o1.getLog2TableCapacity();
    if (cmp != 0) {
      return cmp;
    }
    else {
      return o2.size() - o1.size();
    }
  }
}

代码示例来源:origin: org.apache.flink/flink-streaming-java

@Override
  public int compare(KeyMap<?, ?> o1, KeyMap<?, ?> o2) {
    // this sorts descending
    int cmp = o2.getLog2TableCapacity() - o1.getLog2TableCapacity();
    if (cmp != 0) {
      return cmp;
    }
    else {
      return o2.size() - o1.size();
    }
  }
}

代码示例来源:origin: org.apache.flink/flink-streaming-java_2.11

@Override
  public int compare(KeyMap<?, ?> o1, KeyMap<?, ?> o2) {
    // this sorts descending
    int cmp = o2.getLog2TableCapacity() - o1.getLog2TableCapacity();
    if (cmp != 0) {
      return cmp;
    }
    else {
      return o2.size() - o1.size();
    }
  }
}

相关文章