Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableInputFormat.java =================================================================== --- src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableInputFormat.java (revision 574964) +++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableInputFormat.java (working copy) @@ -77,11 +77,9 @@ * @throws IOException */ public TableRecordReader(Text startRow, Text endRow) throws IOException { - LOG.debug("start construct"); m_row = new TreeMap(); m_scanner = m_table.obtainScanner(m_cols, startRow); m_endRow = endRow; - LOG.debug("end construct"); } /** {@inheritDoc} */ @@ -86,9 +84,7 @@ /** {@inheritDoc} */ public void close() throws IOException { - LOG.debug("start close"); m_scanner.close(); - LOG.debug("end close"); } /** @@ -135,7 +131,6 @@ */ @SuppressWarnings("unchecked") public boolean next(HStoreKey key, MapWritable value) throws IOException { - LOG.debug("start next"); m_row.clear(); HStoreKey tKey = key; boolean hasMore = m_scanner.next(tKey, m_row); @@ -152,7 +147,6 @@ } } } - LOG.debug("end next"); return hasMore; } @@ -175,8 +169,6 @@ */ @SuppressWarnings("unused") public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException { - LOG.debug("start getSplits"); - Text[] startKeys = m_table.getStartKeys(); if(startKeys == null || startKeys.length == 0) { throw new IOException("Expecting at least one region"); @@ -185,9 +177,10 @@ for(int i = 0; i < startKeys.length; i++) { splits[i] = new TableSplit(m_tableName, startKeys[i], ((i + 1) < startKeys.length) ? startKeys[i + 1] : new Text()); - LOG.debug("split: " + i + "->" + splits[i]); + if (LOG.isDebugEnabled()) { + LOG.debug("split: " + i + "->" + splits[i]); + } } - LOG.debug("end splits"); return splits; } @@ -193,7 +186,6 @@ /** {@inheritDoc} */ public void configure(JobConf job) { - LOG.debug("start configure"); Path[] tableNames = job.getInputPaths(); m_tableName = new Text(tableNames[0].getName()); String colArg = job.get(COLUMN_LIST); @@ -207,7 +199,6 @@ } catch (Exception e) { LOG.error(e); } - LOG.debug("end configure"); } /** {@inheritDoc} */ Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableMap.java =================================================================== --- src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableMap.java (revision 574964) +++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableMap.java (working copy) @@ -32,7 +32,6 @@ import org.apache.hadoop.mapred.Reporter; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HStoreKey; -import org.apache.log4j.Logger; /** * Scan an HBase table to sort by a specified sort column. @@ -41,9 +40,6 @@ */ @SuppressWarnings("unchecked") public abstract class TableMap extends MapReduceBase implements Mapper { - - private static final Logger LOG = Logger.getLogger(TableMap.class.getName()); - private TableOutputCollector m_collector; /** constructor*/ @@ -86,7 +82,6 @@ public void map(WritableComparable key, Writable value, OutputCollector output, Reporter reporter) throws IOException { - LOG.debug("start map"); if(m_collector.collector == null) { m_collector.collector = output; } @@ -91,7 +86,6 @@ m_collector.collector = output; } map((HStoreKey)key, (MapWritable)value, m_collector, reporter); - LOG.debug("end map"); } /** Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java =================================================================== --- src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java (revision 574964) +++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java (working copy) @@ -75,11 +75,7 @@ /** {@inheritDoc} */ public void write(Text key, MapWritable value) throws IOException { - LOG.debug("start write"); - - // start transaction - - long xid = m_table.startUpdate(key); + long xid = m_table.startUpdate(key); // start transaction for (Map.Entry e: value.entrySet()) { m_table.put(xid, (Text)e.getKey(), @@ -85,12 +81,7 @@ m_table.put(xid, (Text)e.getKey(), ((ImmutableBytesWritable)e.getValue()).get()); } - - // end transaction - - m_table.commit(xid); - - LOG.debug("end write"); + m_table.commit(xid); // end transaction } } @@ -105,7 +96,6 @@ // expecting exactly one path - LOG.debug("start get writer"); Text tableName = new Text(job.get(OUTPUT_TABLE)); HTable table = null; try { @@ -114,7 +104,6 @@ LOG.error(e); throw e; } - LOG.debug("end get writer"); return new TableRecordWriter(table); } Index: src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableReduce.java =================================================================== --- src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableReduce.java (revision 574964) +++ src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableReduce.java (working copy) @@ -29,7 +29,6 @@ import org.apache.hadoop.mapred.OutputCollector; import org.apache.hadoop.mapred.Reducer; import org.apache.hadoop.mapred.Reporter; -import org.apache.log4j.Logger; /** * Write a table, sorting by the input key @@ -36,9 +35,6 @@ */ @SuppressWarnings("unchecked") public abstract class TableReduce extends MapReduceBase implements Reducer { - private static final Logger LOG = - Logger.getLogger(TableReduce.class.getName()); - TableOutputCollector m_collector; /** Constructor */ @@ -71,7 +67,7 @@ @SuppressWarnings("unchecked") public void reduce(WritableComparable key, Iterator values, OutputCollector output, Reporter reporter) throws IOException { - LOG.debug("start reduce"); + if(m_collector.collector == null) { m_collector.collector = output; } @@ -76,7 +72,6 @@ m_collector.collector = output; } reduce((Text)key, values, m_collector, reporter); - LOG.debug("end reduce"); } /**