Counter moreThan1Counter = new GenericCounter(); when(reducerContext.getCounter(AvroKeyDedupReducer.EVENT_COUNTER.MORE_THAN_1)).thenReturn(moreThan1Counter); Counter dedupedCounter = new GenericCounter(); when(reducerContext.getCounter(AvroKeyDedupReducer.EVENT_COUNTER.DEDUPED)).thenReturn(dedupedCounter); Counter recordCounter = new GenericCounter(); when(reducerContext.getCounter(AvroKeyDedupReducer.EVENT_COUNTER.RECORD_COUNT)).thenReturn(recordCounter); reducer.setup(reducerContext);
@Override protected Counter newCounter(String name, String displayName, long value) { return new GenericCounter(name, displayName, value); }
@Override public Counter getCounter(String group, String name) { return new GenericCounter(); }
@Override protected Counter newCounter(String name, String displayName, long value) { return new GenericCounter(name, displayName, value); }
@Override protected Counter newCounter() { return new GenericCounter(); }
@Override protected Counter newCounter(String name, String displayName, long value) { return new GenericCounter(name, displayName, value); }
@Override protected Counter newCounter() { return new GenericCounter(); }
@Override protected Counter newCounter() { return new GenericCounter(); }
@Override protected Counter newCounter(String name, String displayName, long value) { return new GenericCounter(name, displayName, value); }
@Override protected Counter newCounter() { return new GenericCounter(); }
@Override public Counter getCounter(Enum<?> name) { return new GenericCounter(); }
public Counter() { this(new GenericCounter()); }
public Counter() { this(new GenericCounter()); }
public Counter() { this(new GenericCounter()); }
public Counter() { this(new GenericCounter()); }
@Override protected Counter newCounter(String counterName, String displayName, long value) { return new Counter(new GenericCounter(counterName, displayName, value)); }
@Override protected Counter newCounter(String counterName, String displayName, long value) { return new Counter(new GenericCounter(counterName, displayName, value)); }
@Override protected Counter newCounter(String counterName, String displayName, long value) { return new Counter(new GenericCounter(counterName, displayName, value)); }
@Override protected Counter newCounter(String counterName, String displayName, long value) { return new Counter(new GenericCounter(counterName, displayName, value)); }
AuditReplayThread(Mapper.Context mapperContext, DelayQueue<AuditReplayCommand> queue, ConcurrentMap<String, FileSystem> fsCache) throws IOException { commandQueue = queue; this.fsCache = fsCache; loginUser = UserGroupInformation.getLoginUser(); mapperConf = mapperContext.getConfiguration(); namenodeUri = URI.create(mapperConf.get(WorkloadDriver.NN_URI)); startTimestampMs = mapperConf.getLong(WorkloadDriver.START_TIMESTAMP_MS, -1); createBlocks = mapperConf.getBoolean(AuditReplayMapper.CREATE_BLOCKS_KEY, AuditReplayMapper.CREATE_BLOCKS_DEFAULT); LOG.info("Start timestamp: " + startTimestampMs); for (REPLAYCOUNTERS rc : REPLAYCOUNTERS.values()) { replayCountersMap.put(rc, new GenericCounter()); } for (ReplayCommand replayCommand : ReplayCommand.values()) { individualCommandsMap.put(replayCommand + INDIVIDUAL_COMMANDS_COUNT_SUFFIX, new GenericCounter()); individualCommandsMap.put(replayCommand + INDIVIDUAL_COMMANDS_LATENCY_SUFFIX, new GenericCounter()); individualCommandsMap.put(replayCommand + INDIVIDUAL_COMMANDS_INVALID_SUFFIX, new GenericCounter()); } }