您的位置:首页 > 教育 > 培训 > 品牌设计法则_站内优化怎么做_新手怎么学电商运营_互联网广告联盟

品牌设计法则_站内优化怎么做_新手怎么学电商运营_互联网广告联盟

2025/5/10 14:46:34 来源:https://blog.csdn.net/zhixingheyi_tian/article/details/143621424  浏览:    关键词:品牌设计法则_站内优化怎么做_新手怎么学电商运营_互联网广告联盟
品牌设计法则_站内优化怎么做_新手怎么学电商运营_互联网广告联盟

SQLMetric

Spark Plan 包含以下基本 方法,

  /*** @return All metrics containing metrics of this SparkPlan.*/def metrics: Map[String, SQLMetric] = Map.empty
  /*** @return [[SQLMetric]] for the `name`.*/def longMetric(name: String): SQLMetric = metrics(name)
BytesToBytesMap
public final class BytesToBytesMap extends MemoryConsumer {
  /*** Returns the average number of probes per key lookup.*/public double getAvgHashProbesPerKey() {return (1.0 * numProbes) / numKeyLookups;}
  /*** Looks up a key, and saves the result in provided `loc`.** This is a thread-safe version of `lookup`, could be used by multiple threads.*/public void safeLookup(Object keyBase, long keyOffset, int keyLength, Location loc, int hash) {assert(longArray != null);numKeyLookups++;int pos = hash & mask;int step = 1;while (true) {numProbes++;if (longArray.get(pos * 2) == 0) {// This is a new key.loc.with(pos, hash, false);return;} else {long stored = longArray.get(pos * 2 + 1);if ((int) (stored) == hash) {// Full hash code matches.  Let's compare the keys for equality.loc.with(pos, hash, true);if (loc.getKeyLength() == keyLength) {final boolean areEqual = ByteArrayMethods.arrayEquals(keyBase,keyOffset,loc.getKeyBase(),loc.getKeyOffset(),keyLength);if (areEqual) {return;}}}}pos = (pos + step) & mask;step++;}}

这里, hashprobe 本质上就是一个 hash lookup 的过程

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com