tidb-incubator / TiBigData

TiDB connectors for Flink/Hive/Presto
Apache License 2.0
211 stars 57 forks source link

Optimize tidb-core module API #248

Closed humengyu2012 closed 1 year ago

humengyu2012 commented 1 year ago

What is the purpose of the change

Reduce the number of RPC getTable calls.

Brief change log

  1. add a new field named titableinfo in io.tidb.bigdata.tidb.handle.TableHandleInternal to storead titableinfo, instead of querying it every time.
  2. Add builder for io.tidb.bigdata.tidb.RecordSetInternal;
  3. Move getSplit() method to ClientSession, we needn't SplitManager in flink/hive/mapreduce;
  4. Reduce the number of RPC getTable calls;
  5. Change a lot of methods parameters (String databaseName,String tableName) to (String databaseName,TiTableInfo tableInfo) in ClientSession.

Verifying this change

This change is already covered by existing tests

Does this pull request potentially affect one of the following parts:

Documentation

humengyu2012 commented 1 year ago

/run-all-tests

humengyu2012 commented 1 year ago

/run-all-tests

humengyu2012 commented 1 year ago

/run-all-tests

humengyu2012 commented 1 year ago

/run-all-tests

shiyuhang0 commented 1 year ago

flink part LGTM