Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getTable for better user compatibility #166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions src/main/java/com/alipay/oceanbase/rpc/ObTableClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,21 @@ private ReplicaLocation getPartitionLocation(TableEntry tableEntry, long partId,
}
}

/**
*
* @param tableName table want to get for user compatible
* @param rowKey row key
* @param refresh whether to refresh
* @param waitForRefresh whether wait for refresh
* @param needFetchAll whether need fetch all
* @return ObPair of partId and table
* @throws Exception exception
*/
public ObPair<Long, ObTableParam> getTable(String tableName, Object[] rowKey,
boolean refresh, boolean waitForRefresh, boolean needFetchAll)
throws Exception {
return getTableBySingleRowKey(tableName, rowKey, refresh, waitForRefresh, needFetchAll);
}
/**
*
* @param tableName table want to get
Expand All @@ -1450,6 +1465,27 @@ public ObPair<Long, ObTableParam> getTableBySingleRowKey(String tableName, Objec
return getTableBySingleRowKeyWithRoute(tableName, rowKey, refresh, waitForRefresh, needFetchAll, route);
}

/**
*
* @param tableName table want to get for user compatible
* @param rowKey row key
* @param refresh whether to refresh
* @param waitForRefresh whether wait for refresh
* @param route ObServer route
* @return ObPair of partId and table
* @throws Exception exception
*/
public ObPair<Long, ObTableParam> getTable(String tableName,
Object[] rowKey,
boolean refresh,
boolean waitForRefresh,
boolean needFetchAll,
ObServerRoute route) throws Exception {

return getTableBySingleRowKeyWithRoute(tableName, rowKey, refresh, waitForRefresh, needFetchAll, route);
}


/**
*
* @param tableName table want to get
Expand Down
Loading