hadoop OperationAuditorOptions 源码

  • 2022-10-20
  • 浏览 (104)

haddop OperationAuditorOptions 代码

文件路径:/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/audit/OperationAuditorOptions.java

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.hadoop.fs.s3a.audit;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.statistics.impl.IOStatisticsStore;

/**
 * Options for the {@link OperationAuditor}.
 * Done as a builder and passed in so
 * that if it is extended, external auditors will still link.
 */
public final class OperationAuditorOptions {

  private Configuration configuration;
  private IOStatisticsStore ioStatisticsStore;


  private OperationAuditorOptions() {
  }

  public Configuration getConfiguration() {
    return configuration;
  }

  /**
   * Set builder value.
   * @param value new value
   * @return the builder
   */
  public OperationAuditorOptions withConfiguration(final Configuration value) {
    configuration = value;
    return this;
  }

  public IOStatisticsStore getIoStatisticsStore() {
    return ioStatisticsStore;
  }

  /**
   * Set builder value.
   * @param value new value
   * @return the builder
   */
  public OperationAuditorOptions withIoStatisticsStore(
      final IOStatisticsStore value) {
    ioStatisticsStore = value;
    return this;
  }

  /**
   * Create one.
   * @return a new option instance
   */
  public static OperationAuditorOptions builder() {
    return new OperationAuditorOptions();
  }
}

相关信息

hadoop 源码目录

相关文章

hadoop AWSAuditEventCallbacks 源码

hadoop AWSRequestAnalyzer 源码

hadoop AuditFailureException 源码

hadoop AuditIntegration 源码

hadoop AuditManagerS3A 源码

hadoop AuditSpanS3A 源码

hadoop OperationAuditor 源码

hadoop S3AAuditConstants 源码

hadoop S3LogParser 源码

hadoop S3LogVerbs 源码

0  赞