Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in the text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "For this reason, Beam defined a RestrictionTracker
object."
A block of code is set as follows:
ClassLoader loader = FirstPipeline.class.getClassLoader();String file = loader.getResource("lorem.txt").getFile();List<String> lines = Files.readAllLines(Paths.get(file), StandardCharsets.UTF_8);
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
@Override public PCollection<String> expand(PBegin input) { return input .apply(Impulse.create()) .apply(MapElements.into(TypeDescriptors.strings()) .via(e -> directoryPath)) .apply(new DirectoryWatch()) .apply(Reshuffle.viaRandomKey()) .apply(new FileRead()); }
Any command-line input or output is written as follows:
$ ./mvnw clean install
Bold: Indicates a new term, an important word, or words that you see on screen. For instance, words in menus or dialog boxes appear in bold. Here is an example: "A typical example of a runner would be Apache Flink, Apache Spark, or Google Cloud Dataflow."
Tips or Important notes
Appear like this.