Apache IoTDB代码极简阅读

2022-04-24 00:00:00 执行 专区 代码 逻辑 输出

一. 代码总结

  • 代码仓库: https://github.com/apache/iotdb
  • commit:ce154b8d2e1cb3d723168b8fc2b103d223c39d8d
  • 开发语言: Java
  • 有效行数: 170021
  • 函数数量: 15432
  • 函数当量: 15.4 LevelDB
  • 类数量: 1914

二. 代码阅读

IoTDB是时序数据库, 可接入其他数据处理系统, 比如Hive, Flink等. 详细介绍, 开发动机, workload请参考官网. 本文只给出看代码的步骤.

1. 盲搜

盲搜的全部命令如下:

javatree.pl '\w+' ''  
javatree.pl 'Oparator' ''  
javatree.pl 'Operator' '' 1 
javatree.pl 'Operator' '' 1  'spark/tsfile' 
javatree.pl 'Operator' '' 1  'iotdb/db/qp/logical' 
javatree.pl 'PhysicalPlan' '' 1     
javatree.pl 'PhysicalPlan' 'Projection' 1   
javatree.pl 'PhysicalPlan' 'Project' 1    
javatree.pl 'Expr' '' 1   
javatree.pl 'Expression' '' 1   
javatree.pl 'IExpression' '' 1   
javatree.pl '\w+' 'IExpression' 1   
javatree.pl '\w+' 'Expression' 1   
javatree.pl '\w+' '^Expression' 1   
javatree.pl '\w+' '^Expression$' 1   
javatree.pl '^Expression$' ''  1   
javatree.pl '^Scan$' ''  1   
javatree.pl 'Scan' ''  1   
javatree.pl '(?)Scan' ''  1   
javatree.pl 'Join' ''  1   
javatree.pl '(?i)Join' ''  1   
javatree.pl '(?i)aggregate' ''  1   
javatree.pl '(?i)exec' ''  1   
javatree.pl 'GroupByExecutor' ''  1   
javatree.pl '\w+' 'GroupByExecutor'  1   
vim server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByExecutor.java +30
javatree.pl '(?i)Physical' ''  1   
vim server/src/main/java/org/apache/iotdb/db/qp/physical/PhysicalPlan.java +9
javatree.pl '(?i)select' ''  1   
javatree.pl '(?i)UDTF' ''  1   
vim server/src/main/java/org/apache/iotdb/db/query/udf/api/UDTF.java +58
javatree.pl 'Encoder' ''  1    
javatree.pl 'Decoder' ''  1   
vim tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/GorillaDecoderV2.java +35
vim tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/Decoder.java +31
java_calltree.pl 'nextBatch' ''  1 1 2
java_calltree.pl 'fetchSingleSeries' ''  1 1 2
java_calltree.pl 'fetchSingleSeries' ''  1 1 3
java_calltree.pl 'fetchSingleSeries' ''  1 1 -3
java_calltree.pl 'getValuesInTimestamps' ''  1 1 -3
java_calltree.pl 'execute' ''  1 1 -3
java_calltree.pl 'execute' ''  1 1 -2
vim tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileReader.java +50
javatree.pl 'Executor' '' 1 
javatree.pl 'Executor$' '' 1 
javatree.pl 'IPlanExecutor' '' 1 
vim server/src/main/java/org/apache/iotdb/db/qp/executor/IPlanExecutor.java +44
java_calltree.pl 'PlanExecutor' '' 1 1 2
java_calltree.pl 'PlanExecutor' '' 1 1 -4
java_calltree.pl 'PlanExecutor' '' 1 1 -3
java_calltree.pl 'ClusterPlanExecutor' '' 1 1 -3
java_calltree.pl 'TsFileExecutor' '' 1 1 -3
java_calltree.pl 'TsFileExecutor' '' 1 1 -4
java_calltree.pl 'TsFileExecutor' '' 1 1 -4
javatree.pl 'UDTF' '' 1 
vim server/src/main/java/org/apache/iotdb/db/query/udf/api/UDTF.java +58
javatree.pl '(?i)UDTF\w*executor' '' 1 
java_calltree.pl 'ClusterUDTFQueryExecutor' '' 1 1 -4
vim server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java +567
javatree.pl 'QueryPlan' '' 1 
javatree.pl '\w+' 'QueryPlan'  1 
java_calltree.pl 'LastQueryPlan' ''  1 1 1

相关文章