hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject hbase git commit: HBASE-12810 Update to htrace-incubating
Date Thu, 22 Jan 2015 22:37:29 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 508085fe5 -> 9824eb784


HBASE-12810 Update to htrace-incubating


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9824eb78
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9824eb78
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9824eb78

Branch: refs/heads/master
Commit: 9824eb7840aa636210f48d7d5969ccabd4e13af6
Parents: 508085f
Author: Nick Dimiduk <ndimiduk@apache.org>
Authored: Wed Jan 21 13:02:24 2015 -0800
Committer: Nick Dimiduk <ndimiduk@apache.org>
Committed: Thu Jan 22 14:28:20 2015 -0800

----------------------------------------------------------------------
 hbase-client/pom.xml                            |  2 +-
 .../hadoop/hbase/client/AsyncProcess.java       |  2 +-
 .../client/ResultBoundedCompletionService.java  |  4 +-
 .../apache/hadoop/hbase/ipc/RpcClientImpl.java  |  6 +--
 .../hbase/zookeeper/RecoverableZooKeeper.java   |  4 +-
 hbase-common/pom.xml                            |  2 +-
 .../hbase/trace/HBaseHTraceConfiguration.java   |  2 +-
 .../hadoop/hbase/trace/SpanReceiverHost.java    | 52 +++++---------------
 hbase-it/pom.xml                                |  2 +-
 .../hadoop/hbase/mttr/IntegrationTestMTTR.java  |  8 +--
 .../trace/IntegrationTestSendTraceRequests.java |  6 +--
 hbase-server/pom.xml                            |  2 +-
 .../hadoop/hbase/executor/EventHandler.java     |  6 +--
 .../hadoop/hbase/io/hfile/HFileReaderV2.java    |  4 +-
 .../org/apache/hadoop/hbase/ipc/CallRunner.java |  4 +-
 .../apache/hadoop/hbase/ipc/RequestContext.java |  2 +-
 .../org/apache/hadoop/hbase/ipc/RpcServer.java  |  2 +-
 .../hbase/mapreduce/TableMapReduceUtil.java     |  2 +-
 .../master/handler/DisableTableHandler.java     |  2 +-
 .../hbase/regionserver/MemStoreFlusher.java     |  4 +-
 .../hadoop/hbase/regionserver/wal/FSHLog.java   |  8 +--
 .../hbase/regionserver/wal/RingBufferTruck.java |  2 +-
 .../hbase/regionserver/wal/SyncFuture.java      |  2 +-
 .../hadoop/hbase/PerformanceEvaluation.java     | 14 +++---
 .../hadoop/hbase/trace/TestHTraceHooks.java     | 26 +++++-----
 .../hbase/wal/WALPerformanceEvaluation.java     | 13 +++--
 hbase-shell/pom.xml                             |  2 +-
 .../src/main/ruby/shell/commands/trace.rb       |  4 +-
 hbase-thrift/pom.xml                            |  2 +-
 pom.xml                                         |  4 +-
 30 files changed, 85 insertions(+), 110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-client/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml
index 56d3d0a..29fa4fe 100644
--- a/hbase-client/pom.xml
+++ b/hbase-client/pom.xml
@@ -152,7 +152,7 @@
       <artifactId>zookeeper</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.htrace</groupId>
+      <groupId>org.apache.htrace</groupId>
       <artifactId>htrace-core</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
index 826c91f..d00118c 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
@@ -54,7 +54,7 @@ import org.apache.hadoop.hbase.client.coprocessor.Batch;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
-import org.htrace.Trace;
+import org.apache.htrace.Trace;
 
 import com.google.common.annotations.VisibleForTesting;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ResultBoundedCompletionService.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ResultBoundedCompletionService.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ResultBoundedCompletionService.java
