#!/bin/bash
PORT_NUMBER=9009
export HADOOP_CLIENT_OPTS='-agentlib:jdwp=transport=dt_socket,address=localhost:$PORT_NUMBER,server=y,suspend=y'
echo Running: hadoop-local "$@" \(with jdb debugging enabled on port number: $PORT_NUMBER\)
echo Run \`jdb -sourcepath ./src/ -attach localhost:$PORT_NUMBER\` from the main project director to access the debugger.
hadoop-local "$@"

# Note: 
# The the javac entry in the ant build.xml file needs to be updated to include the debug flag as shown below:
# <javac srcdir="${src}" debug="true" destdir="${build}" target="1.7">
