diff --git a/CHANGES.txt b/CHANGES.txt index 1824f72420b..646216120bc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -216,6 +216,8 @@ Release 0.21.0 - Unreleased Purtell) HBASE-2017 Set configurable max value size check to 10MB HBASE-2019 [EC2] remember credentials if not configured + HBASE-2029 Reduce shell exception dump on console + (Lars George and J-D via Stack) NEW FEATURES HBASE-1901 "General" partitioner for "hbase-48" bulk (behind the api, write diff --git a/bin/hirb.rb b/bin/hirb.rb index ae1aba9e641..5dea4a1f918 100644 --- a/bin/hirb.rb +++ b/bin/hirb.rb @@ -18,17 +18,11 @@ include Java # Some goodies for hirb. Should these be left up to the user's discretion? require 'irb/completion' -# Hack to turn down zk logging so it don't spew over the shell -# log4j.logger.org.apache.zookeeper=INFO -logger = org.apache.log4j.Logger.getLogger("org.apache.zookeeper") -logger.setLevel(org.apache.log4j.Level::WARN); - # Add the $HBASE_HOME/bin directory, the location of this script, to the ruby # load path so I can load up my HBase ruby modules $LOAD_PATH.unshift File.dirname($PROGRAM_NAME) -# Require formatter and hbase +# Require formatter require 'Formatter' -require 'HBase' # See if there are args for this shell. If any, read and then strip from ARGV # so they don't go through to irb. Output shell 'usage' if user types '--help' @@ -36,11 +30,13 @@ cmdline_help = < format_width) # TODO, etc. @formatter = Formatter::XHTML.new(STDOUT) +# Set logging level to avoid verboseness +logger = org.apache.log4j.Logger.getLogger("org.apache.zookeeper") +logger.setLevel(logLevel); +logger = org.apache.log4j.Logger.getLogger("org.apache.hadoop.hbase") +logger.setLevel(logLevel); +# Require HBase now after setting log levels +require 'HBase' + # Setup the HBase module. Create a configuration. # Turn off retries in hbase and ipc. Human doesn't want to wait on N retries. @configuration = org.apache.hadoop.hbase.HBaseConfiguration.new() @@ -478,6 +487,7 @@ module IRB IRB.setup(ap_path) @CONF[:IRB_NAME] = 'hbase' @CONF[:AP_NAME] = 'hbase' + @CONF[:BACK_TRACE_LIMIT] = 0 unless $fullBackTrace if @CONF[:SCRIPT] hirb = HIRB.new(nil, @CONF[:SCRIPT]) diff --git a/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java b/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java index 61564121f49..33aa73378ff 100644 --- a/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java +++ b/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java @@ -196,8 +196,10 @@ public class HConnectionManager implements HConstants { */ public void process(WatchedEvent event) { KeeperState state = event.getState(); - LOG.debug("Got ZooKeeper event, state: " + state + ", type: " - + event.getType() + ", path: " + event.getPath()); + if(!state.equals(KeeperState.SyncConnected)) { + LOG.debug("Got ZooKeeper event, state: " + state + ", type: " + + event.getType() + ", path: " + event.getPath()); + } if (state == KeeperState.Expired) { resetZooKeeper(); } @@ -698,7 +700,7 @@ public class HConnectionManager implements HConstants { if (LOG.isDebugEnabled()) { LOG.debug("locateRegionInMeta attempt " + tries + " of " + this.numRetries + " failed; retrying after sleep of " + - getPauseTime(tries), e); + getPauseTime(tries) + " because: " + e.getMessage()); } relocateRegion(parentTable, metaKey); } else { @@ -862,7 +864,9 @@ public class HConnectionManager implements HConstants { SoftValueSortedMap tableLocations = getTableLocations(tableName); if (tableLocations.put(startKey, location) == null) { - LOG.debug("Cached location " + location); + LOG.debug("Cached location for " + + location.getRegionInfo().getRegionNameAsString() + + " is " + location.getServerAddress()); } }