@@ -247,14 +247,14 @@ bool AspireSpecificVersions(
247
247
}
248
248
249
249
// Like PollFileSystemForConfig(), but for a single servable.
250
- Status PollFileSystemForServable (
250
+ absl:: Status PollFileSystemForServable (
251
251
const FileSystemStoragePathSourceConfig::ServableToMonitor& servable,
252
252
std::vector<ServableData<StoragePath>>* versions) {
253
253
// First, determine whether the base path exists. This check guarantees that
254
254
// we don't emit an empty aspired-versions list for a non-existent (or
255
255
// transiently unavailable) base-path. (On some platforms, GetChildren()
256
256
// returns an empty list instead of erring if the base path isn't found.)
257
- Status status = Env::Default ()->FileExists (servable.base_path ());
257
+ absl:: Status status = Env::Default ()->FileExists (servable.base_path ());
258
258
if (!status.ok ()) {
259
259
return errors::InvalidArgument (
260
260
" Could not find base path " , servable.base_path (), " for servable " ,
@@ -317,13 +317,13 @@ Status PollFileSystemForServable(
317
317
" (eg. '/1/')?" ;
318
318
}
319
319
320
- return Status ();
320
+ return absl:: Status ();
321
321
}
322
322
323
323
// Polls the file system, and populates 'versions_by_servable_name' with the
324
324
// aspired-versions data FileSystemStoragePathSource should emit based on what
325
325
// was found, indexed by servable name.
326
- Status PollFileSystemForConfig (
326
+ absl:: Status PollFileSystemForConfig (
327
327
const FileSystemStoragePathSourceConfig& config,
328
328
std::map<string, std::vector<ServableData<StoragePath>>>*
329
329
versions_by_servable_name) {
@@ -334,12 +334,13 @@ Status PollFileSystemForConfig(
334
334
versions_by_servable_name->insert (
335
335
{servable.servable_name (), std::move (versions)});
336
336
}
337
- return Status ();
337
+ return absl:: Status ();
338
338
}
339
339
340
340
// Determines if, for any servables in 'config', the file system doesn't
341
341
// currently contain at least one version under its base path.
342
- Status FailIfZeroVersions (const FileSystemStoragePathSourceConfig& config) {
342
+ absl::Status FailIfZeroVersions (
343
+ const FileSystemStoragePathSourceConfig& config) {
343
344
std::map<string, std::vector<ServableData<StoragePath>>>
344
345
versions_by_servable_name;
345
346
TF_RETURN_IF_ERROR (
@@ -361,19 +362,19 @@ Status FailIfZeroVersions(const FileSystemStoragePathSourceConfig& config) {
361
362
" at: " , servable_name_to_base_path_map[servable]);
362
363
}
363
364
}
364
- return Status ();
365
+ return absl:: Status ();
365
366
}
366
367
367
368
} // namespace
368
369
369
- Status FileSystemStoragePathSource::Create (
370
+ absl:: Status FileSystemStoragePathSource::Create (
370
371
const FileSystemStoragePathSourceConfig& config,
371
372
std::unique_ptr<FileSystemStoragePathSource>* result) {
372
373
result->reset (new FileSystemStoragePathSource ());
373
374
return (*result)->UpdateConfig (config);
374
375
}
375
376
376
- Status FileSystemStoragePathSource::UpdateConfig (
377
+ absl:: Status FileSystemStoragePathSource::UpdateConfig (
377
378
const FileSystemStoragePathSourceConfig& config) {
378
379
mutex_lock l (mu_);
379
380
@@ -394,7 +395,7 @@ Status FileSystemStoragePathSource::UpdateConfig(
394
395
}
395
396
config_ = config;
396
397
397
- return Status ();
398
+ return absl:: Status ();
398
399
}
399
400
400
401
void FileSystemStoragePathSource::SetAspiredVersionsCallback (
@@ -410,7 +411,7 @@ void FileSystemStoragePathSource::SetAspiredVersionsCallback(
410
411
aspired_versions_callback_ = callback;
411
412
412
413
const auto thread_fn = [this ](void ) {
413
- Status status = this ->PollFileSystemAndInvokeCallback ();
414
+ absl:: Status status = this ->PollFileSystemAndInvokeCallback ();
414
415
if (!status.ok ()) {
415
416
LOG (ERROR) << " FileSystemStoragePathSource encountered a "
416
417
" filesystem access error: "
@@ -437,7 +438,7 @@ void FileSystemStoragePathSource::SetAspiredVersionsCallback(
437
438
}
438
439
}
439
440
440
- Status FileSystemStoragePathSource::PollFileSystemAndInvokeCallback () {
441
+ absl:: Status FileSystemStoragePathSource::PollFileSystemAndInvokeCallback () {
441
442
mutex_lock l (mu_);
442
443
std::map<string, std::vector<ServableData<StoragePath>>>
443
444
versions_by_servable_name;
@@ -461,16 +462,16 @@ Status FileSystemStoragePathSource::PollFileSystemAndInvokeCallback() {
461
462
}
462
463
CallAspiredVersionsCallback (servable, versions);
463
464
}
464
- return Status ();
465
+ return absl:: Status ();
465
466
}
466
467
467
- Status FileSystemStoragePathSource::UnaspireServables (
468
+ absl:: Status FileSystemStoragePathSource::UnaspireServables (
468
469
const std::set<string>& servable_names) {
469
470
for (const string& servable_name : servable_names) {
470
471
CallAspiredVersionsCallback (servable_name,
471
472
std::vector<ServableData<StoragePath>>{});
472
473
}
473
- return Status ();
474
+ return absl:: Status ();
474
475
}
475
476
476
477
} // namespace serving
0 commit comments