You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/11/21 22:34:08 UTC

[GitHub] [incubator-druid] clintropolis commented on a change in pull request #8923: RetryingInputEntity to retry on transient errors

clintropolis commented on a change in pull request #8923: RetryingInputEntity to retry on transient errors
URL: https://github.com/apache/incubator-druid/pull/8923#discussion_r349352361
 
 

 ##########
 File path: core/src/main/java/org/apache/druid/data/input/impl/RetryingInputEntity.java
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * 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.data.input.impl;
+
+import com.google.common.base.Predicate;
+import org.apache.druid.data.input.InputEntity;
+import org.apache.druid.data.input.impl.prefetch.ObjectOpenFunction;
+
+import javax.annotation.Nullable;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+
+public class RetryingInputEntity implements InputEntity
 
 Review comment:
   I changed my mind, I think this might be better as part of the `InputEntity` interface so we don't have to wrap `RetryingInputEntity` everywhere, e.g. swap the default to be for `read()` instead of `read(long offset)` and provide a default implementation for `getRetryCondition` that is always false?

----------------------------------------------------------------
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@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org