virajjasani commented on a change in pull request #1039:
URL: https://github.com/apache/phoenix/pull/1039#discussion_r549944912
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
##########
@@ -2461,11 +2464,11 @@ public Object run() throws Exception {
try (PhoenixConnection connection =
QueryUtil.getConnectionOnServer(env.getConfiguration())
.unwrap(PhoenixConnection.class))
{
- try{
+ try {
MetaDataUtil.deleteFromStatsTable(connection,
deletedTable,
physicalTableNames, sharedTableStates);
- LOGGER.info("Table stats deleted successfully.
"+
-
deletedTable.getPhysicalName().getString());
+ LOGGER.info("Table stats deleted successfully.
"
+ +
deletedTable.getPhysicalName().getString());
Review comment:
same here
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
##########
@@ -342,12 +341,12 @@ public PhoenixResultSet call() throws SQLException {
}
//Force update cache and retry if meta not found error
occurs
catch (MetaDataEntityNotFoundException e) {
- if(doRetryOnMetaNotFoundError &&
e.getTableName()!=null){
- if(LOGGER.isDebugEnabled())
- LOGGER.debug("Reloading table "
- + e.getTableName()+" data from
server");
- if(new
MetaDataClient(connection).updateCache(connection.getTenantId(),
- e.getSchemaName(), e.getTableName(),
true).wasUpdated()){
+ if (doRetryOnMetaNotFoundError && e.getTableName() !=
null) {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Reloading table " +
e.getTableName() + " data from server");
Review comment:
Better replace with placeholder?
```
LOGGER.debug("Reloading table {} data from server", e.getTableName());
```
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java
##########
@@ -430,12 +429,12 @@ public Integer call() throws SQLException {
}
//Force update cache and retry if meta not found
error occurs
catch (MetaDataEntityNotFoundException e) {
- if(doRetryOnMetaNotFoundError &&
e.getTableName()!=null){
- if(LOGGER.isDebugEnabled())
- LOGGER.debug("Reloading table "+
e.getTableName()
- +" data from server");
- if(new
MetaDataClient(connection).updateCache(connection.getTenantId(),
- e.getSchemaName(), e.getTableName(),
true).wasUpdated()){
+ if (doRetryOnMetaNotFoundError &&
e.getTableName() != null) {
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("Reloading table " +
e.getTableName() + " data from server");
Review comment:
same here
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
##########
@@ -456,7 +457,7 @@
);
static {
- Collections.sort(COLUMN_KV_COLUMNS, KeyValue.COMPARATOR);
+ Collections.sort(COLUMN_KV_COLUMNS, CellComparator.getInstance());
Review comment:
Since we are sorting list, we can directly use sort():
```
COLUMN_KV_COLUMNS.sort(CellComparator.getInstance());
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]