Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-14320

Update programming-guide w/Java GroupByKey example

Details

    Description

      Minor addition to assist new users with a GroupByKey example in Java. Specifically:

      Add the following content to provide a Java example at the end of section 4.2.2. GroupByKey.

      ------------------

      Using GroupByKey is straightforward:

      < highlight java >
      // The input PCollection.
      PCollection<KV<String, String>> mapped = ...;

      // Apply GroupByKey to the PCollection mapped.
      // Save the result as the PCollection reduced.
      PCollection<KV<String, Iterable>> reduced =
      mapped.apply(GroupByKey.<String, String>create());

      {\{< /highlight >}

      }

      Attachments

        Issue Links

          Activity

            People

              denisecase Denise Case
              denisecase Denise Case
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h