Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-20438

Add an HBase antipattern check for reintroducing commons-logging

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 2.1.0, 2.0.0
    • Fix Version/s: 3.0.0, 2.0.0
    • Component/s: dependencies, test
    • Labels:
      None

      Description

      We moved to slf4j in HBASE-10092, but looking at our source tree we've had some regression back to commons-logging:

      $ git grep -E "org.apache.commons.logging.Log(Factory|;)"
      hbase-server/src/main/java/org/apache/hadoop/hbase/master/zksyncer/ClientZKSyncer.java:import org.apache.commons.logging.Log;
      hbase-server/src/main/java/org/apache/hadoop/hbase/master/zksyncer/ClientZKSyncer.java:import org.apache.commons.logging.LogFactory;
      hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/FileArchiverNotifierImpl.java:import org.apache.commons.logging.Log;
      hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/FileArchiverNotifierImpl.java:import org.apache.commons.logging.LogFactory;
      hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeReportingChore.java:import org.apache.commons.logging.Log;
      hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeReportingChore.java:import org.apache.commons.logging.LogFactory;
      hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeStoreImpl.java:import org.apache.commons.logging.Log;
      hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/RegionSizeStoreImpl.java:import org.apache.commons.logging.LogFactory;
      hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/StoreHotnessProtector.java:import org.apache.commons.logging.Log;
      hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/throttle/StoreHotnessProtector.java:import org.apache.commons.logging.LogFactory;
      hbase-server/src/test/java/org/apache/hadoop/hbase/TestClusterPortAssignment.java:import org.apache.commons.logging.Log;
      hbase-server/src/test/java/org/apache/hadoop/hbase/TestClusterPortAssignment.java:import org.apache.commons.logging.LogFactory;
      hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java:import org.apache.commons.logging.Log;
      hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFlushFromClient.java:import org.apache.commons.logging.LogFactory;
      hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java:import org.apache.commons.logging.Log;
      hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java:import org.apache.commons.logging.LogFactory;
      hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestFailedProcCleanup.java:import org.apache.commons.logging.Log;
      hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/TestFailedProcCleanup.java:import org.apache.commons.logging.LogFactory;
      hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestDisabledWAL.java:import org.apache.commons.logging.Log;
      hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestDisabledWAL.java:import org.apache.commons.logging.LogFactory;
      

      We should do the same kind of check that we do to avoid e.g. the Hadoop annotations

        Attachments

        1. HBASE-20438.master.001.patch
          0.9 kB
          Nihal Jain

          Activity

            People

            • Assignee:
              nihaljain.cs Nihal Jain
              Reporter:
              busbey Sean Busbey
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: