@Override public Command build(Config config, Command parent, Command child, MorphlineContext context) { return new CopyTestCommand(this, config, parent, child, context); }
@Override protected boolean doProcess(Record record) { for (int i = 0; i < count; i++) { Record next = record.copy(); next.replaceValues(name, i); if (!getChild().process(next)) { return false; } } return true; }
public CopyTestCommand(CommandBuilder builder, Config config, Command parent, Command child, MorphlineContext context) { super(builder, config, parent, child, context); this.name = getConfigs().getString(config, "name"); this.count = getConfigs().getInt(config, "count", 2); getCounter("counter1"); getHistogram("histogram1"); getMeter("meter1"); getTimer("timer1"); }