wordcount

package
v2.34.0-RC1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2021 License: Apache-2.0, BSD-3-Clause, MIT Imports: 8 Imported by: 2

Documentation

Overview

Package wordcount contains transforms for wordcount.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountWords

func CountWords(s beam.Scope, lines beam.PCollection) beam.PCollection

CountWords is a composite transform that counts the words of a PCollection of lines. It expects a PCollection of type string and returns a PCollection of type KV<string,int>. The Beam type checker enforces these constraints during pipeline construction.

func Format

func Format(s beam.Scope, counted beam.PCollection) beam.PCollection

Format formats a KV of a word and its count as a string.

func WordCount

func WordCount(glob, hash string, size int) *beam.Pipeline

WordCount returns a self-validating wordcount pipeline.

func WordCountFromPCol added in v2.34.0

func WordCountFromPCol(s beam.Scope, in beam.PCollection, hash string, size int)

WordCountFromPCol counts the words from a PCollection and validates it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL