org.apache.hadoop.mapreduce.counters.Limits Java Examples

The following examples show how to use org.apache.hadoop.mapreduce.counters.Limits. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestCounters.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private void testMaxCounters(final Counters counters) {
  LOG.info("counters max="+ Limits.getCountersMax());
  for (int i = 0; i < Limits.getCountersMax(); ++i) {
    counters.findCounter("test", "test"+ i);
  }
  setExpected(counters);
  shouldThrow(LimitExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
 
Example #2
Source File: TestCounters.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private void testMaxGroups(final Counters counters) {
  LOG.info("counter groups max="+ Limits.getGroupsMax());
  for (int i = 0; i < Limits.getGroupsMax(); ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test"+ i, "test");
  }
  setExpected(counters);
  shouldThrow(LimitExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
 
Example #3
Source File: TestCounters.java    From big-c with Apache License 2.0 5 votes vote down vote up
private void testMaxCounters(final Counters counters) {
  LOG.info("counters max="+ Limits.getCountersMax());
  for (int i = 0; i < Limits.getCountersMax(); ++i) {
    counters.findCounter("test", "test"+ i);
  }
  setExpected(counters);
  shouldThrow(LimitExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("test", "bad");
    }
  });
  checkExpected(counters);
}
 
Example #4
Source File: TestCounters.java    From big-c with Apache License 2.0 5 votes vote down vote up
private void testMaxGroups(final Counters counters) {
  LOG.info("counter groups max="+ Limits.getGroupsMax());
  for (int i = 0; i < Limits.getGroupsMax(); ++i) {
    // assuming COUNTERS_MAX > GROUPS_MAX
    counters.findCounter("test"+ i, "test");
  }
  setExpected(counters);
  shouldThrow(LimitExceededException.class, new Runnable() {
    public void run() {
      counters.findCounter("bad", "test");
    }
  });
  checkExpected(counters);
}
 
Example #5
Source File: Counters.java    From hadoop with Apache License 2.0 4 votes vote down vote up
GenericGroup(String name, String displayName, Limits limits) {
  super(name, displayName, limits);
}
 
Example #6
Source File: Counters.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
protected Group newGenericGroup(String name, String displayName,
                                Limits limits) {
  return new Group(new GenericGroup(name, displayName, limits));
}
 
Example #7
Source File: Counters.java    From hadoop with Apache License 2.0 4 votes vote down vote up
GenericGroup(String name, String displayName, Limits limits) {
  super(name, displayName, limits);
}
 
Example #8
Source File: Counters.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
protected CounterGroup newGenericGroup(String name, String displayName,
                                       Limits limits) {
  return new GenericGroup(name, displayName, limits);
}
 
Example #9
Source File: Counters.java    From big-c with Apache License 2.0 4 votes vote down vote up
GenericGroup(String name, String displayName, Limits limits) {
  super(name, displayName, limits);
}
 
Example #10
Source File: Counters.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
protected Group newGenericGroup(String name, String displayName,
                                Limits limits) {
  return new Group(new GenericGroup(name, displayName, limits));
}
 
Example #11
Source File: Counters.java    From big-c with Apache License 2.0 4 votes vote down vote up
GenericGroup(String name, String displayName, Limits limits) {
  super(name, displayName, limits);
}
 
Example #12
Source File: Counters.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
protected CounterGroup newGenericGroup(String name, String displayName,
                                       Limits limits) {
  return new GenericGroup(name, displayName, limits);
}
 
Example #13
Source File: HadoopMapReduceCounters.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override public Limits limits() {
    return null;
}