001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *    http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.apache.hadoop.fs.adl;
020
021import org.apache.hadoop.classification.InterfaceAudience;
022import org.apache.hadoop.classification.InterfaceStability;
023
024/**
025 * Constants.
026 */
027@InterfaceAudience.Public
028@InterfaceStability.Evolving
029public final class AdlConfKeys {
030  // OAuth2 Common Configuration
031  public static final String AZURE_AD_REFRESH_URL_KEY = "dfs.adls.oauth2"
032      + ".refresh.url";
033
034  // optional when provider type is refresh or client id.
035  public static final String AZURE_AD_TOKEN_PROVIDER_CLASS_KEY =
036      "dfs.adls.oauth2.access.token.provider";
037  public static final String AZURE_AD_CLIENT_ID_KEY =
038      "dfs.adls.oauth2.client.id";
039  public static final String AZURE_AD_TOKEN_PROVIDER_TYPE_KEY =
040      "dfs.adls.oauth2.access.token.provider.type";
041
042  // OAuth Refresh Token Configuration
043  public static final String AZURE_AD_REFRESH_TOKEN_KEY =
044      "dfs.adls.oauth2.refresh.token";
045
046  public static final String TOKEN_PROVIDER_TYPE_REFRESH_TOKEN = "RefreshToken";
047  // OAuth Client Cred Token Configuration
048  public static final String AZURE_AD_CLIENT_SECRET_KEY =
049      "dfs.adls.oauth2.credential";
050  public static final String TOKEN_PROVIDER_TYPE_CLIENT_CRED =
051      "ClientCredential";
052
053  public static final String READ_AHEAD_BUFFER_SIZE_KEY =
054      "adl.feature.client.cache.readahead";
055
056  public static final String WRITE_BUFFER_SIZE_KEY =
057      "adl.feature.client.cache.drop.behind.writes";
058  static final String SECURE_TRANSPORT_SCHEME = "https";
059  static final String INSECURE_TRANSPORT_SCHEME = "http";
060  static final String ADL_DEBUG_OVERRIDE_LOCAL_USER_AS_OWNER =
061      "adl.debug.override.localuserasfileowner";
062
063  static final boolean ADL_DEBUG_SET_LOCAL_USER_AS_OWNER_DEFAULT = false;
064  static final long ADL_BLOCK_SIZE = 256 * 1024 * 1024;
065  static final int ADL_REPLICATION_FACTOR = 1;
066  static final String ADL_HADOOP_CLIENT_NAME = "hadoop-azure-datalake-";
067  static final String ADL_HADOOP_CLIENT_VERSION =
068      "2.0.0-SNAPSHOT";
069  static final String ADL_EVENTS_TRACKING_CLUSTERNAME =
070      "adl.events.tracking.clustername";
071
072  static final String ADL_EVENTS_TRACKING_CLUSTERTYPE =
073      "adl.events.tracking.clustertype";
074  static final int DEFAULT_READ_AHEAD_BUFFER_SIZE = 4 * 1024 * 1024;
075  static final int DEFAULT_WRITE_AHEAD_BUFFER_SIZE = 4 * 1024 * 1024;
076
077  static final String LATENCY_TRACKER_KEY =
078      "adl.dfs.enable.client.latency.tracker";
079  static final boolean LATENCY_TRACKER_DEFAULT = true;
080
081  static final String ADL_EXPERIMENT_POSITIONAL_READ_KEY =
082      "adl.feature.experiment.positional.read.enable";
083  static final boolean ADL_EXPERIMENT_POSITIONAL_READ_DEFAULT = true;
084
085  static final String ADL_SUPPORT_ACL_BIT_IN_FSPERMISSION =
086      "adl.feature.support.acl.bit";
087  static final boolean ADL_SUPPORT_ACL_BIT_IN_FSPERMISSION_DEFAULT = true;
088
089  static final String ADL_ENABLEUPN_FOR_OWNERGROUP_KEY =
090      "adl.feature.ownerandgroup.enableupn";
091  static final boolean ADL_ENABLEUPN_FOR_OWNERGROUP_DEFAULT = false;
092
093  private AdlConfKeys() {
094  }
095}