Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include
directive."
A block of code is set as follows:
public static class MyPartitioner extends org.apache.hadoop.mapreduce.Partitioner<Text,Text> { @Override public int getPartition(Text key, Text value, int numPartitions) { int count =Integer.parseInt(line[1]); if(count<=3) return 0; else return 1; } } And in Driver class job.setPartitionerClass(MyPartitioner.class);
Any command-line input or output is written as follows:
hadoop fs -put /home/shiva/Samplefile.txt /user/shiva/dir3/
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.