TiBigData icon indicating copy to clipboard operation
TiBigData copied to clipboard

Optimize tidb-core module API

Open humengyu2012 opened this issue 1 year ago • 3 comments

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

Use current tests enough.

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

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

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: no
  • The runtime per-record code paths (performance sensitive): yes

Documentation

  • Does this pull request introduce a new feature? no

humengyu2012 avatar Oct 07 '22 12:10 humengyu2012

/run-all-tests

humengyu2012 avatar Oct 07 '22 13:10 humengyu2012

/run-all-tests

humengyu2012 avatar Oct 08 '22 06:10 humengyu2012

/run-all-tests

humengyu2012 avatar Oct 08 '22 07:10 humengyu2012

/run-all-tests

humengyu2012 avatar Oct 09 '22 04:10 humengyu2012

flink part LGTM

shiyuhang0 avatar Oct 13 '22 03:10 shiyuhang0