Validating the Tez Installation
Use the following procedure to run an example Tez application, such as OrderedWordCount, and validate your Tez installation.
- Create a sample test.txt file: - foo bar foo bar foo 
- Log in as the $HDFS_USER. The $HDFS_USER is the user that owns the HDFS service. For example, hdfs: - su $HDFS_USER 
- Create a - /tmp/input/directory in HDFS and copy the test.txt file into that directory:- hdfs dfs -mkdir -p /tmp/input/ hdfs dfs -put test.txt /tmp/input/ 
- Execute the following command to run the OrderedWordCount application using Tez: - hadoop jar /usr/hdp/current/tez-client/tez-examples-*.jar orderedwordcount /tmp/input/test.txt /tmp/out 
- Run the following command to verify the word count: - hdfs dfs -cat '/tmp/out/*' - This should return: - foo 3 bar 2 

