jackye1995 commented on a change in pull request #4254:
URL: https://github.com/apache/iceberg/pull/4254#discussion_r818155813
##########
File path:
core/src/main/java/org/apache/iceberg/hadoop/HadoopMetricsContext.java
##########
@@ -33,23 +34,18 @@
* statistics implementation using the provided scheme.
*/
public class HadoopMetricsContext implements FileIOMetricsContext {
- public static final String SCHEME = "io.metrics-scheme";
private String scheme;
private transient FileSystem.Statistics statistics;
- public HadoopMetricsContext(String scheme) {
- ValidationException.check(scheme != null,
- "Scheme is required for Hadoop FileSystem metrics reporting");
-
- this.scheme = scheme;
+ public HadoopMetricsContext() {
}
@Override
public void initialize(Map<String, String> properties) {
// FileIO has no specific implementation class, but Hadoop will
// still track and report for the provided scheme.
- this.scheme = properties.getOrDefault(SCHEME, scheme);
+ this.scheme = properties.get(CatalogProperties.IO_METRICS_SCHEME);
Review comment:
assert not null
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]