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

    https://github.com/apache/metron/pull/1108#discussion_r203383057
  
    --- Diff: 
metron-platform/metron-pcap/src/main/java/org/apache/metron/pcap/finalizer/PcapCliFinalizer.java
 ---
    @@ -0,0 +1,37 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.metron.pcap.finalizer;
    +
    +import java.util.Map;
    +import org.apache.hadoop.fs.Path;
    +import org.apache.metron.pcap.config.PcapOptions;
    +
    +/**
    + * Write to local FS.
    + */
    +public class PcapCliFinalizer extends PcapFinalizer {
    +
    +  @Override
    +  protected String getOutputFileName(Map<String, Object> config, int 
partition) {
    +    Path finalOutputPath = PcapOptions.FINAL_OUTPUT_PATH.get(config, 
PcapOptions.STRING_TO_PATH, Path.class);
    +    String prefix = PcapOptions.FINAL_FILENAME_PREFIX.get(config, 
String.class);
    +    return String.format("%s/pcap-data-%s+%04d.pcap", finalOutputPath, 
prefix, partition);
    --- End diff --
    
    This constant string should be be a `static final String` with a comment 
about the file format in English.


---

Reply via email to