MCPcopy Create free account
hub / github.com/apache/impala / WaitForDiskFileStatus

Method WaitForDiskFileStatus

be/src/runtime/tmp-file-mgr-test.cc:317–327  ·  view source on GitHub ↗

Helper to wait for the disk file changing to specific status. Will timeout after 20 seconds.

Source from the content-addressed store, hash-verified

315 /// Helper to wait for the disk file changing to specific status. Will timeout after 20
316 /// seconds.
317 static bool WaitForDiskFileStatus(DiskFile* file, DiskFileStatus status) {
318 DCHECK(file != nullptr);
319 int wait_times = 20;
320 while (wait_times-- > 0) {
321 if (file->GetFileStatus() == status) {
322 return true;
323 }
324 usleep(1000 * 1000); // sleep 1s each round.
325 }
326 return false;
327 }
328
329 /// Helper to get the remote temporary file from the temporary file group.
330 static TmpFileRemote* GetRemoteTmpFileByFileGroup(TmpFileGroup& file_group, int idx) {

Callers

nothing calls this directly

Calls 1

GetFileStatusMethod · 0.80

Tested by

no test coverage detected