当前位置: 首页 > news >正文

Spark Plan 之 SQLMetric

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 的过程

http://www.lryc.cn/news/482130.html

相关文章:

  • 基于YOLOv5模型的火焰识别系统
  • 多模态AI:开启人工智能的新纪元
  • 麒麟信安支撑2024年电力监控系统网络安全加固培训护航电力网络安全!
  • 横表和纵表 中的横表
  • 7个常用的JavaScript数组操作进阶用法
  • Spark的Standalone集群环境安装
  • Android Glide动态apply centerCropTransform(),transition withCrossFade动画,Kotlin
  • shukla方差和相对平均偏差
  • 双指针(二)双指针到底是怎么个事
  • vscode通过remote-ssh连接远程开发机
  • uniapp实现H5和微信小程序获取当前位置(腾讯地图)
  • SQL HAVING子句
  • 计算机视觉基础:OpenCV库详解
  • UI自动化测试工具(超详细总结)
  • AJAX 全面教程:从基础到高级
  • ONLYOFFICE 8.2测评:功能增强与体验优化,打造高效办公新体验
  • Science Robotics 综述揭示演化研究新范式,从机器人复活远古生物!
  • uni-app表格带分页,后端处理过每页显示多少条
  • 基于STM32设计的矿山环境监测系统(NBIOT)_262
  • 【初阶数据结构与算法】线性表之链表的分类以及双链表的定义与实现
  • 219页华为供应链管理:市场预测SOP计划、销售预测与存货管理精要
  • mac 安装指定的node和npm版本
  • 为什么分布式光伏规模是6MW为界点?
  • arm64架构的linux 配置vm_page_prot方式
  • vue3 + naive ui card header 和 title 冲突 bug
  • Ubuntu 22.04.5 LTS配置 bond
  • 100种算法【Python版】第58篇——滤波算法之卡尔曼滤波
  • 关于几种卷积
  • 51单片机教程(五)- LED灯闪烁
  • VUE3中Element table表头动态展示合计信息(不是表尾合计)