phoenix git commit: PHOENIX-4231 Support restriction of remote UDF load sources

2018-03-15 Thread pboado
Repository: phoenix
Updated Branches:
  refs/heads/4.x-cdh5.11.2 25026b6cc -> 1f0416616


PHOENIX-4231 Support restriction of remote UDF load sources

Signed-off-by: Andrew Purtell 


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

Branch: refs/heads/4.x-cdh5.11.2
Commit: 1f041661681efa9030e1292f8fba4926e856fba5
Parents: 25026b6
Author: aertoria 
Authored: Tue Feb 27 23:02:07 2018 +
Committer: Pedro Boado 
Committed: Fri Mar 16 00:54:38 2018 +

--
 .../phoenix/end2end/UserDefinedFunctionsIT.java | 127 +--
 .../expression/function/UDFExpression.java  |  20 +--
 2 files changed, 120 insertions(+), 27 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1f041661/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
index f58f750..943119d 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/UserDefinedFunctionsIT.java
@@ -27,15 +27,12 @@ import static 
org.apache.phoenix.util.PhoenixRuntime.PHOENIX_TEST_DRIVER_URL_PAR
 import static org.apache.phoenix.util.TestUtil.JOIN_ITEM_TABLE_FULL_NAME;
 import static org.apache.phoenix.util.TestUtil.JOIN_SUPPLIER_TABLE_FULL_NAME;
 import static org.apache.phoenix.util.TestUtil.LOCALHOST;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.PreparedStatement;
@@ -53,6 +50,10 @@ import java.util.jar.Manifest;
 import javax.tools.JavaCompiler;
 import javax.tools.ToolProvider;
 
+import org.apache.commons.lang.exception.ExceptionUtils;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.FileUtil;
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
@@ -66,13 +67,15 @@ import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.QueryUtil;
 import org.apache.phoenix.util.ReadOnlyProps;
 import org.junit.After;
+import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.Rule;
 import org.junit.Test;
 
 import com.google.common.collect.Maps;
