/*
* 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.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.membership.MembershipType;
import alluxio.network.ChannelType;
import alluxio.network.netty.FileTransferType;
import alluxio.security.authentication.AuthType;
import alluxio.underfs.ChecksumType;
import alluxio.util.FormatUtils;
import alluxio.util.compression.DirectoryMarshaller;
import alluxio.worker.block.BlockStoreType;
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.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 (!(fileName instanceof String)) {
return false;
}
File file = new Fi
没有合适的资源?快使用搜索试试~ 我知道了~
Alluxio分布式存储系统 v3.1.0.zip
共2000个文件
java:1952个
xml:22个
md:17个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 103 浏览量
2024-03-18
21:22:07
上传
评论
收藏 16.59MB ZIP 举报
温馨提示
Alluxio分布式存储系统 v3.1.0.zip
资源推荐
资源详情
资源评论
收起资源包目录
Alluxio分布式存储系统 v3.1.0.zip (2000个子文件)
PropertyKey.java 510KB
DefaultFileSystemMaster.java 221KB
MetricKey.java 135KB
ForkJoinPool.java 124KB
S3ClientRestApiTest.java 102KB
CompletableFuture.java 95KB
FileSystemMasterTest.java 79KB
S3RestServiceHandler.java 70KB
S3ObjectTask.java 66KB
InodeSyncStream.java 62KB
FileSystemMasterFsOptsTest.java 60KB
FileSystemMasterIntegrationTest.java 60KB
InodeTree.java 56KB
LocalCacheManagerTest.java 55KB
FileSystemMasterPartialListingTest.java 55KB
ForkJoinTask.java 54KB
BlockMasterTest.java 52KB
PagedDoraWorker.java 52KB
RaftJournalSystem.java 49KB
ObjectUnderFileSystem.java 47KB
ConcurrentBlockMasterTest.java 47KB
LocalCacheFileInStreamTest.java 45KB
LocalCacheManager.java 44KB
ConcurrentClockCuckooFilter.java 43KB
PagedDoraWorkerTest.java 43KB
NettyReadHandlerStateMachine.java 42KB
InodeTreeTest.java 42KB
InstancedConfigurationTest.java 41KB
AlluxioURITest.java 40KB
FileSystemContext.java 40KB
ListStatusTest.java 40KB
UfsSyncIntegrationTest.java 39KB
PermissionCheckTest.java 39KB
AbstractFileSystemTest.java 37KB
MultiProcessCluster.java 37KB
MetricsSystem.java 37KB
JournalBackupIntegrationTest.java 35KB
UnderFileSystemWithLogging.java 35KB
UnderFileSystem.java 34KB
FileSystemMasterSyncMetadataMetricsTest.java 34KB
DFSIOIntegrationTest.java 34KB
S3NettyObjectTask.java 33KB
CompletionStage.java 33KB
FileSystem.java 32KB
InodeTreePersistentState.java 32KB
AbstractFileSystem.java 32KB
RocksStore.java 32KB
CommonUtils.java 31KB
CpCommand.java 31KB
CpCommandIntegrationTest.java 31KB
MountTable.java 30KB
S3RestUtils.java 29KB
CollectLogCommandTest.java 29KB
RocksInodeStoreTest.java 29KB
JournalStateMachine.java 29KB
CountedCompleter.java 28KB
SchedulerTest.java 27KB
InvalidationSyncCacheTest.java 27KB
FileSystemIntegrationTest.java 26KB
GrpcUtils.java 26KB
S3BucketTask.java 26KB
UfsJournalIntegrationTest.java 26KB
NetworkAddressUtils.java 26KB
LoadMetadataIntegrationTest.java 26KB
RaftJournalTest.java 25KB
UfsJournal.java 25KB
NettyDataReaderStateMachine.java 25KB
StressClientIOBench.java 25KB
S3NettyHandler.java 24KB
StressWorkerBench.java 24KB
DoraCacheFileSystem.java 24KB
FileSystemMaster.java 23KB
FileOutStreamAsyncWriteJobIntegrationTest.java 23KB
Configuration.java 23KB
MembershipManagerTest.java 23KB
FileSystemAclIntegrationTest.java 23KB
FileSystemMasterClientServiceHandler.java 23KB
DecommissionWorkerCommand.java 23KB
LockedInodePathTest.java 23KB
PersistenceTest.java 23KB
CollectInfo.java 22KB
Performance.java 22KB
CompleteMultipartUploadHandler.java 22KB
LocalCacheManagerWithMemPageStoreTest.java 22KB
LockedInodePath.java 22KB
S3ObjectTest.java 22KB
CommonUtilsTest.java 22KB
WorkerIdentity.java 22KB
AlluxioEtcdClient.java 21KB
FileSystemMasterSyncMetadataTest.java 21KB
ConcurrentRenameIntegrationTest.java 21KB
GrpcMessagingConnection.java 21KB
PathUtilsTest.java 21KB
UfsJournalLogWriter.java 21KB
ObjectSizeCalculator.java 21KB
RocksStoreTest.java 20KB
MutableInode.java 20KB
ListBucketResult.java 20KB
UfsJournalLogWriterTest.java 20KB
EmbeddedJournalIntegrationTestFaultTolerance.java 20KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
芝麻粒儿
- 粉丝: 6w+
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- SVID_20240523_141155_1.mp4
- Code for the complete guide to tkinter tutorial
- 关于百货中心供应链管理系统.zip
- SimpleFolderIcon-master 修改Unity的Project下的文件夹图标
- A python Tkinter widget to display tile based maps
- A pure Python library for adding tables to a Tkinter application
- Vector资源文件.zip
- MobaXterm-Installer
- MicroMsg.xlsx
- 88-520告白(520气球).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功