Java 类org.apache.hadoop.mapred.Counters.CountersExceededException 实例源码

项目:hadoop    文件:TestCounters.java   
private void testMaxCountersLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_COUNTER_LIMIT; ++i) {
    counters.findCounter("test", "test" + i);
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
项目:hadoop    文件:TestCounters.java   
private void testMaxGroupsLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_GROUP_LIMIT; ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test" + i, "test");
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
项目:hadoop    文件:TestCounters.java   
private void shouldThrow(Class<? extends Exception> ecls, Runnable runnable) {
  try {
    runnable.run();
  } catch (CountersExceededException e) {
    return;
  }
  Assert.fail("Should've thrown " + ecls.getSimpleName());
}
项目:aliyun-oss-hadoop-fs    文件:TestCounters.java   
private void testMaxCountersLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_COUNTER_LIMIT; ++i) {
    counters.findCounter("test", "test" + i);
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
项目:aliyun-oss-hadoop-fs    文件:TestCounters.java   
private void testMaxGroupsLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_GROUP_LIMIT; ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test" + i, "test");
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
项目:aliyun-oss-hadoop-fs    文件:TestCounters.java   
private void shouldThrow(Class<? extends Exception> ecls, Runnable runnable) {
  try {
    runnable.run();
  } catch (CountersExceededException e) {
    return;
  }
  Assert.fail("Should've thrown " + ecls.getSimpleName());
}
项目:big-c    文件:TestCounters.java   
private void testMaxCountersLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_COUNTER_LIMIT; ++i) {
    counters.findCounter("test", "test" + i);
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
项目:big-c    文件:TestCounters.java   
private void testMaxGroupsLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_GROUP_LIMIT; ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test" + i, "test");
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
项目:big-c    文件:TestCounters.java   
private void shouldThrow(Class<? extends Exception> ecls, Runnable runnable) {
  try {
    runnable.run();
  } catch (CountersExceededException e) {
    return;
  }
  Assert.fail("Should've thrown " + ecls.getSimpleName());
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestCounters.java   
private void testMaxCountersLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_COUNTER_LIMIT; ++i) {
    counters.findCounter("test", "test" + i);
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestCounters.java   
private void testMaxGroupsLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_GROUP_LIMIT; ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test" + i, "test");
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestCounters.java   
private void shouldThrow(Class<? extends Exception> ecls, Runnable runnable) {
  try {
    runnable.run();
  } catch (CountersExceededException e) {
    return;
  }
  Assert.fail("Should've thrown " + ecls.getSimpleName());
}
项目:hadoop-plus    文件:TestCounters.java   
private void testMaxCountersLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_COUNTER_LIMIT; ++i) {
    counters.findCounter("test", "test" + i);
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
项目:hadoop-plus    文件:TestCounters.java   
private void testMaxGroupsLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_GROUP_LIMIT; ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test" + i, "test");
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
项目:hadoop-plus    文件:TestCounters.java   
private void shouldThrow(Class<? extends Exception> ecls, Runnable runnable) {
  try {
    runnable.run();
  } catch (CountersExceededException e) {
    return;
  }
  Assert.fail("Should've thrown " + ecls.getSimpleName());
}
项目:FlexMap    文件:TestCounters.java   
private void testMaxCountersLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_COUNTER_LIMIT; ++i) {
    counters.findCounter("test", "test" + i);
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
项目:FlexMap    文件:TestCounters.java   
private void testMaxGroupsLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_GROUP_LIMIT; ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test" + i, "test");
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
项目:FlexMap    文件:TestCounters.java   
private void shouldThrow(Class<? extends Exception> ecls, Runnable runnable) {
  try {
    runnable.run();
  } catch (CountersExceededException e) {
    return;
  }
  Assert.fail("Should've thrown " + ecls.getSimpleName());
}
项目:hops    文件:TestCounters.java   
private void testMaxCountersLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_COUNTER_LIMIT; ++i) {
    counters.findCounter("test", "test" + i);
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
项目:hops    文件:TestCounters.java   
private void testMaxGroupsLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_GROUP_LIMIT; ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test" + i, "test");
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
项目:hops    文件:TestCounters.java   
private void shouldThrow(Class<? extends Exception> ecls, Runnable runnable) {
  try {
    runnable.run();
  } catch (CountersExceededException e) {
    return;
  }
  Assert.fail("Should've thrown " + ecls.getSimpleName());
}
项目:hadoop-TCP    文件:TestCounters.java   
private void testMaxCountersLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_COUNTER_LIMIT; ++i) {
    counters.findCounter("test", "test" + i);
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
项目:hadoop-TCP    文件:TestCounters.java   
private void testMaxGroupsLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_GROUP_LIMIT; ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test" + i, "test");
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
项目:hadoop-TCP    文件:TestCounters.java   
private void shouldThrow(Class<? extends Exception> ecls, Runnable runnable) {
  try {
    runnable.run();
  } catch (CountersExceededException e) {
    return;
  }
  Assert.fail("Should've thrown " + ecls.getSimpleName());
}
项目:hadoop-on-lustre    文件:JobInProgress.java   
/**
 *  Returns map phase counters by summing over all map tasks in progress.
 *  This method returns true if counters are within limit or false.
 */
public synchronized boolean getMapCounters(Counters counters) {
  try {
    counters = incrementTaskCounters(counters, maps);
  } catch(CountersExceededException ce) {
    LOG.info("Counters Exceeded for Job: " + jobId, ce);
    return false;
  }
  return true;
}
项目:hadoop-on-lustre    文件:JobInProgress.java   
/**
 *  Returns map phase counters by summing over all map tasks in progress.
 *  This method returns true if counters are within limits and false otherwise.
 */
public synchronized boolean getReduceCounters(Counters counters) {
  try {
    counters = incrementTaskCounters(counters, reduces);
  } catch(CountersExceededException ce) {
    LOG.info("Counters Exceeded for Job: " + jobId, ce);
    return false;
  }
  return true;
}
项目:hadoop-on-lustre    文件:JobInProgress.java   
/**
 *  Returns the total job counters, by adding together the job, 
 *  the map and the reduce counters. This method returns true if
 *  counters are within limits and false otherwise.
 */
public synchronized boolean getCounters(Counters result) {
  try {
    result.incrAllCounters(getJobCounters());
    incrementTaskCounters(result, maps);
    incrementTaskCounters(result, reduces);
  } catch(CountersExceededException ce) {
    LOG.info("Counters Exceeded for Job: " + jobId, ce);
    return false;
  }
  return true;
}
项目:hardfs    文件:TestCounters.java   
private void testMaxCountersLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_COUNTER_LIMIT; ++i) {
    counters.findCounter("test", "test" + i);
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
项目:hardfs    文件:TestCounters.java   
private void testMaxGroupsLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_GROUP_LIMIT; ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test" + i, "test");
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
项目:hardfs    文件:TestCounters.java   
private void shouldThrow(Class<? extends Exception> ecls, Runnable runnable) {
  try {
    runnable.run();
  } catch (CountersExceededException e) {
    return;
  }
  Assert.fail("Should've thrown " + ecls.getSimpleName());
}
项目:hadoop-on-lustre2    文件:TestCounters.java   
private void testMaxCountersLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_COUNTER_LIMIT; ++i) {
    counters.findCounter("test", "test" + i);
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
项目:hadoop-on-lustre2    文件:TestCounters.java   
private void testMaxGroupsLimits(final Counters counters) {
  for (int i = 0; i < org.apache.hadoop.mapred.Counters.MAX_GROUP_LIMIT; ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test" + i, "test");
  }
  setExpected(counters);
  shouldThrow(CountersExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
项目:hadoop-on-lustre2    文件:TestCounters.java   
private void shouldThrow(Class<? extends Exception> ecls, Runnable runnable) {
  try {
    runnable.run();
  } catch (CountersExceededException e) {
    return;
  }
  Assert.fail("Should've thrown " + ecls.getSimpleName());
}
项目:mammoth    文件:JobInProgress.java   
/**
 *  Returns map phase counters by summing over all map tasks in progress.
 *  This method returns true if counters are within limit or false.
 */
public synchronized boolean getMapCounters(Counters counters) {
  try {
    counters = incrementTaskCounters(counters, maps);
  } catch(CountersExceededException ce) {
    LOG.info("Counters Exceeded for Job: " + jobId, ce);
    return false;
  }
  return true;
}
项目:mammoth    文件:JobInProgress.java   
/**
 *  Returns map phase counters by summing over all map tasks in progress.
 *  This method returns true if counters are within limits and false otherwise.
 */
public synchronized boolean getReduceCounters(Counters counters) {
  try {
    counters = incrementTaskCounters(counters, reduces);
  } catch(CountersExceededException ce) {
    LOG.info("Counters Exceeded for Job: " + jobId, ce);
    return false;
  }
  return true;
}
项目:mammoth    文件:JobInProgress.java   
/**
 *  Returns the total job counters, by adding together the job, 
 *  the map and the reduce counters. This method returns true if
 *  counters are within limits and false otherwise.
 */
public synchronized boolean getCounters(Counters result) {
  try {
    result.incrAllCounters(getJobCounters());
    incrementTaskCounters(result, maps);
    incrementTaskCounters(result, reduces);
  } catch(CountersExceededException ce) {
    LOG.info("Counters Exceeded for Job: " + jobId, ce);
    return false;
  }
  return true;
}
项目:hortonworks-extension    文件:JobInProgress.java   
/**
 *  Returns map phase counters by summing over all map tasks in progress.
 *  This method returns true if counters are within limit or false.
 */
public synchronized boolean getMapCounters(Counters counters) {
  try {
    counters = incrementTaskCounters(counters, maps);
  } catch(CountersExceededException ce) {
    LOG.info("Counters Exceeded for Job: " + jobId, ce);
    return false;
  }
  return true;
}
项目:hortonworks-extension    文件:JobInProgress.java   
/**
 *  Returns map phase counters by summing over all map tasks in progress.
 *  This method returns true if counters are within limits and false otherwise.
 */
public synchronized boolean getReduceCounters(Counters counters) {
  try {
    counters = incrementTaskCounters(counters, reduces);
  } catch(CountersExceededException ce) {
    LOG.info("Counters Exceeded for Job: " + jobId, ce);
    return false;
  }
  return true;
}
项目:hortonworks-extension    文件:JobInProgress.java   
/**
 *  Returns the total job counters, by adding together the job, 
 *  the map and the reduce counters. This method returns true if
 *  counters are within limits and false otherwise.
 */
public synchronized boolean getCounters(Counters result) {
  try {
    result.incrAllCounters(getJobCounters());
    incrementTaskCounters(result, maps);
    incrementTaskCounters(result, reduces);
  } catch(CountersExceededException ce) {
    LOG.info("Counters Exceeded for Job: " + jobId, ce);
    return false;
  }
  return true;
}
项目:hortonworks-extension    文件:JobInProgress.java   
/**
 *  Returns map phase counters by summing over all map tasks in progress.
 *  This method returns true if counters are within limit or false.
 */
public synchronized boolean getMapCounters(Counters counters) {
  try {
    counters = incrementTaskCounters(counters, maps);
  } catch(CountersExceededException ce) {
    LOG.info("Counters Exceeded for Job: " + jobId, ce);
    return false;
  }
  return true;
}