[
https://issues.apache.org/jira/browse/METRON-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16548304#comment-16548304
]
ASF GitHub Bot commented on METRON-1674:
----------------------------------------
Github user cestella commented on a diff in the pull request:
https://github.com/apache/metron/pull/1109#discussion_r203502396
--- Diff:
metron-platform/metron-pcap/src/main/java/org/apache/metron/pcap/finalizer/PcapRestFinalizer.java
---
@@ -0,0 +1,46 @@
+/**
+ * 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.nio.file.Paths;
+import java.util.Map;
+import org.apache.hadoop.fs.Path;
+import org.apache.metron.job.Statusable;
+import org.apache.metron.pcap.config.PcapOptions;
+
+/**
+ * Write to HDFS.
+ */
+public class PcapRestFinalizer extends PcapFinalizer {
+
+ private String user;
+ private String jobType = Statusable.JobType.MAP_REDUCE.name();
+
+ public void setUser(String user) {
+ this.user = user;
+ }
+
+ @Override
+ protected Path getOutputPath(Map<String, Object> config, int partition) {
+ String jobId = PcapOptions.JOB_ID.get(config, String.class);
+ String finalOutputPath = PcapOptions.FINAL_OUTPUT_PATH.get(config,
String.class);
--- End diff --
Why isn't the user passed into the config rather than being in a member
variable? This seems inconsistent. I'd expect a
PcapOptions.USERNAME.get(config, String.class) rather than a member variable.
> Create REST endpoint for job status abstraction
> -----------------------------------------------
>
> Key: METRON-1674
> URL: https://issues.apache.org/jira/browse/METRON-1674
> Project: Metron
> Issue Type: Sub-task
> Reporter: Ryan Merriman
> Priority: Major
>
> We need a REST endpoint that will enable us to get the status of a running
> job.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)