Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tsl/platform/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,8 @@ cc_library(
name = "null_file_system",
hdrs = ["null_file_system.h"],
deps = [
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings:string_view",
"@xla//xla/tsl/platform:env",
],
)
Expand Down Expand Up @@ -1441,6 +1443,7 @@ cc_library(
deps = [
":random",
":retrying_utils",
"@com_google_absl//absl/strings:string_view",
"@xla//xla/tsl/platform:env",
"@xla//xla/tsl/platform:errors",
"@xla//xla/tsl/platform:status",
Expand All @@ -1456,7 +1459,6 @@ tsl_cc_test(
":str_util",
"@com_google_googletest//:gtest_main",
"@xla//xla/tsl/lib/core:status_test_util",
"@xla//xla/tsl/platform:env_impl",
"@xla//xla/tsl/platform:test",
],
)
Expand Down
4 changes: 3 additions & 1 deletion tsl/platform/null_file_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ limitations under the License.
#include <string>
#include <vector>

#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "xla/tsl/platform/env.h"
#include "xla/tsl/platform/file_system.h"
#include "xla/tsl/platform/file_system_helper.h"
Expand Down Expand Up @@ -62,7 +64,7 @@ class NullFileSystem : public FileSystem {
"NewReadOnlyMemoryRegionFromFile unimplemented");
}

absl::Status FileExists(const string& fname,
absl::Status FileExists(absl::string_view fname,
TransactionToken* token) override {
return errors::Unimplemented("FileExists unimplemented");
}
Expand Down
4 changes: 2 additions & 2 deletions tsl/platform/retrying_file_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ limitations under the License.

#include <functional>
#include <memory>
#include <string>
#include <vector>

#include "absl/strings/string_view.h"
#include "xla/tsl/platform/env.h"
#include "xla/tsl/platform/errors.h"
#include "xla/tsl/platform/file_system.h"
Expand Down Expand Up @@ -56,7 +56,7 @@ class RetryingFileSystem : public FileSystem {
const string& filename, TransactionToken* token,
std::unique_ptr<ReadOnlyMemoryRegion>* result) override;

absl::Status FileExists(const string& fname,
absl::Status FileExists(absl::string_view fname,
TransactionToken* token) override {
return RetryingUtils::CallWithRetries(
[this, &fname, token]() {
Expand Down
2 changes: 1 addition & 1 deletion tsl/platform/retrying_file_system_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class MockFileSystem : public FileSystem {
return calls_.ConsumeNextCall("NewReadOnlyMemoryRegionFromFile");
}

absl::Status FileExists(const string& fname,
absl::Status FileExists(absl::string_view fname,
TransactionToken* token) override {
return calls_.ConsumeNextCall("FileExists");
}
Expand Down
Loading