[
https://issues.apache.org/jira/browse/DRILL-7532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17252410#comment-17252410
]
ASF GitHub Bot commented on DRILL-7532:
---------------------------------------
vdiravka commented on a change in pull request #2116:
URL: https://github.com/apache/drill/pull/2116#discussion_r542662674
##########
File path:
contrib/format-syslog/src/main/java/org/apache/drill/exec/store/syslog/SyslogBatchReader.java
##########
@@ -0,0 +1,335 @@
+/*
+ * 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.drill.exec.store.syslog;
+
+import org.apache.drill.common.AutoCloseables;
+import org.apache.drill.common.exceptions.CustomErrorContext;
+import org.apache.drill.common.exceptions.UserException;
+import org.apache.drill.common.types.TypeProtos;
+import org.apache.drill.common.types.TypeProtos.MinorType;
+import
org.apache.drill.exec.physical.impl.scan.file.FileScanFramework.FileSchemaNegotiator;
+import org.apache.drill.exec.physical.impl.scan.framework.ManagedReader;
+import org.apache.drill.exec.physical.resultSet.ResultSetLoader;
+import org.apache.drill.exec.physical.resultSet.RowSetLoader;
+import org.apache.drill.exec.record.metadata.ColumnMetadata;
+import org.apache.drill.exec.record.metadata.MetadataUtils;
+import org.apache.drill.exec.record.metadata.SchemaBuilder;
+import org.apache.drill.exec.record.metadata.TupleMetadata;
+import org.apache.drill.exec.store.dfs.easy.EasySubScan;
+import org.apache.drill.exec.vector.accessor.ScalarWriter;
+import org.apache.drill.exec.vector.accessor.TupleWriter;
+import org.apache.hadoop.mapred.FileSplit;
+import org.joda.time.Instant;
+import org.realityforge.jsyslog.message.StructuredDataParameter;
+import org.realityforge.jsyslog.message.SyslogMessage;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+public class SyslogBatchReader implements ManagedReader<FileSchemaNegotiator> {
+ private static final Logger logger =
LoggerFactory.getLogger(SyslogBatchReader.class);
+ private final String STRUCTURED_DATA_PREFIX = "structured_data_";
Review comment:
```suggestion
private static final String STRUCTURED_DATA_PREFIX = "structured_data_";
```
##########
File path:
contrib/format-syslog/src/test/java/org/apache/drill/exec/store/syslog/TestSyslogFormat.java
##########
@@ -58,6 +66,7 @@ private static void defineSyslogPlugin() throws
ExecutionSetupException {
// Define a temporary plugin for the "cp" storage plugin.
Review comment:
```suggestion
// Define a temporary plugin for the "cp" and "dsp" storage plugins.
```
##########
File path: contrib/format-syslog/src/test/resources/syslog/test.syslog1
##########
@@ -1,2 +1,2 @@
<86>1 2015-08-05T21:58:59.693Z 192.168.2.132 SecureAuth0 23108 ID52020
[SecureAuth@27389 UserAgent="Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0;
rv:11.0) like Gecko" UserHostAddress="192.168.2.132"
BrowserSession="0gvhdi5udjuqtweprbgoxilc" Realm="SecureAuth0"
Appliance="secureauthqa.gosecureauth.com" Company="SecureAuth Corporation"
UserID="Tester2" PEN="27389" HostName="192.168.2.132" Category="AUDIT"
Priority="4"] Found the user for retrieving user's profile
-<134>1 2016-04-01T16:44:58Z MacBook-Pro-3 - 94473 - -
{"pid":94473,"hostname":"MacBook-Pro-3","level":30,"msg":"hello
world","time":1459529098958,"v":1}
\ No newline at end of file
+<134>1 2016-04-01T16:44:00.58Z MacBook-Pro-3 - 94473 - -
{"pid":94473,"hostname":"MacBook-Pro-3","level":30,"msg":"hello
world","time":1459529098958,"v":1}
Review comment:
```suggestion
<134>1 2016-04-01T16:44:00.58Z MacBook-Pro-3 - 94473 - -
{"pid":94473,"hostname":"MacBook-Pro-3","level":30,"msg":"hello
world","time":1459529098958,"v":1}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Convert SysLog to EVF
> ---------------------
>
> Key: DRILL-7532
> URL: https://issues.apache.org/jira/browse/DRILL-7532
> Project: Apache Drill
> Issue Type: Sub-task
> Affects Versions: 1.17.0
> Reporter: Arina Ielchiieva
> Assignee: Charles Givre
> Priority: Major
> Labels: ready-to-commit
> Fix For: 1.19.0
>
>
> Convert SysLog to EVF
--
This message was sent by Atlassian Jira
(v8.3.4#803005)