asterixdb git commit: ASTERIXDB-1719 - Align HTTP Test Requests to $METHOD.http

2016-11-04 Thread mblow
Repository: asterixdb
Updated Branches:
  refs/heads/master d292151eb -> 314c0df16


ASTERIXDB-1719 - Align HTTP Test Requests to $METHOD.http

Change-Id: I60958f77226f1afb2585baf9248682c4867758d8
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1341
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Till Westmann 


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

Branch: refs/heads/master
Commit: 314c0df168fec698291a0fa8706d1e307505637e
Parents: d292151
Author: Michael Blow 
Authored: Fri Nov 4 11:34:01 2016 -0400
Committer: Michael Blow 
Committed: Fri Nov 4 15:13:25 2016 -0700

--
 .../cluster_state_1.1.cstate.aql|  24 -
 .../cluster_state_1/cluster_state_1.1.get.http  |  25 +
 .../cluster_state_2.1.cstate.aql|  25 -
 .../cluster_state_2/cluster_state_2.1.get.http  |  25 +
 .../cluster_state_3.1.cstate.aql|  25 -
 .../cluster_state_3/cluster_state_3.1.get.http  |  25 +
 .../cluster_state_4.1.cstate.aql|  25 -
 .../cluster_state_4/cluster_state_4.1.get.http  |  25 +
 .../cluster_state_cc_1.1.cstate.aql |  25 -
 .../cluster_state_cc_1.1.get.http   |  25 +
 .../cluster_state_cc_stats_1.1.cstate.aql   |  25 -
 .../cluster_state_cc_stats_1.1.get.http |  25 +
 .../cluster_state_nc_threaddump_1.1.cstate.aql  |  25 -
 .../cluster_state_nc_threaddump_1.1.get.http|  25 +
 .../api/diagnostics_1/diagnostics_1.1.get.http  |  25 +
 .../diagnostics_1/diagnostics_1.1.httpapi.aql   |  25 -
 .../api/replication/replication.1.get.http  |  25 +
 .../api/replication/replication.1.httpapi.aql   |  25 -
 .../queries/api/version_1/version_1.1.get.http  |  25 +
 .../api/version_1/version_1.1.version.aql   |  24 -
 .../apache/asterix/test/aql/TestExecutor.java   | 108 ---
 .../testframework/context/TestFileContext.java  |   6 ++
 22 files changed, 325 insertions(+), 287 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql
--
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql
deleted file mode 100644
index 517b5b0..000
--- 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.cstate.aql
+++ /dev/null
@@ -1,24 +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.
- */
-/*
- * Test case Name  : cluster_state_1
- * Description : test cluster state api
- * Expected Result : Success
- * Date: 7th September 2016
- */

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/314c0df1/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.get.http
--
diff --git 
a/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.get.http
 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.get.http
new file mode 100644
index 000..08577ae
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/runtimets/queries/api/cluster_state_1/cluster_state_1.1.get.http
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the 

asterixdb git commit: Support broadcast join.

2016-11-04 Thread buyingyi
Repository: asterixdb
Updated Branches:
  refs/heads/master 15e49e0db -> ea4ec725b


Support broadcast join.

- The branch for broadcast is always the right branch, i.e., the build branch.

Change-Id: I269d29816206f4f7c21097c99b6e3f19b29be138
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1340
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Till Westmann 


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

Branch: refs/heads/master
Commit: ea4ec725b76ef889538282090a52bc90a0a36ac0
Parents: 15e49e0
Author: Yingyi Bu 
Authored: Fri Nov 4 01:26:16 2016 -0700
Committer: Yingyi Bu 
Committed: Fri Nov 4 09:44:42 2016 -0700

--
 .../queries/tpch/q12_shipping_broadcast.sqlpp   |  56 
 .../results/tpch/q12_shipping_broadcast.plan|  43 ++
 .../q12_shipping_broadcast.1.ddl.sqlpp  | 134 +++
 .../q12_shipping_broadcast.2.update.sqlpp   |  38 ++
 .../q12_shipping_broadcast.3.query.sqlpp|  33 +
 .../resources/runtimets/testsuite_sqlpp.xml |   5 +
 .../asterix-lang-sqlpp/src/main/javacc/SQLPP.jj |  25 +---
 7 files changed, 315 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ea4ec725/asterixdb/asterix-app/src/test/resources/optimizerts/queries/tpch/q12_shipping_broadcast.sqlpp
--
diff --git 
a/asterixdb/asterix-app/src/test/resources/optimizerts/queries/tpch/q12_shipping_broadcast.sqlpp
 
