Set HADOOP_HOME and HADOOP_CONF_DIR to point to the right place for
your cluster.
The files in HADOOP_CONF_DIR are used to override parameters needed to
connect to remote clusters.
Use the --cluster flag for jaql's shell.
I always do some sanity tests to make sure my current jaql client
session can see the cluster.
For hdfs:
jaql> hdfsShell("-ls ."); // do you see the files that you expect
on the cluster?
For mapreduce:
jaql> [1,2,3] -> write(hdfs("foo"));
jaql> read(hdfs("foo")) -> transform $ + 1; // do you see this
job on the map-reduce admin console?
Also, its always useful to try some bin/hadoop commands to make sure
that the hadoop cluster is visible from your environment.