git commit: PHOENIX-1174 Rename and move properties using existing convention

2014-08-17 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 db3b65669 - 2ecc9599b


PHOENIX-1174 Rename and move properties using existing convention


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/2ecc9599
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/2ecc9599
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/2ecc9599

Branch: refs/heads/4.0
Commit: 2ecc9599bfcf85a5fbf87235b366042932cf13ff
Parents: db3b656
Author: James Taylor jtay...@salesforce.com
Authored: Sun Aug 17 00:35:53 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Sun Aug 17 00:35:53 2014 -0700

--
 .../phoenix/trace/PhoenixTableMetricsWriterIT.java   |  5 +++--
 .../phoenix/trace/PhoenixTracingEndToEndIT.java  |  3 ++-
 .../java/org/apache/phoenix/query/QueryServices.java | 15 ---
 .../apache/phoenix/query/QueryServicesOptions.java   |  6 ++
 .../phoenix/trace/PhoenixTableMetricsWriter.java | 10 ++
 .../java/org/apache/phoenix/trace/TraceReader.java   | 13 ++---
 .../java/org/apache/phoenix/trace/util/Tracing.java  |  2 +-
 .../java/org/apache/phoenix/trace/TracingCompat.java |  8 
 8 files changed, 32 insertions(+), 30 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2ecc9599/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTableMetricsWriterIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTableMetricsWriterIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTableMetricsWriterIT.java
index b1544e8..ecac21b 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTableMetricsWriterIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTableMetricsWriterIT.java
@@ -24,6 +24,7 @@ import java.sql.Connection;
 import java.util.Collection;
 
 import org.apache.phoenix.metrics.PhoenixMetricsRecord;
+import org.apache.phoenix.query.QueryServicesOptions;
 import org.apache.phoenix.trace.Hadoop1TracingTestEnabler.Hadoop1Disabled;
 import org.apache.phoenix.trace.TraceReader.SpanInfo;
 import org.apache.phoenix.trace.TraceReader.TraceHolder;
@@ -50,9 +51,9 @@ public class PhoenixTableMetricsWriterIT extends 
BaseTracingTestIT {
 
 // check for existence of the tracing table
 try {
-String ddl = CREATE TABLE  + 
TracingCompat.DEFAULT_STATS_TABLE_NAME;
+String ddl = CREATE TABLE  + 
QueryServicesOptions.DEFAULT_TRACING_STATS_TABLE_NAME;
 conn.createStatement().execute(ddl);
-fail(Table  + TracingCompat.DEFAULT_STATS_TABLE_NAME
+fail(Table  + 
QueryServicesOptions.DEFAULT_TRACING_STATS_TABLE_NAME
 +  was not created by the metrics sink);
 } catch (Exception e) {
 // expected

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2ecc9599/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTracingEndToEndIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTracingEndToEndIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTracingEndToEndIT.java
index 0fe4538..6742f9e 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTracingEndToEndIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/trace/PhoenixTracingEndToEndIT.java
@@ -34,6 +34,7 @@ import 
org.apache.phoenix.coprocessor.BaseScannerRegionObserver;
 import org.apache.phoenix.end2end.HBaseManagedTimeTest;
 import org.apache.phoenix.metrics.Metrics;
 import org.apache.phoenix.metrics.TracingTestCompat;
+import org.apache.phoenix.query.QueryServicesOptions;
 import org.apache.phoenix.trace.Hadoop1TracingTestEnabler.Hadoop1Disabled;
 import org.apache.phoenix.trace.TraceReader.SpanInfo;
 import org.apache.phoenix.trace.TraceReader.TraceHolder;
@@ -223,7 +224,7 @@ public class PhoenixTracingEndToEndIT extends 
BaseTracingTestIT {
 public boolean foundTrace(TraceHolder trace, SpanInfo span) {
 String traceInfo = trace.toString();
 // skip logging traces that are just traces about tracing
-if 
(traceInfo.contains(TracingCompat.DEFAULT_STATS_TABLE_NAME)) {
+if 
(traceInfo.contains(QueryServicesOptions.DEFAULT_TRACING_STATS_TABLE_NAME)) {
 return false;
 }
 if (traceInfo.contains(Completing index)) {

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2ecc9599/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServices.java
--
diff --git 

Apache-Phoenix | Master | Hadoop1 | Build Successful

2014-08-17 Thread Apache Jenkins Server
Master branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Last Successful Compiled Artifacts https://builds.apache.org/job/Phoenix-master-hadoop1/lastSuccessfulBuild/artifact/

Last Complete Test Report https://builds.apache.org/job/Phoenix-master-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] PHOENIX-1174 Rename and move properties using existing convention



Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-08-17 Thread Apache Jenkins Server
4.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] PHOENIX-1174 Rename and move properties using existing convention



Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-08-17 Thread Apache Jenkins Server
4.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] PHOENIX-1174 Rename and move properties using existing convention



Jenkins build is back to normal : Phoenix | 4.0 | Hadoop2 #43

2014-08-17 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-4.0-hadoop2/43/changes



Apache-Phoenix | Master | Hadoop1 | Build Successful

2014-08-17 Thread Apache Jenkins Server
Master branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Last Successful Compiled Artifacts https://builds.apache.org/job/Phoenix-master-hadoop1/lastSuccessfulBuild/artifact/

Last Complete Test Report https://builds.apache.org/job/Phoenix-master-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] PHOENIX-1174 Rename and move properties using existing convention



svn commit: r1618518 - in /phoenix/site: publish/tracing.html source/src/site/markdown/tracing.md

2014-08-17 Thread jamestaylor
Author: jamestaylor
Date: Sun Aug 17 20:07:24 2014
New Revision: 1618518

URL: http://svn.apache.org/r1618518
Log:
Update tracing doc

Modified:
phoenix/site/publish/tracing.html
phoenix/site/source/src/site/markdown/tracing.md

Modified: phoenix/site/publish/tracing.html
URL: 
http://svn.apache.org/viewvc/phoenix/site/publish/tracing.html?rev=1618518r1=1618517r2=1618518view=diff
==
--- phoenix/site/publish/tracing.html (original)
+++ phoenix/site/publish/tracing.html Sun Aug 17 20:07:24 2014
@@ -1,7 +1,7 @@
 
 !DOCTYPE html
 !--
- Generated by Apache Maven Doxia at 2014-08-16
+ Generated by Apache Maven Doxia at 2014-08-17
  Rendered using Reflow Maven Skin 1.1.0 
(http://andriusvelykis.github.io/reflow-maven-skin)
 --
 html  xml:lang=en lang=en
@@ -132,7 +132,7 @@
  pThere are only a couple small things you need to do to enable tracing a 
given request with Phoenix./p 
  div class=section 
   h3 id=Client_PropertyClient Property/h3 
-  pThe frequency of tracing is determined by the client JDBC property:/p 
+  pThe frequency of tracing is determined by the following client-side HBase 
configuration property:/p 
   div class=source 
prephoenix.trace.frequency
 /pre 
@@ -150,22 +150,21 @@
liprobability 
 ul 
  litake traces with a probabilistic frequency/li 
- liprobability threshold set by: 
“phoenix.trace.probability.threshold”/li 
+ liprobability threshold is set by 
ttphoenix.trace.probability.threshold/tt with a default of 0.05 (5%)./li 
 /ul/li 
   /ol 
-  pBy turning one of these properties on, you turn on merely collecting the 
traces. However, the traces need to be deposited somewhere/p 
+  pAs with other configuration properties, this property may be specified at 
JDBC connection time as a connection property. By turning one of these 
properties on, you turn on merely collecting the traces. However, the traces 
need to be deposited somewhere/p 
   pExample:/p 
   div class=source 
pre# Enable tracing on every request
 Properties props = new Properties();
 props.setProperty(quot;phoenix.trace.frequencyquot;, quot;alwaysquot;);
-
-# Or more simply
-org.apache.phoenix.trace.Tracing.setSampling(props, Tracing.Frequency.ALWAYS);
+Connection conn = 
DriverManager.getConnection(quot;jdbc:phoenix:localhostquot;, props);
 
 # Enable tracing on 50% of requests
-org.apache.phoenix.trace.Tracing.setSampling(props, Tracing.Frequency.ALWAYS);
-props.setProperty(quot;phoenix.trace.probability.thresholdquot;, .5)
+props.setProperty(quot;phoenix.trace.frequencyquot;, 
quot;probabilityquot;);
+props.setProperty(quot;phoenix.trace.probability.thresholdquot;, 0.5)
+Connection conn = 
DriverManager.getConnection(quot;jdbc:phoenix:localhostquot;, props);
 /pre 
   /div 
  /div 
@@ -183,10 +182,10 @@ phoenix.sink.writer-class=org.apache.pho
 /div 
 div class=section 
  h2 id=Reading_TracesReading Traces/h2 
- pOnce the traces are deposited into the tracing table, by default 
ttPHOENIX.TRACING_STATS/tt, but it is configurable in the HBase 
configuration via:/p 
+ pOnce the traces are deposited into the tracing table, by default 
ttSYSTEM.TRACING_STATS/tt, but it is configurable in the HBase 
configuration via:/p 
  div class=source 
   pre  lt;propertygt;
-lt;namegt;phoenix._internal.trace.tablenamelt;/namegt;
+lt;namegt;phoenix.trace.statsTableNamelt;/namegt;
 lt;valuegt;lt;your custom tracing table namegt;lt;/valuegt;
   lt;/propertygt;
 /pre 
@@ -194,7 +193,7 @@ phoenix.sink.writer-class=org.apache.pho
  pThe tracing table is initialized via the ddl:/p 
  div 
   pre
-CREATE TABLE bPHOENIX.TRACING_STATS/b (
+CREATE TABLE bSYSTEM.TRACING_STATS/b (
   btrace_id/b BIGINT NOT NULL,
   bparent_id/b BIGINT NOT NULL,
   bspan_id/b BIGINT NOT NULL,
@@ -210,13 +209,13 @@ phoenix.sink.writer-class=org.apache.pho
  pThe tracing table also contains a number of dynamic columns for each 
trace, identified by a unique trace-id (id of the request), parent-id (id of 
the parent span) and individual span-id (id of the individual segment), may 
have multiple tags and annotations about what happened during the trace. Once 
you have the number of tags and annotations, you can retrieve them the table 
with a request like:/p 
  div class=source 
   preSELECT lt;columnsgt;
-  FROM PHOENIX.TRACING_STATS
+  FROM SYSTEM.TRACING_STATS
   WHERE trace_id = ?
   AND parent_id = ?
   ANd span_id = ?
 /pre 
  /div 
- pwhere columns is either “annotations.aX” or “tags.tX” where 
‘X’ is the index of the dynamic column to lookup./p 
+ pwhere columns is either ttannotations.aX/tt or tttags.tX/tt where 
ttX/tt is the index of the dynamic column to lookup./p 
  pFor more usage, look at our generic a class=externalLink 
href=https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/trace/TraceReader.java;TraceReader/a
 which can programatically read a number of 

git commit: PHOENIX-1172 Prevent lock contention in ConnectionQueryServicesImpl. Fix exception handling. (Samarth Jain)

2014-08-17 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 97a5f7ef2 - 7a615713e


PHOENIX-1172 Prevent lock contention in ConnectionQueryServicesImpl. Fix 
exception handling. (Samarth Jain)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/7a615713
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/7a615713
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/7a615713

Branch: refs/heads/3.0
Commit: 7a615713efc267a3734789b0555219ef0f879e10
Parents: 97a5f7e
Author: James Taylor jtay...@salesforce.com
Authored: Sun Aug 17 13:14:56 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Sun Aug 17 13:14:56 2014 -0700

--
 .../query/ConnectionQueryServicesImpl.java  | 57 +++-
 1 file changed, 33 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/7a615713/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 7c9332d..f811c6e 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -133,15 +133,18 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 private final StatsManager statsManager;
 
 // Cache the latest meta data here for future connections
-@GuardedBy(latestMetaDataLock)
-private PMetaData latestMetaData;
+// writes guarded by latestMetaDataLock
+private volatile PMetaData latestMetaData;
 private final Object latestMetaDataLock = new Object();
 
 // Lowest HBase version on the cluster.
 private int lowestClusterHBaseVersion = Integer.MAX_VALUE;
 private boolean hasInvalidIndexConfiguration = false;
+
+@GuardedBy(connectionCountLock)
 private int connectionCount = 0;
-
+private final Object connectionCountLock = new Object();
+
 private HConnection connection;
 private volatile boolean initialized;
 
@@ -149,7 +152,8 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 private volatile boolean closed;
 
 private volatile SQLException initializationException;
-protected ConcurrentMapSequenceKey,Sequence sequenceMap = 
Maps.newConcurrentMap();
+// setting this member variable guarded by connectionCountLock
+private volatile ConcurrentMapSequenceKey,Sequence sequenceMap = 
Maps.newConcurrentMap();
 private KeyValueBuilder kvBuilder;
 
 private PMetaData newEmptyMetaData() {
@@ -492,11 +496,11 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 @Override
 public PhoenixConnection connect(String url, Properties info) throws 
SQLException {
 checkClosed();
-synchronized (latestMetaDataLock) {
-throwConnectionClosedIfNullMetaData();
-latestMetaDataLock.notifyAll();
-return new PhoenixConnection(this, url, info, latestMetaData);
+PMetaData metadata = latestMetaData;
+if (metadata == null) {
+throwConnectionClosedException();
 }
+return new PhoenixConnection(this, url, info, metadata);
 }
 
 
@@ -1110,11 +1114,11 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 MetaDataUtil.VIEW_INDEX_TABLE_PREFIX_BYTES.length,
 
physicalIndexTableName.length-MetaDataUtil.VIEW_INDEX_TABLE_PREFIX_BYTES.length);
 try {
-synchronized (latestMetaDataLock) {
-throwConnectionClosedIfNullMetaData();
-table = latestMetaData.getTable(new PTableKey(tenantId, name));
-latestMetaDataLock.notifyAll();
+PMetaData metadata = latestMetaData;
+if (metadata == null) {
+throwConnectionClosedException();
 }
+table = metadata.getTable(new PTableKey(tenantId, name));
 if (table.getTimeStamp() = timestamp) { // Table in cache is 
newer than client timestamp which shouldn't be the case
 throw new 
TableNotFoundException(table.getSchemaName().getString(), 
table.getTableName().getString());
 }
@@ -1295,7 +1299,6 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
 return null;
 }
 checkClosed();
-SQLException sqlE = null;
 

git commit: PHOENIX-1176 Allow tracing to be turned on globally through config

2014-08-17 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 f18922c61 - 495491a72


PHOENIX-1176 Allow tracing to be turned on globally through config


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/495491a7
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/495491a7
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/495491a7

Branch: refs/heads/4.0
Commit: 495491a729150896d04307ab8315fc60904a5cb9
Parents: f18922c
Author: James Taylor jtay...@salesforce.com
Authored: Sun Aug 17 11:21:36 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Sun Aug 17 11:21:36 2014 -0700

--
 .../org/apache/phoenix/query/QueryServicesOptions.java   |  3 +++
 .../apache/phoenix/trace/util/ConfigurationAdapter.java  | 11 +--
 .../main/java/org/apache/phoenix/trace/util/Tracing.java |  8 +---
 3 files changed, 13 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/495491a7/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java 
b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
index 20c3359..ae1dbc7 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
@@ -60,6 +60,7 @@ import java.util.Map.Entry;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.regionserver.wal.WALCellCodec;
+import org.apache.phoenix.trace.util.Tracing;
 import org.apache.phoenix.util.DateUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
 
@@ -140,6 +141,8 @@ public class QueryServicesOptions {
  * Configuration key to overwrite the tablename that should be used as the 
target table
  */
 public static final String DEFAULT_TRACING_STATS_TABLE_NAME = 
SYSTEM.TRACING_STATS;
+public static final String DEFAULT_TRACING_FREQ = 
Tracing.Frequency.NEVER.getKey();
+public static final double DEFAULT_TRACING_PROBABILITY_THRESHOLD = 0.05;
 
 private final Configuration config;
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/495491a7/phoenix-core/src/main/java/org/apache/phoenix/trace/util/ConfigurationAdapter.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/ConfigurationAdapter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/util/ConfigurationAdapter.java
index a96be7d..cde7f9e 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/ConfigurationAdapter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/util/ConfigurationAdapter.java
@@ -18,7 +18,6 @@
 package org.apache.phoenix.trace.util;
 
 import org.apache.hadoop.conf.Configuration;
-
 import org.apache.phoenix.jdbc.PhoenixConnection;
 
 /**
@@ -26,7 +25,7 @@ import org.apache.phoenix.jdbc.PhoenixConnection;
  */
 abstract class ConfigurationAdapter {
 
-  public abstract String get(String key);
+  public abstract String get(String key, String defaultValue);
 
   public static class ConnectionConfigurationAdapter extends 
ConfigurationAdapter {
 private PhoenixConnection conn;
@@ -36,8 +35,8 @@ abstract class ConfigurationAdapter {
 }
 
 @Override
-public String get(String key) {
-  return conn.getClientInfo(key);
+public String get(String key, String defaultValue) {
+  return conn.getQueryServices().getProps().get(key, defaultValue);
 }
   }
 
@@ -49,8 +48,8 @@ abstract class ConfigurationAdapter {
 }
 
 @Override
-public String get(String key) {
-  return conf.get(key);
+public String get(String key, String defaultValue) {
+  return conf.get(key, defaultValue);
 }
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/495491a7/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
index 5e4ac9e..e90d2c8 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
@@ -30,6 +30,7 @@ import org.apache.phoenix.call.CallRunner;
 import org.apache.phoenix.call.CallWrapper;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.query.QueryServicesOptions;
 import 

git commit: PHOENIX-1176 Allow tracing to be turned on globally through config

2014-08-17 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 828326488 - 8adcc87a6


PHOENIX-1176 Allow tracing to be turned on globally through config


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/8adcc87a
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/8adcc87a
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/8adcc87a

Branch: refs/heads/master
Commit: 8adcc87a625a0d56bea4b6cf8c3e967b4a226972
Parents: 8283264
Author: James Taylor jtay...@salesforce.com
Authored: Sun Aug 17 11:21:36 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Sun Aug 17 13:26:49 2014 -0700

--
 .../org/apache/phoenix/query/QueryServicesOptions.java   |  3 +++
 .../apache/phoenix/trace/util/ConfigurationAdapter.java  | 11 +--
 .../main/java/org/apache/phoenix/trace/util/Tracing.java |  8 +---
 3 files changed, 13 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8adcc87a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java 
b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
index 20c3359..ae1dbc7 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java
@@ -60,6 +60,7 @@ import java.util.Map.Entry;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.regionserver.wal.WALCellCodec;
+import org.apache.phoenix.trace.util.Tracing;
 import org.apache.phoenix.util.DateUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
 
@@ -140,6 +141,8 @@ public class QueryServicesOptions {
  * Configuration key to overwrite the tablename that should be used as the 
target table
  */
 public static final String DEFAULT_TRACING_STATS_TABLE_NAME = 
SYSTEM.TRACING_STATS;
+public static final String DEFAULT_TRACING_FREQ = 
Tracing.Frequency.NEVER.getKey();
+public static final double DEFAULT_TRACING_PROBABILITY_THRESHOLD = 0.05;
 
 private final Configuration config;
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/8adcc87a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/ConfigurationAdapter.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/ConfigurationAdapter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/util/ConfigurationAdapter.java
index a96be7d..cde7f9e 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/ConfigurationAdapter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/util/ConfigurationAdapter.java
@@ -18,7 +18,6 @@
 package org.apache.phoenix.trace.util;
 
 import org.apache.hadoop.conf.Configuration;
-
 import org.apache.phoenix.jdbc.PhoenixConnection;
 
 /**
@@ -26,7 +25,7 @@ import org.apache.phoenix.jdbc.PhoenixConnection;
  */
 abstract class ConfigurationAdapter {
 
-  public abstract String get(String key);
+  public abstract String get(String key, String defaultValue);
 
   public static class ConnectionConfigurationAdapter extends 
ConfigurationAdapter {
 private PhoenixConnection conn;
@@ -36,8 +35,8 @@ abstract class ConfigurationAdapter {
 }
 
 @Override
-public String get(String key) {
-  return conn.getClientInfo(key);
+public String get(String key, String defaultValue) {
+  return conn.getQueryServices().getProps().get(key, defaultValue);
 }
   }
 
@@ -49,8 +48,8 @@ abstract class ConfigurationAdapter {
 }
 
 @Override
-public String get(String key) {
-  return conf.get(key);
+public String get(String key, String defaultValue) {
+  return conf.get(key, defaultValue);
 }
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/8adcc87a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
index 5e4ac9e..e90d2c8 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/trace/util/Tracing.java
@@ -30,6 +30,7 @@ import org.apache.phoenix.call.CallRunner;
 import org.apache.phoenix.call.CallWrapper;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.query.QueryServicesOptions;
 import 

Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2014-08-17 Thread Apache Jenkins Server
3.0 branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf/phoenix.git

Last Successful Compiled Artifacts https://builds.apache.org/job/Phoenix-3.0-hadoop1/lastSuccessfulBuild/artifact/

Last Complete Test Report https://builds.apache.org/job/Phoenix-3.0-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] PHOENIX-1172 Prevent lock contention in ConnectionQueryServicesImpl. Fix exception handling. (Samarth Jain)



Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-08-17 Thread Apache Jenkins Server
4.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] PHOENIX-1176 Allow tracing to be turned on globally through config

[jtaylor] PHOENIX-1172 Prevent lock contention in ConnectionQueryServicesImpl. Fix exception handling. (Samarth Jain)



Apache-Phoenix | Master | Hadoop1 | Build Successful

2014-08-17 Thread Apache Jenkins Server
Master branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Last Successful Compiled Artifacts https://builds.apache.org/job/Phoenix-master-hadoop1/lastSuccessfulBuild/artifact/

Last Complete Test Report https://builds.apache.org/job/Phoenix-master-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] PHOENIX-1176 Allow tracing to be turned on globally through config

[jtaylor] PHOENIX-1172 Prevent lock contention in ConnectionQueryServicesImpl. Fix exception handling. (Samarth Jain)



Apache-Phoenix | 4.0 | Hadoop1 | Build Successful

2014-08-17 Thread Apache Jenkins Server
4.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf/incubator-phoenix.git

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.0-hadoop1/lastCompletedBuild/testReport/

Changes
[jtaylor] PHOENIX-1166 Avoid HTable creation in coprocessors to write into local index table (JeffreyZ)