Skip to content

Commit 85c9f6b

Browse files
committed
format code and optimize by review
1 parent 646a37d commit 85c9f6b

File tree

4 files changed

+162
-140
lines changed

4 files changed

+162
-140
lines changed

src/main/java/com/alipay/oceanbase/rpc/ObTableClient.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,6 @@ public void setRpcExecuteTimeout(int rpcExecuteTimeout) {
946946

947947
/**
948948
* Get or refresh table entry meta information.
949-
* work for both OcpMode and OdpMode
950949
* @param tableName table name
951950
* @return TableEntry
952951
* @throws Exception if fail
@@ -962,7 +961,6 @@ public TableEntry getOrRefreshTableEntry(final String tableName, boolean forceRe
962961

963962
/**
964963
* refresh table meta information except location
965-
* work for both OcpMode and OdpMode
966964
* @param tableName table name
967965
* */
968966
private TableEntry refreshMeta(String tableName) throws Exception {
@@ -971,12 +969,11 @@ private TableEntry refreshMeta(String tableName) throws Exception {
971969

972970
/**
973971
* refresh table meta information except location
974-
* work for both OcpMode and OdpMode
975972
* only support by ODP version after 4.3.2
976973
* @param tableName table name
977974
* */
978975
public TableEntry refreshOdpMeta(String tableName) throws Exception {
979-
return tableRoute.refreshODPMeta(tableName, true);
976+
return tableRoute.refreshOdpMeta(tableName, true);
980977
}
981978

982979
/**
@@ -1087,13 +1084,12 @@ public ObTableParam getTableParamWithPartId(String tableName, long partId, ObSer
10871084
* only support by ODP version after 4.3.2
10881085
* @param tableName table want to get
10891086
* @param partId logic of table
1090-
* @param route ObServer route
10911087
* @return ObPair of partId and table
10921088
* @throws Exception exception
10931089
*/
1094-
public ObTableParam getOdpTableParamWithPartId(String tableName, long partId, ObServerRoute route)
1090+
public ObTableParam getOdpTableParamWithPartId(String tableName, long partId)
10951091
throws Exception {
1096-
return tableRoute.getOdpTableWithPartId(tableName, partId, route);
1092+
return tableRoute.getOdpTableWithPartId(tableName, partId);
10971093
}
10981094

10991095
/**
@@ -1932,7 +1928,7 @@ private Partition getSinglePartitionInternal(String tableName, Row rowKey, boole
19321928
ObTableParam tableParam = null;
19331929
if (odpMode) {
19341930
if (refresh) {
1935-
tableRoute.refreshODPMeta(tableName, true);
1931+
tableRoute.refreshOdpMeta(tableName, true);
19361932
}
19371933
tableParam = tableRoute.getOdpTableParam(tableName, rowKey);
19381934
} else {
@@ -1967,7 +1963,7 @@ private List<Partition> getAllPartitionInternal(String tableName, boolean refres
19671963
List<ObTableParam> allTables;
19681964
if (odpMode) {
19691965
if (refresh) {
1970-
tableRoute.refreshODPMeta(tableName, true);
1966+
tableRoute.refreshOdpMeta(tableName, true);
19711967
}
19721968
allTables = tableRoute.getOdpTableParams(tableName, new ObTableQuery(), new Object[]{ ObObj.getMin() }, true,
19731969
new Object[]{ ObObj.getMax() }, true);

src/main/java/com/alipay/oceanbase/rpc/location/model/TableLocations.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,13 +533,14 @@ private long getTableLevelRefreshInterval(ServerRoster serverRoster) {
533533

534534
/**
535535
* fetch ODP partition meta information
536+
* only support by ODP version after 4.3.2
536537
* @param tableName table name to query
537538
* @param forceRefresh flag to force ODP to fetch the latest partition meta information
538539
* @param odpTable odp table to execute refreshing
539540
* @return TableEntry ODPTableEntry
540541
* @throws Exception Exception
541542
*/
542-
public TableEntry refreshODPMeta(String tableName, boolean forceRefresh, ObTable odpTable)
543+
public TableEntry refreshOdpMeta(String tableName, boolean forceRefresh, ObTable odpTable)
543544
throws Exception {
544545
if (tableName == null || tableName.isEmpty()) {
545546
throw new IllegalArgumentException("table name is null");

0 commit comments

Comments
 (0)