Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
apc999 committed Feb 18, 2020
1 parent 49b37b8 commit 9e5c0f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
Expand Up @@ -140,9 +140,9 @@ public static FileSystem create(FileSystemContext context) {
LOG.debug("{}={} ({})", key.getName(), value, source);
}
}
FileSystem fs = (conf.getBoolean(PropertyKey.USER_METADATA_CACHE_ENABLED))
FileSystem fs = conf.getBoolean(PropertyKey.USER_METADATA_CACHE_ENABLED)
? new MetadataCachingBaseFileSystem(context) : new BaseFileSystem(context);
if (conf.getBoolean(PropertyKey.USER_LOCAL_CACHE_ENABLED)) {
if (conf.getBoolean(PropertyKey.USER_CLIENT_CACHE_ENABLED)) {
return new LocalCacheFileSystem(fs, conf);
}
return fs;
Expand Down
14 changes: 6 additions & 8 deletions core/common/src/main/java/alluxio/conf/PropertyKey.java
Expand Up @@ -3184,6 +3184,7 @@ public String toString() {
new Builder(Name.USER_CLIENT_CACHE_ENABLED)
.setDefaultValue(false)
.setDescription("If this is enabled, data will be cached on Alluxio client.")
.setConsistencyCheckLevel(ConsistencyCheckLevel.WARN)
.setScope(Scope.CLIENT)
.build();
public static final PropertyKey USER_CLIENT_CACHE_EVICTOR_CLASS =
Expand All @@ -3192,12 +3193,14 @@ public String toString() {
.setDescription("The strategy that client uses to evict local cached pages when running "
+ "out of space. Currently the only valid option provided is "
+ "`alluxio.client.file.cache.evictor.LRUCacheEvictor`.")
.setConsistencyCheckLevel(ConsistencyCheckLevel.WARN)
.setScope(Scope.CLIENT)
.build();
public static final PropertyKey USER_CLIENT_CACHE_DIR =
new Builder(Name.USER_CLIENT_CACHE_DIR)
.setDefaultValue("/tmp/alluxio_cache")
.setDescription("The directory where client-side cache is stored.")
.setConsistencyCheckLevel(ConsistencyCheckLevel.WARN)
.setScope(Scope.CLIENT)
.build();
public static final PropertyKey USER_CLIENT_CACHE_STORE_TYPE =
Expand All @@ -3206,18 +3209,21 @@ public String toString() {
.setDescription("The type of page store to use for client-side cache. Can be either "
+ "`LOCAL` or `ROCKS`. The `LOCAL` page store stores all pages in a directory, "
+ "the `ROCKS` page store utilizes rocksDB to persist the data.")
.setConsistencyCheckLevel(ConsistencyCheckLevel.WARN)
.setScope(Scope.CLIENT)
.build();
public static final PropertyKey USER_CLIENT_CACHE_SIZE =
new Builder(Name.USER_CLIENT_CACHE_SIZE)
.setDefaultValue("512MB")
.setDescription("The maximum size of the client-side cache.")
.setConsistencyCheckLevel(ConsistencyCheckLevel.WARN)
.setScope(Scope.CLIENT)
.build();
public static final PropertyKey USER_CLIENT_CACHE_PAGE_SIZE =
new Builder(Name.USER_CLIENT_CACHE_PAGE_SIZE)
.setDefaultValue("1MB")
.setDescription("Size of each page in client-side cache.")
.setConsistencyCheckLevel(ConsistencyCheckLevel.WARN)
.setScope(Scope.CLIENT)
.build();
public static final PropertyKey USER_FILE_WRITE_TYPE_DEFAULT =
Expand Down Expand Up @@ -3252,13 +3258,6 @@ public String toString() {
.setConsistencyCheckLevel(ConsistencyCheckLevel.WARN)
.setScope(Scope.CLIENT)
.build();
public static final PropertyKey USER_LOCAL_CACHE_ENABLED =
new Builder(Name.USER_LOCAL_CACHE_ENABLED)
.setDefaultValue(false)
.setDescription("If this is enabled, data will be cached on Alluxio client.")
.setConsistencyCheckLevel(ConsistencyCheckLevel.WARN)
.setScope(Scope.CLIENT)
.build();
public static final PropertyKey USER_LOCAL_READER_CHUNK_SIZE_BYTES =
new Builder(Name.USER_LOCAL_READER_CHUNK_SIZE_BYTES)
.setDefaultValue("8MB")
Expand Down Expand Up @@ -4674,7 +4673,6 @@ public static final class Name {
public static final String USER_FILE_WRITE_TIER_DEFAULT =
"alluxio.user.file.write.tier.default";
public static final String USER_HOSTNAME = "alluxio.user.hostname";
public static final String USER_LOCAL_CACHE_ENABLED = "alluxio.user.local.cache.enabled";
public static final String USER_LOCAL_READER_CHUNK_SIZE_BYTES =
"alluxio.user.local.reader.chunk.size.bytes";
public static final String USER_LOCAL_WRITER_CHUNK_SIZE_BYTES =
Expand Down

0 comments on commit 9e5c0f5

Please sign in to comment.