Apache-Phoenix | Master | Build Successful

2014-10-27 Thread Apache Jenkins Server
Master 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-master/lastSuccessfulBuild/artifact/

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

Changes
[jtaylor] PHOENIX-1366 Use static constants

[jtaylor] PHOENIX-1366 Use static constants

[jtaylor] PHOENIX-1379 Wrong MultiIndexWriteFailureException when recovering local index table (Shunsuke Nakamura)



Build failed in Jenkins: Phoenix | 4.0 #425

2014-10-27 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-4.0/425/changes

Changes:

[jtaylor] PHOENIX-1366 Use static constants

[jtaylor] PHOENIX-1366 Use static constants

[jtaylor] PHOENIX-1379 Wrong MultiIndexWriteFailureException when recovering 
local index table (Shunsuke Nakamura)

--
[...truncated 5812 lines...]
42/47K
46/47K
47/47K
47K downloaded  (commons-parent-25.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
[INFO] Unable to find resource 'com.google.protobuf:protobuf-java:pom:2.5.0' in 
repository apache release 
(https://repository.apache.org/content/repositories/releases/)
Downloading: 
http://conjars.org/repo/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
[INFO] Unable to find resource 'com.google.protobuf:protobuf-java:pom:2.5.0' in 
repository conjars.org (http://conjars.org/repo)
Downloading: 
https://repository.apache.org/content/repositories/snapshots//com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
[INFO] Unable to find resource 'com.google.protobuf:protobuf-java:pom:2.5.0' in 
repository apache snapshot 
(https://repository.apache.org/content/repositories/snapshots/)
Downloading: 
http://download.java.net/maven/2//com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
[INFO] Unable to find resource 'com.google.protobuf:protobuf-java:pom:2.5.0' in 
repository java.net (http://download.java.net/maven/2/)
Downloading: 
http://repository.codehaus.org//com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
[INFO] Unable to find resource 'com.google.protobuf:protobuf-java:pom:2.5.0' in 
repository codehaus (http://repository.codehaus.org/)
Downloading: 
http://repository.jboss.org/nexus/content/groups/public-jboss//com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
26/?
4122/?
8192/?
8218/?
8375/?
  
Downloading: 
https://repository.apache.org/content/repositories/releases//com/google/google/1/google-1.pom
[INFO] Unable to find resource 'com.google:google:pom:1' in repository apache 
release (https://repository.apache.org/content/repositories/releases/)
Downloading: http://conjars.org/repo/com/google/google/1/google-1.pom
[INFO] Unable to find resource 'com.google:google:pom:1' in repository 
conjars.org (http://conjars.org/repo)
Downloading: 
https://repository.apache.org/content/repositories/snapshots//com/google/google/1/google-1.pom
[INFO] Unable to find resource 'com.google:google:pom:1' in repository apache 
snapshot (https://repository.apache.org/content/repositories/snapshots/)
Downloading: http://download.java.net/maven/2//com/google/google/1/google-1.pom
[INFO] Unable to find resource 'com.google:google:pom:1' in repository java.net 
(http://download.java.net/maven/2/)
Downloading: http://repository.codehaus.org//com/google/google/1/google-1.pom
[INFO] Unable to find resource 'com.google:google:pom:1' in repository codehaus 
(http://repository.codehaus.org/)
Downloading: 
http://repository.jboss.org/nexus/content/groups/public-jboss//com/google/google/1/google-1.pom
1/1K
1K downloaded  (google-1.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-annotations/2.2.0/hadoop-annotations-2.2.0.pom
2/2K
2K downloaded  (hadoop-annotations-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-project/2.2.0/hadoop-project-2.2.0.pom
4/36K
7/36K
11/36K
15/36K
19/36K
22/36K
26/36K
30/36K
34/36K
36/36K
36K downloaded  (hadoop-project-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-main/2.2.0/hadoop-main-2.2.0.pom
4/16K
7/16K
11/16K
13/16K
16/16K
16K downloaded  (hadoop-main-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-common/2.2.0/hadoop-common-2.2.0.pom
4/26K
7/26K
11/26K
13/26K
17/26K
21/26K
25/26K
26/26K
26K downloaded  (hadoop-common-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-project-dist/2.2.0/hadoop-project-dist-2.2.0.pom
4/17K
7/17K
11/17K
13/17K
17/17K
17K downloaded  (hadoop-project-dist-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/commons/commons-math/2.1/commons-math-2.1.pom
4/10K
7/10K
10/10K
10K downloaded  (commons-math-2.1.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/commons/commons-parent/14/commons-parent-14.pom
4/30K
7/30K
11/30K
15/30K
19/30K
23/30K
27/30K
30/30K
30K downloaded  (commons-parent-14.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//xmlenc/xmlenc/0.52/xmlenc-0.52.pom
[INFO] Unable to find resource 'xmlenc:xmlenc:pom:0.52' in repository apache 
release (https://repository.apache.org/content/repositories/releases/)
Downloading: 

git commit: PHOENIX-897 Quote parameters in psql.py

2014-10-27 Thread greid
Repository: phoenix
Updated Branches:
  refs/heads/4.0 7b5716084 - f5a49bff2


PHOENIX-897 Quote parameters in psql.py

Properly quote supplied command-line parameters in psql.py so that
it's possible to supply any character (including ones that have
special meanings in various shells) as parameters.


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

Branch: refs/heads/4.0
Commit: f5a49bff2c43686fc0381f5262de75f504e366ed
Parents: 7b57160
Author: Gabriel Reid gabri...@ngdata.com
Authored: Mon Oct 27 10:57:43 2014 +0100
Committer: Gabriel Reid gabri...@ngdata.com
Committed: Mon Oct 27 10:57:43 2014 +0100

--
 bin/psql.py | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f5a49bff/bin/psql.py
--
diff --git a/bin/psql.py b/bin/psql.py
index a8cbe31..34a95df 100755
--- a/bin/psql.py
+++ b/bin/psql.py
@@ -26,11 +26,17 @@ import phoenix_utils
 
 phoenix_utils.setPath()
 
+if os.name == 'nt':
+args = subprocess.list2cmdline(sys.argv[1:])
+else:
+import pipes# pipes module isn't available on Windows
+args =  .join([pipes.quote(v) for v in sys.argv[1:]])
+
 # HBase configuration folder path (where hbase-site.xml reside) for
 # HBase/Phoenix client side property override
 java_cmd = 'java -cp ' + phoenix_utils.hbase_conf_path + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
 ' -Dlog4j.configuration=file:' + \
 os.path.join(phoenix_utils.current_dir, log4j.properties) + \
- org.apache.phoenix.util.PhoenixRuntime  + ' '.join(sys.argv[1:])
+ org.apache.phoenix.util.PhoenixRuntime  + args 
 
 subprocess.call(java_cmd, shell=True)



git commit: PHOENIX-897 Quote parameters in psql.py

2014-10-27 Thread greid
Repository: phoenix
Updated Branches:
  refs/heads/master 79423f801 - 481d1bb87


PHOENIX-897 Quote parameters in psql.py

Properly quote supplied command-line parameters in psql.py so that
it's possible to supply any character (including ones that have
special meanings in various shells) as parameters.


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

Branch: refs/heads/master
Commit: 481d1bb878d08fc43fd1eb8f85c36244afdafe45
Parents: 79423f8
Author: Gabriel Reid gabri...@ngdata.com
Authored: Mon Oct 27 10:57:43 2014 +0100
Committer: Gabriel Reid gabri...@ngdata.com
Committed: Mon Oct 27 10:59:11 2014 +0100

--
 bin/psql.py | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/481d1bb8/bin/psql.py
--
diff --git a/bin/psql.py b/bin/psql.py
index a8cbe31..34a95df 100755
--- a/bin/psql.py
+++ b/bin/psql.py
@@ -26,11 +26,17 @@ import phoenix_utils
 
 phoenix_utils.setPath()
 
+if os.name == 'nt':
+args = subprocess.list2cmdline(sys.argv[1:])
+else:
+import pipes# pipes module isn't available on Windows
+args =  .join([pipes.quote(v) for v in sys.argv[1:]])
+
 # HBase configuration folder path (where hbase-site.xml reside) for
 # HBase/Phoenix client side property override
 java_cmd = 'java -cp ' + phoenix_utils.hbase_conf_path + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
 ' -Dlog4j.configuration=file:' + \
 os.path.join(phoenix_utils.current_dir, log4j.properties) + \
- org.apache.phoenix.util.PhoenixRuntime  + ' '.join(sys.argv[1:])
+ org.apache.phoenix.util.PhoenixRuntime  + args 
 
 subprocess.call(java_cmd, shell=True)



git commit: PHOENIX-897 Quote parameters in psql.py

2014-10-27 Thread greid
Repository: phoenix
Updated Branches:
  refs/heads/3.0 ca6c08f04 - f46875991


PHOENIX-897 Quote parameters in psql.py

Properly quote supplied command-line parameters in psql.py so that
it's possible to supply any character (including ones that have
special meanings in various shells) as parameters.


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

Branch: refs/heads/3.0
Commit: f4687599173427d2b7e71b076aa1e763a062281b
Parents: ca6c08f
Author: Gabriel Reid gabri...@ngdata.com
Authored: Mon Oct 27 10:57:43 2014 +0100
Committer: Gabriel Reid gabri...@ngdata.com
Committed: Mon Oct 27 10:58:48 2014 +0100

--
 bin/psql.py | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f4687599/bin/psql.py
--
diff --git a/bin/psql.py b/bin/psql.py
index a8cbe31..34a95df 100755
--- a/bin/psql.py
+++ b/bin/psql.py
@@ -26,11 +26,17 @@ import phoenix_utils
 
 phoenix_utils.setPath()
 
+if os.name == 'nt':
+args = subprocess.list2cmdline(sys.argv[1:])
+else:
+import pipes# pipes module isn't available on Windows
+args =  .join([pipes.quote(v) for v in sys.argv[1:]])
+
 # HBase configuration folder path (where hbase-site.xml reside) for
 # HBase/Phoenix client side property override
 java_cmd = 'java -cp ' + phoenix_utils.hbase_conf_path + os.pathsep + 
phoenix_utils.phoenix_client_jar + \
 ' -Dlog4j.configuration=file:' + \
 os.path.join(phoenix_utils.current_dir, log4j.properties) + \
- org.apache.phoenix.util.PhoenixRuntime  + ' '.join(sys.argv[1:])
+ org.apache.phoenix.util.PhoenixRuntime  + args 
 
 subprocess.call(java_cmd, shell=True)



Apache-Phoenix | Master | Build Successful

2014-10-27 Thread Apache Jenkins Server
Master 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-master/lastSuccessfulBuild/artifact/

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

Changes
[gabrielr] PHOENIX-897 Quote parameters in psql.py



git commit: PHOENIX-1381 NPE in CellUtil.matchingFamily() for IndexedKeyValue (Jeffrey Zhong)

2014-10-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 f5a49bff2 - b84b91eee


PHOENIX-1381 NPE in CellUtil.matchingFamily() for IndexedKeyValue (Jeffrey 
Zhong)


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

Branch: refs/heads/4.0
Commit: b84b91eeebc31fafced60e96a23c9e484500d44c
Parents: f5a49bf
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 09:13:11 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 09:13:11 2014 -0700

--
 .../hbase/index/wal/IndexedKeyValue.java| 46 +++-
 1 file changed, 44 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b84b91ee/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
index 0be1a6b..0270de5 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
@@ -34,7 +34,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 
 public class IndexedKeyValue extends KeyValue {
-public static final byte [] COLUMN_FAMILY = 
Bytes.toBytes(INDEXEDKEYVALUE_FAKED_FAMILY);
+public static final byte [] COLUMN_QUALIFIER = 
Bytes.toBytes(INDEXEDKEYVALUE_FAKED_COLUMN);
   
 private static int calcHashCode(ImmutableBytesPtr indexTableName, Mutation 
mutation) {
 final int prime = 31;
@@ -71,9 +71,51 @@ public class IndexedKeyValue extends KeyValue {
  */
 @Override
 public byte [] getFamily() {
-  return COLUMN_FAMILY;
+  return WALEdit.METAFAMILY;
 }
 
+@Override
+public byte[] getFamilyArray() {
+return WALEdit.METAFAMILY;
+}
+
+/**
+ * @return Family offset
+ */
+@Override
+public int getFamilyOffset() {
+return 0;
+}
+
+/**
+ * @return Family length
+ */
+@Override
+public byte getFamilyLength() {
+return (byte) WALEdit.METAFAMILY.length;
+}
+
+@Override
+public byte[] getQualifierArray() {
+return COLUMN_QUALIFIER;
+}
+
+/**
+ * @return Qualifier offset
+ */
+@Override
+public int getQualifierOffset() {
+return 0;
+}
+
+/**
+ * @return Qualifier length
+ */
+@Override
+public int getQualifierLength() {
+return COLUMN_QUALIFIER.length;
+}
+
 /**
  * This is a KeyValue that shouldn't actually be replayed/replicated, so 
we always mark it as 
  * an {@link WALEdit#METAFAMILY} so it isn't replayed/replicated via the 
normal replay mechanism



git commit: PHOENIX-1381 NPE in CellUtil.matchingFamily() for IndexedKeyValue (Jeffrey Zhong)

2014-10-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 481d1bb87 - c0b617f55


PHOENIX-1381 NPE in CellUtil.matchingFamily() for IndexedKeyValue (Jeffrey 
Zhong)


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

Branch: refs/heads/master
Commit: c0b617f554938ea31832a921b8caa579e87749aa
Parents: 481d1bb
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 09:13:11 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 09:14:03 2014 -0700

--
 .../hbase/index/wal/IndexedKeyValue.java| 46 +++-
 1 file changed, 44 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c0b617f5/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
index 0be1a6b..0270de5 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/wal/IndexedKeyValue.java
@@ -34,7 +34,7 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.hbase.index.util.ImmutableBytesPtr;
 
 public class IndexedKeyValue extends KeyValue {
-public static final byte [] COLUMN_FAMILY = 
Bytes.toBytes(INDEXEDKEYVALUE_FAKED_FAMILY);
+public static final byte [] COLUMN_QUALIFIER = 
Bytes.toBytes(INDEXEDKEYVALUE_FAKED_COLUMN);
   
 private static int calcHashCode(ImmutableBytesPtr indexTableName, Mutation 
mutation) {
 final int prime = 31;
@@ -71,9 +71,51 @@ public class IndexedKeyValue extends KeyValue {
  */
 @Override
 public byte [] getFamily() {
-  return COLUMN_FAMILY;
+  return WALEdit.METAFAMILY;
 }
 
+@Override
+public byte[] getFamilyArray() {
+return WALEdit.METAFAMILY;
+}
+
+/**
+ * @return Family offset
+ */
+@Override
+public int getFamilyOffset() {
+return 0;
+}
+
+/**
+ * @return Family length
+ */
+@Override
+public byte getFamilyLength() {
+return (byte) WALEdit.METAFAMILY.length;
+}
+
+@Override
+public byte[] getQualifierArray() {
+return COLUMN_QUALIFIER;
+}
+
+/**
+ * @return Qualifier offset
+ */
+@Override
+public int getQualifierOffset() {
+return 0;
+}
+
+/**
+ * @return Qualifier length
+ */
+@Override
+public int getQualifierLength() {
+return COLUMN_QUALIFIER.length;
+}
+
 /**
  * This is a KeyValue that shouldn't actually be replayed/replicated, so 
we always mark it as 
  * an {@link WALEdit#METAFAMILY} so it isn't replayed/replicated via the 
normal replay mechanism



Apache-Phoenix | Master | Build Successful

2014-10-27 Thread Apache Jenkins Server
Master 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-master/lastSuccessfulBuild/artifact/

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

Changes
[jtaylor] PHOENIX-1381 NPE in CellUtil.matchingFamily() for IndexedKeyValue (Jeffrey Zhong)



Jenkins build is back to normal : Phoenix | 4.0 #427

2014-10-27 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-4.0/427/changes



Apache-Phoenix | 4.0 | Build Successful

2014-10-27 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/lastSuccessfulBuild/artifact/

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

Changes
[jtaylor] PHOENIX-1381 NPE in CellUtil.matchingFamily() for IndexedKeyValue (Jeffrey Zhong)



[2/2] git commit: PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver

2014-10-27 Thread jamestaylor
PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver


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

Branch: refs/heads/4.0
Commit: b2c5ffa9cfa4962da675df2e9a9480b9d9887c1a
Parents: f4d8bb0
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 13:40:47 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 13:40:47 2014 -0700

--
 .../src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java | 5 -
 .../main/java/org/apache/phoenix/schema/tuple/ResultTuple.java  | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b2c5ffa9/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
index e662a3f..8a6cf64 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
@@ -1232,9 +1232,4 @@ public class PhoenixResultSet implements ResultSet, 
SQLCloseable, org.apache.pho
 public T T getObject(String columnLabel, ClassT type) throws 
SQLException {
 return (T) getObject(columnLabel); // Just ignore type since we only 
support built-in types
 }
-
-@Override
-public String toString(){
-  return ResultSet:\n+ \tclosed: +this.isClosed+\n\tcurrent row: 
+currentRow;
-}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b2c5ffa9/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
index a7f411c..c28a2bf 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
@@ -65,7 +65,7 @@ public class ResultTuple extends BaseTuple {
 public String toString() {
   StringBuilder sb = new StringBuilder();
   sb.append(keyvalues=);
-  if(this.result.isEmpty()) {
+  if(this.result == null || this.result.isEmpty()) {
 sb.append(NONE);
 return sb.toString();
   }



[2/2] git commit: PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver

2014-10-27 Thread jamestaylor
PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver


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

Branch: refs/heads/master
Commit: 4ed9ddb8fd28dffcd686671c18dc89d12b0a1c0c
Parents: 692b8cb
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 13:40:47 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 13:44:07 2014 -0700

--
 .../src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java | 5 -
 .../main/java/org/apache/phoenix/schema/tuple/ResultTuple.java  | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4ed9ddb8/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
index e662a3f..8a6cf64 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
@@ -1232,9 +1232,4 @@ public class PhoenixResultSet implements ResultSet, 
SQLCloseable, org.apache.pho
 public T T getObject(String columnLabel, ClassT type) throws 
SQLException {
 return (T) getObject(columnLabel); // Just ignore type since we only 
support built-in types
 }
-
-@Override
-public String toString(){
-  return ResultSet:\n+ \tclosed: +this.isClosed+\n\tcurrent row: 
+currentRow;
-}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4ed9ddb8/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
index a7f411c..c28a2bf 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
@@ -65,7 +65,7 @@ public class ResultTuple extends BaseTuple {
 public String toString() {
   StringBuilder sb = new StringBuilder();
   sb.append(keyvalues=);
-  if(this.result.isEmpty()) {
+  if(this.result == null || this.result.isEmpty()) {
 sb.append(NONE);
 return sb.toString();
   }



[1/2] git commit: PHOENIX-1385 Adding, dropping and adding columns fails with NPE (Samarth Jain, James Taylor)

2014-10-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/3.0 f46875991 - 72144f178


PHOENIX-1385 Adding, dropping and adding columns fails with NPE (Samarth Jain, 
James Taylor)


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

Branch: refs/heads/3.0
Commit: 2681601164441f6868e8472c40ed461cdac32c36
Parents: f468759
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 13:35:49 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 13:45:32 2014 -0700

--
 .../apache/phoenix/end2end/AlterTableIT.java| 22 +++-
 .../apache/phoenix/jdbc/PhoenixConnection.java  |  8 +--
 .../query/ConnectionQueryServicesImpl.java  |  4 +-
 .../query/ConnectionlessQueryServicesImpl.java  |  6 +--
 .../query/DelegateConnectionQueryServices.java  |  6 +--
 .../apache/phoenix/query/MetaDataMutated.java   |  2 +-
 .../apache/phoenix/schema/MetaDataClient.java   |  6 +--
 .../apache/phoenix/schema/PMetaDataImpl.java| 53 +++-
 8 files changed, 64 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/26816011/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
index b17c1bd..9c14f16 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AlterTableIT.java
@@ -884,4 +884,24 @@ public class AlterTableIT extends BaseHBaseManagedTimeIT {
 pstmt2.close();
 conn1.close();
 }
-}
+
+@Test
+public void testAddColumnsUsingNewConnection() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+String ddl = CREATE TABLE T (\n
++ID1 VARCHAR(15) NOT NULL,\n
++ID2 VARCHAR(15) NOT NULL,\n
++CREATED_DATE DATE,\n
++CREATION_TIME BIGINT,\n
++LAST_USED DATE,\n
++CONSTRAINT PK PRIMARY KEY (ID1, ID2));
+Connection conn1 = DriverManager.getConnection(getUrl(), props);
+conn1.createStatement().execute(ddl);
+ddl = ALTER TABLE T ADD STRING VARCHAR, STRING_DATA_TYPES VARCHAR;
+conn1.createStatement().execute(ddl);
+ddl = ALTER TABLE T DROP COLUMN STRING, STRING_DATA_TYPES;
+conn1.createStatement().execute(ddl);
+ddl = ALTER TABLE T ADD STRING_ARRAY1 VARCHAR[];
+conn1.createStatement().execute(ddl);
+conn1.close();
+}}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/26816011/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
index 7eced73..75f9f55 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixConnection.java
@@ -697,11 +697,11 @@ public class PhoenixConnection implements Connection, 
org.apache.phoenix.jdbc.Jd
 }
 
 @Override
-public PMetaData removeColumn(PName tenantId, String tableName, String 
familyName, String columnName,
-long tableTimeStamp, long tableSeqNum) throws SQLException {
-metaData = metaData.removeColumn(tenantId, tableName, familyName, 
columnName, tableTimeStamp, tableSeqNum);
+public PMetaData removeColumn(PName tenantId, String tableName, 
ListPColumn columnsToRemove, long tableTimeStamp,
+long tableSeqNum) throws SQLException {
+metaData = metaData.removeColumn(tenantId, tableName, columnsToRemove, 
tableTimeStamp, tableSeqNum);
 //Cascade through to connectionQueryServices too
-getQueryServices().removeColumn(tenantId, tableName, familyName, 
columnName, tableTimeStamp, tableSeqNum);
+getQueryServices().removeColumn(tenantId, tableName, columnsToRemove, 
tableTimeStamp, tableSeqNum);
 return metaData;
 }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/26816011/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
 

[2/2] git commit: PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver

2014-10-27 Thread jamestaylor
PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver


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

Branch: refs/heads/3.0
Commit: 72144f17884518b1152b83d294b77f10c2a743a5
Parents: 2681601
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 13:40:47 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 13:45:38 2014 -0700

--
 .../src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java | 5 -
 .../main/java/org/apache/phoenix/schema/tuple/ResultTuple.java  | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/72144f17/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java 
b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
index e662a3f..8a6cf64 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixResultSet.java
@@ -1232,9 +1232,4 @@ public class PhoenixResultSet implements ResultSet, 
SQLCloseable, org.apache.pho
 public T T getObject(String columnLabel, ClassT type) throws 
SQLException {
 return (T) getObject(columnLabel); // Just ignore type since we only 
support built-in types
 }
-
-@Override
-public String toString(){
-  return ResultSet:\n+ \tclosed: +this.isClosed+\n\tcurrent row: 
+currentRow;
-}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/72144f17/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
index 02aebf7..f0dbd9e 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/tuple/ResultTuple.java
@@ -62,7 +62,7 @@ public class ResultTuple extends BaseTuple {
 public String toString() {
   StringBuilder sb = new StringBuilder();
   sb.append(keyvalues=);
-  if(this.result.isEmpty()) {
+  if(this.result == null || this.result.isEmpty()) {
 sb.append(NONE);
 return sb.toString();
   }



[2/3] PHOENIX-1286 Remove hadoop2 compat modules

2014-10-27 Thread jyates
http://git-wip-us.apache.org/repos/asf/phoenix/blob/842f8a8a/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
new file mode 100644
index 000..6ae52d8
--- /dev/null
+++ b/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.trace;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.Pair;
+import org.cloudera.htrace.Span;
+
+/**
+ * Utilities for tracing
+ */
+public class TracingUtils {
+
+private static final Log LOG = LogFactory.getLog(TracingUtils.class);
+
+public static final String METRIC_SOURCE_KEY = phoenix.;
+
+/** Set context to enable filtering */
+public static final String METRICS_CONTEXT = tracing;
+
+/** Marker metric to ensure that we register the tracing mbeans */
+public static final String METRICS_MARKER_CONTEXT = marker;
+
+public static void addAnnotation(Span span, String message, int value) {
+span.addKVAnnotation(message.getBytes(), 
Bytes.toBytes(Integer.toString(value)));
+}
+
+public static PairString, String readAnnotation(byte[] key, byte[] 
value) {
+return new PairString, String(new String(key), 
Bytes.toString(value));
+}
+
+/**
+ * @see #getTraceMetricName(String)
+ */
+public static final String getTraceMetricName(long traceId) {
+return getTraceMetricName(Long.toString(traceId));
+}
+
+/**
+ * @param traceId unique id of the trace
+ * @return the name of the metric record that should be generated for a 
given trace
+ */
+public static final String getTraceMetricName(String traceId) {
+return METRIC_SOURCE_KEY + traceId;
+}
+}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/842f8a8a/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 d0677cf..b093b9c 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
@@ -36,8 +36,7 @@ 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 org.apache.phoenix.trace.TracingCompat;
-import org.apache.phoenix.util.StringUtil;
+import org.apache.phoenix.trace.TraceMetricSource;
 import org.cloudera.htrace.Sampler;
 import org.cloudera.htrace.Span;
 import org.cloudera.htrace.Trace;
@@ -313,7 +312,7 @@ public class Tracing {
 public synchronized static void addTraceMetricsSource() {
 try {
 if (!initialized) {
-Trace.addReceiver(TracingCompat.newTraceMetricSource());
+Trace.addReceiver(new TraceMetricSource());
 }
 } catch (RuntimeException e) {
 LOG.warn(Tracing will outputs will not be written to any metrics 
sink! No 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/842f8a8a/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
 
b/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
new file mode 100644
index 000..f4dfd74
--- /dev/null
+++ 
b/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See 

[1/3] PHOENIX-1286 Remove hadoop2 compat modules

2014-10-27 Thread jyates
Repository: phoenix
Updated Branches:
  refs/heads/master 4ed9ddb8f - 842f8a8a8


http://git-wip-us.apache.org/repos/asf/phoenix/blob/842f8a8a/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TraceMetricsSourceTest.java
--
diff --git 
a/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TraceMetricsSourceTest.java
 
b/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TraceMetricsSourceTest.java
deleted file mode 100644
index 3258e8a..000
--- 
a/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TraceMetricsSourceTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * License); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.phoenix.trace;
-
-import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.hadoop.metrics2.MetricsCollector;
-import org.apache.hadoop.metrics2.MetricsRecordBuilder;
-import org.apache.hadoop.metrics2.MetricsTag;
-import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
-import org.cloudera.htrace.Span;
-import org.cloudera.htrace.impl.MilliSpan;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.mockito.Mockito;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-/**
- * Test that the @{link TraceMetricSource} correctly handles different kinds 
of traces
- */
-public class TraceMetricsSourceTest {
-
-  @BeforeClass
-  public static void setup() throws Exception{
-DefaultMetricsSystem.setMiniClusterMode(true);
-  }
-
-  /**
-   * For PHOENIX-1126, Phoenix originally assumed all the annotation values 
were integers,
-   * but HBase writes some strings as well, so we need to be able to handle 
that too
-   */
-  @Test
-  public void testNonIntegerAnnotations(){
-Span span = getSpan();
-// make sure its less than the length of an integer
-byte[] value = Bytes.toBytes(a);
-byte[] someInt = Bytes.toBytes(1);
-assertTrue(someInt.length value.length);
-
-// an annotation that is not an integer
-span.addKVAnnotation(Bytes.toBytes(key), value);
-
-// Create the sink and write the span
-TraceMetricSource source = new TraceMetricSource();
-source.receiveSpan(span);
-  }
-
-  @Test
-  public void testIntegerAnnotations(){
-Span span = getSpan();
-
-// add annotation through the phoenix interfaces
-TracingCompat.addAnnotation(span, message, 10);
-
-TraceMetricSource source = new TraceMetricSource();
-source.receiveSpan(span);
-  }
-
-  /**
-   * If the source does not write any metrics when there are no spans, i.e. 
when initialized,
-   * then the metrics system will discard the source, so it needs to always 
emit some metrics.
-   */
-  @Test
-  public void testWritesInfoWhenNoSpans(){
-TraceMetricSource source = new TraceMetricSource();
-MetricsCollector collector = Mockito.mock(MetricsCollector.class);
-MetricsRecordBuilder builder = Mockito.mock(MetricsRecordBuilder.class);
-Mockito.when(collector.addRecord(Mockito.anyString())).thenReturn(builder);
-
-source.getMetrics(collector, true);
-
-// verify that we add a record and that the record has some info
-Mockito.verify(collector).addRecord(Mockito.anyString());
-Mockito.verify(builder).add(Mockito.any(MetricsTag.class));
-  }
-
-  private Span getSpan(){
-return new MilliSpan(test span, 0, 1 , 2, pid);
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/phoenix/blob/842f8a8a/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TracingTest.java
--
diff --git 
a/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TracingTest.java
 
b/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TracingTest.java
deleted file mode 100644
index ffe6c82..000
--- 
a/phoenix-hadoop2-compat/src/test/java/org/apache/phoenix/trace/TracingTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF 

[2/3] PHOENIX-1286 Remove hadoop2 compat modules

2014-10-27 Thread jyates
http://git-wip-us.apache.org/repos/asf/phoenix/blob/b48ca7b5/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java 
b/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
new file mode 100644
index 000..6ae52d8
--- /dev/null
+++ b/phoenix-core/src/main/java/org/apache/phoenix/trace/TracingUtils.java
@@ -0,0 +1,63 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.trace;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hbase.util.Pair;
+import org.cloudera.htrace.Span;
+
+/**
+ * Utilities for tracing
+ */
+public class TracingUtils {
+
+private static final Log LOG = LogFactory.getLog(TracingUtils.class);
+
+public static final String METRIC_SOURCE_KEY = phoenix.;
+
+/** Set context to enable filtering */
+public static final String METRICS_CONTEXT = tracing;
+
+/** Marker metric to ensure that we register the tracing mbeans */
+public static final String METRICS_MARKER_CONTEXT = marker;
+
+public static void addAnnotation(Span span, String message, int value) {
+span.addKVAnnotation(message.getBytes(), 
Bytes.toBytes(Integer.toString(value)));
+}
+
+public static PairString, String readAnnotation(byte[] key, byte[] 
value) {
+return new PairString, String(new String(key), 
Bytes.toString(value));
+}
+
+/**
+ * @see #getTraceMetricName(String)
+ */
+public static final String getTraceMetricName(long traceId) {
+return getTraceMetricName(Long.toString(traceId));
+}
+
+/**
+ * @param traceId unique id of the trace
+ * @return the name of the metric record that should be generated for a 
given trace
+ */
+public static final String getTraceMetricName(String traceId) {
+return METRIC_SOURCE_KEY + traceId;
+}
+}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b48ca7b5/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 d0677cf..b093b9c 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
@@ -36,8 +36,7 @@ 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 org.apache.phoenix.trace.TracingCompat;
-import org.apache.phoenix.util.StringUtil;
+import org.apache.phoenix.trace.TraceMetricSource;
 import org.cloudera.htrace.Sampler;
 import org.cloudera.htrace.Span;
 import org.cloudera.htrace.Trace;
@@ -313,7 +312,7 @@ public class Tracing {
 public synchronized static void addTraceMetricsSource() {
 try {
 if (!initialized) {
-Trace.addReceiver(TracingCompat.newTraceMetricSource());
+Trace.addReceiver(new TraceMetricSource());
 }
 } catch (RuntimeException e) {
 LOG.warn(Tracing will outputs will not be written to any metrics 
sink! No 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b48ca7b5/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
 
b/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
new file mode 100644
index 000..f4dfd74
--- /dev/null
+++ 
b/phoenix-core/src/test/java/org/apache/hadoop/metrics2/impl/ExposedMetricCounterLong.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See 

Build failed in Jenkins: Phoenix | 4.0 #428

2014-10-27 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-4.0/428/changes

Changes:

[jtaylor] PHOENIX-1385 Adding, dropping and adding columns fails with NPE 
(Samarth Jain, James Taylor)

[jtaylor] PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver

--
[...truncated 6275 lines...]
43/47K
47/47K
47K downloaded  (commons-parent-25.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
[INFO] Unable to find resource 'com.google.protobuf:protobuf-java:pom:2.5.0' in 
repository apache release 
(https://repository.apache.org/content/repositories/releases/)
Downloading: 
http://conjars.org/repo/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
[INFO] Unable to find resource 'com.google.protobuf:protobuf-java:pom:2.5.0' in 
repository conjars.org (http://conjars.org/repo)
Downloading: 
https://repository.apache.org/content/repositories/snapshots//com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
[INFO] Unable to find resource 'com.google.protobuf:protobuf-java:pom:2.5.0' in 
repository apache snapshot 
(https://repository.apache.org/content/repositories/snapshots/)
Downloading: 
http://download.java.net/maven/2//com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
[INFO] Unable to find resource 'com.google.protobuf:protobuf-java:pom:2.5.0' in 
repository java.net (http://download.java.net/maven/2/)
Downloading: 
http://repository.codehaus.org//com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
[INFO] Unable to find resource 'com.google.protobuf:protobuf-java:pom:2.5.0' in 
repository codehaus (http://repository.codehaus.org/)
Downloading: 
http://repository.jboss.org/nexus/content/groups/public-jboss//com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
26/?
4122/?
8192/?
8218/?
8375/?
  
Downloading: 
https://repository.apache.org/content/repositories/releases//com/google/google/1/google-1.pom
[INFO] Unable to find resource 'com.google:google:pom:1' in repository apache 
release (https://repository.apache.org/content/repositories/releases/)
Downloading: http://conjars.org/repo/com/google/google/1/google-1.pom
[INFO] Unable to find resource 'com.google:google:pom:1' in repository 
conjars.org (http://conjars.org/repo)
Downloading: 
https://repository.apache.org/content/repositories/snapshots//com/google/google/1/google-1.pom
[INFO] Unable to find resource 'com.google:google:pom:1' in repository apache 
snapshot (https://repository.apache.org/content/repositories/snapshots/)
Downloading: http://download.java.net/maven/2//com/google/google/1/google-1.pom
[INFO] Unable to find resource 'com.google:google:pom:1' in repository java.net 
(http://download.java.net/maven/2/)
Downloading: http://repository.codehaus.org//com/google/google/1/google-1.pom
[INFO] Unable to find resource 'com.google:google:pom:1' in repository codehaus 
(http://repository.codehaus.org/)
Downloading: 
http://repository.jboss.org/nexus/content/groups/public-jboss//com/google/google/1/google-1.pom
1/1K
1K downloaded  (google-1.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-annotations/2.2.0/hadoop-annotations-2.2.0.pom
2/2K
2K downloaded  (hadoop-annotations-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-project/2.2.0/hadoop-project-2.2.0.pom
4/36K
7/36K
11/36K
15/36K
19/36K
22/36K
26/36K
30/36K
34/36K
36/36K
36K downloaded  (hadoop-project-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-main/2.2.0/hadoop-main-2.2.0.pom
4/16K
7/16K
11/16K
15/16K
16/16K
16K downloaded  (hadoop-main-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-common/2.2.0/hadoop-common-2.2.0.pom
4/26K
7/26K
11/26K
15/26K
19/26K
22/26K
26/26K
26K downloaded  (hadoop-common-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/hadoop/hadoop-project-dist/2.2.0/hadoop-project-dist-2.2.0.pom
4/17K
7/17K
11/17K
15/17K
16/17K
17/17K
17K downloaded  (hadoop-project-dist-2.2.0.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/commons/commons-math/2.1/commons-math-2.1.pom
4/10K
7/10K
10/10K
10K downloaded  (commons-math-2.1.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//org/apache/commons/commons-parent/14/commons-parent-14.pom
4/30K
7/30K
11/30K
15/30K
18/30K
22/30K
25/30K
29/30K
30/30K
30K downloaded  (commons-parent-14.pom)
Downloading: 
https://repository.apache.org/content/repositories/releases//xmlenc/xmlenc/0.52/xmlenc-0.52.pom
[INFO] Unable to find resource 'xmlenc:xmlenc:pom:0.52' in repository apache 
release (https://repository.apache.org/content/repositories/releases/)
Downloading: 

Apache-Phoenix | 3.0 | Hadoop1 | Build Successful

2014-10-27 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-1385 Adding, dropping and adding columns fails with NPE (Samarth Jain, James Taylor)

[jtaylor] PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver



git commit: PHOENIX-1170 Change status of local index during splitting to prevent usage when slower than query through data table (Rajeshbabu)

2014-10-27 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.0 b48ca7b5c - 4c0d00bdd


PHOENIX-1170 Change status of local index during splitting to prevent usage 
when slower than query through data table (Rajeshbabu)


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

Branch: refs/heads/4.0
Commit: 4c0d00bdd32e1853e929729f396dda567dc6faeb
Parents: b48ca7b
Author: James Taylor jtay...@salesforce.com
Authored: Mon Oct 27 14:29:07 2014 -0700
Committer: James Taylor jtay...@salesforce.com
Committed: Mon Oct 27 14:29:07 2014 -0700

--
 .../org/apache/phoenix/end2end/QueryIT.java |  20 ++-
 .../phoenix/end2end/index/LocalIndexIT.java | 152 ---
 .../IndexHalfStoreFileReaderGenerator.java  |  63 
 .../hbase/regionserver/LocalIndexSplitter.java  |  40 +
 .../java/org/apache/phoenix/query/BaseTest.java |   1 +
 5 files changed, 250 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c0d00bd/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
index cc431c1..f45b689 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryIT.java
@@ -50,6 +50,7 @@ import java.sql.Timestamp;
 import java.util.Arrays;
 import java.util.Properties;
 
+import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.client.HTable;
 import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
@@ -60,6 +61,7 @@ import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.schema.PDataType;
 import org.apache.phoenix.schema.SequenceNotFoundException;
 import org.apache.phoenix.util.ByteUtil;
+import org.apache.phoenix.util.MetaDataUtil;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.junit.Test;
@@ -761,14 +763,16 @@ public class QueryIT extends BaseQueryIT {
 HTable htable = (HTable) 
conn.unwrap(PhoenixConnection.class).getQueryServices().getTable(tableName);
 htable.clearRegionCache();
 int nRegions = htable.getRegionLocations().size();
-admin.split(tableName, ByteUtil.concat(Bytes.toBytes(tenantId), 
Bytes.toBytes(00A + Character.valueOf((char) ('3' + nextRunCount())) + ts))); 
// vary split point with test run
-int retryCount = 0;
-do {
-Thread.sleep(2000);
-retryCount++;
-//htable.clearRegionCache();
-} while (retryCount  10  htable.getRegionLocations().size() == 
nRegions);
-assertNotEquals(nRegions, htable.getRegionLocations().size());
+
if(!admin.tableExists(TableName.valueOf(MetaDataUtil.getLocalIndexTableName(ATABLE_NAME
 {
+admin.split(tableName, 
ByteUtil.concat(Bytes.toBytes(tenantId), Bytes.toBytes(00A + 
Character.valueOf((char) ('3' + nextRunCount())) + ts))); // vary split point 
with test run
+int retryCount = 0;
+do {
+Thread.sleep(2000);
+retryCount++;
+//htable.clearRegionCache();
+} while (retryCount  10  htable.getRegionLocations().size() 
== nRegions);
+assertNotEquals(nRegions, htable.getRegionLocations().size());
+} 
 
 statement.setString(1, tenantId);
 rs = statement.executeQuery();

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c0d00bd/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/LocalIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/LocalIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/LocalIndexIT.java
index 019e0fb..7fa69d4 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/LocalIndexIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/LocalIndexIT.java
@@ -24,22 +24,31 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
+import java.io.IOException;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.List;
 import java.util.Map;
+import 

Jenkins build is back to normal : Phoenix | 4.0 #429

2014-10-27 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-4.0/429/changes



Build failed in Jenkins: Phoenix | Master #462

2014-10-27 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-master/462/changes

Changes:

[jtaylor] PHOENIX-1385 Adding, dropping and adding columns fails with NPE 
(Samarth Jain, James Taylor)

[jtaylor] PHOENIX-1376 java.lang.NullPointerException occurs in JDBC driver

[jyates] PHOENIX-1286 Remove hadoop2 compat modules

--
[...truncated 353 lines...]
Running org.apache.phoenix.end2end.SpooledOrderByIT
Tests run: 49, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 52.785 sec - 
in org.apache.phoenix.end2end.CastAndCoerceIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.525 sec - in 
org.apache.phoenix.end2end.SpooledOrderByIT
Running org.apache.phoenix.end2end.VariableLengthPKIT
Running org.apache.phoenix.end2end.ScanQueryIT
Tests run: 77, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 63.588 sec - 
in org.apache.phoenix.end2end.NotQueryIT
Running org.apache.phoenix.end2end.DynamicUpsertIT
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.254 sec - in 
org.apache.phoenix.end2end.DynamicUpsertIT
Running org.apache.phoenix.end2end.CreateTableIT
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 26.894 sec - 
in org.apache.phoenix.end2end.UpsertSelectIT
Running org.apache.phoenix.end2end.DynamicColumnIT
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.087 sec - in 
org.apache.phoenix.end2end.DynamicColumnIT
Running org.apache.phoenix.end2end.DerivedTableIT
Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.014 sec - 
in org.apache.phoenix.end2end.VariableLengthPKIT
Running org.apache.phoenix.end2end.UpsertValuesIT
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.359 sec - 
in org.apache.phoenix.end2end.CreateTableIT
Running org.apache.phoenix.end2end.GroupByIT
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.013 sec - 
in org.apache.phoenix.end2end.DerivedTableIT
Running org.apache.phoenix.end2end.SequenceIT
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.742 sec - 
in org.apache.phoenix.end2end.UpsertValuesIT
Running org.apache.phoenix.end2end.ArrayIT
Tests run: 50, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 31.087 sec - 
in org.apache.phoenix.end2end.SequenceIT
Running org.apache.phoenix.end2end.RowValueConstructorIT
Tests run: 48, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 26.043 sec - 
in org.apache.phoenix.end2end.ArrayIT
Running org.apache.phoenix.end2end.ExtendedQueryExecIT
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.654 sec - in 
org.apache.phoenix.end2end.ExtendedQueryExecIT
Running org.apache.phoenix.end2end.QueryIT
Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 25.034 sec - 
in org.apache.phoenix.end2end.RowValueConstructorIT
Running org.apache.phoenix.end2end.IsNullIT
Tests run: 119, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 91.002 sec - 
in org.apache.phoenix.end2end.ScanQueryIT
Running org.apache.phoenix.end2end.ToCharFunctionIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.871 sec - in 
org.apache.phoenix.end2end.IsNullIT
Running org.apache.phoenix.end2end.FunkyNamesIT
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.051 sec - in 
org.apache.phoenix.end2end.ToCharFunctionIT
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.507 sec - in 
org.apache.phoenix.end2end.FunkyNamesIT
Running org.apache.phoenix.end2end.salted.SaltedTableIT
Running org.apache.phoenix.end2end.NativeHBaseTypesIT
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.667 sec - in 
org.apache.phoenix.end2end.NativeHBaseTypesIT
Running org.apache.phoenix.end2end.CompareDecimalToLongIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.407 sec - in 
org.apache.phoenix.end2end.salted.SaltedTableIT
Running org.apache.phoenix.end2end.TruncateFunctionIT
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.34 sec - in 
org.apache.phoenix.end2end.TruncateFunctionIT
Running org.apache.phoenix.end2end.QueryDatabaseMetaDataIT
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.823 sec - in 
org.apache.phoenix.end2end.CompareDecimalToLongIT
Running org.apache.phoenix.end2end.PercentileIT
Tests run: 91, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 78.849 sec - 
in org.apache.phoenix.end2end.GroupByIT
Running org.apache.phoenix.end2end.ToNumberFunctionIT
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.053 sec - 
in org.apache.phoenix.end2end.PercentileIT
Running org.apache.phoenix.end2end.OrderByIT
Tests run: 203, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 155.096 sec - 
in org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT
Running org.apache.phoenix.end2end.GroupByCaseIT
Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.941 sec - in 
org.apache.phoenix.end2end.ToNumberFunctionIT
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.007 sec 

Jenkins build is back to normal : Phoenix | Master #463

2014-10-27 Thread Apache Jenkins Server
See https://builds.apache.org/job/Phoenix-master/463/changes