@@ -51,7 +51,7 @@ LoaderHarness::State LoaderHarness::state() const {
5151 return state_;
5252}
5353
54- Status LoaderHarness::LoadRequested () {
54+ absl:: Status LoaderHarness::LoadRequested () {
5555 mutex_lock l (mu_);
5656
5757 if (state_ != State::kNew ) {
@@ -60,25 +60,25 @@ Status LoaderHarness::LoadRequested() {
6060 state_ = State::kLoadRequested ;
6161 VLOG (1 ) << " Load requested for servable version " << id_;
6262
63- return OkStatus ();
63+ return absl:: OkStatus ();
6464}
6565
66- Status LoaderHarness::LoadApproved () {
66+ absl:: Status LoaderHarness::LoadApproved () {
6767 mutex_lock l (mu_);
6868 TF_RETURN_IF_ERROR (
6969 TransitionState (State::kLoadRequested , State::kLoadApproved ));
7070 LOG (INFO) << " Approving load for servable version " << id_;
71- return OkStatus ();
71+ return absl:: OkStatus ();
7272}
7373
74- Status LoaderHarness::Load () {
74+ absl:: Status LoaderHarness::Load () {
7575 {
7676 mutex_lock l (mu_);
7777 TF_RETURN_IF_ERROR (TransitionState (State::kLoadApproved , State::kLoading ));
7878 LOG (INFO) << " Loading servable version " << id_;
7979 }
8080
81- const Status status = Retry (
81+ const absl:: Status status = Retry (
8282 strings::StrCat (" Loading servable: " , id_.DebugString ()),
8383 options_.max_num_load_retries , options_.load_retry_interval_micros ,
8484 [&]() { return loader_->LoadWithMetadata ({id_}); },
@@ -111,17 +111,17 @@ Status LoaderHarness::Load() {
111111 return status;
112112}
113113
114- Status LoaderHarness::UnloadRequested () {
114+ absl:: Status LoaderHarness::UnloadRequested () {
115115 mutex_lock l (mu_);
116116 if (state_ != State::kReady ) {
117117 return errors::FailedPrecondition (
118118 " Servable not loaded, or unload already requested/ongoing" );
119119 }
120120 state_ = State::kUnloadRequested ;
121- return OkStatus ();
121+ return absl:: OkStatus ();
122122}
123123
124- Status LoaderHarness::UnloadInternal (State from_state) {
124+ absl:: Status LoaderHarness::UnloadInternal (State from_state) {
125125 {
126126 mutex_lock l (mu_);
127127 TF_RETURN_IF_ERROR (TransitionState (from_state, State::kUnloading ));
@@ -135,10 +135,10 @@ Status LoaderHarness::UnloadInternal(State from_state) {
135135 TF_RETURN_IF_ERROR (TransitionState (State::kUnloading , State::kDisabled ));
136136 LOG (INFO) << " Done unloading servable version " << id_;
137137 }
138- return OkStatus ();
138+ return absl:: OkStatus ();
139139}
140140
141- Status LoaderHarness::UnloadDueToCancelledLoad () {
141+ absl:: Status LoaderHarness::UnloadDueToCancelledLoad () {
142142 return UnloadInternal (State::kLoading );
143143}
144144
@@ -153,24 +153,26 @@ bool LoaderHarness::should_retry(absl::Status status) {
153153 return should_retry_ (status);
154154}
155155
156- Status LoaderHarness::Unload () { return UnloadInternal (State::kQuiesced ); }
156+ absl::Status LoaderHarness::Unload () {
157+ return UnloadInternal (State::kQuiesced );
158+ }
157159
158- Status LoaderHarness::StartQuiescing () {
160+ absl:: Status LoaderHarness::StartQuiescing () {
159161 mutex_lock l (mu_);
160162 TF_RETURN_IF_ERROR (
161163 TransitionState (State::kUnloadRequested , State::kQuiescing ));
162164 LOG (INFO) << " Quiescing servable version " << id_;
163- return OkStatus ();
165+ return absl:: OkStatus ();
164166}
165167
166- Status LoaderHarness::DoneQuiescing () {
168+ absl:: Status LoaderHarness::DoneQuiescing () {
167169 mutex_lock l (mu_);
168170 TF_RETURN_IF_ERROR (TransitionState (State::kQuiescing , State::kQuiesced ));
169171 LOG (INFO) << " Done quiescing servable version " << id_;
170- return OkStatus ();
172+ return absl:: OkStatus ();
171173}
172174
173- void LoaderHarness::ErrorInternal (const Status& status) {
175+ void LoaderHarness::ErrorInternal (const absl:: Status& status) {
174176 state_ = State::kError ;
175177 status_ = status;
176178 if (options_.error_callback ) {
@@ -180,14 +182,14 @@ void LoaderHarness::ErrorInternal(const Status& status) {
180182 << status_;
181183}
182184
183- void LoaderHarness::Error (const Status& status) {
185+ void LoaderHarness::Error (const absl:: Status& status) {
184186 mutex_lock l (mu_);
185187 ErrorInternal (status);
186188}
187189
188- Status LoaderHarness::TransitionState (const State from, const State to) {
190+ absl:: Status LoaderHarness::TransitionState (const State from, const State to) {
189191 if (state_ != from) {
190- const Status error = errors::Internal (
192+ const absl:: Status error = errors::Internal (
191193 " Illegal request to transition from state " , StateDebugString (state_),
192194 " to " , StateDebugString (to));
193195#ifndef NDEBUG
@@ -198,10 +200,10 @@ Status LoaderHarness::TransitionState(const State from, const State to) {
198200 return error;
199201 }
200202 state_ = to;
201- return OkStatus ();
203+ return absl:: OkStatus ();
202204}
203205
204- Status LoaderHarness::status () const {
206+ absl:: Status LoaderHarness::status () const {
205207 mutex_lock l (mu_);
206208 return status_;
207209}
0 commit comments