code: @Deprecated
    public void setMaxVirtualMemoryForTask(long vmem) {
      LOG.warn("setMaxVirtualMemoryForTask() is deprecated."+
        "Instead use setMemoryForMapTask() and setMemoryForReduceTask()");
      if(vmem != DISABLED_MEMORY_LIMIT && vmem < 0) {
        setMemoryForMapTask(DISABLED_MEMORY_LIMIT);
        setMemoryForReduceTask(DISABLED_MEMORY_LIMIT);
      }
  
      if(get(JobConf.MAPRED_TASK_MAXVMEM_PROPERTY) == null) {
        setMemoryForMapTask(vmem / (1024 * 1024)); //Changing bytes to mb
        setMemoryForReduceTask(vmem / (1024 * 1024));//Changing bytes to mb
      }else{
        this.setLong(JobConf.MAPRED_TASK_MAXVMEM_PROPERTY,vmem);
      }
    }
docs: Set the maximum amount of memory any task of this job can use. See
  {@link #MAPRED_TASK_MAXVMEM_PROPERTY}
  <p/>
  mapred.task.maxvmem is split into
  mapred.job.map.memory.mb
  and mapred.job.map.memory.mb,mapred
  each of the new key are set
  as mapred.task.maxvmem / 1024
  as new values are in MB
  
  @param vmem Maximum amount of virtual memory in bytes any task of this job
  can use.
  @see #getMaxVirtualMemoryForTask()
  @deprecated
  Use {@link #setMemoryForMapTask(long mem)}  and
  Use {@link #setMemoryForReduceTask(long mem)}