/*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the "License"). You may not use this work except in compliance with the License, which is
* available at www.apache.org/licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied, as more fully set forth in the License.
*
* See the NOTICE file distributed with this work for information regarding copyright ownership.
*/
package alluxio.conf;
import static alluxio.conf.PropertyKey.Builder.booleanBuilder;
import static alluxio.conf.PropertyKey.Builder.classBuilder;
import static alluxio.conf.PropertyKey.Builder.dataSizeBuilder;
import static alluxio.conf.PropertyKey.Builder.doubleBuilder;
import static alluxio.conf.PropertyKey.Builder.durationBuilder;
import static alluxio.conf.PropertyKey.Builder.enumBuilder;
import static alluxio.conf.PropertyKey.Builder.intBuilder;
import static alluxio.conf.PropertyKey.Builder.listBuilder;
import static alluxio.conf.PropertyKey.Builder.longBuilder;
import static alluxio.conf.PropertyKey.Builder.stringBuilder;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static java.lang.String.format;
import alluxio.Constants;
import alluxio.DefaultSupplier;
import alluxio.ProjectConstants;
import alluxio.RuntimeConstants;
import alluxio.annotation.PublicApi;
import alluxio.client.ReadType;
import alluxio.client.WriteType;
import alluxio.client.file.cache.ShadowCacheType;
import alluxio.client.file.cache.store.PageStoreType;
import alluxio.exception.ExceptionMessage;
import alluxio.executor.RpcExecutorType;
import alluxio.executor.ThreadPoolExecutorQueueType;
import alluxio.grpc.LoadMetadataPType;
import alluxio.grpc.Scope;
import alluxio.grpc.TtlAction;
import alluxio.grpc.WritePType;
import alluxio.master.GraceMode;
import alluxio.master.ZookeeperConnectionErrorPolicy;
import alluxio.master.file.MetadataSyncTraversalOrder;
import alluxio.master.journal.JournalType;
import alluxio.master.metastore.MetastoreType;
import alluxio.master.metastore.rocks.DataBlockIndexType;
import alluxio.master.metastore.rocks.IndexType;
import alluxio.network.ChannelType;
import alluxio.security.authentication.AuthType;
import alluxio.util.FormatUtils;
import alluxio.util.OSUtils;
import alluxio.util.compression.DirectoryMarshaller;
import alluxio.util.io.PathUtils;
import alluxio.worker.block.BlockStoreType;
import alluxio.worker.block.management.BackoffStrategy;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Joiner;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.collect.ImmutableList;
import com.sun.management.OperatingSystemMXBean;
import io.netty.util.ResourceLeakDetector;
import org.rocksdb.CompressionType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.lang.management.ManagementFactory;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;
/**
* Configuration property keys. This class provides a set of pre-defined property keys.
*/
@ThreadSafe
@PublicApi
public final class PropertyKey implements Comparable<PropertyKey> {
/** Regex string to find "${key}" for variable substitution. */
public static final String REGEX_STRING = "(\\$\\{([^{}]*)\\})";
/** Regex to find ${key} for variable substitution. */
public static final Pattern CONF_REGEX = Pattern.compile(REGEX_STRING);
private static final Logger LOG = LoggerFactory.getLogger(PropertyKey.class);
// The following two maps must be the first to initialize within this file.
/** A map from default property key's string name to the key. */
private static final Map<String, PropertyKey> DEFAULT_KEYS_MAP = new ConcurrentHashMap<>();
/** A map from default property key's alias to the key. */
private static final Map<String, PropertyKey> DEFAULT_ALIAS_MAP = new ConcurrentHashMap<>();
/** A cache storing result for template regexp matching results. */
private static final Cache<String, Boolean> REGEXP_CACHE = CacheBuilder.newBuilder()
.maximumSize(1024)
.build();
/**
* The consistency check level to apply to a certain property key.
* User can run "alluxio validateEnv all cluster.conf.consistent" to validate the consistency of
* configuration properties within the cluster. The command reads all Alluxio properties on
* each node of the cluster and shows error or warning for properties that have inconsistent
* values among the nodes. For example, it would show error if the Alluxio property for aws secret
* access key has some value on a master node and a different value on one of the worker nodes.
*/
public enum ConsistencyCheckLevel {
/**
* Do not check consistency of property value.
* This should be set if the property is not required to have same value among the nodes
* (e.g. worker hostname).
*/
IGNORE,
/**
* Check consistency of property value, show warning of inconsistent values.
* This should be set if the property is recommended to have same value among the nodes,
* although having different values does not cause immediate issues(e.g. alluxio home folder
* location, timeout value for connecting to a worker).
*/
WARN,
/**
* Check consistency of property value, show error of inconsistent values.
* This should be set if the property is required to have same value among the nodes
* (e.g. AWS credentials, journal location).
*/
ENFORCE,
}
/**
* Indicates how the property value should be displayed.
*/
public enum DisplayType {
/**
* The property value should be displayed normally.
*/
DEFAULT,
/**
* The property value contains credentials and should not be displayed directly.
*/
CREDENTIALS,
}
/**
* Indicates property type.
*/
public enum PropertyType {
/**
* The Property's value is of boolean type, stored as a Boolean.
*/
BOOLEAN(Boolean.class),
/**
* The Property's value is of integer type, stored as an Integer.
*/
INTEGER(Integer.class),
/**
* The Property's value is of long integer type, stored as a long.
*/
LONG(Long.class),
/**
* The Property's value is of double type, stored as a Double.
*/
DOUBLE(Double.class),
/**
* The Property's value is of string type, stored as a String.
*/
STRING(String.class),
/**
* The Property's value represents a time duration, stored as a Long in ms.
*/
DURATION(String.class),
/**
* The Property's value represents a data size, stored as a Long in bytes.
*/
DATASIZE(String.class),
/**
* The Property's value is of list type, stored as a delimiter separated string.
*/
LIST(String.class),
/**
* The Property's value is an enum for a predefined enum class.
*/
ENUM(Enum.class),
/**
* The Property's value is of class type, stored as a Class.
*/
CLASS(String.class);
private final Class<?> mJavaType;
PropertyType(Class<?> javaType) {
mJavaType = javaType;
}
Class<?> getJavaType() {
return mJavaType;
}
}
public static final Function<Object, Boolean> CHECK_FILE_EXISTS = (fileName) -> {
if (!(fileN
没有合适的资源?快使用搜索试试~ 我知道了~
alluxio.zip
共2000个文件
java:1731个
md:167个
xml:38个
需积分: 5 1 下载量 22 浏览量
2023-08-19
12:28:05
上传
评论
收藏 46.17MB ZIP 举报
温馨提示
[Alluxio](https://www.alluxio.io)(原名Tachyon) 是一个虚拟分布式存储系统。它弥合了 计算框架和存储系统,使计算应用程序能够连接到 许多存储系统通过一个公共接口。阅读更多关于 [Alluxio概述](https://docs.alluxio.io/os/user/stable/en/Overview.html)。
资源推荐
资源详情
资源评论
收起资源包目录
alluxio.zip (2000个子文件)
bootstrap.min.css 152KB
pygments-default.css 4KB
main.css 2KB
global.html 5KB
404.html 4KB
index.html 1KB
index.html 1KB
index.html 1KB
index.html 73B
index.html 73B
index.html 64B
PropertyKey.java 537KB
MetricKey.java 138KB
ForkJoinPool.java 124KB
S3ClientRestApiTest.java 102KB
CompletableFuture.java 95KB
FileSystemMasterIntegrationTest.java 59KB
ForkJoinTask.java 54KB
LocalCacheManagerTest.java 50KB
ObjectUnderFileSystem.java 46KB
ConcurrentClockCuckooFilter.java 43KB
InstancedConfigurationTest.java 43KB
TieredBlockStore.java 42KB
UfsSyncIntegrationTest.java 41KB
AlluxioURITest.java 40KB
LocalCacheFileInStreamTest.java 40KB
AbstractFileSystemTest.java 37KB
BlockMasterRegisterStreamIntegrationTest.java 37KB
MultiProcessCluster.java 36KB
MetricsSystem.java 36KB
UnderFileSystemWithLogging.java 36KB
JournalBackupIntegrationTest.java 35KB
AlluxioFileInStreamTest.java 34KB
DFSIOIntegrationTest.java 34KB
LocalCacheManager.java 33KB
CompletionStage.java 33KB
FileSystem.java 32KB
UnderFileSystem.java 31KB
FileSystemContext.java 31KB
CpCommandIntegrationTest.java 30KB
CommonUtils.java 30KB
CpCommand.java 30KB
TieredBlockStoreTest.java 30KB
CountedCompleter.java 28KB
CollectLogCommandTest.java 28KB
AlluxioWorkerRestServiceHandler.java 28KB
GrpcUtils.java 28KB
BaseFileSystem.java 28KB
BlockWorkerRegisterStreamIntegrationTest.java 28KB
BlockStoreClientTest.java 26KB
AbstractFileSystem.java 26KB
FileSystemIntegrationTest.java 26KB
FileInStreamIntegrationTest.java 26KB
UfsJournalIntegrationTest.java 26KB
NetworkAddressUtils.java 26KB
InstancedConfiguration.java 26KB
LoadMetadataIntegrationTest.java 25KB
StressClientIOBench.java 25KB
Configuration.java 24KB
AlluxioCatalogTest.java 23KB
FileOutStreamAsyncWriteJobIntegrationTest.java 23KB
DecommissionWorkerCommand.java 23KB
FileSystemAclIntegrationTest.java 23KB
Performance.java 22KB
LocalCacheManagerWithMemPageStoreTest.java 22KB
DefaultBlockWorker.java 22KB
PagedBlockStore.java 22KB
CommonUtilsTest.java 22KB
BaseFileSystemTest.java 22KB
GlueDatabase.java 22KB
CollectInfo.java 22KB
RemoteReadIntegrationTest.java 21KB
RetryHandlingFileSystemMasterClient.java 21KB
MasterWebUIMetrics.java 21KB
CompactionBench.java 21KB
FuseIOBench.java 21KB
PathUtilsTest.java 21KB
FileOutStreamDecommissionIntegrationTest.java 21KB
ConcurrentRenameIntegrationTest.java 21KB
Database.java 21KB
AlluxioFileInStream.java 21KB
ObjectSizeCalculator.java 21KB
GlueUtilsTest.java 20KB
FileOutStreamTest.java 20KB
MultiOperationStressMasterBench.java 20KB
DefaultStorageDirTest.java 20KB
StressMasterBench.java 20KB
EmbeddedJournalIntegrationTestFaultTolerance.java 19KB
StressMasterBenchBase.java 19KB
BlockInStream.java 19KB
CapacityCommand.java 19KB
AbstractClient.java 19KB
BlockMasterClientTest.java 19KB
PersistCommandTest.java 19KB
FileSystemMasterFaultToleranceIntegrationTest.java 19KB
DefaultBlockWorkerTest.java 18KB
TransformManager.java 18KB
ManagedBlockingUfsForwarder.java 18KB
FileInfo.java 18KB
DistributedLoadUtils.java 18KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
hello_中年人
- 粉丝: 7
- 资源: 324
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 在AWGN信道中使用16PSK调制的simulink.rar
- 在AWGN信道中使用BPSK的OFDM误码率Matlab代码.rar
- 在AWGN信道中使用PSK调制的LDPC编码Matlab代码.rar
- 在AWGN中BPSK的误码率(BER)对于不同Eb_N0值进行了计算,然后将模拟BER与理论BER进行了比较Matlab代码 (1).rar
- 在AWGN中,使用格雷编码星座映射推导出理论上的16QAM误码率(BER)matlab代码.rar
- 在AWGN信道中使用PSK调制的LDPC编码Matlab实现.rar
- 在MATLAB上实现一个相干检测的BPSK系统,并获得其误比特率(PB)与信噪比(E_N0)的关系。.rar
- 在AWGN中BPSK的误码率(BER)对于不同Eb_N0值进行了计算,然后将模拟BER与理论BER进行了比较Matlab代码.rar
- 在FPGA中使用Xilinx系统生成器的数字调制(ASK、BPSK、FSK、OOK、QPSK).rar
- 在OFDM中使用16QAM技术的信噪比与误码率绘图Matlab代码.rar
- 在Simulink中非常简单地模拟BPSK调制.rar
- 在Simulink中非常简单地模拟BPSK调制。.rar
- 在雷利衰落信道上的误码率(BER)的模拟结果Matlab代码.rar
- 在Simulink中进行了两个简单的QAM和PSK调制器的仿真.rar
- 在不考虑信道噪声或HPA效应的情况下,OFDM信号的生成、传输和接收Matlab代码.rar
- 在Simulink中使用PSK,通过恢复进行调制和解调.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功