flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] StephanEwen commented on a change in pull request #13784: [FLINK-19698][connectors/common] API improvements to the Sources.
Date Wed, 28 Oct 2020 10:34:13 GMT

StephanEwen commented on a change in pull request #13784:
URL: https://github.com/apache/flink/pull/13784#discussion_r513286480



##########
File path: flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java
##########
@@ -565,6 +565,20 @@ else if (t instanceof Error) {
 		return Optional.empty();
 	}
 
+	/**
+	 * Find the root cause of the given throwable chain.
+	 *
+	 * @param throwable the throwable chain to check.
+	 * @return the root cause of the throwable chain.
+	 */
+	public static Throwable findRootCause(Throwable throwable) {

Review comment:
       I think this needs an extra check against cyclic cause chains, which are possible and
nasty.
   
   We previously used the Apache Commons Lang for that: https://github.com/apache/flink/blob/master/flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheGetTest.java#L597
   
   I think at the very least, we need a set to check duplicates and stop traversing once we
see an exception we saw before.

##########
File path: flink-core/src/main/java/org/apache/flink/api/common/state/CheckpointListener.java
##########
@@ -0,0 +1,51 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one

Review comment:
       Nit: The header here uses a different style than the rest of the code (other files
have * at every line start).

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointListener.java
##########
@@ -1,19 +1,19 @@
 /*
- * 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.
+ Licensed to the Apache Software Foundation (ASF) under one

Review comment:
       Nit: The header here uses a different style than the rest of the code (other files
have * at every line start).




----------------------------------------------------------------
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



Mime
View raw message