[
https://issues.apache.org/jira/browse/METRON-1555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16503987#comment-16503987
]
ASF GitHub Bot commented on METRON-1555:
----------------------------------------
Github user mmiklavc commented on a diff in the pull request:
https://github.com/apache/metron/pull/1019#discussion_r193571493
--- Diff:
metron-interface/metron-rest/src/main/java/org/apache/metron/rest/service/impl/PcapQueryServiceImpl.java
---
@@ -0,0 +1,73 @@
+/**
+ * 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.rest.service.impl;
+
+import com.google.common.collect.Lists;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.metron.common.hadoop.SequenceFileIterable;
+import org.apache.metron.common.utils.timestamp.TimestampConverters;
+import org.apache.metron.pcap.PcapMerger;
+import org.apache.metron.pcap.filter.query.QueryPcapFilter;
+import org.apache.metron.pcap.mr.PcapJob;
+import org.apache.metron.rest.model.PcapsResponse;
+import org.apache.metron.rest.service.PcapQueryService;
+import org.springframework.stereotype.Service;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.List;
+
+@Service
+public class PcapQueryServiceImpl implements PcapQueryService {
+
+ @Override
+ public PcapsResponse query() {
+ PcapsResponse response = new PcapsResponse();
+ PcapJob pcapJob = new PcapJob();
+ Configuration configuration = new Configuration();
+ try {
+ SequenceFileIterable results = pcapJob.query(
+ new Path("/apps/metron/pcap"),
--- End diff --
These paths should be configurable
> Update REST to run YARN and MR jobs
> -----------------------------------
>
> Key: METRON-1555
> URL: https://issues.apache.org/jira/browse/METRON-1555
> Project: Metron
> Issue Type: Sub-task
> Reporter: Ryan Merriman
> Assignee: Ryan Merriman
> Priority: Major
>
> This task involves enabling REST to submit YARN or MR jobs. We will likely
> need to:
> * update Maven dependencies to include YARN and MR libraries in the
> classpath and resolve any version conflicts
> * update REST start script to include properties required for YARN
> * update the MPack for any additional setup work (create user HDFS directory
> for example) and properties needed
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)