phoenix git commit: PHOENIX-1947 Create .py script in phoenix/bin to start transaction manager

2015-09-02 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/txn 92ee51a0d -> 242d1fc56


PHOENIX-1947 Create .py script in phoenix/bin to start transaction manager


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

Branch: refs/heads/txn
Commit: 242d1fc565e4a8a687f009e8e1fc7487f52ed578
Parents: 92ee51a
Author: Thomas D'Silva 
Authored: Tue Sep 1 17:36:00 2015 -0700
Committer: Thomas D'Silva 
Committed: Wed Sep 2 11:58:57 2015 -0700

--
 bin/tephra  | 310 +++
 bin/tephra-env.sh   |  55 
 phoenix-assembly/pom.xml|   2 +
 phoenix-assembly/src/build/server-with-txns.xml |  48 +++
 .../src/build/server-without-antlr.xml  |   2 +
 phoenix-assembly/src/build/server.xml   |  10 +-
 6 files changed, 419 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/242d1fc5/bin/tephra
--
diff --git a/bin/tephra b/bin/tephra
new file mode 100644
index 000..54fe301
--- /dev/null
+++ b/bin/tephra
@@ -0,0 +1,310 @@
+#!/bin/sh
+
+#
+# Copyright © 2014 Cask Data, Inc.
+#
+# Licensed 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.
+#
+
+# Source function library. used for "status" use case
+if [ -f "/etc/rc.d/init.d/functions" ]; then
+  PLATFORM="RHEL"
+  . /etc/rc.d/init.d/functions
+elif [ -f /lib/lsb/init-functions ] ; then
+  PLATFORM="UBUNTU"
+  . /lib/lsb/init-functions
+else
+  PLATFORM="UNSUPPORTED"
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+bin=`dirname "${BASH_SOURCE-$0}"`
+bin=`cd "$bin"; pwd`
+lib="$bin"/../lib
+conf="$bin"/../conf
+script=`basename $0`
+
+# Resolve relative symlinks
+while [ -h "$PRG" ] ; do
+ls=`ls -ld "$PRG"`
+link=`expr "$ls" : '.*-> \(.*\)$'`
+if expr "$link" : '/.*' > /dev/null; then
+PRG="$link"
+else
+PRG=`dirname "$PRG"`"/$link"
+fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/.."
+APP_HOME="`pwd -P`"
+APP=`basename $0`
+
+# Load component common environment file too
+. $bin/tephra-env.sh
+
+pid=$PID_DIR/tephra-service-${IDENT_STRING}.pid
+
+# In other environment, the jars are expected to be in /lib directory.
+# Load all the jar files. Not ideal, but we need to load only the things that
+# is needed by this script.
+if [ "$CLASSPATH" = "" ]; then
+  CLASSPATH=${lib}/*
+else
+  CLASSPATH=$CLASSPATH:${lib}/*
+fi
+
+# Load the configuration too.
+if [ -d "$conf" ]; then
+  CLASSPATH=$CLASSPATH:"$conf"/
+fi
+
+# Set Log location
+if [ ! -e $LOG_DIR ]; then
+  mkdir -p $LOG_DIR;
+fi
+export LOG_PREFIX="tephra-service-$IDENT_STRING-$HOSTNAME"
+export LOGFILE=$LOG_PREFIX.log
+loglog="${LOG_DIR}/${LOGFILE}"
+
+# set the classpath to include hadoop and hbase dependencies
+set_classpath()
+{
+  COMP_HOME=$1
+  if [ -n "$HBASE_HOME" ]; then
+HBASE_CP=`$HBASE_HOME/bin/hbase classpath`
+  elif [ `which hbase` ]; then
+HBASE_CP=`hbase classpath`
+  fi
+
+  export HBASE_CP
+
+  if [ -n "$HBASE_CP" ]; then
+CP=$COMP_HOME/phoenix-assembly/target/*:$HBASE_CP:$EXTRA_CLASSPATH
+  else
+# assume Hadoop/HBase libs are included via EXTRA_CLASSPATH
+echo "WARN: could not find Hadoop and HBase libraries"
+CP=$COMP_HOME/phoenix-assembly/target/*:$EXTRA_CLASSPATH
+  fi
+
+  # Setup classpaths.
+  if [ -n "$CLASSPATH" ]; then
+CLASSPATH=$CLASSPATH:$CP
+  else
+CLASSPATH=$CP
+  fi
+
+  export CLASSPATH
+}
+
+# Attempts to find JAVA in few ways.
+set_java ()
+{
+  # Determine the Java command to use to start the JVM.
+  if [ -n "$JAVA_HOME" ] ; then
+if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+# IBM's JDK on AIX uses strange locations for the executables
+export JAVA="$JAVA_HOME/jre/sh/java"
+else
+export JAVA="$JAVA_HOME/bin/java"
+fi
+if [ ! -x "$JAVA" ] ; then
+echo "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation." >&2
+exit 1
+fi
+  else
+

phoenix git commit: PHOENIX-2160 - Add new files

2015-09-02 Thread ramkrishna
Repository: phoenix
Updated Branches:
  refs/heads/master 7d7c21786 -> caaf29e92


PHOENIX-2160 - Add new files


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

Branch: refs/heads/master
Commit: caaf29e920e517d872cf8adad7fddc09328140fe
Parents: 7d7c217
Author: ramkrishna 
Authored: Wed Sep 2 17:07:47 2015 +0530
Committer: ramkrishna 
Committed: Wed Sep 2 17:07:47 2015 +0530

--
 .../CloneNonDeterministicExpressionVisitor.java | 30 +
 .../ProjectedColumnExpressionVisitor.java   | 25 +++
 .../ReplaceArrayFunctionExpressionVisitor.java  | 46 
 3 files changed, 101 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/caaf29e9/phoenix-core/src/main/java/org/apache/phoenix/expression/visitor/CloneNonDeterministicExpressionVisitor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/visitor/CloneNonDeterministicExpressionVisitor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/visitor/CloneNonDeterministicExpressionVisitor.java
new file mode 100644
index 000..1aeb9a9
--- /dev/null
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/visitor/CloneNonDeterministicExpressionVisitor.java
@@ -0,0 +1,30 @@
+/*
+ * 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.expression.visitor;
+
+import java.util.List;
+
+import org.apache.phoenix.expression.Determinism;
+import org.apache.phoenix.expression.Expression;
+
+public class CloneNonDeterministicExpressionVisitor extends 
CloneExpressionVisitor {
+
+public boolean isCloneNode(Expression node, List children) {
+return Determinism.PER_INVOCATION.compareTo(node.getDeterminism()) <= 
0;
+}
+}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/caaf29e9/phoenix-core/src/main/java/org/apache/phoenix/expression/visitor/ProjectedColumnExpressionVisitor.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/expression/visitor/ProjectedColumnExpressionVisitor.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/visitor/ProjectedColumnExpressionVisitor.java
new file mode 100644
index 000..2380c6b
--- /dev/null
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/expression/visitor/ProjectedColumnExpressionVisitor.java
@@ -0,0 +1,25 @@
+/*
+ * 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.expression.visitor;
+
+import org.apache.phoenix.expression.ProjectedColumnExpression;
+
+public abstract class ProjectedColumnExpressionVisitor extends 
StatelessTraverseAllExpressionVisitor {
+@Override
+abstract public Void visit(ProjectedColumnExpression node);
+}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/caaf29e9/phoenix-core/src/main/java/org/apache/phoenix/expression/visitor/ReplaceArrayFunctionExpressionVisitor.java
--
diff --git 

Build failed in Jenkins: Phoenix | Master #888

2015-09-02 Thread Apache Jenkins Server
See 

Changes:

[ramkrishna] PHOENIX-2160 - Projection of specific array index does not work 
(Dumindu

--
[...truncated 118643 lines...]
[ERROR] LiteralExpression.java[227] (sizes) LineLength: Line is longer than 100 
characters (found 152).
[ERROR] LiteralExpression.java[246] (misc) Regexp: Line matches the illegal 
pattern 'Trailing whitespace'.
[ERROR] LiteralExpression.java[269] (blocks) NeedBraces: 'if' construct must 
use '{}'s.
[ERROR] LiteralExpression.java[270] (blocks) NeedBraces: 'if' construct must 
use '{}'s.
[ERROR] LiteralExpression.java[271] (blocks) NeedBraces: 'if' construct must 
use '{}'s.
[ERROR] LiteralExpression.java[272:54] (whitespace) WhitespaceAfter: 'cast' is 
not followed by whitespace.
[ERROR] LiteralExpression.java[274] (blocks) NeedBraces: 'if' construct must 
use '{}'s.
[ERROR] LiteralExpression.java[275] (blocks) NeedBraces: 'if' construct must 
use '{}'s.
[ERROR] LiteralExpression.java[282:60] (whitespace) WhitespaceAround: '-' is 
not preceded with whitespace.
[ERROR] LiteralExpression.java[282:61] (whitespace) WhitespaceAround: '-' is 
not followed by whitespace.
[ERROR] LiteralExpression.java[286:36] (whitespace) WhitespaceAround: '<=' is 
not preceded with whitespace.
[ERROR] LiteralExpression.java[286:38] (whitespace) WhitespaceAround: '<=' is 
not followed by whitespace.
[ERROR] LiteralExpression.java[288] (sizes) LineLength: Line is longer than 100 
characters (found 112).
[ERROR] LiteralExpression.java[288] (misc) Regexp: Line matches the illegal 
pattern 'Trailing whitespace'.
[ERROR] LiteralExpression.java[288] (indentation) Indentation: if child at 
indentation level 16 not at correct indentation, 12
[ERROR] LiteralExpression.java[289] (indentation) Indentation: if child at 
indentation level 16 not at correct indentation, 12
[ERROR] LiteralExpression.java[289:85] (coding) EmptyStatement: Empty statement.
[ERROR] LiteralExpression.java[290:9] (blocks) RightCurly: '}' should be on the 
same line.
[ERROR] LiteralExpression.java[292] (indentation) Indentation: else child at 
indentation level 16 not at correct indentation, 12
[ERROR] LiteralExpression.java[292:66] (whitespace) WhitespaceAround: '>>' is 
not preceded with whitespace.
[ERROR] LiteralExpression.java[292:68] (whitespace) WhitespaceAround: '>>' is 
not followed by whitespace.
[ERROR] LiteralExpression.java[292:70] (whitespace) WhitespaceAround: '-' is 
not preceded with whitespace.
[ERROR] LiteralExpression.java[292:71] (whitespace) WhitespaceAround: '-' is 
not followed by whitespace.
[ERROR] LiteralExpression.java[293] (indentation) Indentation: else child at 
indentation level 16 not at correct indentation, 12
[ERROR] LiteralExpression.java[294] (sizes) LineLength: Line is longer than 100 
characters (found 113).
[ERROR] LiteralExpression.java[294] (indentation) Indentation: else child at 
indentation level 16 not at correct indentation, 12
[ERROR] LiteralExpression.java[295] (indentation) Indentation: else child at 
indentation level 16 not at correct indentation, 12
[ERROR] LiteralExpression.java[296] (misc) Regexp: Line matches the illegal 
pattern 'Trailing whitespace'.
[ERROR] LiteralExpression.java[312] (sizes) LineLength: Line is longer than 100 
characters (found 114).
[ERROR] LiteralExpression.java[312:83] (whitespace) WhitespaceAround: '==' is 
not preceded with whitespace.
[ERROR] LiteralExpression.java[312:85] (whitespace) WhitespaceAround: '==' is 
not followed by whitespace.
[ERROR] LiteralExpression.java[314] (sizes) LineLength: Line is longer than 100 
characters (found 122).
[ERROR] LiteralExpression.java[314] (misc) Regexp: Line matches the illegal 
pattern 'Trailing whitespace'.
[ERROR] LiteralExpression.java[316] (sizes) LineLength: Line is longer than 100 
characters (found 103).
[ERROR] LiteralExpression.java[316:67] (whitespace) WhitespaceAround: '+' is 
not preceded with whitespace.
[ERROR] LiteralExpression.java[316:68] (whitespace) WhitespaceAround: '+' is 
not followed by whitespace.
[ERROR] LiteralExpression.java[316:70] (whitespace) WhitespaceAround: '<<' is 
not preceded with whitespace.
[ERROR] LiteralExpression.java[316:72] (whitespace) WhitespaceAround: '<<' is 
not followed by whitespace.
[ERROR] LiteralExpression.java[342] (misc) Regexp: Line matches the illegal 
pattern 'Trailing whitespace'.
[ERROR] LiteralExpression.java[360] (misc) Regexp: Line matches the illegal 
pattern 'Trailing whitespace'.
[ERROR] LiteralExpression.java[365] (misc) Regexp: Line matches the illegal 
pattern 'Trailing whitespace'.
[ERROR] DateSubtractExpression.java[2] (header) Header: Line does not match 
expected header line of ' * Licensed to the Apache Software Foundation (ASF) 
under one or more'.
[ERROR] DateSubtractExpression.java[34] (javadoc) JavadocType: Missing a 
Javadoc comment.
[ERROR] DateSubtractExpression.java[35] (misc) Regexp: Line matches the illegal 
pattern 'Trailing 

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

2015-09-02 Thread Apache Jenkins Server
See