You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/08/01 18:11:50 UTC
[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request
#4474: An auto recommendation for inverted index
mcvsubbu commented on a change in pull request #4474: An auto recommendation for inverted index
URL: https://github.com/apache/incubator-pinot/pull/4474#discussion_r309830241
##########
File path: pinot-tools/src/main/java/org/apache/pinot/tools/tuner/query/src/parser/BrokerLogParserImpl.java
##########
@@ -0,0 +1,76 @@
+/**
+ * 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.pinot.tools.tuner.query.src.parser;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.annotation.Nullable;
+import org.apache.pinot.tools.tuner.query.src.stats.wrapper.AbstractQueryStats;
+import org.apache.pinot.tools.tuner.query.src.stats.wrapper.IndexSuggestQueryStatsImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Implementation of {@link QueryParser}, to parse complete lines of broker log text
+ */
+public class BrokerLogParserImpl implements QueryParser {
+ private static final Logger LOGGER = LoggerFactory.getLogger(BrokerLogParserImpl.class);
+
+ //Regex to parse Broker Log
Review comment:
A change to the log line will break the tool?
Perhaps the log line parers should be in the respective packages (broker/server)?
Bonus points if we can add a unit test that attempts to parse the log line generated by the current code, so we know we have broken it.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org