mccheah commented on a change in pull request #153: [Baseline] Apply baseline
linting to iceberg-core
URL: https://github.com/apache/incubator-iceberg/pull/153#discussion_r274061414
##########
File path: core/src/main/java/org/apache/iceberg/MergingSnapshotUpdate.java
##########
@@ -46,19 +47,17 @@
import org.apache.iceberg.util.CharSequenceWrapper;
import org.apache.iceberg.util.StructLikeWrapper;
import org.apache.iceberg.util.Tasks;
+import org.apache.iceberg.util.ThreadPools;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static com.google.common.collect.Iterables.filter;
-import static com.google.common.collect.Iterables.transform;
import static org.apache.iceberg.TableProperties.MANIFEST_MIN_MERGE_COUNT;
import static
org.apache.iceberg.TableProperties.MANIFEST_MIN_MERGE_COUNT_DEFAULT;
import static org.apache.iceberg.TableProperties.MANIFEST_TARGET_SIZE_BYTES;
import static
org.apache.iceberg.TableProperties.MANIFEST_TARGET_SIZE_BYTES_DEFAULT;
-import static org.apache.iceberg.util.ThreadPools.getWorkerPool;
abstract class MergingSnapshotUpdate extends SnapshotUpdate {
- private final Logger LOG = LoggerFactory.getLogger(getClass());
+ private static final Logger LOG =
LoggerFactory.getLogger(MergingSnapshotUpdate.class);
Review comment:
I'm strongly against passing `Logger` instances around since it leads to a
lot of difficult to trace bugs. Particularly, it's possible for the logger to
be tied to this class (since we call `getClass`) but then it gets passed to a
different object of a different class, thus making the logger context
inconsistent.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]