+import org.junit.rules.TestName;
 
 public class UserDefinedFunctionsIT extends BaseOwnClusterIT {
-
 protected static final String TENANT_ID = "ZZTop";
 private static String url;
 private static PhoenixTestDriver driver;
@@ -190,10 +193,36 @@ public class UserDefinedFunctionsIT extends 
BaseOwnClusterIT {
 private static String GETY_CLASSNAME_PROGRAM = getProgram(GETY_CLASSNAME, 
GETY_EVALUATE_METHOD, "return PInteger.INSTANCE;");
 private static Properties EMPTY_PROPS = new Properties();
 
+@Rule
+public TestName name = new TestName();
 
 @Override
 @After
-public void cleanUpAfterTest() throws Exception {}
+public void cleanUpAfterTest() throws Exception {
+Connection conn = driver.connect(url, EMPTY_PROPS);
+Statement stmt = conn.createStatement();
+ResultSet rs = stmt.executeQuery("list jars");
+stmt.execute("delete jar '"+ 
util.getConfiguration().get(QueryServices.DYNAMIC_JARS_DIR_KEY)+"/"+"myjar1.jar'");
+stmt.execute("delete jar '"+ 
util.getConfiguration().get(QueryServices.DYNAMIC_JARS_DIR_KEY)+"/"+"myjar2.jar'");
+stmt.execute("delete jar '"+ 
util.getConfiguration().get(QueryServices.DYNAMIC_JARS_DIR_KEY)+"/"+"myjar3.jar'");
+stmt.execute("delete jar '"+ 
util.getConfiguration().get(QueryServices.DYNAMIC_JARS_DIR_KEY)+"/"+"myjar4.jar'");
+stmt.execute("delete jar '"+ 
util.getConfiguration().get(QueryServices.DYNAMIC_JARS_DIR_KEY)+"/"+"myjar5.jar'");
+stmt.execute("delete jar '"+ 
util.getConfiguration().get(QueryServices.DYNAMIC_JARS_DIR_KEY)+"/"+"myjar6.jar'");
+stmt.execute("delete jar '"+ 
util.getConfiguration().get(QueryServices.DYNAMIC_JARS_DIR_KEY)+"/"+"myjar7.jar'");
+stmt.execute("delete 

phoenix git commit: PHOENIX-4620 Fix compilation issues against hbase-2.0.0-beta2

2018-03-15 Thread elserj
Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 f49c8a724 -> 4c379d764


PHOENIX-4620 Fix compilation issues against hbase-2.0.0-beta2

Signed-off-by: Sergey Soldatov 


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

Branch: refs/heads/5.x-HBase-2.0
Commit: 4c379d76426ad33cef2fe65e36240f02d345efa9
Parents: f49c8a7
Author: Josh Elser 
Authored: Thu Mar 15 13:22:11 2018 -0400
Committer: Josh Elser 
Committed: Thu Mar 15 15:57:37 2018 -0400

--
 .../wal/WALReplayWithIndexWritesAndCompressedWALIT.java   | 2 +-
 .../phoenix/coprocessor/UngroupedAggregateRegionObserver.java | 3 ++-
 .../apache/phoenix/replication/SystemCatalogWALEntryFilter.java   | 2 +-
 .../hbase/index/write/recovery/TestPerRegionIndexWriteCache.java  | 2 +-
 pom.xml   | 2 +-
 5 files changed, 6 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c379d76/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
 
b/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
index e1101b0..52cdc0c 100644
--- 
a/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/hadoop/hbase/regionserver/wal/WALReplayWithIndexWritesAndCompressedWALIT.java
@@ -189,7 +189,7 @@ public class WALReplayWithIndexWritesAndCompressedWALIT {
 CoveredColumnIndexSpecifierBuilder builder = new 
CoveredColumnIndexSpecifierBuilder();
 builder.addIndexGroup(fam1);
 builder.build(htd);
-WALFactory walFactory = new WALFactory(this.conf, null, "localhost,1234");
+WALFactory walFactory = new WALFactory(this.conf, "localhost,1234");
 
 WAL wal = createWAL(this.conf, walFactory);
 // create the region + its WAL

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c379d76/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
index ce25e7f..2fd58bd 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
@@ -246,7 +246,8 @@ public class UngroupedAggregateRegionObserver extends 
BaseScannerRegionObserver
 Mutation[] mutationArray = new Mutation[mutations.size()];
   // When memstore size reaches blockingMemstoreSize we are waiting 3 
seconds for the
   // flush happen which decrease the memstore size and then writes allowed 
on the region.
-  for (int i = 0; region.getMemStoreSize() > blockingMemstoreSize && i < 
30; i++) {
+  for (int i = 0; (region.getMemStoreHeapSize() + 
region.getMemStoreOffHeapSize()) > blockingMemstoreSize
+&& i < 30; i++) {
   try {
   checkForRegionClosing();
   Thread.sleep(100);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4c379d76/phoenix-core/src/main/java/org/apache/phoenix/replication/SystemCatalogWALEntryFilter.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/replication/SystemCatalogWALEntryFilter.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/replication/SystemCatalogWALEntryFilter.java
index d1b71ef..0bdc63e 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/replication/SystemCatalogWALEntryFilter.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/replication/SystemCatalogWALEntryFilter.java
@@ -48,7 +48,7 @@ public class SystemCatalogWALEntryFilter implements 
WALEntryFilter {
 
 //if the WAL.Entry's table isn't System.Catalog, it auto-passes this filter
 //TODO: when Phoenix drops support for pre-1.3 versions of HBase, redo as 
a WALCellFilter
-if (!SchemaUtil.isMetaTable(entry.getKey().getTablename().getName())){
+if (!SchemaUtil.isMetaTable(entry.getKey().getTableName().getName())){
   return entry;
 }
 


Build failed in Jenkins: Phoenix Compile Compatibility with HBase #576

2018-03-15 Thread Apache Jenkins Server
See 


--
[...truncated 39.68 KB...]
[ERROR] 
:[364,5]
 method does not override or implement a method from a supertype
[ERROR] 
:[370,5]
 method does not override or implement a method from a supertype
[ERROR] 
:[376,5]
 method does not override or implement a method from a supertype
[ERROR] 
:[382,5]
 method does not override or implement a method from a supertype
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on 
project phoenix-core: Compilation failure: Compilation failure: 
[ERROR] 
:[34,39]
 cannot find symbol
[ERROR]   symbol:   class MetricRegistry
[ERROR]   location: package org.apache.hadoop.hbase.metrics
[ERROR] 
:[144,16]
 cannot find symbol
[ERROR]   symbol:   class MetricRegistry
[ERROR]   location: class 
org.apache.phoenix.coprocessor.PhoenixMetaDataCoprocessorHost.PhoenixMetaDataControllerEnvironment
[ERROR] 
:[24,35]
 cannot find symbol
[ERROR]   symbol:   class DelegatingHBaseRpcController
[ERROR]   location: package org.apache.hadoop.hbase.ipc
[ERROR] 
:[25,35]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: package org.apache.hadoop.hbase.ipc
[ERROR] 
:[37,37]
 cannot find symbol
[ERROR]   symbol: class DelegatingHBaseRpcController
[ERROR] 
:[56,38]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.MetadataRpcController
[ERROR] 
:[26,35]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: package org.apache.hadoop.hbase.ipc
[ERROR] 
:[40,12]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.InterRegionServerMetadataRpcControllerFactory
[ERROR] 
:[46,12]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.InterRegionServerMetadataRpcControllerFactory
[ERROR] 
:[52,12]
 cannot find symbol
[ERROR]   symbol:   class HBaseRpcController
[ERROR]   location: class 
org.apache.hadoop.hbase.ipc.controller.InterRegionServerMetadataRpcControllerFactory
[ERROR] 
:[57,46]
 cannot 

Build failed in Jenkins: Phoenix-4.x-HBase-1.1 #686

2018-03-15 Thread Apache Jenkins Server
See 


Changes:

[maryannxue] PHOENIX-4322 DESC primary key column with variable length does not 
work

--
[...truncated 618.87 KB...]
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 
[INFO] --- maven-failsafe-plugin:2.20:integration-test 
(NeedTheirOwnClusterTests) @ phoenix-core ---
[INFO] 
[INFO] ---
[INFO]  T E S T S
[INFO] ---
[INFO] Running 
org.apache.hadoop.hbase.regionserver.wal.WALReplayWithIndexWritesAndCompressedWALIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 42.339 s 
- in 
org.apache.hadoop.hbase.regionserver.wal.WALReplayWithIndexWritesAndCompressedWALIT
[INFO] Running 
org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.128 s 
- in org.apache.hadoop.hbase.regionserver.wal.WALRecoveryRegionPostOpenIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedImmutableTxStatsCollectorIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedImmutableNonTxStatsCollectorIT
[INFO] Running 
org.apache.phoenix.end2end.ColumnEncodedMutableNonTxStatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.ConnectionUtilIT
[INFO] Running org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 44.106 s 
- in org.apache.phoenix.end2end.ConnectionUtilIT
[INFO] Running org.apache.phoenix.end2end.ContextClassloaderIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.742 s 
- in org.apache.phoenix.end2end.ContextClassloaderIT
[INFO] Running org.apache.phoenix.end2end.CostBasedDecisionIT
[INFO] Running org.apache.phoenix.end2end.CountDistinctCompressionIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.897 s 
- in org.apache.phoenix.end2end.CountDistinctCompressionIT
[WARNING] Tests run: 26, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
160.318 s - in 
org.apache.phoenix.end2end.ColumnEncodedImmutableNonTxStatsCollectorIT
[WARNING] Tests run: 26, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
165.188 s - in 
org.apache.phoenix.end2end.ColumnEncodedMutableNonTxStatsCollectorIT
[WARNING] Tests run: 26, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 
167.815 s - in org.apache.phoenix.end2end.ColumnEncodedMutableTxStatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.CsvBulkLoadToolIT
[INFO] Running org.apache.phoenix.end2end.DropSchemaIT
[INFO] Running org.apache.phoenix.end2end.FlappingLocalIndexIT
[INFO] Running org.apache.phoenix.end2end.IndexExtendedIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.427 s 
- in org.apache.phoenix.end2end.DropSchemaIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 110.567 
s - in org.apache.phoenix.end2end.CsvBulkLoadToolIT
[INFO] Running org.apache.phoenix.end2end.IndexScrutinyToolIT
[INFO] Running org.apache.phoenix.end2end.IndexToolForPartialBuildIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 190.732 
s - in org.apache.phoenix.end2end.FlappingLocalIndexIT
[INFO] Tests run: 32, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 191.149 
s - in org.apache.phoenix.end2end.IndexExtendedIT
[INFO] Running 
org.apache.phoenix.end2end.IndexToolForPartialBuildWithNamespaceEnabledIT
[INFO] Running org.apache.phoenix.end2end.IndexToolIT
[INFO] Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 568.826 
s - in org.apache.phoenix.end2end.CostBasedDecisionIT
[INFO] Running org.apache.phoenix.end2end.LocalIndexSplitMergeIT
[INFO] Tests run: 33, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 476.172 
s - in org.apache.phoenix.end2end.IndexScrutinyToolIT
[INFO] Running org.apache.phoenix.end2end.MigrateSystemTablesToSystemNamespaceIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 73.036 s 
- in org.apache.phoenix.end2end.LocalIndexSplitMergeIT
[ERROR] Tests run: 26, Failures: 0, Errors: 18, Skipped: 4, Time elapsed: 
865.805 s <<< FAILURE! - in 
org.apache.phoenix.end2end.ColumnEncodedImmutableTxStatsCollectorIT
[ERROR] testRowCountAndByteCounts[mutable = false, transactional = true, 
isUserTableNamespaceMapped = false, columnEncoded = 
true](org.apache.phoenix.end2end.ColumnEncodedImmutableTxStatsCollectorIT)  
Time elapsed: 46.153 s  <<< ERROR!
java.lang.RuntimeException: org.apache.thrift.TException: Unable to discover 
transaction service.
Caused by: org.apache.thrift.TException: Unable to discover transaction service.

[ERROR] testSomeUpdateEmptyStats[mutable = false, transactional = true, 
isUserTableNamespaceMapped = false, columnEncoded = 
true](org.apache.phoenix.end2end.ColumnEncodedImmutableTxStatsCollectorIT)  
Time elapsed: