hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r575009 - in /lucene/hadoop/trunk/src/contrib/hbase: ./ src/java/org/apache/hadoop/hbase/mapred/
Date Wed, 12 Sep 2007 16:48:58 GMT
Author: jimk
Date: Wed Sep 12 09:48:54 2007
New Revision: 575009

URL: http://svn.apache.org/viewvc?rev=575009&view=rev
Log:
HADOOP-1884 Remove useless debugging log messages from hbase.mapred

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableInputFormat.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableMap.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableReduce.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=575009&r1=575008&r2=575009&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Wed Sep 12 09:48:54 2007
@@ -57,6 +57,7 @@
     HADOOP-1835 Updated Documentation for HBase setup/installation
                 (Izaak Rubin via Stack)
     HADOOP-1868 Make default configuration more responsive
+    HADOOP-1884 Remove useless debugging log messages from hbase.mapred
 
 
 Below are the list of changes before 2007-08-18

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableInputFormat.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableInputFormat.java?rev=575009&r1=575008&r2=575009&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableInputFormat.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableInputFormat.java
Wed Sep 12 09:48:54 2007
@@ -77,18 +77,14 @@
      * @throws IOException
      */
     public TableRecordReader(Text startRow, Text endRow) throws IOException {
-      LOG.debug("start construct");
       m_row = new TreeMap<Text, byte[]>();
       m_scanner = m_table.obtainScanner(m_cols, startRow);
       m_endRow = endRow;
-      LOG.debug("end construct");
     }
 
     /** {@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,15 +177,15 @@
     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;
   }
 
   /** {@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} */

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableMap.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableMap.java?rev=575009&r1=575008&r2=575009&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableMap.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableMap.java
Wed Sep 12 09:48:54 2007
@@ -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,12 +82,10 @@
   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;
     }
     map((HStoreKey)key, (MapWritable)value, m_collector, reporter);
-    LOG.debug("end map");
   }
 
   /**

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java?rev=575009&r1=575008&r2=575009&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java
Wed Sep 12 09:48:54 2007
@@ -75,22 +75,13 @@
 
     /** {@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<Writable, Writable> e: value.entrySet()) {
         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);
   }
 

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableReduce.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableReduce.java?rev=575009&r1=575008&r2=575009&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableReduce.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/mapred/TableReduce.java
Wed Sep 12 09:48:54 2007
@@ -29,16 +29,12 @@
 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
  */
 @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,12 +67,11 @@
   @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;
     }
     reduce((Text)key, values, m_collector, reporter);
-    LOG.debug("end reduce");
   }
 
   /**



Mime
View raw message