Github user cestella commented on a diff in the pull request:
https://github.com/apache/metron/pull/1109#discussion_r203046824
--- Diff:
metron-interface/metron-rest-client/src/main/java/org/apache/metron/rest/model/pcap/PcapRequest.java
---
@@ -17,75 +17,65 @@
*/
package org.apache.metron.rest.model.pcap;
-public class PcapRequest {
+import org.apache.commons.collections4.map.AbstractMapDecorator;
+import org.apache.metron.pcap.config.PcapOptions;
- private String baseOutputPath;
- private String basePath;
- private Long startTime = 0L;
- private Long endTime = System.currentTimeMillis();
- private Integer numReducers = 1;
+import java.util.HashMap;
- public String getBaseOutputPath() {
- return baseOutputPath;
- }
+public class PcapRequest extends AbstractMapDecorator<String, Object> {
- public void setBaseOutputPath(String baseOutputPath) {
- this.baseOutputPath = baseOutputPath;
+ public PcapRequest() {
+ super(new HashMap<>());
+ setStartTimeMs(0L);
+ setEndTimeMs(System.currentTimeMillis());
+ setNumReducers(1);
--- End diff --
It might be worthwhile to pick the number of reducers > 1 just because this
is going to be slow by default. Maybe 10 would be a sensible middle ground?
---