drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sachouche commented on a change in pull request #1355: DRILL-6560: Enhanced the batch statistics logging enablement
Date Wed, 11 Jul 2018 15:46:14 GMT
sachouche commented on a change in pull request #1355: DRILL-6560: Enhanced the batch statistics
logging enablement
URL: https://github.com/apache/drill/pull/1355#discussion_r201514069
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/util/record/RecordBatchStats.java
 ##########
 @@ -100,6 +108,119 @@ private String getQueryId(FragmentContext _context) {
       }
       return "NA";
     }
+
+    private boolean isBatchStatsEnabledForOperator(FragmentContext context, OperatorContext
oContext) {
+      // The configuration can select what operators should log batch statistics
+      final String statsLoggingOperator = context.getOptions().getString(ExecConstants.STATS_LOGGING_BATCH_OPERATOR_OPTION).toUpperCase();
+      final String allOperatorsStr = "ALL";
+
+      // All operators are allowed to log batch statistics
+      if (allOperatorsStr.equals(statsLoggingOperator)) {
+        return true;
+      }
+
+      // No, only a select few are allowed; syntax: operator-id-1,operator-id-2,..
 
 Review comment:
   I tested the logic with Parquet and it worked:
   - The configuration should set a list of operators delimited by a comma
   - The code will attempt to locate an operator identifier string within the context operator
string (using contains)
   - The presence of the '_' character is irrelevant (no impact)
   Let's use an example:
   - enabled_operators = MY_OPR_1,MY_OPR_2
   - String[] operators = ["MY_OPR_1", "MY_OPR_2"]
   - Context operator string is "1:[MY_OPR_2]"
   The code will be able to match MY_OPR_2 as "1:[MY_OPR_2]".contains("MY_OPR_2") will return
true
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message