title: Hive query execution failed
body: <p>I am executing a hive query and its failing.
  I have used the below set parameters. </p>
  
  <pre><code>SET hive.execution.engine=tez ;
  SET tez.am.resource.memory.mb=4096;
  SET hive.tez.container.size=4096;
  set hive.compute.query.using.stats=true;
  set hive.stats.fetch.column.stats=true;
  set hive.stats.fetch.partition.stats=true;
  SET hive.execution.engine=tez ;
  SET hive.vectorized.execution.enabled=false;
  SET hive.auto.convert.join=false;
  </code></pre>
  
  <p>I am getting the error.</p>
  
  <blockquote>
    <p>Vertex failed, vertexName=Map 38,<br>
    vertexId=vertex_1479183638971_463139_1_22, diagnostics=[Task failed,<br>
    taskId=task_1479183638971_463139_1_22_000036,<br>
        diagnostics=[TaskAttempt 0 failed, info=[Container container_1479183638971_463139_01_000556 finished with diagnostics set
    to [Container failed, exitCode=-104.<br>
        Container [pid=31713,containerID=container_1479183638971_463139_01_000556] is
    running beyond physical memory limits. Current usage: 4.2 GB of 4 GB
    physical memory used;</p>
  </blockquote>
  
  <p>So that I have tried with parallel option the below parameters still I am getting some different error.</p>
  
  <pre><code>SET hive.execution.engine=tez ;
  SET tez.am.resource.memory.mb=4096;
  SET hive.tez.container.size=4096;
  set hive.compute.query.using.stats=true;
  set hive.stats.fetch.column.stats=true;
  set hive.stats.fetch.partition.stats=true;
  SET hive.execution.engine=tez ;
  SET hive.vectorized.execution.enabled=false;
  SET hive.auto.convert.join=false;
  SET tez.am.java.opts=-server -Xmx3276m -Djava.net.preferIPv4Stack=true -XX:+UseNUMA -XX:+UseParallelGC;
  SET hive.tez.java.opts=-server -Xmx3276m -Djava.net.preferIPv4Stack=true -XX:+UseNUMA -XX:+UseParallelGC;
  </code></pre>
  
  <p>I am getting the error.</p>
  
  <blockquote>
    <p>Status: Failed<br>
    Counters limit exceeded: Too many counters: 2001 max=2000 FAILED:
    Execution Error, return code 2 from
    org.apache.hadoop.hive.ql.exec.tez.TezTask. Counters limit exceeded:
    Too many counters: 2001 max=2000</p>
  </blockquote>
  
  <p>Please help me. How to make my query to execute.</p>
  
  <p>Thanks in Advance.</p>