https://github.com/xmlking/wordcount
https://github.com/xmlking/wordcount
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/xmlking/wordcount
- Owner: xmlking
- Created: 2019-10-30T22:40:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-30T23:11:35.000Z (over 6 years ago)
- Last Synced: 2024-05-01T20:22:24.815Z (almost 2 years ago)
- Language: Go
- Size: 2.05 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wordcount
```
gsutil ls gs://micro-starter-kit/dataflow/wordcount/
gsutil cp shakespeare.txt gs://micro-starter-kit/dataflow/wordcount/input/
gsutil cp gs://micro-starter-kit/dataflow/wordcount/input/shakespeare.txt .
```
```bash
# setup
go mod init github.com/xmlking/wordcount
# build
go build
# run
./wordcount --input shakespeare.txt --output counts
export GOOGLE_APPLICATION_CREDENTIALS="/Users/sumo/micro-starter-kit.json"
./wordcount --input gs://micro-starter-kit/dataflow/wordcount/input/shakespeare.txt \
--output gs://micro-starter-kit/dataflow/wordcount/output/counts \
--runner dataflow \
--job_name wordcount1 \
--project micro-starter-kit \
--region us-west1 \
--subnetwork my-subnetwork \
--temp_location gs://micro-starter-kit/dataflow/wordcount/tmp/ \
--staging_location gs://micro-starter-kit/dataflow/wordcount/binaries/ \
--worker_harness_container_image=apachebeam/go_sdk:latest
./wordcount --input gs://micro-starter-kit/dataflow/wordcount/input/shakespeare.txt \
--output gs://micro-starter-kit/dataflow/wordcount/output/counts \
--runner dataflow \
--job_name wordcount1 \
--project micro-starter-kit \
--temp_location gs://micro-starter-kit/dataflow/wordcount/tmp/ \
--staging_location gs://micro-starter-kit/dataflow/wordcount/binaries/ \
--worker_harness_container_image=apachebeam/go_sdk:latest
```