b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/tpch/q12_shipping_broadcast.sqlpp
new file mode 100644
index 000..94b5d2b
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/optimizerts/queries/tpch/q12_shipping_broadcast.sqlpp
@@ -0,0 +1,56 @@
+/*
+ * 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.
+ */
+
+
+DROP dataverse tpch IF EXISTS;
+CREATE  dataverse tpch;
+
+USE tpch;
+
+
+CREATE TYPE LineItemType AS {
+  l_linenumber : integer
+}
+
+CREATE TYPE OrderType AS {
+  o_orderkey : integer
+}
+
+CREATE DATASET LineItem(LineItemType) PRIMARY KEY l_linenumber;
+
+CREATE DATASET Orders(OrderType) PRIMARY KEY o_orderkey;
+
+/** The plan tests that the expression for different switch-case branches are 
not extracted.*/
+SELECT l.l_shipmode,
+   sum(CASE
+ WHEN o.o_orderpriority = '1-URGENT' or o.o_orderpriority = 
'2-HIGH' THEN 1 +  o.o_orderpriority * 0
+ ELSE 0 + o.o_orderpriority * 0
+   END) high_line_count,
+   sum(CASE o.o_orderpriority = '1-URGENT' or o.o_orderpriority = '2-HIGH'
+ WHEN true THEN 0 + o.o_orderpriority * 0
+ ELSE 1 +  o.o_orderpriority * 0
+   END) low_line_count
+FROM  LineItem l,
+  Orders o
+WHERE l.l_orderkey /*+ bcast */ = o.o_orderkey AND l.l_commitdate < 
l.l_receiptdate AND
+  l.l_shipdate < l.l_commitdate AND l.l_receiptdate >= '1994-01-01' AND
+  l.l_receiptdate < '1995-01-01' AND (l.l_shipmode = 'MAIL' OR 
l.l_shipmode = 'SHIP')
+GROUP BY l.l_shipmode
+ORDER BY l.l_shipmode
+;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ea4ec725/asterixdb/asterix-app/src/test/resources/optimizerts/results/tpch/q12_shipping_broadcast.plan
--
diff --git 
a/asterixdb/asterix-app/src/test/resources/optimizerts/results/tpch/q12_shipping_broadcast.plan
 
b/asterixdb/asterix-app/src/test/resources/optimizerts/results/tpch/q12_shipping_broadcast.plan
new file mode 100644
index 000..773b4db
--- /dev/null
+++ 
b/asterixdb/asterix-app/src/test/resources/optimizerts/results/tpch/q12_shipping_broadcast.plan
@@ -0,0 +1,43 @@
+-- DISTRIBUTE_RESULT  |PARTITIONED|
+  -- 

asterixdb git commit: Fix for ASTERIXDB-1725

2016-11-04 Thread imaxon
Repository: asterixdb
Updated Branches:
  refs/heads/master aee552c08 -> 15e49e0db


Fix for ASTERIXDB-1725

This is tricky, the best method I could think to fix this involved simply
putting the root page number in the metadata page rather than trying to
calculate it somehow going backwards from the end of the file.

I also fixed a bug discovered by Mike B where getLSNOffset was not
taking into consideration page header sizes.

Change-Id: I9f21e96ab045d331e4fc1c77b5c73b975e6260fa
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1331
Sonar-Qube: Jenkins 
Tested-by: Jenkins 
Integration-Tests: Jenkins 
Reviewed-by: Michael Blow 


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

Branch: refs/heads/master
Commit: 15e49e0db5a40d68e6e6dbf60138d6ec61fd15b0
Parents: aee552c
Author: Ian Maxon 
Authored: Thu Nov 3 14:42:45 2016 -0700
Committer: Ian Maxon 
Committed: Fri Nov 4 00:27:41 2016 -0700

--
 .../am/common/api/IMetaDataPageManager.java |  4 ++
 .../am/common/api/ITreeIndexMetaDataFrame.java  |  6 ++-
 .../am/common/frames/LIFOMetaDataFrame.java | 14 +-
 .../freepage/LinkedMetaDataPageManager.java | 49 ++--
 .../am/common/impls/AbstractTreeIndex.java  | 22 +++--
 .../freepage/VirtualMetaDataPageManager.java| 13 ++
 .../impls/MultitenantVirtualBufferCache.java|  7 ++-
 .../am/lsm/common/impls/VirtualBufferCache.java | 12 +++--
 .../storage/common/buffercache/BufferCache.java |  1 +
 .../common/buffercache/DebugBufferCache.java|  5 ++
 .../common/buffercache/IBufferCache.java|  2 +
 11 files changed, 109 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/15e49e0d/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/IMetaDataPageManager.java
--
diff --git 
a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/IMetaDataPageManager.java
 
b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/IMetaDataPageManager.java
index 3982a3a..5d87f99 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/IMetaDataPageManager.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/IMetaDataPageManager.java
@@ -172,4 +172,8 @@ public interface IMetaDataPageManager {
 long getLSNOffset() throws HyracksDataException;
 
 public long getLastMarkerLSN() throws HyracksDataException;
+
+void setRootPage(int rootPage) throws HyracksDataException;
+
+int getRootPage() throws HyracksDataException;
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/15e49e0d/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java
--
diff --git 
a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java
 
b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java
index d4fbaa2..21e918d 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java
@@ -25,7 +25,7 @@ public interface ITreeIndexMetaDataFrame {
 
 //Storage version #. Change this if you alter any tree frame formats to 
stop
 // possible corruption from old versions reading new formats.
-public static final int VERSION = 2;
+public static final int VERSION = 3;
 
 public void initBuffer(byte level);
 
@@ -74,4 +74,8 @@ public interface ITreeIndexMetaDataFrame {
 public long getLastMarkerLSN();
 
 public void setLastMarkerLSN(long lsn);
+
+void setRootPageNumber(int rootPage);
+
+int getRootPageNumber();
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/15e49e0d/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/frames/LIFOMetaDataFrame.java