From 9069ed1ac6885817ec182e76a8c0c5d417c159e5 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 27 Sep 2010 22:18:28 +0000 Subject: [PATCH] HBASE-2995 Incorrect dependency on Log class from Jetty git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1001936 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + .../java/org/apache/hadoop/hbase/mapreduce/Export.java | 6 ++++-- src/test/java/org/apache/hadoop/hbase/client/TestHCM.java | 8 +++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index de0e33ada80..2c20090f422 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -549,6 +549,7 @@ Release 0.21.0 - Unreleased time as a split HBASE-3042 Use LO4J in SequenceFileLogReader (Nicolas Spiegelberg via Stack) + HBASE-2995 Incorrect dependency on Log class from Jetty IMPROVEMENTS HBASE-1760 Cleanup TODOs in HTable diff --git a/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java b/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java index 7b08134cc1d..d328915dbfa 100644 --- a/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java +++ b/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java @@ -31,7 +31,8 @@ import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat; import org.apache.hadoop.util.GenericOptionsParser; -import org.mortbay.log.Log; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; /** * Export an HBase table. @@ -39,6 +40,7 @@ import org.mortbay.log.Log; * back in again. */ public class Export { + private static final Log LOG = LogFactory.getLog(Export.class); final static String NAME = "export"; /** @@ -89,7 +91,7 @@ public class Export { long startTime = args.length > 3? Long.parseLong(args[3]): 0L; long endTime = args.length > 4? Long.parseLong(args[4]): Long.MAX_VALUE; s.setTimeRange(startTime, endTime); - Log.info("verisons=" + versions + ", starttime=" + startTime + + LOG.info("verisons=" + versions + ", starttime=" + startTime + ", endtime=" + endTime); TableMapReduceUtil.initTableMapperJob(tableName, s, Exporter.class, null, null, job); diff --git a/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java b/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java index 4b4468cc4a5..b01a2d29977 100644 --- a/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java +++ b/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java @@ -37,7 +37,8 @@ import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.mortbay.log.Log; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNotNull; @@ -46,6 +47,7 @@ import static org.junit.Assert.assertNotNull; * This class is for testing HCM features */ public class TestHCM { + private static final Log LOG = LogFactory.getLog(TestHCM.class); private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private static final byte[] TABLE_NAME = Bytes.toBytes("test"); private static final byte[] FAM_NAM = Bytes.toBytes("f"); @@ -99,7 +101,7 @@ public class TestHCM { // to remove them, so the LRU strategy does not work. configuration.set("someotherkey", String.valueOf(_randy.nextInt())); last = connection; - Log.info("Cache Size: " + LOG.info("Cache Size: " + getHConnectionManagerCacheSize() + ", Valid Keys: " + getValidKeyCount()); Thread.sleep(100); @@ -154,4 +156,4 @@ public class TestHCM { HRegionLocation rl = conn.getCachedLocation(TABLE_NAME, ROW); assertNull("What is this location?? " + rl, rl); } -} \ No newline at end of file +}