mcvsubbu commented on a change in pull request #6861:
URL: https://github.com/apache/incubator-pinot/pull/6861#discussion_r622505391



##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -485,6 +490,12 @@ private BrokerResponseNative handleSQLRequest(long 
requestId, String query, Json
     return brokerResponse;
   }
 
+  private String getBrokerTenant(String tableNameWithType) {
+    TableConfig tableConfig = _tableCache.getTableConfig(tableNameWithType);
+    Preconditions.checkNotNull(tableConfig, "Table config is not available for 
table '%s'", tableNameWithType);
+    return tableConfig.getTenantConfig().getBroker();

Review comment:
       ```suggestion
       return tableConfig.getTenantConfig().getServer();
   ```

##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/api/RequestStatistics.java
##########
@@ -50,12 +50,22 @@
   private boolean _isNumGroupsLimitReached;
   private int _numExceptions;
   private String _brokerId;
+  private String _offlineBrokerTenant;

Review comment:
       ```suggestion
     private String _offlineServerTenant;
   ```
   Same foe the realtime part

##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -485,6 +490,12 @@ private BrokerResponseNative handleSQLRequest(long 
requestId, String query, Json
     return brokerResponse;
   }
 
+  private String getBrokerTenant(String tableNameWithType) {
+    TableConfig tableConfig = _tableCache.getTableConfig(tableNameWithType);
+    Preconditions.checkNotNull(tableConfig, "Table config is not available for 
table '%s'", tableNameWithType);

Review comment:
       If you add this as Preconditions, it will throw exception in case the 
cache returns null. Better to add the string "Unknown_tenant" or something like 
that if the cache turns out to be null.

##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -485,6 +490,12 @@ private BrokerResponseNative handleSQLRequest(long 
requestId, String query, Json
     return brokerResponse;
   }
 
+  private String getBrokerTenant(String tableNameWithType) {

Review comment:
       ```suggestion
     private String getServerTenant(String tableNameWithType) {
   ```




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to