Python word count with DirectRunner gets stuck during application termination on Windows
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
Using virtualenv 15 **** python 2.7.13 **** pip 9.0.1 on Windows 2016
Example logs from DirectRunner:
```
(beamRC2)PS C:\Users\lcwik\.virtualenvs\beamRC2> python -m apache_beam.examples.wordcount --input ".\input\*"
--output l
ocal_counts
No handlers could be found for logger "oauth2client.contrib.multistore_file"
INFO:root:Missing
pipeline option (runner). Executing pipeline using the default runner: DirectRunner.
INFO:root:Running
pipeline with DirectRunner.
```
Application gets stuck here, pressing ctrl-z gets it unstuck and the remainder below is logged
```
INFO:root:Starting finalize_write threads with num_shards: 1, batches: 1, num_threads: 1
INFO:root:Renamed
1 shards in 0.14 seconds.
INFO:root:number of empty lines: 47851
INFO:root:average word length: 4
```
Output is correct, so it seems as though the bug is somewhere in shutdown.
Happens when using a local or gs path with the DirectRunner. Enabling DEBUG logging did not add any additional details.
Imported from Jira [BEAM-2265](https://issues.apache.org/jira/browse/BEAM-2265). Original Jira may contain additional context.
Reported by: lcwik.
Contributor guide
Research direction
Start by reproducing apache_beam.examples.wordcount with DirectRunner on Windows using the command and environment shown. Trace the DirectRunner application-termination and shutdown path; done means the process exits without needing Ctrl-Z while preserving the correct output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100