index 1dab776..eacbe2d 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ResultBoundedCompletionService.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ResultBoundedCompletionService.java
@@ -25,7 +25,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.htrace.Trace;
+import org.apache.htrace.Trace;
 
 /**
  * A completion service for the RpcRetryingCallerFactory.
@@ -162,4 +162,4 @@ public class ResultBoundedCompletionService<V> {
       if (future != null) future.cancel(true);
     }
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java
index 97fa475..0b45eb1 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/RpcClientImpl.java
@@ -60,9 +60,9 @@ import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.Token;
 import org.apache.hadoop.security.token.TokenIdentifier;
 import org.apache.hadoop.security.token.TokenSelector;
-import org.htrace.Span;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
+import org.apache.htrace.Span;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
 
 import javax.net.SocketFactory;
 import javax.security.sasl.SaslException;

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
index a72f49c..4272671 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java
@@ -45,8 +45,8 @@ import org.apache.zookeeper.data.ACL;
 import org.apache.zookeeper.data.Stat;
 import org.apache.zookeeper.proto.CreateRequest;
 import org.apache.zookeeper.proto.SetDataRequest;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
 
 /**
  * A zookeeper that can handle 'recoverable' errors.

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-common/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml
index 877f737..c95aaf7 100644
--- a/hbase-common/pom.xml
+++ b/hbase-common/pom.xml
@@ -249,7 +249,7 @@
     </dependency>
     <!-- tracing Dependencies -->
     <dependency>
-      <groupId>org.htrace</groupId>
+      <groupId>org.apache.htrace</groupId>
       <artifactId>htrace-core</artifactId>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/HBaseHTraceConfiguration.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/HBaseHTraceConfiguration.java
b/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/HBaseHTraceConfiguration.java
index b2a36d7..42347ce 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/HBaseHTraceConfiguration.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/HBaseHTraceConfiguration.java
@@ -20,7 +20,7 @@ package org.apache.hadoop.hbase.trace;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.htrace.HTraceConfiguration;
+import org.apache.htrace.HTraceConfiguration;
 
 @InterfaceAudience.Private
 public class HBaseHTraceConfiguration extends HTraceConfiguration {

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/SpanReceiverHost.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/SpanReceiverHost.java
b/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/SpanReceiverHost.java
index eb74ea1..b90d191 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/SpanReceiverHost.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/trace/SpanReceiverHost.java
@@ -25,8 +25,9 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.htrace.SpanReceiver;
-import org.htrace.Trace;
+import org.apache.htrace.SpanReceiver;
+import org.apache.htrace.SpanReceiverBuilder;
+import org.apache.htrace.Trace;
 
 /**
  * This class provides functions for reading the names of SpanReceivers from
@@ -67,33 +68,24 @@ public class SpanReceiverHost {
   }
 
   /**
-   * Reads the names of classes specified in the
-   * "hbase.trace.spanreceiver.classes" property and instantiates and registers
-   * them with the Tracer as SpanReceiver's.
+   * Reads the names of classes specified in the {@code hbase.trace.spanreceiver.classes}
property
+   * and instantiates and registers them with the Tracer.
    *
    */
   public void loadSpanReceivers() {
-    Class<?> implClass = null;
     String[] receiverNames = conf.getStrings(SPAN_RECEIVERS_CONF_KEY);
     if (receiverNames == null || receiverNames.length == 0) {
       return;
     }
+
+    SpanReceiverBuilder builder = new SpanReceiverBuilder(new HBaseHTraceConfiguration(conf));
     for (String className : receiverNames) {
       className = className.trim();
 
-      try {
-        implClass = Class.forName(className);
-        SpanReceiver receiver = loadInstance(implClass);
-        if (receiver != null) {
-          receivers.add(receiver);
-          LOG.info("SpanReceiver " + className + " was loaded successfully.");
-        }
-
-      } catch (ClassNotFoundException e) {
-        LOG.warn("Class " + className + " cannot be found. " + e.getMessage());
-      } catch (IOException e) {
-        LOG.warn("Load SpanReceiver " + className + " failed. "
-            + e.getMessage());
+      SpanReceiver receiver = builder.spanReceiverClass(className).build();
+      if (receiver != null) {
+        receivers.add(receiver);
+        LOG.info("SpanReceiver " + className + " was loaded successfully.");
       }
     }
     for (SpanReceiver rcvr : receivers) {
@@ -101,28 +93,6 @@ public class SpanReceiverHost {
     }
   }
 
-  private SpanReceiver loadInstance(Class<?> implClass)
-      throws IOException {
-    SpanReceiver impl = null;
-    try {
-      Object o = implClass.newInstance();
-      impl = (SpanReceiver)o;
-      impl.configure(new HBaseHTraceConfiguration(this.conf));
-    } catch (SecurityException e) {
-      throw new IOException(e);
-    } catch (IllegalArgumentException e) {
-      throw new IOException(e);
-    } catch (RuntimeException e) {
-      throw new IOException(e);
-    } catch (InstantiationException e) {
-      e.printStackTrace();
-    } catch (IllegalAccessException e) {
-      e.printStackTrace();
-    }
-
-    return impl;
-  }
-
   /**
    * Calls close() on all SpanReceivers created by this SpanReceiverHost.
    */

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-it/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-it/pom.xml b/hbase-it/pom.xml
index ecd7714..a527e77 100644
--- a/hbase-it/pom.xml
+++ b/hbase-it/pom.xml
@@ -221,7 +221,7 @@
       <artifactId>commons-lang</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.htrace</groupId>
+      <groupId>org.apache.htrace</groupId>
       <artifactId>htrace-core</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
index feed860..824e87f 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/mttr/IntegrationTestMTTR.java
@@ -65,10 +65,10 @@ import org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException;
 import org.apache.hadoop.hbase.security.AccessDeniedException;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.LoadTestTool;
-import org.htrace.Span;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
-import org.htrace.impl.AlwaysSampler;
+import org.apache.htrace.Span;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
+import org.apache.htrace.impl.AlwaysSampler;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-it/src/test/java/org/apache/hadoop/hbase/trace/IntegrationTestSendTraceRequests.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/trace/IntegrationTestSendTraceRequests.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/trace/IntegrationTestSendTraceRequests.java
index 1f313c3..2b0b1d6 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/trace/IntegrationTestSendTraceRequests.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/trace/IntegrationTestSendTraceRequests.java
@@ -35,9 +35,9 @@ import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.util.AbstractHBaseTool;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.util.ToolRunner;
-import org.htrace.Sampler;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
+import org.apache.htrace.Sampler;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-server/pom.xml b/hbase-server/pom.xml
index 4cd8d17..c9ba4da 100644
--- a/hbase-server/pom.xml
+++ b/hbase-server/pom.xml
@@ -466,7 +466,7 @@
     </dependency>
     <!-- tracing Dependencies -->
     <dependency>
-      <groupId>org.htrace</groupId>
+      <groupId>org.apache.htrace</groupId>
       <artifactId>htrace-core</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventHandler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventHandler.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventHandler.java
index cbc0e56..1a8b847 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventHandler.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/executor/EventHandler.java
@@ -25,9 +25,9 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.Server;
-import org.htrace.Span;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
+import org.apache.htrace.Span;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
 
 /**
  * Abstract base class for all HBase event handlers. Subclasses should

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
index d58ca10..e466041 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderV2.java
@@ -43,8 +43,8 @@ import org.apache.hadoop.hbase.util.ByteBufferUtils;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.IdLock;
 import org.apache.hadoop.io.WritableUtils;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
 
 import com.google.common.annotations.VisibleForTesting;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
index d4364ab..ef6fa88 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/CallRunner.java
@@ -27,8 +27,8 @@ import org.apache.hadoop.hbase.security.UserProvider;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.util.StringUtils;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
 
 import com.google.protobuf.Message;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RequestContext.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RequestContext.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RequestContext.java
index 93b4313..a395f2e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RequestContext.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RequestContext.java
@@ -26,7 +26,7 @@ import org.apache.hadoop.hbase.security.User;
 import com.google.protobuf.BlockingService;
 
 import org.apache.hadoop.hbase.util.Bytes;
-import org.htrace.Trace;
+import org.apache.htrace.Trace;
 
 import java.net.InetAddress;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
index 3936f10..c787414 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
@@ -119,7 +119,7 @@ import org.apache.hadoop.security.token.SecretManager.InvalidToken;
 import org.apache.hadoop.security.token.TokenIdentifier;
 import org.apache.hadoop.util.StringUtils;
 import org.codehaus.jackson.map.ObjectMapper;
-import org.htrace.TraceInfo;
+import org.apache.htrace.TraceInfo;
 
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import com.google.protobuf.BlockingService;

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
index 3b303bd..a9d5b6b 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java
@@ -729,7 +729,7 @@ public class TableMapReduceUtil {
       io.netty.channel.Channel.class,
       com.google.protobuf.Message.class,
       com.google.common.collect.Lists.class,
-      org.htrace.Trace.class);
+      org.apache.htrace.Trace.class);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java
index ee97616..993edb2 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java
@@ -43,7 +43,7 @@ import org.apache.hadoop.hbase.master.RegionState;
 import org.apache.hadoop.hbase.master.RegionStates;
 import org.apache.hadoop.hbase.master.TableLockManager;
 import org.apache.hadoop.hbase.master.TableLockManager.TableLock;
-import org.htrace.Trace;
+import org.apache.htrace.Trace;
 
 /**
  * Handler to run disable of a table.

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
index eece27a..a345a05 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java
@@ -51,8 +51,8 @@ import org.apache.hadoop.hbase.util.HasThread;
 import org.apache.hadoop.hbase.util.Threads;
 import org.apache.hadoop.ipc.RemoteException;
 import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
 
 import com.google.common.base.Preconditions;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
index 3ba9b4c..19b4719 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
@@ -84,10 +84,10 @@ import org.apache.hadoop.hbase.wal.WALProvider.Writer;
 import org.apache.hadoop.hbase.wal.WALSplitter;
 import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
 import org.apache.hadoop.util.StringUtils;
-import org.htrace.NullScope;
-import org.htrace.Span;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
+import org.apache.htrace.NullScope;
+import org.apache.htrace.Span;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.Maps;

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/RingBufferTruck.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/RingBufferTruck.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/RingBufferTruck.java
index 8eeef6e..25c2111 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/RingBufferTruck.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/RingBufferTruck.java
@@ -19,7 +19,7 @@
 package org.apache.hadoop.hbase.regionserver.wal;
 
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.htrace.Span;
+import org.apache.htrace.Span;
 
 import com.lmax.disruptor.EventFactory;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SyncFuture.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SyncFuture.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SyncFuture.java
index bcd23da..62ab458 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SyncFuture.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SyncFuture.java
@@ -21,7 +21,7 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
-import org.htrace.Span;
+import org.apache.htrace.Span;
 
 /**
  * A Future on a filesystem sync call.  It given to a client or 'Handler' for it to wait
on till

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
index 193b4ee..aadc2f9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
@@ -74,6 +74,7 @@ import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
 import org.apache.hadoop.hbase.io.hfile.RandomDistribution;
 import org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil;
 import org.apache.hadoop.hbase.regionserver.BloomType;
+import org.apache.hadoop.hbase.trace.HBaseHTraceConfiguration;
 import org.apache.hadoop.hbase.trace.SpanReceiverHost;
 import org.apache.hadoop.hbase.util.*;
 import org.apache.hadoop.io.LongWritable;
@@ -86,10 +87,10 @@ import org.apache.hadoop.mapreduce.lib.reduce.LongSumReducer;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
 import org.codehaus.jackson.map.ObjectMapper;
-import org.htrace.Sampler;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
-import org.htrace.impl.ProbabilitySampler;
+import org.apache.htrace.Sampler;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
+import org.apache.htrace.impl.ProbabilitySampler;
 
 import com.google.common.base.Objects;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
@@ -952,7 +953,7 @@ public class PerformanceEvaluation extends Configured implements Tool
{
      */
     Test(final Connection con, final TestOptions options, final Status status) {
       this.connection = con;
-      this.conf = con ==  null? null: this.connection.getConfiguration();
+      this.conf = con == null ? HBaseConfiguration.create() : this.connection.getConfiguration();
       this.receiverHost = this.conf == null? null: SpanReceiverHost.getInstance(conf);
       this.opts = options;
       this.status = status;
@@ -960,7 +961,8 @@ public class PerformanceEvaluation extends Configured implements Tool
{
       if (options.traceRate >= 1.0) {
         this.traceSampler = Sampler.ALWAYS;
       } else if (options.traceRate > 0.0) {
-        this.traceSampler = new ProbabilitySampler(options.traceRate);
+        conf.setDouble("hbase.sampler.fraction", options.traceRate);
+        this.traceSampler = new ProbabilitySampler(new HBaseHTraceConfiguration(conf));
       } else {
         this.traceSampler = Sampler.NEVER;
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java
index c5a3d2e..7a47f52 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/trace/TestHTraceHooks.java
@@ -30,12 +30,12 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.client.Table;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
 import org.apache.hadoop.hbase.testclassification.MiscTests;
-import org.htrace.Sampler;
-import org.htrace.Span;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
-import org.htrace.TraceTree;
-import org.htrace.impl.POJOSpanReceiver;
+import org.apache.htrace.Sampler;
+import org.apache.htrace.Span;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
+import org.apache.htrace.TraceTree;
+import org.apache.htrace.impl.POJOSpanReceiver;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -48,11 +48,12 @@ public class TestHTraceHooks {
 
   private static final byte[] FAMILY_BYTES = "family".getBytes();
   private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
-  private static final POJOSpanReceiver rcvr = new POJOSpanReceiver();
+  private static POJOSpanReceiver rcvr;
 
   @BeforeClass
   public static void before() throws Exception {
     TEST_UTIL.startMiniCluster(2, 3);
+    rcvr = new POJOSpanReceiver(new HBaseHTraceConfiguration(TEST_UTIL.getConfiguration()));
     Trace.addReceiver(rcvr);
   }
 
@@ -60,6 +61,7 @@ public class TestHTraceHooks {
   public static void after() throws Exception {
     TEST_UTIL.shutdownMiniCluster();
     Trace.removeReceiver(rcvr);
+    rcvr = null;
   }
 
   @Test
@@ -85,25 +87,23 @@ public class TestHTraceHooks {
 
     Collection<Span> spans = rcvr.getSpans();
     TraceTree traceTree = new TraceTree(spans);
-    Collection<Span> roots = traceTree.getRoots();
+    Collection<Span> roots = traceTree.getSpansByParent().find(Span.ROOT_SPAN_ID);
 
     assertEquals(1, roots.size());
     Span createTableRoot = roots.iterator().next();
 
     assertEquals("creating table", createTableRoot.getDescription());
-    Multimap<Long, Span> spansByParentIdMap = traceTree
-        .getSpansByParentIdMap();
 
     int createTableCount = 0;
 
-    for (Span s : spansByParentIdMap.get(createTableRoot.getSpanId())) {
+    for (Span s : traceTree.getSpansByParent().find(createTableRoot.getSpanId())) {
       if (s.getDescription().startsWith("MasterService.CreateTable")) {
         createTableCount++;
       }
     }
 
     assertTrue(createTableCount >= 1);
-    assertTrue(spansByParentIdMap.get(createTableRoot.getSpanId()).size() > 3);
+    assertTrue(traceTree.getSpansByParent().find(createTableRoot.getSpanId()).size() >
3);
     assertTrue(spans.size() > 5);
     
     Put put = new Put("row".getBytes());
@@ -118,7 +118,7 @@ public class TestHTraceHooks {
 
     spans = rcvr.getSpans();
     traceTree = new TraceTree(spans);
-    roots = traceTree.getRoots();
+    roots = traceTree.getSpansByParent().find(Span.ROOT_SPAN_ID);
 
     assertEquals(2, roots.size());
     Span putRoot = null;

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java
index bf8fba0..05d5e51 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/WALPerformanceEvaluation.java
@@ -50,6 +50,7 @@ import org.apache.hadoop.hbase.client.Put;
 import org.apache.hadoop.hbase.io.crypto.KeyProviderForTesting;
 import org.apache.hadoop.hbase.regionserver.HRegion;
 import org.apache.hadoop.hbase.regionserver.LogRoller;
+import org.apache.hadoop.hbase.trace.HBaseHTraceConfiguration;
 import org.apache.hadoop.hbase.trace.SpanReceiverHost;
 import org.apache.hadoop.hbase.wal.WALProvider.Writer;
 import org.apache.hadoop.hbase.wal.WAL;
@@ -58,10 +59,11 @@ import org.apache.hadoop.hbase.util.FSUtils;
 import org.apache.hadoop.hbase.util.Threads;
 import org.apache.hadoop.util.Tool;
 import org.apache.hadoop.util.ToolRunner;
-import org.htrace.Sampler;
-import org.htrace.Trace;
-import org.htrace.TraceScope;
-import org.htrace.impl.ProbabilitySampler;
+import org.apache.htrace.HTraceConfiguration;
+import org.apache.htrace.Sampler;
+import org.apache.htrace.Trace;
+import org.apache.htrace.TraceScope;
+import org.apache.htrace.impl.ProbabilitySampler;
 
 import com.yammer.metrics.core.Histogram;
 import com.yammer.metrics.core.Meter;
@@ -150,7 +152,8 @@ public final class WALPerformanceEvaluation extends Configured implements
Tool {
               + " SpanReciever can keep up.");
           }
         } else {
-          loopSampler = new ProbabilitySampler(traceFreq);
+          getConf().setDouble("hbase.sampler.fraction", traceFreq);
+          loopSampler = new ProbabilitySampler(new HBaseHTraceConfiguration(getConf()));
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-shell/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-shell/pom.xml b/hbase-shell/pom.xml
index 5343a26..bdba00c 100644
--- a/hbase-shell/pom.xml
+++ b/hbase-shell/pom.xml
@@ -231,7 +231,7 @@
     </dependency>
     <!-- Test Dependencies -->
     <dependency>
-      <groupId>org.htrace</groupId>
+      <groupId>org.apache.htrace</groupId>
       <artifactId>htrace-core</artifactId>
    </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-shell/src/main/ruby/shell/commands/trace.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/shell/commands/trace.rb b/hbase-shell/src/main/ruby/shell/commands/trace.rb
index 2ce443b..5e00930 100644
--- a/hbase-shell/src/main/ruby/shell/commands/trace.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/trace.rb
@@ -16,8 +16,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-HTrace = org.htrace.Trace
-java_import org.htrace.Sampler
+HTrace = org.apache.htrace.Trace
+java_import org.apache.htrace.Sampler
 java_import org.apache.hadoop.hbase.trace.SpanReceiverHost
 
 module Shell

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/hbase-thrift/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-thrift/pom.xml b/hbase-thrift/pom.xml
index 406ad41..c07a417 100644
--- a/hbase-thrift/pom.xml
+++ b/hbase-thrift/pom.xml
@@ -241,7 +241,7 @@
       <version>${project.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.htrace</groupId>
+      <groupId>org.apache.htrace</groupId>
       <artifactId>htrace-core</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/9824eb78/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c122f57..200a165 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1036,7 +1036,7 @@
     <jruby.version>1.6.8</jruby.version>
     <junit.version>4.11</junit.version>
     <hamcrest.version>1.3</hamcrest.version>
-    <htrace.version>3.0.4</htrace.version>
+    <htrace.version>3.1.0-incubating</htrace.version>
     <log4j.version>1.2.17</log4j.version>
     <mockito-all.version>1.10.8</mockito-all.version>
     <protobuf.version>2.5.0</protobuf.version>
@@ -1530,7 +1530,7 @@
         <scope>test</scope>
       </dependency>
       <dependency>
-        <groupId>org.htrace</groupId>
+        <groupId>org.apache.htrace</groupId>
         <artifactId>htrace-core</artifactId>
         <version>${htrace.version}</version>
       </dependency>


Mime
View raw message