diff options
author | 2018-06-15 13:38:29 -0700 | |
---|---|---|
committer | 2018-06-15 13:39:52 -0700 | |
commit | d15440327249899c0bb9cda36996937c74e46e47 (patch) | |
tree | fe4715f9b9af28363acdbb29453b444529ab67bc /src/main/java/com | |
parent | a81c200f6d9c54c9631756dcb82ea04dff04a78a (diff) |
ActionFS supports fast digests. Add test coverage for this and some file metadata operations.
RELNOTES: None
PiperOrigin-RevId: 200765925
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java b/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java index 604f1c3dae..e5430355a6 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/ActionFileSystem.java @@ -216,7 +216,8 @@ final class ActionFileSystem extends AbstractFileSystemWithCustomStat @Override public boolean isDirectory() { - // TODO(felly): Support directory awareness. + // TODO(felly): Support directory awareness, and consider disallowing directory artifacts + // eagerly at ActionFS construction. return false; } @@ -265,7 +266,7 @@ final class ActionFileSystem extends AbstractFileSystemWithCustomStat @Override protected long getFileSize(Path path, boolean followSymlinks) throws IOException { - return getMetadataOrThrowFileNotFound(path).getSize(); + return stat(path, followSymlinks).getSize(); } @Override @@ -312,6 +313,11 @@ final class ActionFileSystem extends AbstractFileSystemWithCustomStat } @Override + protected byte[] getDigest(Path path, HashFunction hash) throws IOException { + return getFastDigest(path, hash); + } + + @Override protected Collection<String> getDirectoryEntries(Path path) throws IOException { // TODO(felly): Support directory traversal. return ImmutableList.of(); |