hadoop job -list
hadoop job -status your_job_id
long allocatedJVMMemory = Runtime.getRuntime().totalMemory();
long freeJVMMemory = Runtime.getRuntime().freeMemory();