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

Function _read_available_output

tests/util/shell_util.py:85–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83 stderr = list()
84
85 def _read_available_output():
86 while True:
87 available_fds, _, _ = select(remaining_fds, [], [], 0)
88 if not available_fds:
89 return
90 for fd in available_fds:
91 data = os.read(fd, 4096)
92 if fd == stdout_fileno:
93 if not data:
94 del remaining_fds[0]
95 else:
96 stdout.append(data.decode())
97 elif fd == stderr_fileno:
98 if not data:
99 del remaining_fds[-1]
100 else:
101 stderr.append(data.decode())
102
103 deadline = time() + timeout_secs if timeout_secs is not None else None
104 while True:

Callers 1

shellFunction · 0.85

Calls 3

decodeMethod · 0.80
readMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected