Example code for using Apache Shark