Github user mmiklavc commented on a diff in the pull request:

    https://github.com/apache/metron/pull/1151#discussion_r208697541
  
    --- Diff: 
metron-platform/metron-pcap/src/main/java/org/apache/metron/pcap/mr/PcapJob.java
 ---
    @@ -216,20 +218,22 @@ public void setCompleteCheckInterval(long interval) {
         Configuration hadoopConf = PcapOptions.HADOOP_CONF.get(configuration, 
Configuration.class);
         FileSystem fileSystem = PcapOptions.FILESYSTEM.get(configuration, 
FileSystem.class);
         Path basePath = PcapOptions.BASE_PATH.getTransformed(configuration, 
Path.class);
    -    Path baseInterimResultPath = 
PcapOptions.BASE_INTERIM_RESULT_PATH.getTransformed(configuration, Path.class);
    +    Path baseInterimResultPath = PcapOptions.BASE_INTERIM_RESULT_PATH
    +        .getTransformedOrDefault(configuration, Path.class,
    +            new Path(PcapGlobalDefaults.BASE_INTERIM_RESULT_PATH_DEFAULT));
         long startTime;
         if (configuration.containsKey(PcapOptions.START_TIME_NS.getKey())) {
    -      startTime = PcapOptions.START_TIME_NS.get(configuration, Long.class);
    +      startTime = PcapOptions.START_TIME_NS.getOrDefault(configuration, 
Long.class, 0L);
         } else {
    -      startTime = PcapOptions.START_TIME_MS.get(configuration, Long.class) 
* 1000000;
    +      startTime = PcapOptions.START_TIME_MS.getOrDefault(configuration, 
Long.class, 0L) * 1000000;
         }
         long endTime;
         if (configuration.containsKey(PcapOptions.END_TIME_NS.getKey())) {
    -      endTime = PcapOptions.END_TIME_NS.get(configuration, Long.class);
    +      endTime = PcapOptions.END_TIME_NS.getOrDefault(configuration, 
Long.class, System.nanoTime());
    --- End diff --
    
    @justinleet good catch! Thanks.


---

Reply via email to