jon-wei commented on a change in pull request #11961:
URL: https://github.com/apache/druid/pull/11961#discussion_r764464482
##########
File path:
core/src/main/java/org/apache/druid/java/util/common/parsers/ParseException.java
##########
@@ -38,26 +40,43 @@
public class ParseException extends RuntimeException
{
private final boolean fromPartiallyValidRow;
+ private final long timeOfExceptionMillis;
+ private final String input;
- public ParseException(String formatText, Object... arguments)
+ public ParseException(@Nullable String input, String formatText, Object...
arguments)
{
super(StringUtils.nonStrictFormat(formatText, arguments));
+ this.input = input;
this.fromPartiallyValidRow = false;
+ this.timeOfExceptionMillis = System.currentTimeMillis();
}
- public ParseException(boolean fromPartiallyValidRow, String formatText,
Object... arguments)
+ public ParseException(@Nullable String input, boolean fromPartiallyValidRow,
String formatText, Object... arguments)
Review comment:
Added a comment
##########
File path:
core/src/main/java/org/apache/druid/java/util/common/parsers/UnparseableColumnsParseException.java
##########
@@ -0,0 +1,44 @@
+/*
+ * 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.druid.java.util.common.parsers;
+
+import java.util.List;
+
+public class UnparseableColumnsParseException extends ParseException
Review comment:
Added javadocs
##########
File path:
extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/FileBasedProtobufBytesDecoder.java
##########
@@ -98,35 +98,40 @@ public DynamicMessage parse(ByteBuffer bytes)
url = new URL(descriptorFilePath);
}
catch (MalformedURLException e) {
- throw new ParseException(e, "Descriptor not found in class path or
malformed URL:" + descriptorFilePath);
+ throw new ParseException(
+ descriptorFilePath,
+ e,
+ "Descriptor not found in class path or malformed URL:" +
descriptorFilePath
+ );
}
try {
fin = url.openConnection().getInputStream();
}
catch (IOException e) {
- throw new ParseException(e, "Cannot read descriptor file: " + url);
+ throw new ParseException(url.toString(), e, "Cannot read descriptor
file: " + url);
}
}
DynamicSchema dynamicSchema;
try {
dynamicSchema = DynamicSchema.parseFrom(fin);
}
catch (Descriptors.DescriptorValidationException e) {
- throw new ParseException(e, "Invalid descriptor file: " +
descriptorFilePath);
+ throw new ParseException(descriptorFilePath, e, "Invalid descriptor
file: " + descriptorFilePath);
}
catch (IOException e) {
- throw new ParseException(e, "Cannot read descriptor file: " +
descriptorFilePath);
+ throw new ParseException(descriptorFilePath, e, "Cannot read descriptor
file: " + descriptorFilePath);
}
Set<String> messageTypes = dynamicSchema.getMessageTypes();
if (messageTypes.size() == 0) {
- throw new ParseException("No message types found in the descriptor: " +
descriptorFilePath);
+ throw new ParseException(descriptorFilePath, "No message types found in
the descriptor: " + descriptorFilePath);
}
String messageType = protoMessageType == null ? (String)
messageTypes.toArray()[0] : protoMessageType;
Descriptors.Descriptor desc =
dynamicSchema.getMessageDescriptor(messageType);
if (desc == null) {
throw new ParseException(
+ null,
Review comment:
Made this use messageType
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/SinglePhaseSubTask.java
##########
@@ -262,6 +263,8 @@ public TaskStatus runTask(final TaskToolbox toolbox)
inputSource,
toolbox.getIndexingTmpDir()
);
+
+ Thread.sleep(60000);
Review comment:
Ah, that was left in from testing, removed this
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]