You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by sj...@apache.org on 2016/09/09 20:54:03 UTC

[01/15] asterixdb-bad git commit: Fixed structure

Repository: asterixdb-bad
Updated Branches:
  refs/heads/master bdba1b863 -> 0921e3c9b


http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/conf/asterix-build-configuration.xml
----------------------------------------------------------------------
diff --git a/target/test-classes/conf/asterix-build-configuration.xml b/target/test-classes/conf/asterix-build-configuration.xml
deleted file mode 100644
index c2f5d41..0000000
--- a/target/test-classes/conf/asterix-build-configuration.xml
+++ /dev/null
@@ -1,110 +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.
- !-->
-<asterixConfiguration xmlns="asterixconf">
-  <metadataNode>asterix_nc1</metadataNode>
-  <store>
-    <ncId>asterix_nc1</ncId>
-    <storeDirs>iodevice0,iodevice1</storeDirs>
-  </store>
-  <store>
-    <ncId>asterix_nc2</ncId>
-    <storeDirs>iodevice0,iodevice1</storeDirs>
-  </store>
-  <transactionLogDir>
-    <ncId>asterix_nc1</ncId>
-    <txnLogDirPath>target/txnLogDir/asterix_nc1</txnLogDirPath>
-  </transactionLogDir>
-  <transactionLogDir>
-    <ncId>asterix_nc2</ncId>
-    <txnLogDirPath>target/txnLogDir/asterix_nc2</txnLogDirPath>
-  </transactionLogDir>
-  <extensions>
-    <extension>
-      <extensionClassName>org.apache.asterix.bad.lang.BADQueryTranslatorExtension</extensionClassName>
-    </extension>
-    <extension>
-      <extensionClassName>org.apache.asterix.bad.lang.BADLangExtension</extensionClassName>
-    </extension>
-    <extension>
-      <extensionClassName>org.apache.asterix.bad.metadata.BADMetadataExtension</extensionClassName>
-    </extension>
-  </extensions>
-  <property>
-    <name>max.wait.active.cluster</name>
-    <value>60</value>
-    <description>Maximum wait (in seconds) for a cluster to be ACTIVE (all
-      nodes are available)
-      before a submitted query/statement can be
-      executed. (Default = 60 seconds)
-    </description>
-  </property>
-  <property>
-    <name>log.level</name>
-    <value>WARNING</value>
-    <description>Log level for running tests/build</description>
-  </property>
-  <property>
-    <name>compiler.framesize</name>
-    <value>32768</value>
-  </property>
-  <property>
-    <name>compiler.sortmemory</name>
-    <value>327680</value>
-  </property>
-  <property>
-    <name>compiler.groupmemory</name>
-    <value>163840</value>
-  </property>
-  <property>
-    <name>compiler.joinmemory</name>
-    <value>163840</value>
-  </property>
-  <property>
-    <name>compiler.pregelix.home</name>
-    <value>~/pregelix</value>
-  </property>
-  <property>
-    <name>storage.buffercache.pagesize</name>
-    <value>32768</value>
-    <description>The page size in bytes for pages in the buffer cache.
-      (Default = "32768" // 32KB)
-    </description>
-  </property>
-  <property>
-    <name>storage.buffercache.size</name>
-    <value>33554432</value>
-    <description>The size of memory allocated to the disk buffer cache.
-      The value should be a multiple of the buffer cache page size(Default
-      = "33554432" // 32MB)
-    </description>
-  </property>
-  <property>
-    <name>storage.memorycomponent.numpages</name>
-    <value>8</value>
-    <description>The number of pages to allocate for a memory component.
-      (Default = 8)
-    </description>
-  </property>
-  <property>
-    <name>plot.activate</name>
-    <value>false</value>
-    <description>Enabling plot of Algebricks plan to tmp folder. (Default = false)
-    </description>
-  </property>
-</asterixConfiguration>

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/conf/cluster.xml
----------------------------------------------------------------------
diff --git a/target/test-classes/conf/cluster.xml b/target/test-classes/conf/cluster.xml
deleted file mode 100644
index 8f0b694..0000000
--- a/target/test-classes/conf/cluster.xml
+++ /dev/null
@@ -1,49 +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.
- !-->
-<cluster xmlns="cluster">
-  <instance_name>asterix</instance_name>
-  <store>storage</store>
-
-  <data_replication>
-    <enabled>false</enabled>
-    <replication_port>2016</replication_port>
-    <replication_factor>2</replication_factor>
-    <auto_failover>false</auto_failover>
-    <replication_time_out>30</replication_time_out>
-  </data_replication>
-
-  <master_node>
-    <id>master</id>
-    <client_ip>127.0.0.1</client_ip>
-    <cluster_ip>127.0.0.1</cluster_ip>
-    <client_port>1098</client_port>
-    <cluster_port>1099</cluster_port>
-    <http_port>8888</http_port>
-  </master_node>
-  <node>
-    <id>nc1</id>
-    <cluster_ip>127.0.0.1</cluster_ip>
-    <replication_port>2016</replication_port>
-  </node>
-  <node>
-    <id>nc2</id>
-    <cluster_ip>127.0.0.1</cluster_ip>
-    <replication_port>2017</replication_port>
-  </node>
-</cluster>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/conf/hyracks-deployment.properties
----------------------------------------------------------------------
diff --git a/target/test-classes/conf/hyracks-deployment.properties b/target/test-classes/conf/hyracks-deployment.properties
deleted file mode 100644
index 17a6772..0000000
--- a/target/test-classes/conf/hyracks-deployment.properties
+++ /dev/null
@@ -1,21 +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.
-cc.bootstrap.class=org.apache.asterix.hyracks.bootstrap.CCBootstrapImpl
-nc.bootstrap.class=org.apache.asterix.hyracks.bootstrap.NCBootstrapImpl
-cc.ip=127.0.0.1
-cc.port=1098

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/conf/test.properties
----------------------------------------------------------------------
diff --git a/target/test-classes/conf/test.properties b/target/test-classes/conf/test.properties
deleted file mode 100644
index 86269c8..0000000
--- a/target/test-classes/conf/test.properties
+++ /dev/null
@@ -1,22 +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.
-MetadataNode=nc1
-NewUniverse=true
-nc1.stores=nc1data
-nc2.stores=nc2data
-OutputDir=/tmp/asterix_output/

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/optimizerts/queries/channel/channel-create.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/optimizerts/queries/channel/channel-create.aql b/target/test-classes/optimizerts/queries/channel/channel-create.aql
deleted file mode 100644
index 4dc9291..0000000
--- a/target/test-classes/optimizerts/queries/channel/channel-create.aql
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Description  : Check the Plan used by a channel
- * Expected Res : Success
- * Date         : Mar 2015
- */
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text 
-};
-
-write output to nc1:"rttest/channel-create.adm";
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/optimizerts/queries/channel/channel-subscribe.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/optimizerts/queries/channel/channel-subscribe.aql b/target/test-classes/optimizerts/queries/channel/channel-subscribe.aql
deleted file mode 100644
index 682bd6d..0000000
--- a/target/test-classes/optimizerts/queries/channel/channel-subscribe.aql
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Description  : Check the Plan for Subscribing to a channel    
- * Expected Res : Success
- * Date         : Mar 2015
- */
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text 
-};
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
-
-write output to nc1:"rttest/channel-subscribe.adm";
-
-create broker brokerA at "http://www.hello.com";
-
-subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live") on brokerA;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/optimizerts/queries/channel/channel-unsubscribe.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/optimizerts/queries/channel/channel-unsubscribe.aql b/target/test-classes/optimizerts/queries/channel/channel-unsubscribe.aql
deleted file mode 100644
index 7cdec50..0000000
--- a/target/test-classes/optimizerts/queries/channel/channel-unsubscribe.aql
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Description  : Check the Plan for Unsubscribing to a channel
- * Expected Res : Success
- * Date         : Mar 2015
- */
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text 
-};
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
-
-write output to nc1:"rttest/channel-unsubscribe.adm";
-
-unsubscribe "c45ef6d0-c5ae-4b9e-b5da-cf1932718296" from nearbyTweetChannel;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/optimizerts/results/channel/channel-create.plan
----------------------------------------------------------------------
diff --git a/target/test-classes/optimizerts/results/channel/channel-create.plan b/target/test-classes/optimizerts/results/channel/channel-create.plan
deleted file mode 100644
index f597191..0000000
--- a/target/test-classes/optimizerts/results/channel/channel-create.plan
+++ /dev/null
@@ -1,30 +0,0 @@
--- COMMIT  |PARTITIONED|
-  -- STREAM_PROJECT  |PARTITIONED|
-    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-      -- INSERT_DELETE  |PARTITIONED|
-        -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
-          -- ASSIGN  |PARTITIONED|
-            -- STREAM_PROJECT  |PARTITIONED|
-              -- ASSIGN  |PARTITIONED|
-                -- STREAM_PROJECT  |PARTITIONED|
-                  -- ASSIGN  |PARTITIONED|
-                    -- STREAM_PROJECT  |PARTITIONED|
-                      -- ASSIGN  |PARTITIONED|
-                        -- STREAM_PROJECT  |PARTITIONED|
-                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                            -- NESTED_LOOP  |PARTITIONED|
-                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                      -- DATASOURCE_SCAN  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-                              -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- STREAM_PROJECT  |PARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                        -- DATASOURCE_SCAN  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/optimizerts/results/channel/channel-subscribe.plan
----------------------------------------------------------------------
diff --git a/target/test-classes/optimizerts/results/channel/channel-subscribe.plan b/target/test-classes/optimizerts/results/channel/channel-subscribe.plan
deleted file mode 100644
index 4530923..0000000
--- a/target/test-classes/optimizerts/results/channel/channel-subscribe.plan
+++ /dev/null
@@ -1,44 +0,0 @@
--- COMMIT  |PARTITIONED|
-  -- STREAM_PROJECT  |PARTITIONED|
-    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-      -- INSERT_DELETE  |PARTITIONED|
-        -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
-          -- ASSIGN  |PARTITIONED|
-            -- STREAM_PROJECT  |PARTITIONED|
-              -- ASSIGN  |PARTITIONED|
-                -- STREAM_PROJECT  |PARTITIONED|
-                  -- ASSIGN  |PARTITIONED|
-                    -- STREAM_PROJECT  |PARTITIONED|
-                      -- ASSIGN  |PARTITIONED|
-                        -- STREAM_PROJECT  |PARTITIONED|
-                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                            -- NESTED_LOOP  |PARTITIONED|
-                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                      -- DATASOURCE_SCAN  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-                              -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- STREAM_PROJECT  |PARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                        -- DATASOURCE_SCAN  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
--- DISTRIBUTE_RESULT  |PARTITIONED|
-  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-    -- COMMIT  |PARTITIONED|
-      -- STREAM_PROJECT  |PARTITIONED|
-        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-          -- INSERT_DELETE  |PARTITIONED|
-            -- HASH_PARTITION_EXCHANGE [$$8]  |PARTITIONED|
-              -- ASSIGN  |UNPARTITIONED|
-                -- STREAM_PROJECT  |UNPARTITIONED|
-                  -- ASSIGN  |UNPARTITIONED|
-                    -- STREAM_PROJECT  |UNPARTITIONED|
-                      -- ASSIGN  |UNPARTITIONED|
-                        -- ASSIGN  |UNPARTITIONED|
-                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/optimizerts/results/channel/channel-unsubscribe.plan
----------------------------------------------------------------------
diff --git a/target/test-classes/optimizerts/results/channel/channel-unsubscribe.plan b/target/test-classes/optimizerts/results/channel/channel-unsubscribe.plan
deleted file mode 100644
index a9e383a..0000000
--- a/target/test-classes/optimizerts/results/channel/channel-unsubscribe.plan
+++ /dev/null
@@ -1,44 +0,0 @@
--- COMMIT  |PARTITIONED|
-  -- STREAM_PROJECT  |PARTITIONED|
-    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-      -- INSERT_DELETE  |PARTITIONED|
-        -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
-          -- ASSIGN  |PARTITIONED|
-            -- STREAM_PROJECT  |PARTITIONED|
-              -- ASSIGN  |PARTITIONED|
-                -- STREAM_PROJECT  |PARTITIONED|
-                  -- ASSIGN  |PARTITIONED|
-                    -- STREAM_PROJECT  |PARTITIONED|
-                      -- ASSIGN  |PARTITIONED|
-                        -- STREAM_PROJECT  |PARTITIONED|
-                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                            -- NESTED_LOOP  |PARTITIONED|
-                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                      -- DATASOURCE_SCAN  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-                              -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- STREAM_PROJECT  |PARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                        -- DATASOURCE_SCAN  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
--- COMMIT  |PARTITIONED|
-  -- STREAM_PROJECT  |PARTITIONED|
-    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-      -- INSERT_DELETE  |PARTITIONED|
-        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-          -- MATERIALIZE  |PARTITIONED|
-            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-              -- ASSIGN  |PARTITIONED|
-                -- STREAM_PROJECT  |PARTITIONED|
-                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                    -- BTREE_SEARCH  |PARTITIONED|
-                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                        -- ASSIGN  |PARTITIONED|
-                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/org/apache/asterix/bad/test/BADExecutionTest.class
----------------------------------------------------------------------
diff --git a/target/test-classes/org/apache/asterix/bad/test/BADExecutionTest.class b/target/test-classes/org/apache/asterix/bad/test/BADExecutionTest.class
deleted file mode 100644
index 293b1a4..0000000
Binary files a/target/test-classes/org/apache/asterix/bad/test/BADExecutionTest.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/org/apache/asterix/bad/test/BADOptimizerTest.class
----------------------------------------------------------------------
diff --git a/target/test-classes/org/apache/asterix/bad/test/BADOptimizerTest.class b/target/test-classes/org/apache/asterix/bad/test/BADOptimizerTest.class
deleted file mode 100644
index 5394047..0000000
Binary files a/target/test-classes/org/apache/asterix/bad/test/BADOptimizerTest.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql b/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
deleted file mode 100644
index 41b036a..0000000
--- a/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* Description  : Create Channel Test. Confirms that the subscription and result datasets are created
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.2.update.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.2.update.aql b/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.2.update.aql
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql b/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
deleted file mode 100644
index eb341e9..0000000
--- a/target/test-classes/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
+++ /dev/null
@@ -1,7 +0,0 @@
-use dataverse channels;
-
-for $result in dataset Metadata.Channel where $result.ChannelName = "nearbyTweetChannel"
-for $x in dataset Metadata.Dataset
-where $x.DatasetName = $result.SubscriptionsDatasetName
-or $x.DatasetName = $result.ResultsDatasetName
-return $x;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql b/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
deleted file mode 100644
index 7bace03..0000000
--- a/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* Description  : Create Channel Test
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.2.update.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.2.update.aql b/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.2.update.aql
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql b/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
deleted file mode 100644
index 9a1e170..0000000
--- a/target/test-classes/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
+++ /dev/null
@@ -1,3 +0,0 @@
-use dataverse channels;
-
-for $result in dataset Metadata.Channel return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql b/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
deleted file mode 100644
index afc7d5e..0000000
--- a/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-* Description  : Drop Channel Test. Check Metadata
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql b/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql
deleted file mode 100644
index f466b9c..0000000
--- a/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql
+++ /dev/null
@@ -1,3 +0,0 @@
-use dataverse channels;
-
-drop channel nearbyTweetChannel2;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql b/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
deleted file mode 100644
index e762a27..0000000
--- a/target/test-classes/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
+++ /dev/null
@@ -1,7 +0,0 @@
-use dataverse channels;
-
-for $result in dataset Metadata.Channel
-for $x in dataset Metadata.Dataset
-where $x.DatasetName = $result.SubscriptionsDatasetName
-or $x.DatasetName = $result.ResultsDatasetName
-return $x;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql b/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
deleted file mode 100644
index afc7d5e..0000000
--- a/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-* Description  : Drop Channel Test. Check Metadata
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql b/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql
deleted file mode 100644
index f466b9c..0000000
--- a/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql
+++ /dev/null
@@ -1,3 +0,0 @@
-use dataverse channels;
-
-drop channel nearbyTweetChannel2;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql b/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
deleted file mode 100644
index 9a1e170..0000000
--- a/target/test-classes/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
+++ /dev/null
@@ -1,3 +0,0 @@
-use dataverse channels;
-
-for $result in dataset Metadata.Channel return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql b/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
deleted file mode 100644
index 41b036a..0000000
--- a/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* Description  : Create Channel Test. Confirms that the subscription and result datasets are created
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql b/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
deleted file mode 100644
index 6d35506..0000000
--- a/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
+++ /dev/null
@@ -1,7 +0,0 @@
-use dataverse channels;
-
-subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live");
-
-subscribe to nearbyTweetChannel (point("20.0, 20.0"), "Long");
-
-subscribe to nearbyTweetChannel (point("10.0, 10.0"), "Prosper");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql b/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql
deleted file mode 100644
index 0d2c46e..0000000
--- a/target/test-classes/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql
+++ /dev/null
@@ -1,4 +0,0 @@
-use dataverse channels;
-
-for $test in dataset nearbyTweetChannelSubscriptions
-return $test.param1;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm b/target/test-classes/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm
deleted file mode 100644
index baa5299..0000000
--- a/target/test-classes/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm
+++ /dev/null
@@ -1,3 +0,0 @@
-[ { "DataverseName": "channels", "DatasetName": "nearbyTweetChannelResults", "DataTypeName": "nearbyTweetChannelResultsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "rid" ], "PrimaryKey": [ "rid" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Tue Mar 10 15:20:05 PDT 2015", "DatasetId": 106i32, "PendingOp": 0i32 }
-, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannelSubscriptions", "DataTypeName": "nearbyTweetChannelSubscriptionsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "subscription-id" ], "PrimaryKey": [ "subscription-id" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Tue Mar 10 15:20:05 PDT 2015", "DatasetId": 105i32, "PendingOp": 0i32 }
- ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm b/target/test-classes/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm
deleted file mode 100644
index 66a52f3..0000000
--- a/target/test-classes/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-[ { "DataverseName": "channels", "ChannelName": "nearbyTweetChannel", "SubscriptionsDatasetName": "nearbyTweetChannelSubscriptions", "ResultsDatasetName": "nearbyTweetChannelResults", "Function": "channels.NearbyTweetsContainingText@2", "Duration": "PT10M" }
- ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm b/target/test-classes/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm
deleted file mode 100644
index 7b6fdf4..0000000
--- a/target/test-classes/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm
+++ /dev/null
@@ -1,5 +0,0 @@
-[ { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel1Results", "DataTypeName": "nearbyTweetChannel1ResultsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "rid" ], "PrimaryKey": [ "rid" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 116i32, "PendingOp": 0i32 }
-, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel1Subscriptions", "DataTypeName": "nearbyTweetChannel1SubscriptionsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "subscription-id" ], "PrimaryKey": [ "subscription-id" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 115i32, "PendingOp": 0i32 }
-, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel3Results", "DataTypeName": "nearbyTweetChannel3ResultsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "rid" ], "PrimaryKey": [ "rid" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 120i32, "PendingOp": 0i32 }
-, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel3Subscriptions", "DataTypeName": "nearbyTweetChannel3SubscriptionsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "subscription-id" ], "PrimaryKey": [ "subscription-id" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 119i32, "PendingOp": 0i32 }
- ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm b/target/test-classes/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm
deleted file mode 100644
index de2948a..0000000
--- a/target/test-classes/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm
+++ /dev/null
@@ -1,3 +0,0 @@
-[ { "DataverseName": "channels", "ChannelName": "nearbyTweetChannel1", "SubscriptionsDatasetName": "nearbyTweetChannel1Subscriptions", "ResultsDatasetName": "nearbyTweetChannel1Results", "Function": "channels.NearbyTweetsContainingText@2", "Duration": "PT10M" }
-, { "DataverseName": "channels", "ChannelName": "nearbyTweetChannel3", "SubscriptionsDatasetName": "nearbyTweetChannel3Subscriptions", "ResultsDatasetName": "nearbyTweetChannel3Results", "Function": "channels.NearbyTweetsContainingText@2", "Duration": "PT10M" }
- ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm
----------------------------------------------------------------------
diff --git a/target/test-classes/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm b/target/test-classes/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm
deleted file mode 100644
index 2bec6d3..0000000
--- a/target/test-classes/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm
+++ /dev/null
@@ -1,4 +0,0 @@
-[ "Live"
-, "Long"
-, "Prosper"
- ]
\ No newline at end of file


[10/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java b/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
deleted file mode 100644
index c680988..0000000
--- a/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
+++ /dev/null
@@ -1,90 +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.asterix.bad.runtime;
-
-import java.util.Collection;
-
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractExtensibleLogicalOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.IOperatorExtension;
-import org.apache.hyracks.algebricks.core.algebra.visitors.ILogicalExpressionReferenceTransform;
-
-/**
- * A repetitive channel operator, which uses a Java timer to run a given query periodically
- */
-public class NotifyBrokerOperator extends AbstractExtensibleLogicalOperator {
-    private final LogicalVariable subscriptionIdVar;
-    private final LogicalVariable brokerEndpointVar;
-    private final LogicalVariable channelExecutionVar;
-
-    public NotifyBrokerOperator(LogicalVariable brokerEndpointVar, LogicalVariable subscriptionIdVar,
-            LogicalVariable resultSetVar) {
-        this.brokerEndpointVar = brokerEndpointVar;
-        this.subscriptionIdVar = subscriptionIdVar;
-        this.channelExecutionVar = resultSetVar;
-    }
-
-    public LogicalVariable getSubscriptionVariable() {
-        return subscriptionIdVar;
-    }
-
-    public LogicalVariable getBrokerEndpointVariable() {
-        return brokerEndpointVar;
-    }
-
-    public LogicalVariable getChannelExecutionVariable() {
-        return channelExecutionVar;
-    }
-
-    @Override
-    public String toString() {
-        return "notify-brokers";
-    }
-
-    @Override
-    public boolean isMap() {
-        return false;
-    }
-
-    @Override
-    public IOperatorExtension newInstance() {
-        return new NotifyBrokerOperator(brokerEndpointVar, subscriptionIdVar, channelExecutionVar);
-    }
-
-    @Override
-    public boolean acceptExpressionTransform(ILogicalExpressionReferenceTransform transform)
-            throws AlgebricksException {
-        return false;
-    }
-
-    @Override
-    public void getUsedVariables(Collection<LogicalVariable> usedVars) {
-        usedVars.add(subscriptionIdVar);
-        usedVars.add(brokerEndpointVar);
-        usedVars.add(channelExecutionVar);
-    }
-
-    @Override
-    public void getProducedVariables(Collection<LogicalVariable> producedVars) {
-        // none produced
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java b/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
deleted file mode 100644
index 753ece7..0000000
--- a/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
+++ /dev/null
@@ -1,111 +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.asterix.bad.runtime;
-
-import org.apache.asterix.active.EntityId;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.IHyracksJobBuilder;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
-import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
-import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
-import org.apache.hyracks.algebricks.core.algebra.base.PhysicalOperatorTag;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.ExtensionOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.IOperatorSchema;
-import org.apache.hyracks.algebricks.core.algebra.operators.physical.AbstractPhysicalOperator;
-import org.apache.hyracks.algebricks.core.algebra.properties.IPhysicalPropertiesVector;
-import org.apache.hyracks.algebricks.core.algebra.properties.PhysicalRequirements;
-import org.apache.hyracks.algebricks.core.jobgen.impl.JobGenContext;
-import org.apache.hyracks.algebricks.core.jobgen.impl.JobGenHelper;
-import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
-import org.apache.hyracks.algebricks.runtime.evaluators.ColumnAccessEvalFactory;
-import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
-
-public class NotifyBrokerPOperator extends AbstractPhysicalOperator {
-
-    private final EntityId entityId;
-
-    public NotifyBrokerPOperator(EntityId entityId) {
-        this.entityId = entityId;
-    }
-
-    @Override
-    public PhysicalOperatorTag getOperatorTag() {
-        return PhysicalOperatorTag.EXTENSION_OPERATOR;
-    }
-
-    @Override
-    public String toString() {
-        return "NOTIFY_BROKERS";
-    }
-
-    @Override
-    public PhysicalRequirements getRequiredPropertiesForChildren(ILogicalOperator op,
-            IPhysicalPropertiesVector reqdByParent, IOptimizationContext context) {
-        return emptyUnaryRequirements();
-    }
-
-    @Override
-    public void computeDeliveredProperties(ILogicalOperator op, IOptimizationContext context)
-            throws AlgebricksException {
-        AbstractLogicalOperator op2 = (AbstractLogicalOperator) op.getInputs().get(0).getValue();
-        deliveredProperties = op2.getDeliveredPhysicalProperties().clone();
-    }
-
-    @Override
-    public void contributeRuntimeOperator(IHyracksJobBuilder builder, JobGenContext context, ILogicalOperator op,
-            IOperatorSchema propagatedSchema, IOperatorSchema[] inputSchemas, IOperatorSchema outerPlanSchema)
-                    throws AlgebricksException {
-        ExtensionOperator notify = (ExtensionOperator) op;
-        LogicalVariable subVar = ((NotifyBrokerOperator) notify.getDelegate()).getSubscriptionVariable();
-        LogicalVariable brokerVar = ((NotifyBrokerOperator) notify.getDelegate()).getBrokerEndpointVariable();
-        LogicalVariable executionVar = ((NotifyBrokerOperator) notify.getDelegate()).getChannelExecutionVariable();
-
-        int brokerColumn = inputSchemas[0].findVariable(brokerVar);
-        int subColumn = inputSchemas[0].findVariable(subVar);
-        int executionColumn = inputSchemas[0].findVariable(executionVar);
-
-        IScalarEvaluatorFactory brokerEvalFactory = new ColumnAccessEvalFactory(brokerColumn);
-        IScalarEvaluatorFactory subEvalFactory = new ColumnAccessEvalFactory(subColumn);
-        IScalarEvaluatorFactory channelExecutionEvalFactory = new ColumnAccessEvalFactory(executionColumn);
-
-        NotifyBrokerRuntimeFactory runtime = new NotifyBrokerRuntimeFactory(brokerEvalFactory, subEvalFactory,
-                channelExecutionEvalFactory, entityId);
-
-        RecordDescriptor recDesc = JobGenHelper.mkRecordDescriptor(context.getTypeEnvironment(op), propagatedSchema,
-                context);
-
-        builder.contributeMicroOperator(op, runtime, recDesc);
-
-        // and contribute one edge from its child
-        ILogicalOperator src = op.getInputs().get(0).getValue();
-        builder.contributeGraphEdge(src, 0, notify, 0);
-    }
-
-    @Override
-    public boolean isMicroOperator() {
-        return true;
-    }
-
-    @Override
-    public boolean expensiveThanMaterialization() {
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java b/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
deleted file mode 100644
index d55080c..0000000
--- a/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
+++ /dev/null
@@ -1,138 +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.asterix.bad.runtime;
-
-import java.io.DataInputStream;
-import java.nio.ByteBuffer;
-
-import org.apache.asterix.active.ActiveManager;
-import org.apache.asterix.active.EntityId;
-import org.apache.asterix.bad.ChannelJobService;
-import org.apache.asterix.common.api.IAsterixAppRuntimeContext;
-import org.apache.asterix.dataflow.data.nontagged.serde.ADateTimeSerializerDeserializer;
-import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
-import org.apache.asterix.dataflow.data.nontagged.serde.AStringSerializerDeserializer;
-import org.apache.asterix.om.base.ADateTime;
-import org.apache.asterix.om.base.AOrderedList;
-import org.apache.asterix.om.base.AString;
-import org.apache.asterix.om.types.AOrderedListType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
-import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
-import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.data.std.api.IPointable;
-import org.apache.hyracks.data.std.primitive.VoidPointable;
-import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor;
-import org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream;
-import org.apache.hyracks.dataflow.common.data.accessors.FrameTupleReference;
-
-public class NotifyBrokerRuntime extends AbstractOneInputOneOutputOneFramePushRuntime {
-
-    private final ByteBufferInputStream bbis = new ByteBufferInputStream();
-    private final DataInputStream di = new DataInputStream(bbis);
-    private final AOrderedListSerializerDeserializer subSerDes = new AOrderedListSerializerDeserializer(
-            new AOrderedListType(BuiltinType.AUUID, null));
-
-    private IPointable inputArg0 = new VoidPointable();
-    private IPointable inputArg1 = new VoidPointable();
-    private IPointable inputArg2 = new VoidPointable();
-    private IScalarEvaluator eval0;
-    private IScalarEvaluator eval1;
-    private IScalarEvaluator eval2;
-    private final ActiveManager activeManager;
-    private final EntityId entityId;
-    private ChannelJobService channelJobService;
-
-    public NotifyBrokerRuntime(IHyracksTaskContext ctx, IScalarEvaluatorFactory brokerEvalFactory,
-            IScalarEvaluatorFactory subEvalFactory, IScalarEvaluatorFactory channelExecutionEvalFactory,
-            EntityId activeJobId) throws AlgebricksException {
-        this.tRef = new FrameTupleReference();
-        eval0 = brokerEvalFactory.createScalarEvaluator(ctx);
-        eval1 = subEvalFactory.createScalarEvaluator(ctx);
-        eval2 = channelExecutionEvalFactory.createScalarEvaluator(ctx);
-        this.activeManager = (ActiveManager) ((IAsterixAppRuntimeContext) ctx.getJobletContext().getApplicationContext()
-                .getApplicationObject()).getActiveManager();
-        this.entityId = activeJobId;
-        channelJobService = new ChannelJobService();
-    }
-
-    @Override
-    public void open() throws HyracksDataException {
-        return;
-    }
-
-    @Override
-    public void nextFrame(ByteBuffer buffer) throws HyracksDataException {
-        tAccess.reset(buffer);
-        int nTuple = tAccess.getTupleCount();
-        for (int t = 0; t < nTuple; t++) {
-            tRef.reset(tAccess, t);
-            try {
-                eval0.evaluate(tRef, inputArg0);
-                eval1.evaluate(tRef, inputArg1);
-                eval2.evaluate(tRef, inputArg2);
-            } catch (AlgebricksException e) {
-                throw new HyracksDataException(e);
-            }
-            int serBrokerOffset = inputArg0.getStartOffset();
-            bbis.setByteBuffer(tRef.getFrameTupleAccessor().getBuffer(), serBrokerOffset + 1);
-            AString endpoint = AStringSerializerDeserializer.INSTANCE.deserialize(di);
-
-            int serSubOffset = inputArg1.getStartOffset();
-            bbis.setByteBuffer(tRef.getFrameTupleAccessor().getBuffer(), serSubOffset + 1);
-            AOrderedList subs = subSerDes.deserialize(di);
-
-            int resultSetOffset = inputArg2.getStartOffset();
-            bbis.setByteBuffer(tRef.getFrameTupleAccessor().getBuffer(), resultSetOffset + 1);
-            ADateTime executionTime = ADateTimeSerializerDeserializer.INSTANCE.deserialize(di);
-            String executionTimeString = executionTime.toSimpleString();
-
-            channelJobService.sendBrokerNotificationsForChannel(entityId, endpoint.getStringValue(), subs,
-                    executionTimeString);
-
-        }
-
-    }
-
-    @Override
-    public void close() throws HyracksDataException {
-        return;
-    }
-
-    @Override
-    public void setInputRecordDescriptor(int index, RecordDescriptor recordDescriptor) {
-        this.inputRecordDesc = recordDescriptor;
-        this.tAccess = new FrameTupleAccessor(inputRecordDesc);
-    }
-
-    @Override
-    public void flush() throws HyracksDataException {
-        return;
-    }
-
-    @Override
-    public void fail() throws HyracksDataException {
-        failed = true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java b/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
deleted file mode 100644
index d5452d4..0000000
--- a/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
+++ /dev/null
@@ -1,55 +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.asterix.bad.runtime;
-
-import org.apache.asterix.active.EntityId;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.runtime.base.IPushRuntime;
-import org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory;
-import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-
-public class NotifyBrokerRuntimeFactory implements IPushRuntimeFactory {
-
-    private static final long serialVersionUID = 1L;
-
-    private final IScalarEvaluatorFactory brokerEvalFactory;
-    private final IScalarEvaluatorFactory subEvalFactory;
-    private final IScalarEvaluatorFactory channelExecutionEvalFactory;
-    private final EntityId entityId;
-
-    public NotifyBrokerRuntimeFactory(IScalarEvaluatorFactory brokerEvalFactory, IScalarEvaluatorFactory subEvalFactory,
-            IScalarEvaluatorFactory channelExecutionEvalFactory, EntityId entityId) {
-        this.brokerEvalFactory = brokerEvalFactory;
-        this.subEvalFactory = subEvalFactory;
-        this.channelExecutionEvalFactory = channelExecutionEvalFactory;
-        this.entityId = entityId;
-    }
-
-    @Override
-    public String toString() {
-        return "notify-broker";
-    }
-
-    @Override
-    public IPushRuntime createPushRuntime(IHyracksTaskContext ctx) throws AlgebricksException {
-        return new NotifyBrokerRuntime(ctx, brokerEvalFactory, subEvalFactory, channelExecutionEvalFactory, entityId);
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java b/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java
deleted file mode 100644
index 6521ecb..0000000
--- a/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2009-2013 by The Regents of the University of California
- * 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 from
- *
- * 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.asterix.bad.runtime;
-
-import java.util.logging.Logger;
-
-import org.apache.asterix.active.ActiveRuntimeId;
-import org.apache.asterix.active.EntityId;
-import org.apache.asterix.bad.BADConstants;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
-import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.job.JobSpecification;
-import org.apache.hyracks.dataflow.std.base.AbstractSingleActivityOperatorDescriptor;
-
-/**
- * A repetitive channel operator, which uses a Java timer to run a given query periodically
- */
-public class RepetitiveChannelOperatorDescriptor extends AbstractSingleActivityOperatorDescriptor {
-
-    private static final long serialVersionUID = 1L;
-
-    private static final Logger LOGGER = Logger.getLogger(RepetitiveChannelOperatorDescriptor.class.getName());
-
-    /** The unique identifier of the job. **/
-    protected final EntityId entityId;
-
-    protected final JobSpecification jobSpec;
-
-    private final String duration;
-
-    private String strIP;
-    private int port;
-
-    public RepetitiveChannelOperatorDescriptor(JobSpecification spec, String dataverseName, String channelName,
-            String duration, JobSpecification channeljobSpec, String strIP, int port) {
-        super(spec, 0, 0);
-        this.entityId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, dataverseName, channelName);
-        this.jobSpec = channeljobSpec;
-        this.duration = duration;
-        this.strIP = strIP;
-        this.port = port;
-    }
-
-    @Override
-    public IOperatorNodePushable createPushRuntime(IHyracksTaskContext ctx,
-            IRecordDescriptorProvider recordDescProvider, int partition, int nPartitions) throws HyracksDataException {
-        ActiveRuntimeId runtimeId = new ActiveRuntimeId(entityId,
-                RepetitiveChannelOperatorDescriptor.class.getSimpleName(), partition);
-        try {
-            return new RepetitiveChannelOperatorNodePushable(ctx, runtimeId, jobSpec, duration, strIP, port);
-        } catch (AsterixException e) {
-            throw new HyracksDataException(e);
-        }
-    }
-
-    public String getDuration() {
-        return duration;
-    }
-
-    public EntityId getEntityId() {
-        return entityId;
-    }
-
-    public JobSpecification getJobSpec() {
-        return jobSpec;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java b/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java
deleted file mode 100644
index 873d2e7..0000000
--- a/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java
+++ /dev/null
@@ -1,125 +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.asterix.bad.runtime;
-
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Logger;
-
-import org.apache.asterix.active.ActiveRuntimeId;
-import org.apache.asterix.active.ActiveSourceOperatorNodePushable;
-import org.apache.asterix.bad.ChannelJobService;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.hyracks.api.comm.IFrameWriter;
-import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.job.JobSpecification;
-
-public class RepetitiveChannelOperatorNodePushable extends ActiveSourceOperatorNodePushable {
-
-    private static final Logger LOGGER = Logger.getLogger(RepetitiveChannelOperatorNodePushable.class.getName());
-
-    private ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
-    private final JobSpecification jobSpec;
-    private long duration;
-    private ChannelJobService channelJobService;
-    private String strIP;
-    private int port;
-
-    public RepetitiveChannelOperatorNodePushable(IHyracksTaskContext ctx, ActiveRuntimeId runtimeId,
-            JobSpecification channeljobSpec, String duration, String strIP, int port) throws AsterixException {
-        super(ctx, runtimeId);
-        this.jobSpec = channeljobSpec;
-        this.duration = findPeriod(duration);
-        //TODO: we should share channelJobService as a single instance
-        //And only create one hcc
-        channelJobService = new ChannelJobService();
-        this.strIP = strIP;
-        this.port = port;
-    }
-
-    public void executeJob() throws Exception {
-        LOGGER.info("Executing Job: " + runtimeId.toString());
-        channelJobService.runChannelJob(jobSpec, strIP, port);
-    }
-
-    @Override
-    public void setOutputFrameWriter(int index, IFrameWriter writer, RecordDescriptor recordDesc)
-            throws HyracksDataException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    protected void start() throws HyracksDataException, InterruptedException {
-        scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    executeJob();
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-            }
-        }, duration, duration, TimeUnit.MILLISECONDS);
-
-        while (!scheduledExecutorService.isTerminated()) {
-
-        }
-
-    }
-
-    @Override
-    protected void abort() throws HyracksDataException, InterruptedException {
-        scheduledExecutorService.shutdown();
-    }
-
-    private long findPeriod(String duration) {
-        //TODO: Allow Repetitive Channels to use YMD durations  
-        String hoursMinutesSeconds = "";
-        if (duration.indexOf('T') != -1) {
-            hoursMinutesSeconds = duration.substring(duration.indexOf('T') + 1);
-        }
-        double seconds = 0;
-        if (hoursMinutesSeconds != "") {
-            int pos = 0;
-            if (hoursMinutesSeconds.indexOf('H') != -1) {
-                Double hours = Double.parseDouble(hoursMinutesSeconds.substring(pos, hoursMinutesSeconds.indexOf('H')));
-                seconds += (hours * 60 * 60);
-                pos = hoursMinutesSeconds.indexOf('H') + 1;
-
-            }
-            if (hoursMinutesSeconds.indexOf('M') != -1) {
-                Double minutes = Double
-                        .parseDouble(hoursMinutesSeconds.substring(pos, hoursMinutesSeconds.indexOf('M')));
-                seconds += (minutes * 60);
-                pos = hoursMinutesSeconds.indexOf('M') + 1;
-            }
-            if (hoursMinutesSeconds.indexOf('S') != -1) {
-                Double s = Double.parseDouble(hoursMinutesSeconds.substring(pos, hoursMinutesSeconds.indexOf('S')));
-                seconds += (s);
-            }
-
-        }
-        return (long) (seconds * 1000);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/resources/git.properties
----------------------------------------------------------------------
diff --git a/src/main/resources/git.properties b/src/main/resources/git.properties
deleted file mode 100644
index 44f9457..0000000
--- a/src/main/resources/git.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#Generated by Git-Commit-Id-Plugin
-#Thu Jun 02 10:54:34 PDT 2016
-git.build.user.email=sjaco002@ucr.edu
-git.build.host=Sisyphus.local
-git.dirty=false
-git.remote.origin.url=https\://github.com/apache/incubator-asterixdb/
-git.closest.tag.name=apache-asterixdb-0.8.8-incubating
-git.commit.id.describe-short=apache-asterixdb-0.8.8-incubating-2824
-git.commit.user.email=sjaco002@ucr.edu
-git.commit.time=20.05.2016 @ 12\:58\:28 PDT
-git.commit.message.full=Fixed Broker Field Names and updated tests
-git.build.version=0.8.9-SNAPSHOT
-git.commit.message.short=Fixed Broker Field Names and updated tests
-git.commit.id.abbrev=bcef8a3
-git.branch=steven/active
-git.build.user.name=Steven Glenn Jacobs
-git.closest.tag.commit.count=2824
-git.commit.id.describe=apache-asterixdb-0.8.8-incubating-2824-gbcef8a3
-git.commit.id=bcef8a3dac1dd3ee61e66c0746e137f71225f47a
-git.tags=
-git.build.time=02.06.2016 @ 10\:54\:34 PDT
-git.commit.user.name=Steven Jacobs

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/resources/lang-extension/lang.txt
----------------------------------------------------------------------
diff --git a/src/main/resources/lang-extension/lang.txt b/src/main/resources/lang-extension/lang.txt
deleted file mode 100644
index 90edb91..0000000
--- a/src/main/resources/lang-extension/lang.txt
+++ /dev/null
@@ -1,179 +0,0 @@
-import org.apache.asterix.bad.lang.statement.BrokerDropStatement;
-import org.apache.asterix.bad.lang.statement.ChannelDropStatement;
-import org.apache.asterix.bad.lang.statement.ChannelSubscribeStatement;
-import org.apache.asterix.bad.lang.statement.ChannelUnsubscribeStatement;
-import org.apache.asterix.bad.lang.statement.CreateBrokerStatement;
-import org.apache.asterix.bad.lang.statement.CreateChannelStatement;
-
-
-@merge
-Statement SingleStatement() throws ParseException:
-{
-  // merge area 1
-  before:
-  after:
-}
-{
-  (
-    // merge area 2
-    before:
-    after:    | stmt = ChannelSubscriptionStatement())
-  {
-    // merge area 3
-  }
-}
-
-@merge
-Statement CreateStatement() throws ParseException:
-{
-  // merge area 1
-  before:
-  after:
-}
-{
-  (
-    // merge area 2
-    before:
-    after:    | stmt = ChannelSpecification() | stmt = BrokerSpecification())
-  {
-    // merge area 3
-  }
-}
-
-@merge
-Statement DropStatement() throws ParseException:
-{
-  // merge area 1
-  before:
-  after:
-}
-{
-  (
-    // merge area 2
-    before:
-    after:    | <CHANNEL> pairId = QualifiedName() ifExists = IfExists()
-      {
-        stmt = new ChannelDropStatement(pairId.first, pairId.second, ifExists);
-      }
-      	      | <BROKER> pairId = QualifiedName() ifExists = IfExists()	
-      {	
-        stmt = new BrokerDropStatement(pairId.first, pairId.second, ifExists);	
-      }
-      )
-  {
-    // merge area 3
-  }
-}
-
-@new
-CreateChannelStatement ChannelSpecification() throws ParseException:
-{
-  Pair<Identifier,Identifier> nameComponents = null;
-  FunctionSignature appliedFunction = null;
-  CreateChannelStatement ccs = null;
-  String fqFunctionName = null;
-  Expression period = null;
-}
-{
-  (
-    "repetitive" <CHANNEL>  nameComponents = QualifiedName()
-    <USING> appliedFunction = FunctionSignature()
-    "period" period = FunctionCallExpr()
-    {
-      ccs = new CreateChannelStatement(nameComponents.first,
-                                   nameComponents.second, appliedFunction, period);
-    }
-  )
-    {
-      return ccs;
-    }
-}
-
-@new
-CreateBrokerStatement BrokerSpecification() throws ParseException:
-{
-  CreateBrokerStatement cbs = null;
-  Pair<Identifier,Identifier> name = null;
-  String endPoint = null;
-}
-{
-  (
-    <BROKER>  name = QualifiedName()
-    <AT>  endPoint = StringLiteral()
-    {
-      cbs = new CreateBrokerStatement(name.first, name.second,endPoint);
-    }
-  )
-    {
-      return cbs;
-    }
-}
-
-@new
-Statement ChannelSubscriptionStatement() throws ParseException:
-{
-  Statement stmt = null;
-  Pair<Identifier,Identifier> nameComponents = null;
-  List<Expression> argList = new ArrayList<Expression>();
-  Expression tmp = null;
-  String id = null;
-  String subscriptionId = null;
-  Pair<Identifier,Identifier> brokerName = null;
-}
-{
-  (
-  "subscribe" <TO> nameComponents = QualifiedName()
-   <LEFTPAREN> (tmp = Expression()
-   {
-      argList.add(tmp);
-   }
-   (<COMMA> tmp = Expression()
-   {
-      argList.add(tmp);
-   }
-   )*)? <RIGHTPAREN> <ON> brokerName = QualifiedName()
-   {
-      stmt = new ChannelSubscribeStatement(nameComponents.first, nameComponents.second, argList, getVarCounter(), brokerName.first, brokerName.second, subscriptionId);
-   }
-   | "unsubscribe" id = StringLiteral() <FROM> nameComponents = QualifiedName()
-      {
-        setDataverses(new ArrayList<String>());
-        setDatasets(new ArrayList<String>());
-        VariableExpr varExp = new VariableExpr();
-        VarIdentifier var = new VarIdentifier();
-        varExp.setVar(var);
-        var.setValue("$subscriptionPlaceholder");
-        getCurrentScope().addNewVarSymbolToScope(varExp.getVar());
-        List<String> dataverses = getDataverses();
-        List<String> datasets = getDatasets();
-        // we remove the pointer to the dataverses and datasets
-        setDataverses(null);
-        setDatasets(null);
-        stmt = new ChannelUnsubscribeStatement(varExp, nameComponents.first, nameComponents.second, id, getVarCounter(), dataverses, datasets);
-      }
-     | "change" "subscription" subscriptionId = StringLiteral()  <ON> nameComponents = QualifiedName()
-       <LEFTPAREN> (tmp = Expression()
-       {
-         argList.add(tmp);
-       }
-       (<COMMA> tmp = Expression()
-       {
-         argList.add(tmp);
-       }
-       )*)? <RIGHTPAREN>
-        <TO> brokerName = QualifiedName()
-      {
-        stmt = new ChannelSubscribeStatement(nameComponents.first, nameComponents.second, argList, getVarCounter(), brokerName.first, brokerName.second, subscriptionId);
-      }
-    )
-    {
-      return stmt;
-    }
-}
-
-<DEFAULT,IN_DBL_BRACE>
-TOKEN [IGNORE_CASE]:
-{
-    <BROKER : "broker">
-  | <CHANNEL : "channel">
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java b/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java
deleted file mode 100644
index 77e8afe..0000000
--- a/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java
+++ /dev/null
@@ -1,98 +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.asterix.bad.test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.logging.Logger;
-
-import org.apache.asterix.common.config.AsterixTransactionProperties;
-import org.apache.asterix.test.aql.TestExecutor;
-import org.apache.asterix.test.runtime.ExecutionTestUtil;
-import org.apache.asterix.testframework.context.TestCaseContext;
-import org.apache.asterix.testframework.xml.TestGroup;
-import org.apache.commons.lang3.StringUtils;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-/**
- * Runs the runtime test cases under 'src/test/resources/runtimets'.
- */
-@RunWith(Parameterized.class)
-public class BADExecutionTest {
-
-    protected static final Logger LOGGER = Logger.getLogger(BADExecutionTest.class.getName());
-
-    protected static final String PATH_ACTUAL = "target/rttest" + File.separator;
-    protected static final String PATH_BASE = StringUtils.join(new String[] { "src", "test", "resources", "runtimets" },
-            File.separator);
-
-    protected static final String TEST_CONFIG_FILE_NAME = "src/test/resources/conf/asterix-build-configuration.xml";
-
-    protected static AsterixTransactionProperties txnProperties;
-    private static final TestExecutor testExecutor = new TestExecutor();
-    private static final boolean cleanupOnStart = true;
-    private static final boolean cleanupOnStop = true;
-
-    protected static TestGroup FailedGroup;
-
-    @BeforeClass
-    public static void setUp() throws Exception {
-        File outdir = new File(PATH_ACTUAL);
-        outdir.mkdirs();
-        ExecutionTestUtil.setUp(cleanupOnStart, TEST_CONFIG_FILE_NAME);
-    }
-
-    @AfterClass
-    public static void tearDown() throws Exception {
-        ExecutionTestUtil.tearDown(cleanupOnStop);
-        ExecutionTestUtil.integrationUtil.removeTestStorageFiles();
-    }
-
-    @Parameters(name = "BADExecutionTest {index}: {0}")
-    public static Collection<Object[]> tests() throws Exception {
-        return buildTestsInXml("testsuite.xml");
-    }
-
-    protected static Collection<Object[]> buildTestsInXml(String xmlfile) throws Exception {
-        Collection<Object[]> testArgs = new ArrayList<Object[]>();
-        TestCaseContext.Builder b = new TestCaseContext.Builder();
-        for (TestCaseContext ctx : b.build(new File(PATH_BASE), xmlfile)) {
-            testArgs.add(new Object[] { ctx });
-        }
-        return testArgs;
-
-    }
-
-    protected TestCaseContext tcCtx;
-
-    public BADExecutionTest(TestCaseContext tcCtx) {
-        this.tcCtx = tcCtx;
-    }
-
-    @Test
-    public void test() throws Exception {
-        testExecutor.executeTest(PATH_ACTUAL, tcCtx, null, false, FailedGroup);
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java b/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java
deleted file mode 100644
index 040a4e9..0000000
--- a/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java
+++ /dev/null
@@ -1,60 +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.asterix.bad.test;
-
-import java.io.File;
-import java.util.logging.Logger;
-
-import org.apache.asterix.common.config.GlobalConfig;
-import org.apache.asterix.external.util.ExternalDataConstants;
-import org.apache.asterix.external.util.IdentitiyResolverFactory;
-import org.apache.asterix.test.optimizer.OptimizerTest;
-import org.apache.asterix.test.runtime.HDFSCluster;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-
-@RunWith(Parameterized.class)
-public class BADOptimizerTest extends OptimizerTest {
-
-    private static final Logger LOGGER = Logger.getLogger(BADOptimizerTest.class.getName());
-
-    @BeforeClass
-    public static void setUp() throws Exception {
-        TEST_CONFIG_FILE_NAME = "src/test/resources/conf/asterix-build-configuration.xml";
-        System.setProperty(GlobalConfig.CONFIG_FILE_PROPERTY, TEST_CONFIG_FILE_NAME);
-        final File outdir = new File(PATH_ACTUAL);
-        outdir.mkdirs();
-
-        HDFSCluster.getInstance().setup();
-
-        integrationUtil.init(true);
-        // Set the node resolver to be the identity resolver that expects node names
-        // to be node controller ids; a valid assumption in test environment.
-        System.setProperty(ExternalDataConstants.NODE_RESOLVER_FACTORY_PROPERTY,
-                IdentitiyResolverFactory.class.getName());
-    }
-
-    public BADOptimizerTest(File queryFile, File expectedFile, File actualFile) {
-        super(queryFile, expectedFile, actualFile);
-        TEST_CONFIG_FILE_NAME = "src/test/resources/conf/asterix-build-configuration.xml";
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/conf/asterix-build-configuration.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/conf/asterix-build-configuration.xml b/src/test/resources/conf/asterix-build-configuration.xml
deleted file mode 100644
index c2f5d41..0000000
--- a/src/test/resources/conf/asterix-build-configuration.xml
+++ /dev/null
@@ -1,110 +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.
- !-->
-<asterixConfiguration xmlns="asterixconf">
-  <metadataNode>asterix_nc1</metadataNode>
-  <store>
-    <ncId>asterix_nc1</ncId>
-    <storeDirs>iodevice0,iodevice1</storeDirs>
-  </store>
-  <store>
-    <ncId>asterix_nc2</ncId>
-    <storeDirs>iodevice0,iodevice1</storeDirs>
-  </store>
-  <transactionLogDir>
-    <ncId>asterix_nc1</ncId>
-    <txnLogDirPath>target/txnLogDir/asterix_nc1</txnLogDirPath>
-  </transactionLogDir>
-  <transactionLogDir>
-    <ncId>asterix_nc2</ncId>
-    <txnLogDirPath>target/txnLogDir/asterix_nc2</txnLogDirPath>
-  </transactionLogDir>
-  <extensions>
-    <extension>
-      <extensionClassName>org.apache.asterix.bad.lang.BADQueryTranslatorExtension</extensionClassName>
-    </extension>
-    <extension>
-      <extensionClassName>org.apache.asterix.bad.lang.BADLangExtension</extensionClassName>
-    </extension>
-    <extension>
-      <extensionClassName>org.apache.asterix.bad.metadata.BADMetadataExtension</extensionClassName>
-    </extension>
-  </extensions>
-  <property>
-    <name>max.wait.active.cluster</name>
-    <value>60</value>
-    <description>Maximum wait (in seconds) for a cluster to be ACTIVE (all
-      nodes are available)
-      before a submitted query/statement can be
-      executed. (Default = 60 seconds)
-    </description>
-  </property>
-  <property>
-    <name>log.level</name>
-    <value>WARNING</value>
-    <description>Log level for running tests/build</description>
-  </property>
-  <property>
-    <name>compiler.framesize</name>
-    <value>32768</value>
-  </property>
-  <property>
-    <name>compiler.sortmemory</name>
-    <value>327680</value>
-  </property>
-  <property>
-    <name>compiler.groupmemory</name>
-    <value>163840</value>
-  </property>
-  <property>
-    <name>compiler.joinmemory</name>
-    <value>163840</value>
-  </property>
-  <property>
-    <name>compiler.pregelix.home</name>
-    <value>~/pregelix</value>
-  </property>
-  <property>
-    <name>storage.buffercache.pagesize</name>
-    <value>32768</value>
-    <description>The page size in bytes for pages in the buffer cache.
-      (Default = "32768" // 32KB)
-    </description>
-  </property>
-  <property>
-    <name>storage.buffercache.size</name>
-    <value>33554432</value>
-    <description>The size of memory allocated to the disk buffer cache.
-      The value should be a multiple of the buffer cache page size(Default
-      = "33554432" // 32MB)
-    </description>
-  </property>
-  <property>
-    <name>storage.memorycomponent.numpages</name>
-    <value>8</value>
-    <description>The number of pages to allocate for a memory component.
-      (Default = 8)
-    </description>
-  </property>
-  <property>
-    <name>plot.activate</name>
-    <value>false</value>
-    <description>Enabling plot of Algebricks plan to tmp folder. (Default = false)
-    </description>
-  </property>
-</asterixConfiguration>

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/conf/cluster.xml
----------------------------------------------------------------------
diff --git a/src/test/resources/conf/cluster.xml b/src/test/resources/conf/cluster.xml
deleted file mode 100644
index 8f0b694..0000000
--- a/src/test/resources/conf/cluster.xml
+++ /dev/null
@@ -1,49 +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.
- !-->
-<cluster xmlns="cluster">
-  <instance_name>asterix</instance_name>
-  <store>storage</store>
-
-  <data_replication>
-    <enabled>false</enabled>
-    <replication_port>2016</replication_port>
-    <replication_factor>2</replication_factor>
-    <auto_failover>false</auto_failover>
-    <replication_time_out>30</replication_time_out>
-  </data_replication>
-
-  <master_node>
-    <id>master</id>
-    <client_ip>127.0.0.1</client_ip>
-    <cluster_ip>127.0.0.1</cluster_ip>
-    <client_port>1098</client_port>
-    <cluster_port>1099</cluster_port>
-    <http_port>8888</http_port>
-  </master_node>
-  <node>
-    <id>nc1</id>
-    <cluster_ip>127.0.0.1</cluster_ip>
-    <replication_port>2016</replication_port>
-  </node>
-  <node>
-    <id>nc2</id>
-    <cluster_ip>127.0.0.1</cluster_ip>
-    <replication_port>2017</replication_port>
-  </node>
-</cluster>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/conf/hyracks-deployment.properties
----------------------------------------------------------------------
diff --git a/src/test/resources/conf/hyracks-deployment.properties b/src/test/resources/conf/hyracks-deployment.properties
deleted file mode 100644
index 17a6772..0000000
--- a/src/test/resources/conf/hyracks-deployment.properties
+++ /dev/null
@@ -1,21 +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.
-cc.bootstrap.class=org.apache.asterix.hyracks.bootstrap.CCBootstrapImpl
-nc.bootstrap.class=org.apache.asterix.hyracks.bootstrap.NCBootstrapImpl
-cc.ip=127.0.0.1
-cc.port=1098

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/conf/test.properties
----------------------------------------------------------------------
diff --git a/src/test/resources/conf/test.properties b/src/test/resources/conf/test.properties
deleted file mode 100644
index 86269c8..0000000
--- a/src/test/resources/conf/test.properties
+++ /dev/null
@@ -1,22 +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.
-MetadataNode=nc1
-NewUniverse=true
-nc1.stores=nc1data
-nc2.stores=nc2data
-OutputDir=/tmp/asterix_output/

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/optimizerts/queries/channel/channel-create.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/optimizerts/queries/channel/channel-create.aql b/src/test/resources/optimizerts/queries/channel/channel-create.aql
deleted file mode 100644
index 4dc9291..0000000
--- a/src/test/resources/optimizerts/queries/channel/channel-create.aql
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Description  : Check the Plan used by a channel
- * Expected Res : Success
- * Date         : Mar 2015
- */
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text 
-};
-
-write output to nc1:"rttest/channel-create.adm";
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql b/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql
deleted file mode 100644
index 682bd6d..0000000
--- a/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Description  : Check the Plan for Subscribing to a channel    
- * Expected Res : Success
- * Date         : Mar 2015
- */
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text 
-};
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
-
-write output to nc1:"rttest/channel-subscribe.adm";
-
-create broker brokerA at "http://www.hello.com";
-
-subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live") on brokerA;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql b/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql
deleted file mode 100644
index 7cdec50..0000000
--- a/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Description  : Check the Plan for Unsubscribing to a channel
- * Expected Res : Success
- * Date         : Mar 2015
- */
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text 
-};
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
-
-write output to nc1:"rttest/channel-unsubscribe.adm";
-
-unsubscribe "c45ef6d0-c5ae-4b9e-b5da-cf1932718296" from nearbyTweetChannel;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/optimizerts/results/channel/channel-create.plan
----------------------------------------------------------------------
diff --git a/src/test/resources/optimizerts/results/channel/channel-create.plan b/src/test/resources/optimizerts/results/channel/channel-create.plan
deleted file mode 100644
index f597191..0000000
--- a/src/test/resources/optimizerts/results/channel/channel-create.plan
+++ /dev/null
@@ -1,30 +0,0 @@
--- COMMIT  |PARTITIONED|
-  -- STREAM_PROJECT  |PARTITIONED|
-    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-      -- INSERT_DELETE  |PARTITIONED|
-        -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
-          -- ASSIGN  |PARTITIONED|
-            -- STREAM_PROJECT  |PARTITIONED|
-              -- ASSIGN  |PARTITIONED|
-                -- STREAM_PROJECT  |PARTITIONED|
-                  -- ASSIGN  |PARTITIONED|
-                    -- STREAM_PROJECT  |PARTITIONED|
-                      -- ASSIGN  |PARTITIONED|
-                        -- STREAM_PROJECT  |PARTITIONED|
-                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                            -- NESTED_LOOP  |PARTITIONED|
-                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                      -- DATASOURCE_SCAN  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-                              -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- STREAM_PROJECT  |PARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                        -- DATASOURCE_SCAN  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
----------------------------------------------------------------------
diff --git a/src/test/resources/optimizerts/results/channel/channel-subscribe.plan b/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
deleted file mode 100644
index 4530923..0000000
--- a/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
+++ /dev/null
@@ -1,44 +0,0 @@
--- COMMIT  |PARTITIONED|
-  -- STREAM_PROJECT  |PARTITIONED|
-    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-      -- INSERT_DELETE  |PARTITIONED|
-        -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
-          -- ASSIGN  |PARTITIONED|
-            -- STREAM_PROJECT  |PARTITIONED|
-              -- ASSIGN  |PARTITIONED|
-                -- STREAM_PROJECT  |PARTITIONED|
-                  -- ASSIGN  |PARTITIONED|
-                    -- STREAM_PROJECT  |PARTITIONED|
-                      -- ASSIGN  |PARTITIONED|
-                        -- STREAM_PROJECT  |PARTITIONED|
-                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                            -- NESTED_LOOP  |PARTITIONED|
-                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                      -- DATASOURCE_SCAN  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-                              -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- STREAM_PROJECT  |PARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                        -- DATASOURCE_SCAN  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
--- DISTRIBUTE_RESULT  |PARTITIONED|
-  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-    -- COMMIT  |PARTITIONED|
-      -- STREAM_PROJECT  |PARTITIONED|
-        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-          -- INSERT_DELETE  |PARTITIONED|
-            -- HASH_PARTITION_EXCHANGE [$$8]  |PARTITIONED|
-              -- ASSIGN  |UNPARTITIONED|
-                -- STREAM_PROJECT  |UNPARTITIONED|
-                  -- ASSIGN  |UNPARTITIONED|
-                    -- STREAM_PROJECT  |UNPARTITIONED|
-                      -- ASSIGN  |UNPARTITIONED|
-                        -- ASSIGN  |UNPARTITIONED|
-                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
----------------------------------------------------------------------
diff --git a/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan b/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
deleted file mode 100644
index a9e383a..0000000
--- a/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
+++ /dev/null
@@ -1,44 +0,0 @@
--- COMMIT  |PARTITIONED|
-  -- STREAM_PROJECT  |PARTITIONED|
-    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-      -- INSERT_DELETE  |PARTITIONED|
-        -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
-          -- ASSIGN  |PARTITIONED|
-            -- STREAM_PROJECT  |PARTITIONED|
-              -- ASSIGN  |PARTITIONED|
-                -- STREAM_PROJECT  |PARTITIONED|
-                  -- ASSIGN  |PARTITIONED|
-                    -- STREAM_PROJECT  |PARTITIONED|
-                      -- ASSIGN  |PARTITIONED|
-                        -- STREAM_PROJECT  |PARTITIONED|
-                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                            -- NESTED_LOOP  |PARTITIONED|
-                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                      -- DATASOURCE_SCAN  |PARTITIONED|
-                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
-                              -- BROADCAST_EXCHANGE  |PARTITIONED|
-                                -- STREAM_PROJECT  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- STREAM_PROJECT  |PARTITIONED|
-                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                        -- DATASOURCE_SCAN  |PARTITIONED|
-                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                                            -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
--- COMMIT  |PARTITIONED|
-  -- STREAM_PROJECT  |PARTITIONED|
-    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-      -- INSERT_DELETE  |PARTITIONED|
-        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-          -- MATERIALIZE  |PARTITIONED|
-            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-              -- ASSIGN  |PARTITIONED|
-                -- STREAM_PROJECT  |PARTITIONED|
-                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                    -- BTREE_SEARCH  |PARTITIONED|
-                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                        -- ASSIGN  |PARTITIONED|
-                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql b/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
deleted file mode 100644
index 41b036a..0000000
--- a/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* Description  : Create Channel Test. Confirms that the subscription and result datasets are created
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.2.update.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.2.update.aql b/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.2.update.aql
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql b/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
deleted file mode 100644
index eb341e9..0000000
--- a/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
+++ /dev/null
@@ -1,7 +0,0 @@
-use dataverse channels;
-
-for $result in dataset Metadata.Channel where $result.ChannelName = "nearbyTweetChannel"
-for $x in dataset Metadata.Dataset
-where $x.DatasetName = $result.SubscriptionsDatasetName
-or $x.DatasetName = $result.ResultsDatasetName
-return $x;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql b/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
deleted file mode 100644
index 7bace03..0000000
--- a/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* Description  : Create Channel Test
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.2.update.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.2.update.aql b/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.2.update.aql
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql b/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
deleted file mode 100644
index 9a1e170..0000000
--- a/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
+++ /dev/null
@@ -1,3 +0,0 @@
-use dataverse channels;
-
-for $result in dataset Metadata.Channel return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql b/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
deleted file mode 100644
index afc7d5e..0000000
--- a/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-* Description  : Drop Channel Test. Check Metadata
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql b/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql
deleted file mode 100644
index f466b9c..0000000
--- a/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql
+++ /dev/null
@@ -1,3 +0,0 @@
-use dataverse channels;
-
-drop channel nearbyTweetChannel2;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql b/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
deleted file mode 100644
index e762a27..0000000
--- a/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
+++ /dev/null
@@ -1,7 +0,0 @@
-use dataverse channels;
-
-for $result in dataset Metadata.Channel
-for $x in dataset Metadata.Dataset
-where $x.DatasetName = $result.SubscriptionsDatasetName
-or $x.DatasetName = $result.ResultsDatasetName
-return $x;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql b/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
deleted file mode 100644
index afc7d5e..0000000
--- a/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-* Description  : Drop Channel Test. Check Metadata
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
-
-create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql b/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql
deleted file mode 100644
index f466b9c..0000000
--- a/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql
+++ /dev/null
@@ -1,3 +0,0 @@
-use dataverse channels;
-
-drop channel nearbyTweetChannel2;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql b/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
deleted file mode 100644
index 9a1e170..0000000
--- a/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
+++ /dev/null
@@ -1,3 +0,0 @@
-use dataverse channels;
-
-for $result in dataset Metadata.Channel return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql b/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
deleted file mode 100644
index 41b036a..0000000
--- a/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-* Description  : Create Channel Test. Confirms that the subscription and result datasets are created
-* Expected Res : Success
-* Date         : March 2015
-* Author       : Steven Jacobs
-*/
-
-drop dataverse channels if exists;
-create dataverse channels;
-use dataverse channels;
-
-create type TweetMessageTypeuuid as closed {
-  tweetid: uuid,
-  sender-location: point,
-  send-time: datetime,
-  referred-topics: {{ string }},
-  message-text: string,
-  countA: int32,
-  countB: int32
-}
-
-
-create dataset TweetMessageuuids(TweetMessageTypeuuid)
-primary key tweetid autogenerated;
-
-create function NearbyTweetsContainingText($location, $text) {
-  for $tweet in dataset TweetMessageuuids
-  let $circle := create-circle($location,30.0)
-  where contains($tweet.message-text,$text)
-  and spatial-intersect($tweet.sender-location, $location)
-  return $tweet.message-text
-};
-
-create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql b/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
deleted file mode 100644
index 6d35506..0000000
--- a/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
+++ /dev/null
@@ -1,7 +0,0 @@
-use dataverse channels;
-
-subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live");
-
-subscribe to nearbyTweetChannel (point("20.0, 20.0"), "Long");
-
-subscribe to nearbyTweetChannel (point("10.0, 10.0"), "Prosper");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql b/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql
deleted file mode 100644
index 0d2c46e..0000000
--- a/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql
+++ /dev/null
@@ -1,4 +0,0 @@
-use dataverse channels;
-
-for $test in dataset nearbyTweetChannelSubscriptions
-return $test.param1;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm b/src/test/resources/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm
deleted file mode 100644
index baa5299..0000000
--- a/src/test/resources/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm
+++ /dev/null
@@ -1,3 +0,0 @@
-[ { "DataverseName": "channels", "DatasetName": "nearbyTweetChannelResults", "DataTypeName": "nearbyTweetChannelResultsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "rid" ], "PrimaryKey": [ "rid" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Tue Mar 10 15:20:05 PDT 2015", "DatasetId": 106i32, "PendingOp": 0i32 }
-, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannelSubscriptions", "DataTypeName": "nearbyTweetChannelSubscriptionsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "subscription-id" ], "PrimaryKey": [ "subscription-id" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Tue Mar 10 15:20:05 PDT 2015", "DatasetId": 105i32, "PendingOp": 0i32 }
- ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm b/src/test/resources/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm
deleted file mode 100644
index 66a52f3..0000000
--- a/src/test/resources/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm
+++ /dev/null
@@ -1,2 +0,0 @@
-[ { "DataverseName": "channels", "ChannelName": "nearbyTweetChannel", "SubscriptionsDatasetName": "nearbyTweetChannelSubscriptions", "ResultsDatasetName": "nearbyTweetChannelResults", "Function": "channels.NearbyTweetsContainingText@2", "Duration": "PT10M" }
- ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm b/src/test/resources/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm
deleted file mode 100644
index 7b6fdf4..0000000
--- a/src/test/resources/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm
+++ /dev/null
@@ -1,5 +0,0 @@
-[ { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel1Results", "DataTypeName": "nearbyTweetChannel1ResultsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "rid" ], "PrimaryKey": [ "rid" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 116i32, "PendingOp": 0i32 }
-, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel1Subscriptions", "DataTypeName": "nearbyTweetChannel1SubscriptionsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "subscription-id" ], "PrimaryKey": [ "subscription-id" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 115i32, "PendingOp": 0i32 }
-, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel3Results", "DataTypeName": "nearbyTweetChannel3ResultsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "rid" ], "PrimaryKey": [ "rid" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 120i32, "PendingOp": 0i32 }
-, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel3Subscriptions", "DataTypeName": "nearbyTweetChannel3SubscriptionsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "subscription-id" ], "PrimaryKey": [ "subscription-id" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 119i32, "PendingOp": 0i32 }
- ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm b/src/test/resources/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm
deleted file mode 100644
index de2948a..0000000
--- a/src/test/resources/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm
+++ /dev/null
@@ -1,3 +0,0 @@
-[ { "DataverseName": "channels", "ChannelName": "nearbyTweetChannel1", "SubscriptionsDatasetName": "nearbyTweetChannel1Subscriptions", "ResultsDatasetName": "nearbyTweetChannel1Results", "Function": "channels.NearbyTweetsContainingText@2", "Duration": "PT10M" }
-, { "DataverseName": "channels", "ChannelName": "nearbyTweetChannel3", "SubscriptionsDatasetName": "nearbyTweetChannel3Subscriptions", "ResultsDatasetName": "nearbyTweetChannel3Results", "Function": "channels.NearbyTweetsContainingText@2", "Duration": "PT10M" }
- ]
\ No newline at end of file


[13/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
new file mode 100644
index 0000000..c680988
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
@@ -0,0 +1,90 @@
+/*
+ * 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.asterix.bad.runtime;
+
+import java.util.Collection;
+
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractExtensibleLogicalOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.IOperatorExtension;
+import org.apache.hyracks.algebricks.core.algebra.visitors.ILogicalExpressionReferenceTransform;
+
+/**
+ * A repetitive channel operator, which uses a Java timer to run a given query periodically
+ */
+public class NotifyBrokerOperator extends AbstractExtensibleLogicalOperator {
+    private final LogicalVariable subscriptionIdVar;
+    private final LogicalVariable brokerEndpointVar;
+    private final LogicalVariable channelExecutionVar;
+
+    public NotifyBrokerOperator(LogicalVariable brokerEndpointVar, LogicalVariable subscriptionIdVar,
+            LogicalVariable resultSetVar) {
+        this.brokerEndpointVar = brokerEndpointVar;
+        this.subscriptionIdVar = subscriptionIdVar;
+        this.channelExecutionVar = resultSetVar;
+    }
+
+    public LogicalVariable getSubscriptionVariable() {
+        return subscriptionIdVar;
+    }
+
+    public LogicalVariable getBrokerEndpointVariable() {
+        return brokerEndpointVar;
+    }
+
+    public LogicalVariable getChannelExecutionVariable() {
+        return channelExecutionVar;
+    }
+
+    @Override
+    public String toString() {
+        return "notify-brokers";
+    }
+
+    @Override
+    public boolean isMap() {
+        return false;
+    }
+
+    @Override
+    public IOperatorExtension newInstance() {
+        return new NotifyBrokerOperator(brokerEndpointVar, subscriptionIdVar, channelExecutionVar);
+    }
+
+    @Override
+    public boolean acceptExpressionTransform(ILogicalExpressionReferenceTransform transform)
+            throws AlgebricksException {
+        return false;
+    }
+
+    @Override
+    public void getUsedVariables(Collection<LogicalVariable> usedVars) {
+        usedVars.add(subscriptionIdVar);
+        usedVars.add(brokerEndpointVar);
+        usedVars.add(channelExecutionVar);
+    }
+
+    @Override
+    public void getProducedVariables(Collection<LogicalVariable> producedVars) {
+        // none produced
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
new file mode 100644
index 0000000..753ece7
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
@@ -0,0 +1,111 @@
+/*
+ * 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.asterix.bad.runtime;
+
+import org.apache.asterix.active.EntityId;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.core.algebra.base.IHyracksJobBuilder;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
+import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
+import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
+import org.apache.hyracks.algebricks.core.algebra.base.PhysicalOperatorTag;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.ExtensionOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.IOperatorSchema;
+import org.apache.hyracks.algebricks.core.algebra.operators.physical.AbstractPhysicalOperator;
+import org.apache.hyracks.algebricks.core.algebra.properties.IPhysicalPropertiesVector;
+import org.apache.hyracks.algebricks.core.algebra.properties.PhysicalRequirements;
+import org.apache.hyracks.algebricks.core.jobgen.impl.JobGenContext;
+import org.apache.hyracks.algebricks.core.jobgen.impl.JobGenHelper;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.evaluators.ColumnAccessEvalFactory;
+import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
+
+public class NotifyBrokerPOperator extends AbstractPhysicalOperator {
+
+    private final EntityId entityId;
+
+    public NotifyBrokerPOperator(EntityId entityId) {
+        this.entityId = entityId;
+    }
+
+    @Override
+    public PhysicalOperatorTag getOperatorTag() {
+        return PhysicalOperatorTag.EXTENSION_OPERATOR;
+    }
+
+    @Override
+    public String toString() {
+        return "NOTIFY_BROKERS";
+    }
+
+    @Override
+    public PhysicalRequirements getRequiredPropertiesForChildren(ILogicalOperator op,
+            IPhysicalPropertiesVector reqdByParent, IOptimizationContext context) {
+        return emptyUnaryRequirements();
+    }
+
+    @Override
+    public void computeDeliveredProperties(ILogicalOperator op, IOptimizationContext context)
+            throws AlgebricksException {
+        AbstractLogicalOperator op2 = (AbstractLogicalOperator) op.getInputs().get(0).getValue();
+        deliveredProperties = op2.getDeliveredPhysicalProperties().clone();
+    }
+
+    @Override
+    public void contributeRuntimeOperator(IHyracksJobBuilder builder, JobGenContext context, ILogicalOperator op,
+            IOperatorSchema propagatedSchema, IOperatorSchema[] inputSchemas, IOperatorSchema outerPlanSchema)
+                    throws AlgebricksException {
+        ExtensionOperator notify = (ExtensionOperator) op;
+        LogicalVariable subVar = ((NotifyBrokerOperator) notify.getDelegate()).getSubscriptionVariable();
+        LogicalVariable brokerVar = ((NotifyBrokerOperator) notify.getDelegate()).getBrokerEndpointVariable();
+        LogicalVariable executionVar = ((NotifyBrokerOperator) notify.getDelegate()).getChannelExecutionVariable();
+
+        int brokerColumn = inputSchemas[0].findVariable(brokerVar);
+        int subColumn = inputSchemas[0].findVariable(subVar);
+        int executionColumn = inputSchemas[0].findVariable(executionVar);
+
+        IScalarEvaluatorFactory brokerEvalFactory = new ColumnAccessEvalFactory(brokerColumn);
+        IScalarEvaluatorFactory subEvalFactory = new ColumnAccessEvalFactory(subColumn);
+        IScalarEvaluatorFactory channelExecutionEvalFactory = new ColumnAccessEvalFactory(executionColumn);
+
+        NotifyBrokerRuntimeFactory runtime = new NotifyBrokerRuntimeFactory(brokerEvalFactory, subEvalFactory,
+                channelExecutionEvalFactory, entityId);
+
+        RecordDescriptor recDesc = JobGenHelper.mkRecordDescriptor(context.getTypeEnvironment(op), propagatedSchema,
+                context);
+
+        builder.contributeMicroOperator(op, runtime, recDesc);
+
+        // and contribute one edge from its child
+        ILogicalOperator src = op.getInputs().get(0).getValue();
+        builder.contributeGraphEdge(src, 0, notify, 0);
+    }
+
+    @Override
+    public boolean isMicroOperator() {
+        return true;
+    }
+
+    @Override
+    public boolean expensiveThanMaterialization() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
new file mode 100644
index 0000000..d55080c
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
@@ -0,0 +1,138 @@
+/*
+ * 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.asterix.bad.runtime;
+
+import java.io.DataInputStream;
+import java.nio.ByteBuffer;
+
+import org.apache.asterix.active.ActiveManager;
+import org.apache.asterix.active.EntityId;
+import org.apache.asterix.bad.ChannelJobService;
+import org.apache.asterix.common.api.IAsterixAppRuntimeContext;
+import org.apache.asterix.dataflow.data.nontagged.serde.ADateTimeSerializerDeserializer;
+import org.apache.asterix.dataflow.data.nontagged.serde.AOrderedListSerializerDeserializer;
+import org.apache.asterix.dataflow.data.nontagged.serde.AStringSerializerDeserializer;
+import org.apache.asterix.om.base.ADateTime;
+import org.apache.asterix.om.base.AOrderedList;
+import org.apache.asterix.om.base.AString;
+import org.apache.asterix.om.types.AOrderedListType;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.algebricks.runtime.operators.base.AbstractOneInputOneOutputOneFramePushRuntime;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.data.std.api.IPointable;
+import org.apache.hyracks.data.std.primitive.VoidPointable;
+import org.apache.hyracks.dataflow.common.comm.io.FrameTupleAccessor;
+import org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream;
+import org.apache.hyracks.dataflow.common.data.accessors.FrameTupleReference;
+
+public class NotifyBrokerRuntime extends AbstractOneInputOneOutputOneFramePushRuntime {
+
+    private final ByteBufferInputStream bbis = new ByteBufferInputStream();
+    private final DataInputStream di = new DataInputStream(bbis);
+    private final AOrderedListSerializerDeserializer subSerDes = new AOrderedListSerializerDeserializer(
+            new AOrderedListType(BuiltinType.AUUID, null));
+
+    private IPointable inputArg0 = new VoidPointable();
+    private IPointable inputArg1 = new VoidPointable();
+    private IPointable inputArg2 = new VoidPointable();
+    private IScalarEvaluator eval0;
+    private IScalarEvaluator eval1;
+    private IScalarEvaluator eval2;
+    private final ActiveManager activeManager;
+    private final EntityId entityId;
+    private ChannelJobService channelJobService;
+
+    public NotifyBrokerRuntime(IHyracksTaskContext ctx, IScalarEvaluatorFactory brokerEvalFactory,
+            IScalarEvaluatorFactory subEvalFactory, IScalarEvaluatorFactory channelExecutionEvalFactory,
+            EntityId activeJobId) throws AlgebricksException {
+        this.tRef = new FrameTupleReference();
+        eval0 = brokerEvalFactory.createScalarEvaluator(ctx);
+        eval1 = subEvalFactory.createScalarEvaluator(ctx);
+        eval2 = channelExecutionEvalFactory.createScalarEvaluator(ctx);
+        this.activeManager = (ActiveManager) ((IAsterixAppRuntimeContext) ctx.getJobletContext().getApplicationContext()
+                .getApplicationObject()).getActiveManager();
+        this.entityId = activeJobId;
+        channelJobService = new ChannelJobService();
+    }
+
+    @Override
+    public void open() throws HyracksDataException {
+        return;
+    }
+
+    @Override
+    public void nextFrame(ByteBuffer buffer) throws HyracksDataException {
+        tAccess.reset(buffer);
+        int nTuple = tAccess.getTupleCount();
+        for (int t = 0; t < nTuple; t++) {
+            tRef.reset(tAccess, t);
+            try {
+                eval0.evaluate(tRef, inputArg0);
+                eval1.evaluate(tRef, inputArg1);
+                eval2.evaluate(tRef, inputArg2);
+            } catch (AlgebricksException e) {
+                throw new HyracksDataException(e);
+            }
+            int serBrokerOffset = inputArg0.getStartOffset();
+            bbis.setByteBuffer(tRef.getFrameTupleAccessor().getBuffer(), serBrokerOffset + 1);
+            AString endpoint = AStringSerializerDeserializer.INSTANCE.deserialize(di);
+
+            int serSubOffset = inputArg1.getStartOffset();
+            bbis.setByteBuffer(tRef.getFrameTupleAccessor().getBuffer(), serSubOffset + 1);
+            AOrderedList subs = subSerDes.deserialize(di);
+
+            int resultSetOffset = inputArg2.getStartOffset();
+            bbis.setByteBuffer(tRef.getFrameTupleAccessor().getBuffer(), resultSetOffset + 1);
+            ADateTime executionTime = ADateTimeSerializerDeserializer.INSTANCE.deserialize(di);
+            String executionTimeString = executionTime.toSimpleString();
+
+            channelJobService.sendBrokerNotificationsForChannel(entityId, endpoint.getStringValue(), subs,
+                    executionTimeString);
+
+        }
+
+    }
+
+    @Override
+    public void close() throws HyracksDataException {
+        return;
+    }
+
+    @Override
+    public void setInputRecordDescriptor(int index, RecordDescriptor recordDescriptor) {
+        this.inputRecordDesc = recordDescriptor;
+        this.tAccess = new FrameTupleAccessor(inputRecordDesc);
+    }
+
+    @Override
+    public void flush() throws HyracksDataException {
+        return;
+    }
+
+    @Override
+    public void fail() throws HyracksDataException {
+        failed = true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
new file mode 100644
index 0000000..d5452d4
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
@@ -0,0 +1,55 @@
+/*
+ * 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.asterix.bad.runtime;
+
+import org.apache.asterix.active.EntityId;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.runtime.base.IPushRuntime;
+import org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory;
+import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+
+public class NotifyBrokerRuntimeFactory implements IPushRuntimeFactory {
+
+    private static final long serialVersionUID = 1L;
+
+    private final IScalarEvaluatorFactory brokerEvalFactory;
+    private final IScalarEvaluatorFactory subEvalFactory;
+    private final IScalarEvaluatorFactory channelExecutionEvalFactory;
+    private final EntityId entityId;
+
+    public NotifyBrokerRuntimeFactory(IScalarEvaluatorFactory brokerEvalFactory, IScalarEvaluatorFactory subEvalFactory,
+            IScalarEvaluatorFactory channelExecutionEvalFactory, EntityId entityId) {
+        this.brokerEvalFactory = brokerEvalFactory;
+        this.subEvalFactory = subEvalFactory;
+        this.channelExecutionEvalFactory = channelExecutionEvalFactory;
+        this.entityId = entityId;
+    }
+
+    @Override
+    public String toString() {
+        return "notify-broker";
+    }
+
+    @Override
+    public IPushRuntime createPushRuntime(IHyracksTaskContext ctx) throws AlgebricksException {
+        return new NotifyBrokerRuntime(ctx, brokerEvalFactory, subEvalFactory, channelExecutionEvalFactory, entityId);
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java
new file mode 100644
index 0000000..6521ecb
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2009-2013 by The Regents of the University of California
+ * 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 from
+ *
+ * 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.asterix.bad.runtime;
+
+import java.util.logging.Logger;
+
+import org.apache.asterix.active.ActiveRuntimeId;
+import org.apache.asterix.active.EntityId;
+import org.apache.asterix.bad.BADConstants;
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
+import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.job.JobSpecification;
+import org.apache.hyracks.dataflow.std.base.AbstractSingleActivityOperatorDescriptor;
+
+/**
+ * A repetitive channel operator, which uses a Java timer to run a given query periodically
+ */
+public class RepetitiveChannelOperatorDescriptor extends AbstractSingleActivityOperatorDescriptor {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final Logger LOGGER = Logger.getLogger(RepetitiveChannelOperatorDescriptor.class.getName());
+
+    /** The unique identifier of the job. **/
+    protected final EntityId entityId;
+
+    protected final JobSpecification jobSpec;
+
+    private final String duration;
+
+    private String strIP;
+    private int port;
+
+    public RepetitiveChannelOperatorDescriptor(JobSpecification spec, String dataverseName, String channelName,
+            String duration, JobSpecification channeljobSpec, String strIP, int port) {
+        super(spec, 0, 0);
+        this.entityId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, dataverseName, channelName);
+        this.jobSpec = channeljobSpec;
+        this.duration = duration;
+        this.strIP = strIP;
+        this.port = port;
+    }
+
+    @Override
+    public IOperatorNodePushable createPushRuntime(IHyracksTaskContext ctx,
+            IRecordDescriptorProvider recordDescProvider, int partition, int nPartitions) throws HyracksDataException {
+        ActiveRuntimeId runtimeId = new ActiveRuntimeId(entityId,
+                RepetitiveChannelOperatorDescriptor.class.getSimpleName(), partition);
+        try {
+            return new RepetitiveChannelOperatorNodePushable(ctx, runtimeId, jobSpec, duration, strIP, port);
+        } catch (AsterixException e) {
+            throw new HyracksDataException(e);
+        }
+    }
+
+    public String getDuration() {
+        return duration;
+    }
+
+    public EntityId getEntityId() {
+        return entityId;
+    }
+
+    public JobSpecification getJobSpec() {
+        return jobSpec;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java
new file mode 100644
index 0000000..873d2e7
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java
@@ -0,0 +1,125 @@
+/*
+ * 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.asterix.bad.runtime;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.logging.Logger;
+
+import org.apache.asterix.active.ActiveRuntimeId;
+import org.apache.asterix.active.ActiveSourceOperatorNodePushable;
+import org.apache.asterix.bad.ChannelJobService;
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.hyracks.api.comm.IFrameWriter;
+import org.apache.hyracks.api.context.IHyracksTaskContext;
+import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.job.JobSpecification;
+
+public class RepetitiveChannelOperatorNodePushable extends ActiveSourceOperatorNodePushable {
+
+    private static final Logger LOGGER = Logger.getLogger(RepetitiveChannelOperatorNodePushable.class.getName());
+
+    private ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
+    private final JobSpecification jobSpec;
+    private long duration;
+    private ChannelJobService channelJobService;
+    private String strIP;
+    private int port;
+
+    public RepetitiveChannelOperatorNodePushable(IHyracksTaskContext ctx, ActiveRuntimeId runtimeId,
+            JobSpecification channeljobSpec, String duration, String strIP, int port) throws AsterixException {
+        super(ctx, runtimeId);
+        this.jobSpec = channeljobSpec;
+        this.duration = findPeriod(duration);
+        //TODO: we should share channelJobService as a single instance
+        //And only create one hcc
+        channelJobService = new ChannelJobService();
+        this.strIP = strIP;
+        this.port = port;
+    }
+
+    public void executeJob() throws Exception {
+        LOGGER.info("Executing Job: " + runtimeId.toString());
+        channelJobService.runChannelJob(jobSpec, strIP, port);
+    }
+
+    @Override
+    public void setOutputFrameWriter(int index, IFrameWriter writer, RecordDescriptor recordDesc)
+            throws HyracksDataException {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    protected void start() throws HyracksDataException, InterruptedException {
+        scheduledExecutorService.scheduleAtFixedRate(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    executeJob();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }, duration, duration, TimeUnit.MILLISECONDS);
+
+        while (!scheduledExecutorService.isTerminated()) {
+
+        }
+
+    }
+
+    @Override
+    protected void abort() throws HyracksDataException, InterruptedException {
+        scheduledExecutorService.shutdown();
+    }
+
+    private long findPeriod(String duration) {
+        //TODO: Allow Repetitive Channels to use YMD durations  
+        String hoursMinutesSeconds = "";
+        if (duration.indexOf('T') != -1) {
+            hoursMinutesSeconds = duration.substring(duration.indexOf('T') + 1);
+        }
+        double seconds = 0;
+        if (hoursMinutesSeconds != "") {
+            int pos = 0;
+            if (hoursMinutesSeconds.indexOf('H') != -1) {
+                Double hours = Double.parseDouble(hoursMinutesSeconds.substring(pos, hoursMinutesSeconds.indexOf('H')));
+                seconds += (hours * 60 * 60);
+                pos = hoursMinutesSeconds.indexOf('H') + 1;
+
+            }
+            if (hoursMinutesSeconds.indexOf('M') != -1) {
+                Double minutes = Double
+                        .parseDouble(hoursMinutesSeconds.substring(pos, hoursMinutesSeconds.indexOf('M')));
+                seconds += (minutes * 60);
+                pos = hoursMinutesSeconds.indexOf('M') + 1;
+            }
+            if (hoursMinutesSeconds.indexOf('S') != -1) {
+                Double s = Double.parseDouble(hoursMinutesSeconds.substring(pos, hoursMinutesSeconds.indexOf('S')));
+                seconds += (s);
+            }
+
+        }
+        return (long) (seconds * 1000);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/resources/lang-extension/lang.txt
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/resources/lang-extension/lang.txt b/asterix-opt/src/main/resources/lang-extension/lang.txt
new file mode 100644
index 0000000..90edb91
--- /dev/null
+++ b/asterix-opt/src/main/resources/lang-extension/lang.txt
@@ -0,0 +1,179 @@
+import org.apache.asterix.bad.lang.statement.BrokerDropStatement;
+import org.apache.asterix.bad.lang.statement.ChannelDropStatement;
+import org.apache.asterix.bad.lang.statement.ChannelSubscribeStatement;
+import org.apache.asterix.bad.lang.statement.ChannelUnsubscribeStatement;
+import org.apache.asterix.bad.lang.statement.CreateBrokerStatement;
+import org.apache.asterix.bad.lang.statement.CreateChannelStatement;
+
+
+@merge
+Statement SingleStatement() throws ParseException:
+{
+  // merge area 1
+  before:
+  after:
+}
+{
+  (
+    // merge area 2
+    before:
+    after:    | stmt = ChannelSubscriptionStatement())
+  {
+    // merge area 3
+  }
+}
+
+@merge
+Statement CreateStatement() throws ParseException:
+{
+  // merge area 1
+  before:
+  after:
+}
+{
+  (
+    // merge area 2
+    before:
+    after:    | stmt = ChannelSpecification() | stmt = BrokerSpecification())
+  {
+    // merge area 3
+  }
+}
+
+@merge
+Statement DropStatement() throws ParseException:
+{
+  // merge area 1
+  before:
+  after:
+}
+{
+  (
+    // merge area 2
+    before:
+    after:    | <CHANNEL> pairId = QualifiedName() ifExists = IfExists()
+      {
+        stmt = new ChannelDropStatement(pairId.first, pairId.second, ifExists);
+      }
+      	      | <BROKER> pairId = QualifiedName() ifExists = IfExists()	
+      {	
+        stmt = new BrokerDropStatement(pairId.first, pairId.second, ifExists);	
+      }
+      )
+  {
+    // merge area 3
+  }
+}
+
+@new
+CreateChannelStatement ChannelSpecification() throws ParseException:
+{
+  Pair<Identifier,Identifier> nameComponents = null;
+  FunctionSignature appliedFunction = null;
+  CreateChannelStatement ccs = null;
+  String fqFunctionName = null;
+  Expression period = null;
+}
+{
+  (
+    "repetitive" <CHANNEL>  nameComponents = QualifiedName()
+    <USING> appliedFunction = FunctionSignature()
+    "period" period = FunctionCallExpr()
+    {
+      ccs = new CreateChannelStatement(nameComponents.first,
+                                   nameComponents.second, appliedFunction, period);
+    }
+  )
+    {
+      return ccs;
+    }
+}
+
+@new
+CreateBrokerStatement BrokerSpecification() throws ParseException:
+{
+  CreateBrokerStatement cbs = null;
+  Pair<Identifier,Identifier> name = null;
+  String endPoint = null;
+}
+{
+  (
+    <BROKER>  name = QualifiedName()
+    <AT>  endPoint = StringLiteral()
+    {
+      cbs = new CreateBrokerStatement(name.first, name.second,endPoint);
+    }
+  )
+    {
+      return cbs;
+    }
+}
+
+@new
+Statement ChannelSubscriptionStatement() throws ParseException:
+{
+  Statement stmt = null;
+  Pair<Identifier,Identifier> nameComponents = null;
+  List<Expression> argList = new ArrayList<Expression>();
+  Expression tmp = null;
+  String id = null;
+  String subscriptionId = null;
+  Pair<Identifier,Identifier> brokerName = null;
+}
+{
+  (
+  "subscribe" <TO> nameComponents = QualifiedName()
+   <LEFTPAREN> (tmp = Expression()
+   {
+      argList.add(tmp);
+   }
+   (<COMMA> tmp = Expression()
+   {
+      argList.add(tmp);
+   }
+   )*)? <RIGHTPAREN> <ON> brokerName = QualifiedName()
+   {
+      stmt = new ChannelSubscribeStatement(nameComponents.first, nameComponents.second, argList, getVarCounter(), brokerName.first, brokerName.second, subscriptionId);
+   }
+   | "unsubscribe" id = StringLiteral() <FROM> nameComponents = QualifiedName()
+      {
+        setDataverses(new ArrayList<String>());
+        setDatasets(new ArrayList<String>());
+        VariableExpr varExp = new VariableExpr();
+        VarIdentifier var = new VarIdentifier();
+        varExp.setVar(var);
+        var.setValue("$subscriptionPlaceholder");
+        getCurrentScope().addNewVarSymbolToScope(varExp.getVar());
+        List<String> dataverses = getDataverses();
+        List<String> datasets = getDatasets();
+        // we remove the pointer to the dataverses and datasets
+        setDataverses(null);
+        setDatasets(null);
+        stmt = new ChannelUnsubscribeStatement(varExp, nameComponents.first, nameComponents.second, id, getVarCounter(), dataverses, datasets);
+      }
+     | "change" "subscription" subscriptionId = StringLiteral()  <ON> nameComponents = QualifiedName()
+       <LEFTPAREN> (tmp = Expression()
+       {
+         argList.add(tmp);
+       }
+       (<COMMA> tmp = Expression()
+       {
+         argList.add(tmp);
+       }
+       )*)? <RIGHTPAREN>
+        <TO> brokerName = QualifiedName()
+      {
+        stmt = new ChannelSubscribeStatement(nameComponents.first, nameComponents.second, argList, getVarCounter(), brokerName.first, brokerName.second, subscriptionId);
+      }
+    )
+    {
+      return stmt;
+    }
+}
+
+<DEFAULT,IN_DBL_BRACE>
+TOKEN [IGNORE_CASE]:
+{
+    <BROKER : "broker">
+  | <CHANNEL : "channel">
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java b/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java
new file mode 100644
index 0000000..77e8afe
--- /dev/null
+++ b/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java
@@ -0,0 +1,98 @@
+/*
+ * 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.asterix.bad.test;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.logging.Logger;
+
+import org.apache.asterix.common.config.AsterixTransactionProperties;
+import org.apache.asterix.test.aql.TestExecutor;
+import org.apache.asterix.test.runtime.ExecutionTestUtil;
+import org.apache.asterix.testframework.context.TestCaseContext;
+import org.apache.asterix.testframework.xml.TestGroup;
+import org.apache.commons.lang3.StringUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * Runs the runtime test cases under 'src/test/resources/runtimets'.
+ */
+@RunWith(Parameterized.class)
+public class BADExecutionTest {
+
+    protected static final Logger LOGGER = Logger.getLogger(BADExecutionTest.class.getName());
+
+    protected static final String PATH_ACTUAL = "target/rttest" + File.separator;
+    protected static final String PATH_BASE = StringUtils.join(new String[] { "src", "test", "resources", "runtimets" },
+            File.separator);
+
+    protected static final String TEST_CONFIG_FILE_NAME = "src/test/resources/conf/asterix-build-configuration.xml";
+
+    protected static AsterixTransactionProperties txnProperties;
+    private static final TestExecutor testExecutor = new TestExecutor();
+    private static final boolean cleanupOnStart = true;
+    private static final boolean cleanupOnStop = true;
+
+    protected static TestGroup FailedGroup;
+
+    @BeforeClass
+    public static void setUp() throws Exception {
+        File outdir = new File(PATH_ACTUAL);
+        outdir.mkdirs();
+        ExecutionTestUtil.setUp(cleanupOnStart, TEST_CONFIG_FILE_NAME);
+    }
+
+    @AfterClass
+    public static void tearDown() throws Exception {
+        ExecutionTestUtil.tearDown(cleanupOnStop);
+        ExecutionTestUtil.integrationUtil.removeTestStorageFiles();
+    }
+
+    @Parameters(name = "BADExecutionTest {index}: {0}")
+    public static Collection<Object[]> tests() throws Exception {
+        return buildTestsInXml("testsuite.xml");
+    }
+
+    protected static Collection<Object[]> buildTestsInXml(String xmlfile) throws Exception {
+        Collection<Object[]> testArgs = new ArrayList<Object[]>();
+        TestCaseContext.Builder b = new TestCaseContext.Builder();
+        for (TestCaseContext ctx : b.build(new File(PATH_BASE), xmlfile)) {
+            testArgs.add(new Object[] { ctx });
+        }
+        return testArgs;
+
+    }
+
+    protected TestCaseContext tcCtx;
+
+    public BADExecutionTest(TestCaseContext tcCtx) {
+        this.tcCtx = tcCtx;
+    }
+
+    @Test
+    public void test() throws Exception {
+        testExecutor.executeTest(PATH_ACTUAL, tcCtx, null, false, FailedGroup);
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java b/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java
new file mode 100644
index 0000000..040a4e9
--- /dev/null
+++ b/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java
@@ -0,0 +1,60 @@
+/*
+ * 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.asterix.bad.test;
+
+import java.io.File;
+import java.util.logging.Logger;
+
+import org.apache.asterix.common.config.GlobalConfig;
+import org.apache.asterix.external.util.ExternalDataConstants;
+import org.apache.asterix.external.util.IdentitiyResolverFactory;
+import org.apache.asterix.test.optimizer.OptimizerTest;
+import org.apache.asterix.test.runtime.HDFSCluster;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+@RunWith(Parameterized.class)
+public class BADOptimizerTest extends OptimizerTest {
+
+    private static final Logger LOGGER = Logger.getLogger(BADOptimizerTest.class.getName());
+
+    @BeforeClass
+    public static void setUp() throws Exception {
+        TEST_CONFIG_FILE_NAME = "src/test/resources/conf/asterix-build-configuration.xml";
+        System.setProperty(GlobalConfig.CONFIG_FILE_PROPERTY, TEST_CONFIG_FILE_NAME);
+        final File outdir = new File(PATH_ACTUAL);
+        outdir.mkdirs();
+
+        HDFSCluster.getInstance().setup();
+
+        integrationUtil.init(true);
+        // Set the node resolver to be the identity resolver that expects node names
+        // to be node controller ids; a valid assumption in test environment.
+        System.setProperty(ExternalDataConstants.NODE_RESOLVER_FACTORY_PROPERTY,
+                IdentitiyResolverFactory.class.getName());
+    }
+
+    public BADOptimizerTest(File queryFile, File expectedFile, File actualFile) {
+        super(queryFile, expectedFile, actualFile);
+        TEST_CONFIG_FILE_NAME = "src/test/resources/conf/asterix-build-configuration.xml";
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/conf/asterix-build-configuration.xml
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/conf/asterix-build-configuration.xml b/asterix-opt/src/test/resources/conf/asterix-build-configuration.xml
new file mode 100644
index 0000000..c2f5d41
--- /dev/null
+++ b/asterix-opt/src/test/resources/conf/asterix-build-configuration.xml
@@ -0,0 +1,110 @@
+<!--
+ ! 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.
+ !-->
+<asterixConfiguration xmlns="asterixconf">
+  <metadataNode>asterix_nc1</metadataNode>
+  <store>
+    <ncId>asterix_nc1</ncId>
+    <storeDirs>iodevice0,iodevice1</storeDirs>
+  </store>
+  <store>
+    <ncId>asterix_nc2</ncId>
+    <storeDirs>iodevice0,iodevice1</storeDirs>
+  </store>
+  <transactionLogDir>
+    <ncId>asterix_nc1</ncId>
+    <txnLogDirPath>target/txnLogDir/asterix_nc1</txnLogDirPath>
+  </transactionLogDir>
+  <transactionLogDir>
+    <ncId>asterix_nc2</ncId>
+    <txnLogDirPath>target/txnLogDir/asterix_nc2</txnLogDirPath>
+  </transactionLogDir>
+  <extensions>
+    <extension>
+      <extensionClassName>org.apache.asterix.bad.lang.BADQueryTranslatorExtension</extensionClassName>
+    </extension>
+    <extension>
+      <extensionClassName>org.apache.asterix.bad.lang.BADLangExtension</extensionClassName>
+    </extension>
+    <extension>
+      <extensionClassName>org.apache.asterix.bad.metadata.BADMetadataExtension</extensionClassName>
+    </extension>
+  </extensions>
+  <property>
+    <name>max.wait.active.cluster</name>
+    <value>60</value>
+    <description>Maximum wait (in seconds) for a cluster to be ACTIVE (all
+      nodes are available)
+      before a submitted query/statement can be
+      executed. (Default = 60 seconds)
+    </description>
+  </property>
+  <property>
+    <name>log.level</name>
+    <value>WARNING</value>
+    <description>Log level for running tests/build</description>
+  </property>
+  <property>
+    <name>compiler.framesize</name>
+    <value>32768</value>
+  </property>
+  <property>
+    <name>compiler.sortmemory</name>
+    <value>327680</value>
+  </property>
+  <property>
+    <name>compiler.groupmemory</name>
+    <value>163840</value>
+  </property>
+  <property>
+    <name>compiler.joinmemory</name>
+    <value>163840</value>
+  </property>
+  <property>
+    <name>compiler.pregelix.home</name>
+    <value>~/pregelix</value>
+  </property>
+  <property>
+    <name>storage.buffercache.pagesize</name>
+    <value>32768</value>
+    <description>The page size in bytes for pages in the buffer cache.
+      (Default = "32768" // 32KB)
+    </description>
+  </property>
+  <property>
+    <name>storage.buffercache.size</name>
+    <value>33554432</value>
+    <description>The size of memory allocated to the disk buffer cache.
+      The value should be a multiple of the buffer cache page size(Default
+      = "33554432" // 32MB)
+    </description>
+  </property>
+  <property>
+    <name>storage.memorycomponent.numpages</name>
+    <value>8</value>
+    <description>The number of pages to allocate for a memory component.
+      (Default = 8)
+    </description>
+  </property>
+  <property>
+    <name>plot.activate</name>
+    <value>false</value>
+    <description>Enabling plot of Algebricks plan to tmp folder. (Default = false)
+    </description>
+  </property>
+</asterixConfiguration>

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/conf/cluster.xml
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/conf/cluster.xml b/asterix-opt/src/test/resources/conf/cluster.xml
new file mode 100644
index 0000000..8f0b694
--- /dev/null
+++ b/asterix-opt/src/test/resources/conf/cluster.xml
@@ -0,0 +1,49 @@
+<!--
+ ! 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.
+ !-->
+<cluster xmlns="cluster">
+  <instance_name>asterix</instance_name>
+  <store>storage</store>
+
+  <data_replication>
+    <enabled>false</enabled>
+    <replication_port>2016</replication_port>
+    <replication_factor>2</replication_factor>
+    <auto_failover>false</auto_failover>
+    <replication_time_out>30</replication_time_out>
+  </data_replication>
+
+  <master_node>
+    <id>master</id>
+    <client_ip>127.0.0.1</client_ip>
+    <cluster_ip>127.0.0.1</cluster_ip>
+    <client_port>1098</client_port>
+    <cluster_port>1099</cluster_port>
+    <http_port>8888</http_port>
+  </master_node>
+  <node>
+    <id>nc1</id>
+    <cluster_ip>127.0.0.1</cluster_ip>
+    <replication_port>2016</replication_port>
+  </node>
+  <node>
+    <id>nc2</id>
+    <cluster_ip>127.0.0.1</cluster_ip>
+    <replication_port>2017</replication_port>
+  </node>
+</cluster>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/conf/hyracks-deployment.properties
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/conf/hyracks-deployment.properties b/asterix-opt/src/test/resources/conf/hyracks-deployment.properties
new file mode 100644
index 0000000..17a6772
--- /dev/null
+++ b/asterix-opt/src/test/resources/conf/hyracks-deployment.properties
@@ -0,0 +1,21 @@
+#/*
+# 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.
+cc.bootstrap.class=org.apache.asterix.hyracks.bootstrap.CCBootstrapImpl
+nc.bootstrap.class=org.apache.asterix.hyracks.bootstrap.NCBootstrapImpl
+cc.ip=127.0.0.1
+cc.port=1098

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/conf/test.properties
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/conf/test.properties b/asterix-opt/src/test/resources/conf/test.properties
new file mode 100644
index 0000000..86269c8
--- /dev/null
+++ b/asterix-opt/src/test/resources/conf/test.properties
@@ -0,0 +1,22 @@
+#/*
+# 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.
+MetadataNode=nc1
+NewUniverse=true
+nc1.stores=nc1data
+nc2.stores=nc2data
+OutputDir=/tmp/asterix_output/

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-create.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-create.aql b/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-create.aql
new file mode 100644
index 0000000..4dc9291
--- /dev/null
+++ b/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-create.aql
@@ -0,0 +1,36 @@
+/*
+ * Description  : Check the Plan used by a channel
+ * Expected Res : Success
+ * Date         : Mar 2015
+ */
+
+drop dataverse channels if exists;
+create dataverse channels;
+use dataverse channels;
+
+
+create type TweetMessageTypeuuid as closed {
+  tweetid: uuid,
+  sender-location: point,
+  send-time: datetime,
+  referred-topics: {{ string }},
+  message-text: string,
+  countA: int32,
+  countB: int32
+}
+
+
+create dataset TweetMessageuuids(TweetMessageTypeuuid)
+primary key tweetid autogenerated;
+
+create function NearbyTweetsContainingText($location, $text) {
+  for $tweet in dataset TweetMessageuuids
+  let $circle := create-circle($location,30.0)
+  where contains($tweet.message-text,$text)
+  and spatial-intersect($tweet.sender-location, $location)
+  return $tweet.message-text 
+};
+
+write output to nc1:"rttest/channel-create.adm";
+
+create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql b/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql
new file mode 100644
index 0000000..682bd6d
--- /dev/null
+++ b/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql
@@ -0,0 +1,40 @@
+/*
+ * Description  : Check the Plan for Subscribing to a channel    
+ * Expected Res : Success
+ * Date         : Mar 2015
+ */
+
+drop dataverse channels if exists;
+create dataverse channels;
+use dataverse channels;
+
+
+create type TweetMessageTypeuuid as closed {
+  tweetid: uuid,
+  sender-location: point,
+  send-time: datetime,
+  referred-topics: {{ string }},
+  message-text: string,
+  countA: int32,
+  countB: int32
+}
+
+
+create dataset TweetMessageuuids(TweetMessageTypeuuid)
+primary key tweetid autogenerated;
+
+create function NearbyTweetsContainingText($location, $text) {
+  for $tweet in dataset TweetMessageuuids
+  let $circle := create-circle($location,30.0)
+  where contains($tweet.message-text,$text)
+  and spatial-intersect($tweet.sender-location, $location)
+  return $tweet.message-text 
+};
+
+create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
+
+write output to nc1:"rttest/channel-subscribe.adm";
+
+create broker brokerA at "http://www.hello.com";
+
+subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live") on brokerA;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql b/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql
new file mode 100644
index 0000000..7cdec50
--- /dev/null
+++ b/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql
@@ -0,0 +1,38 @@
+/*
+ * Description  : Check the Plan for Unsubscribing to a channel
+ * Expected Res : Success
+ * Date         : Mar 2015
+ */
+
+drop dataverse channels if exists;
+create dataverse channels;
+use dataverse channels;
+
+
+create type TweetMessageTypeuuid as closed {
+  tweetid: uuid,
+  sender-location: point,
+  send-time: datetime,
+  referred-topics: {{ string }},
+  message-text: string,
+  countA: int32,
+  countB: int32
+}
+
+
+create dataset TweetMessageuuids(TweetMessageTypeuuid)
+primary key tweetid autogenerated;
+
+create function NearbyTweetsContainingText($location, $text) {
+  for $tweet in dataset TweetMessageuuids
+  let $circle := create-circle($location,30.0)
+  where contains($tweet.message-text,$text)
+  and spatial-intersect($tweet.sender-location, $location)
+  return $tweet.message-text 
+};
+
+create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
+
+write output to nc1:"rttest/channel-unsubscribe.adm";
+
+unsubscribe "c45ef6d0-c5ae-4b9e-b5da-cf1932718296" from nearbyTweetChannel;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/optimizerts/results/channel/channel-create.plan
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/optimizerts/results/channel/channel-create.plan b/asterix-opt/src/test/resources/optimizerts/results/channel/channel-create.plan
new file mode 100644
index 0000000..f597191
--- /dev/null
+++ b/asterix-opt/src/test/resources/optimizerts/results/channel/channel-create.plan
@@ -0,0 +1,30 @@
+-- COMMIT  |PARTITIONED|
+  -- STREAM_PROJECT  |PARTITIONED|
+    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+      -- INSERT_DELETE  |PARTITIONED|
+        -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
+          -- ASSIGN  |PARTITIONED|
+            -- STREAM_PROJECT  |PARTITIONED|
+              -- ASSIGN  |PARTITIONED|
+                -- STREAM_PROJECT  |PARTITIONED|
+                  -- ASSIGN  |PARTITIONED|
+                    -- STREAM_PROJECT  |PARTITIONED|
+                      -- ASSIGN  |PARTITIONED|
+                        -- STREAM_PROJECT  |PARTITIONED|
+                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                            -- NESTED_LOOP  |PARTITIONED|
+                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                -- STREAM_PROJECT  |PARTITIONED|
+                                  -- ASSIGN  |PARTITIONED|
+                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                      -- DATASOURCE_SCAN  |PARTITIONED|
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
+                              -- BROADCAST_EXCHANGE  |PARTITIONED|
+                                -- STREAM_PROJECT  |PARTITIONED|
+                                  -- ASSIGN  |PARTITIONED|
+                                    -- STREAM_PROJECT  |PARTITIONED|
+                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                        -- DATASOURCE_SCAN  |PARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/optimizerts/results/channel/channel-subscribe.plan b/asterix-opt/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
new file mode 100644
index 0000000..4530923
--- /dev/null
+++ b/asterix-opt/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
@@ -0,0 +1,44 @@
+-- COMMIT  |PARTITIONED|
+  -- STREAM_PROJECT  |PARTITIONED|
+    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+      -- INSERT_DELETE  |PARTITIONED|
+        -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
+          -- ASSIGN  |PARTITIONED|
+            -- STREAM_PROJECT  |PARTITIONED|
+              -- ASSIGN  |PARTITIONED|
+                -- STREAM_PROJECT  |PARTITIONED|
+                  -- ASSIGN  |PARTITIONED|
+                    -- STREAM_PROJECT  |PARTITIONED|
+                      -- ASSIGN  |PARTITIONED|
+                        -- STREAM_PROJECT  |PARTITIONED|
+                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                            -- NESTED_LOOP  |PARTITIONED|
+                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                -- STREAM_PROJECT  |PARTITIONED|
+                                  -- ASSIGN  |PARTITIONED|
+                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                      -- DATASOURCE_SCAN  |PARTITIONED|
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
+                              -- BROADCAST_EXCHANGE  |PARTITIONED|
+                                -- STREAM_PROJECT  |PARTITIONED|
+                                  -- ASSIGN  |PARTITIONED|
+                                    -- STREAM_PROJECT  |PARTITIONED|
+                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                        -- DATASOURCE_SCAN  |PARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
+-- DISTRIBUTE_RESULT  |PARTITIONED|
+  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+    -- COMMIT  |PARTITIONED|
+      -- STREAM_PROJECT  |PARTITIONED|
+        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+          -- INSERT_DELETE  |PARTITIONED|
+            -- HASH_PARTITION_EXCHANGE [$$8]  |PARTITIONED|
+              -- ASSIGN  |UNPARTITIONED|
+                -- STREAM_PROJECT  |UNPARTITIONED|
+                  -- ASSIGN  |UNPARTITIONED|
+                    -- STREAM_PROJECT  |UNPARTITIONED|
+                      -- ASSIGN  |UNPARTITIONED|
+                        -- ASSIGN  |UNPARTITIONED|
+                          -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan b/asterix-opt/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
new file mode 100644
index 0000000..a9e383a
--- /dev/null
+++ b/asterix-opt/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
@@ -0,0 +1,44 @@
+-- COMMIT  |PARTITIONED|
+  -- STREAM_PROJECT  |PARTITIONED|
+    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+      -- INSERT_DELETE  |PARTITIONED|
+        -- HASH_PARTITION_EXCHANGE [$$22]  |PARTITIONED|
+          -- ASSIGN  |PARTITIONED|
+            -- STREAM_PROJECT  |PARTITIONED|
+              -- ASSIGN  |PARTITIONED|
+                -- STREAM_PROJECT  |PARTITIONED|
+                  -- ASSIGN  |PARTITIONED|
+                    -- STREAM_PROJECT  |PARTITIONED|
+                      -- ASSIGN  |PARTITIONED|
+                        -- STREAM_PROJECT  |PARTITIONED|
+                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                            -- NESTED_LOOP  |PARTITIONED|
+                              -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                -- STREAM_PROJECT  |PARTITIONED|
+                                  -- ASSIGN  |PARTITIONED|
+                                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                      -- DATASOURCE_SCAN  |PARTITIONED|
+                                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
+                              -- BROADCAST_EXCHANGE  |PARTITIONED|
+                                -- STREAM_PROJECT  |PARTITIONED|
+                                  -- ASSIGN  |PARTITIONED|
+                                    -- STREAM_PROJECT  |PARTITIONED|
+                                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                        -- DATASOURCE_SCAN  |PARTITIONED|
+                                          -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                                            -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
+-- COMMIT  |PARTITIONED|
+  -- STREAM_PROJECT  |PARTITIONED|
+    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+      -- INSERT_DELETE  |PARTITIONED|
+        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+          -- MATERIALIZE  |PARTITIONED|
+            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+              -- ASSIGN  |PARTITIONED|
+                -- STREAM_PROJECT  |PARTITIONED|
+                  -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                    -- BTREE_SEARCH  |PARTITIONED|
+                      -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                        -- ASSIGN  |PARTITIONED|
+                          -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
new file mode 100644
index 0000000..41b036a
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql
@@ -0,0 +1,34 @@
+/*
+* Description  : Create Channel Test. Confirms that the subscription and result datasets are created
+* Expected Res : Success
+* Date         : March 2015
+* Author       : Steven Jacobs
+*/
+
+drop dataverse channels if exists;
+create dataverse channels;
+use dataverse channels;
+
+create type TweetMessageTypeuuid as closed {
+  tweetid: uuid,
+  sender-location: point,
+  send-time: datetime,
+  referred-topics: {{ string }},
+  message-text: string,
+  countA: int32,
+  countB: int32
+}
+
+
+create dataset TweetMessageuuids(TweetMessageTypeuuid)
+primary key tweetid autogenerated;
+
+create function NearbyTweetsContainingText($location, $text) {
+  for $tweet in dataset TweetMessageuuids
+  let $circle := create-circle($location,30.0)
+  where contains($tweet.message-text,$text)
+  and spatial-intersect($tweet.sender-location, $location)
+  return $tweet.message-text
+};
+
+create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.2.update.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.2.update.aql
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
new file mode 100644
index 0000000..eb341e9
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql
@@ -0,0 +1,7 @@
+use dataverse channels;
+
+for $result in dataset Metadata.Channel where $result.ChannelName = "nearbyTweetChannel"
+for $x in dataset Metadata.Dataset
+where $x.DatasetName = $result.SubscriptionsDatasetName
+or $x.DatasetName = $result.ResultsDatasetName
+return $x;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
new file mode 100644
index 0000000..7bace03
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql
@@ -0,0 +1,34 @@
+/*
+* Description  : Create Channel Test
+* Expected Res : Success
+* Date         : March 2015
+* Author       : Steven Jacobs
+*/
+
+drop dataverse channels if exists;
+create dataverse channels;
+use dataverse channels;
+
+create type TweetMessageTypeuuid as closed {
+  tweetid: uuid,
+  sender-location: point,
+  send-time: datetime,
+  referred-topics: {{ string }},
+  message-text: string,
+  countA: int32,
+  countB: int32
+}
+
+
+create dataset TweetMessageuuids(TweetMessageTypeuuid)
+primary key tweetid autogenerated;
+
+create function NearbyTweetsContainingText($location, $text) {
+  for $tweet in dataset TweetMessageuuids
+  let $circle := create-circle($location,30.0)
+  where contains($tweet.message-text,$text)
+  and spatial-intersect($tweet.sender-location, $location)
+  return $tweet.message-text
+};
+
+create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.2.update.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.2.update.aql
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
new file mode 100644
index 0000000..9a1e170
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql
@@ -0,0 +1,3 @@
+use dataverse channels;
+
+for $result in dataset Metadata.Channel return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
new file mode 100644
index 0000000..afc7d5e
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql
@@ -0,0 +1,38 @@
+/*
+* Description  : Drop Channel Test. Check Metadata
+* Expected Res : Success
+* Date         : March 2015
+* Author       : Steven Jacobs
+*/
+
+drop dataverse channels if exists;
+create dataverse channels;
+use dataverse channels;
+
+create type TweetMessageTypeuuid as closed {
+  tweetid: uuid,
+  sender-location: point,
+  send-time: datetime,
+  referred-topics: {{ string }},
+  message-text: string,
+  countA: int32,
+  countB: int32
+}
+
+
+create dataset TweetMessageuuids(TweetMessageTypeuuid)
+primary key tweetid autogenerated;
+
+create function NearbyTweetsContainingText($location, $text) {
+  for $tweet in dataset TweetMessageuuids
+  let $circle := create-circle($location,30.0)
+  where contains($tweet.message-text,$text)
+  and spatial-intersect($tweet.sender-location, $location)
+  return $tweet.message-text
+};
+
+create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
+
+create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
+
+create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql
new file mode 100644
index 0000000..f466b9c
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql
@@ -0,0 +1,3 @@
+use dataverse channels;
+
+drop channel nearbyTweetChannel2;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
new file mode 100644
index 0000000..e762a27
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql
@@ -0,0 +1,7 @@
+use dataverse channels;
+
+for $result in dataset Metadata.Channel
+for $x in dataset Metadata.Dataset
+where $x.DatasetName = $result.SubscriptionsDatasetName
+or $x.DatasetName = $result.ResultsDatasetName
+return $x;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
new file mode 100644
index 0000000..afc7d5e
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql
@@ -0,0 +1,38 @@
+/*
+* Description  : Drop Channel Test. Check Metadata
+* Expected Res : Success
+* Date         : March 2015
+* Author       : Steven Jacobs
+*/
+
+drop dataverse channels if exists;
+create dataverse channels;
+use dataverse channels;
+
+create type TweetMessageTypeuuid as closed {
+  tweetid: uuid,
+  sender-location: point,
+  send-time: datetime,
+  referred-topics: {{ string }},
+  message-text: string,
+  countA: int32,
+  countB: int32
+}
+
+
+create dataset TweetMessageuuids(TweetMessageTypeuuid)
+primary key tweetid autogenerated;
+
+create function NearbyTweetsContainingText($location, $text) {
+  for $tweet in dataset TweetMessageuuids
+  let $circle := create-circle($location,30.0)
+  where contains($tweet.message-text,$text)
+  and spatial-intersect($tweet.sender-location, $location)
+  return $tweet.message-text
+};
+
+create repetitive channel nearbyTweetChannel1 using NearbyTweetsContainingText@2 period duration("PT10M");
+
+create repetitive channel nearbyTweetChannel2 using NearbyTweetsContainingText@2 period duration("PT10M");
+
+create repetitive channel nearbyTweetChannel3 using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql
new file mode 100644
index 0000000..f466b9c
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql
@@ -0,0 +1,3 @@
+use dataverse channels;
+
+drop channel nearbyTweetChannel2;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
new file mode 100644
index 0000000..9a1e170
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql
@@ -0,0 +1,3 @@
+use dataverse channels;
+
+for $result in dataset Metadata.Channel return $result;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
new file mode 100644
index 0000000..41b036a
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql
@@ -0,0 +1,34 @@
+/*
+* Description  : Create Channel Test. Confirms that the subscription and result datasets are created
+* Expected Res : Success
+* Date         : March 2015
+* Author       : Steven Jacobs
+*/
+
+drop dataverse channels if exists;
+create dataverse channels;
+use dataverse channels;
+
+create type TweetMessageTypeuuid as closed {
+  tweetid: uuid,
+  sender-location: point,
+  send-time: datetime,
+  referred-topics: {{ string }},
+  message-text: string,
+  countA: int32,
+  countB: int32
+}
+
+
+create dataset TweetMessageuuids(TweetMessageTypeuuid)
+primary key tweetid autogenerated;
+
+create function NearbyTweetsContainingText($location, $text) {
+  for $tweet in dataset TweetMessageuuids
+  let $circle := create-circle($location,30.0)
+  where contains($tweet.message-text,$text)
+  and spatial-intersect($tweet.sender-location, $location)
+  return $tweet.message-text
+};
+
+create repetitive channel nearbyTweetChannel using NearbyTweetsContainingText@2 period duration("PT10M");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
new file mode 100644
index 0000000..6d35506
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql
@@ -0,0 +1,7 @@
+use dataverse channels;
+
+subscribe to nearbyTweetChannel (point("30.0, 30.0"), "Live");
+
+subscribe to nearbyTweetChannel (point("20.0, 20.0"), "Long");
+
+subscribe to nearbyTweetChannel (point("10.0, 10.0"), "Prosper");
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql b/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql
new file mode 100644
index 0000000..0d2c46e
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql
@@ -0,0 +1,4 @@
+use dataverse channels;
+
+for $test in dataset nearbyTweetChannelSubscriptions
+return $test.param1;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm b/asterix-opt/src/test/resources/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm
new file mode 100644
index 0000000..baa5299
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/results/channels/create_channel_check_datasets/create_channel_check_datasets.1.adm
@@ -0,0 +1,3 @@
+[ { "DataverseName": "channels", "DatasetName": "nearbyTweetChannelResults", "DataTypeName": "nearbyTweetChannelResultsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "rid" ], "PrimaryKey": [ "rid" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Tue Mar 10 15:20:05 PDT 2015", "DatasetId": 106i32, "PendingOp": 0i32 }
+, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannelSubscriptions", "DataTypeName": "nearbyTweetChannelSubscriptionsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "subscription-id" ], "PrimaryKey": [ "subscription-id" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Tue Mar 10 15:20:05 PDT 2015", "DatasetId": 105i32, "PendingOp": 0i32 }
+ ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm b/asterix-opt/src/test/resources/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm
new file mode 100644
index 0000000..66a52f3
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/results/channels/create_channel_check_metadata/create_channel_check_metadata.1.adm
@@ -0,0 +1,2 @@
+[ { "DataverseName": "channels", "ChannelName": "nearbyTweetChannel", "SubscriptionsDatasetName": "nearbyTweetChannelSubscriptions", "ResultsDatasetName": "nearbyTweetChannelResults", "Function": "channels.NearbyTweetsContainingText@2", "Duration": "PT10M" }
+ ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm b/asterix-opt/src/test/resources/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm
new file mode 100644
index 0000000..7b6fdf4
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/results/channels/drop_channel_check_datasets/drop_channel_check_datasets.1.adm
@@ -0,0 +1,5 @@
+[ { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel1Results", "DataTypeName": "nearbyTweetChannel1ResultsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "rid" ], "PrimaryKey": [ "rid" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 116i32, "PendingOp": 0i32 }
+, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel1Subscriptions", "DataTypeName": "nearbyTweetChannel1SubscriptionsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "subscription-id" ], "PrimaryKey": [ "subscription-id" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 115i32, "PendingOp": 0i32 }
+, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel3Results", "DataTypeName": "nearbyTweetChannel3ResultsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "rid" ], "PrimaryKey": [ "rid" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 120i32, "PendingOp": 0i32 }
+, { "DataverseName": "channels", "DatasetName": "nearbyTweetChannel3Subscriptions", "DataTypeName": "nearbyTweetChannel3SubscriptionsType", "DatasetType": "INTERNAL", "InternalDetails": { "FileStructure": "BTREE", "PartitioningStrategy": "HASH", "PartitioningKey": [ "subscription-id" ], "PrimaryKey": [ "subscription-id" ], "GroupName": "DEFAULT_NG_ALL_NODES", "Autogenerated": true, "CompactionPolicy": "prefix", "CompactionPolicyProperties": [ { "Name": "max-mergable-component-size", "Value": "1073741824" }, { "Name": "max-tolerance-component-count", "Value": "5" } ] }, "ExternalDetails": null, "Hints": {{  }}, "Timestamp": "Wed Mar 11 10:11:53 PDT 2015", "DatasetId": 119i32, "PendingOp": 0i32 }
+ ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm b/asterix-opt/src/test/resources/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm
new file mode 100644
index 0000000..de2948a
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/results/channels/drop_channel_check_metadata/drop_channel_check_metadata.1.adm
@@ -0,0 +1,3 @@
+[ { "DataverseName": "channels", "ChannelName": "nearbyTweetChannel1", "SubscriptionsDatasetName": "nearbyTweetChannel1Subscriptions", "ResultsDatasetName": "nearbyTweetChannel1Results", "Function": "channels.NearbyTweetsContainingText@2", "Duration": "PT10M" }
+, { "DataverseName": "channels", "ChannelName": "nearbyTweetChannel3", "SubscriptionsDatasetName": "nearbyTweetChannel3Subscriptions", "ResultsDatasetName": "nearbyTweetChannel3Results", "Function": "channels.NearbyTweetsContainingText@2", "Duration": "PT10M" }
+ ]
\ No newline at end of file


[02/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/maven-shared-archive-resources/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/target/maven-shared-archive-resources/META-INF/LICENSE b/target/maven-shared-archive-resources/META-INF/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/target/maven-shared-archive-resources/META-INF/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   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.

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/maven-shared-archive-resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/target/maven-shared-archive-resources/META-INF/NOTICE b/target/maven-shared-archive-resources/META-INF/NOTICE
deleted file mode 100644
index 6d778da..0000000
--- a/target/maven-shared-archive-resources/META-INF/NOTICE
+++ /dev/null
@@ -1,8 +0,0 @@
-
-asterix-opt
-Copyright 2016 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
----------------------------------------------------------------------
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
deleted file mode 100644
index ff4596d..0000000
--- a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
+++ /dev/null
@@ -1,49 +0,0 @@
-org/apache/asterix/bad/lang/BADQueryTranslatorFactory.class
-org/apache/asterix/bad/metadata/Broker.class
-org/apache/asterix/bad/BADConstants$ChannelJobType.class
-org/apache/asterix/bad/lang/BADAQLParser.class
-org/apache/asterix/bad/lang/BADAQLParser$FunctionName.class
-org/apache/asterix/bad/runtime/NotifyBrokerPOperator.class
-org/apache/asterix/bad/lang/BADLangExtension.class
-org/apache/asterix/bad/lang/statement/BrokerDropStatement.class
-org/apache/asterix/bad/metadata/ChannelSearchKey.class
-org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.class
-org/apache/asterix/bad/lang/BADAQLParser$LookaheadSuccess.class
-org/apache/asterix/bad/lang/BADQueryTranslatorExtension$LazyHolder.class
-org/apache/asterix/bad/lang/TokenMgrError.class
-org/apache/asterix/bad/lang/BADAQLParserConstants.class
-org/apache/asterix/bad/metadata/ChannelEventsListener$1.class
-org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.class
-org/apache/asterix/bad/metadata/BADMetadataExtension.class
-org/apache/asterix/bad/metadata/BADMetadataIndexes.class
-org/apache/asterix/bad/runtime/NotifyBrokerOperator.class
-org/apache/asterix/bad/lang/BADAQLParserTokenManager.class
-org/apache/asterix/bad/lang/BADAQLParser$1.class
-org/apache/asterix/bad/lang/statement/ChannelDropStatement.class
-org/apache/asterix/bad/lang/statement/CreateChannelStatement.class
-org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable$1.class
-org/apache/asterix/bad/lang/BADAQLParser$IndexParams.class
-org/apache/asterix/bad/metadata/BADMetadataRecordTypes.class
-org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.class
-org/apache/asterix/bad/lang/BADQueryTranslatorExtension.class
-org/apache/asterix/bad/metadata/BrokerSearchKey.class
-org/apache/asterix/bad/lang/JavaCharStream.class
-org/apache/asterix/bad/BADConstants.class
-org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.class
-org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.class
-org/apache/asterix/bad/lang/Token.class
-org/apache/asterix/bad/ChannelJobInfo.class
-org/apache/asterix/bad/runtime/NotifyBrokerRuntime.class
-org/apache/asterix/bad/lang/BADStatementExecutor.class
-org/apache/asterix/bad/metadata/ChannelTupleTranslator.class
-org/apache/asterix/bad/metadata/Channel.class
-org/apache/asterix/bad/lang/BADCompilationProvider.class
-org/apache/asterix/bad/lang/BADLangExtension$1.class
-org/apache/asterix/bad/lang/statement/CreateBrokerStatement.class
-org/apache/asterix/bad/lang/BADAQLParser$JJCalls.class
-org/apache/asterix/bad/metadata/ChannelEventsListener.class
-org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.class
-org/apache/asterix/bad/lang/BADParserFactory.class
-org/apache/asterix/bad/ChannelJobService.class
-org/apache/asterix/bad/lang/ParseException.class
-org/apache/asterix/bad/metadata/BrokerTupleTranslator.class

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
----------------------------------------------------------------------
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
deleted file mode 100644
index 8b4c282..0000000
--- a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
+++ /dev/null
@@ -1,39 +0,0 @@
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/target/generated-sources/javacc/org/apache/asterix/bad/lang/ParseException.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/BADConstants.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParserConstants.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/target/generated-sources/javacc/org/apache/asterix/bad/lang/JavaCharStream.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/target/generated-sources/javacc/org/apache/asterix/bad/lang/TokenMgrError.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParserTokenManager.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobService.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParser.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/target/generated-sources/javacc/org/apache/asterix/bad/lang/Token.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Channel.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Broker.java

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
----------------------------------------------------------------------
diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
deleted file mode 100644
index 2ce725a..0000000
--- a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
+++ /dev/null
@@ -1,2 +0,0 @@
-org/apache/asterix/bad/test/BADOptimizerTest.class
-org/apache/asterix/bad/test/BADExecutionTest.class

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
----------------------------------------------------------------------
diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
deleted file mode 100644
index 6a5de13..0000000
--- a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
+++ /dev/null
@@ -1,2 +0,0 @@
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java
-/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/rat.txt
----------------------------------------------------------------------
diff --git a/target/rat.txt b/target/rat.txt
deleted file mode 100644
index 2ad4245..0000000
--- a/target/rat.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-
-*****************************************************
-Summary
--------
-Generated at: 2016-09-09T11:53:38-07:00
-Notes: 0
-Binaries: 0
-Archives: 0
-Standards: 35
-
-Apache Licensed: 35
-Generated Documents: 0
-
-JavaDocs are generated and so license header is optional
-Generated files do not required license headers
-
-0 Unknown Licenses
-
-*******************************
-
-Unapproved licenses:
-
-
-*******************************
-
-Archives:
-
-*****************************************************
-  Files with Apache License headers will be marked AL
-  Binary files (which do not require AL headers) will be marked B
-  Compressed archives will be marked A
-  Notices, licenses etc will be marked N
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/BADConstants.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobService.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Broker.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Channel.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java
-  AL    /Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/conf/asterix-build-configuration.xml
- 
-*****************************************************
- Printing headers for files without AL header...
- 
- 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/META-INF/DEPENDENCIES
----------------------------------------------------------------------
diff --git a/target/test-classes/META-INF/DEPENDENCIES b/target/test-classes/META-INF/DEPENDENCIES
deleted file mode 100644
index 3c60591..0000000
--- a/target/test-classes/META-INF/DEPENDENCIES
+++ /dev/null
@@ -1,489 +0,0 @@
-// ------------------------------------------------------------------
-// Transitive dependencies of this project determined from the
-// maven pom organized by organization.
-// ------------------------------------------------------------------
-
-asterix-opt
-
-
-From: 'an unknown organization'
-  - AntLR Parser Generator (http://www.antlr.org/) antlr:antlr:jar:2.7.7
-    License: BSD License  (http://www.antlr.org/license.html)
-  - AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
-    License: Public Domain 
-  - Guava: Google Core Libraries for Java (http://code.google.com/p/guava-libraries/guava) com.google.guava:guava:bundle:18.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JSON.simple (http://code.google.com/p/json-simple/) com.googlecode.json-simple:json-simple:jar:1.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Microsoft Windows Azure Client API (https://github.com/WindowsAzure/azure-sdk-for-java) com.microsoft.windowsazure:microsoft-windowsazure-api:jar:0.4.4
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - rome (http://rometools.github.io/rome/) com.rometools:rome:jar:1.5.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - rome-utils (http://rometools.github.io/rome-utils/) com.rometools:rome-utils:jar:1.5.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - ParaNamer Core (http://paranamer.codehaus.org/paranamer) com.thoughtworks.paranamer:paranamer:jar:2.3
-    License: BSD  (LICENSE.txt)
-  - commons-beanutils  commons-beanutils:commons-beanutils:jar:1.7.0
-
-  - commons-logging-api  commons-logging:commons-logging-api:jar:1.0.4
-
-  - rxjava (https://github.com/ReactiveX/RxJava) io.reactivex:rxjava:jar:1.1.8
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JavaBeans Activation Framework (JAF) (http://java.sun.com/products/javabeans/jaf/index.jsp) javax.activation:activation:jar:1.1
-    License: Common Development and Distribution License (CDDL) v1.0  (https://glassfish.dev.java.net/public/CDDLv1.0.html)
-  - javax.inject (http://code.google.com/p/atinject/) javax.inject:javax.inject:jar:1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JDO2 API  javax.jdo:jdo2-api:jar:2.3-20090302111651
-
-  - servlet-api  javax.servlet:servlet-api:jar:2.5
-
-  - jsp-api  javax.servlet.jsp:jsp-api:jar:2.1
-
-  - Java Transaction API (http://java.sun.com/products/jta) javax.transaction:jta:jar:1.1
-
-  - Streaming API for XML  javax.xml.stream:stax-api:jar:1.0-2
-    License: GNU General Public Library  (http://www.gnu.org/licenses/gpl.txt)    License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0  (http://www.sun.com/cddl/cddl.html)
-  - jdom  jdom:jdom:jar:1.0
-
-  - An open source Java toolkit for Amazon S3 (http://jets3t.s3.amazonaws.com/index.html) net.java.dev.jets3t:jets3t:jar:0.6.1
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-  - ANTLR ST4 4.0.4 (http://www.stringtemplate.org) org.antlr:ST4:jar:4.0.4
-    License: BSD licence  (http://antlr.org/license.html)
-  - Antlr 3.4 Runtime (http://www.antlr.org) org.antlr:antlr-runtime:jar:3.4
-
-  - ANTLR StringTemplate (http://www.stringtemplate.org) org.antlr:stringtemplate:jar:3.2.1
-    License: BSD licence  (http://antlr.org/license.html)
-  - Apache Thrift (http://thrift.apache.org) org.apache.thrift:libfb303:pom:0.9.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Thrift (http://thrift.apache.org) org.apache.thrift:libthrift:pom:0.9.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - zookeeper  org.apache.zookeeper:zookeeper:pom:3.4.5
-
-  - Jettison  org.codehaus.jettison:jettison:bundle:1.1
-
-  - DataNucleus JDO API plugin (http://www.datanucleus.org) org.datanucleus:datanucleus-api-jdo:jar:3.2.6
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - DataNucleus Core (http://www.datanucleus.org) org.datanucleus:datanucleus-core:jar:3.2.10
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - DataNucleus RDBMS (http://www.datanucleus.org) org.datanucleus:datanucleus-rdbms:jar:3.2.9
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hamcrest Core (https://github.com/hamcrest/JavaHamcrest/hamcrest-core) org.hamcrest:hamcrest-core:jar:1.3
-    License: New BSD License  (http://www.opensource.org/licenses/bsd-license.php)
-  - ini4j (http://www.ini4j.org) org.ini4j:ini4j:jar:0.5.4
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JAXB2 Commons - Value Constructor Plugin (http://java.net/projects/jaxb2-commons/pages/value-constructor) org.jvnet.jaxb2_commons:jaxb2-value-constructor:jar:3.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - XZ for Java (http://tukaani.org/xz/java.html) org.tukaani:xz:jar:1.0
-    License: Public Domain 
-  - twitter4j-core (http://twitter4j.org/) org.twitter4j:twitter4j-core:jar:4.0.3
-    License: Apache License 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-  - twitter4j-stream (http://twitter4j.org/) org.twitter4j:twitter4j-stream:jar:4.0.3
-    License: Apache License 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-  - oro  oro:oro:jar:2.0.8
-
-  - rome  rome:rome:jar:1.0.1-modified-01
-
-  - StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Xerces2-j (https://xerces.apache.org/xerces2-j/) xerces:xercesImpl:jar:2.11.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - XML Commons External Components XML APIs (http://xml.apache.org/commons/components/external/) xml-apis:xml-apis:jar:1.4.01
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)    License: The SAX License  (http://www.saxproject.org/copying.html)    License: The W3C License  (http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.zip)
-  - xmlenc Library (http://xmlenc.sourceforge.net) xmlenc:xmlenc:jar:0.52
-    License: The BSD License  (http://www.opensource.org/licenses/bsd-license.php)
-
-From: 'Apache Software Foundation' (http://apache.org)
-  - Wicket Core (http://wicket.apache.org/wicket-core/wicket-core) org.apache.wicket:wicket-core:jar:1.5.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Wicket Request (http://maven.apache.org) org.apache.wicket:wicket-request:jar:1.5.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Wicket Util (http://maven.apache.org) org.apache.wicket:wicket-util:jar:1.5.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Apache Software Foundation' (http://db.apache.org/)
-  - Apache Derby Database Engine and Embedded JDBC Driver (http://db.apache.org/derby/derby/) org.apache.derby:derby:jar:10.10.1.1
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Apache Software Foundation' (http://jakarta.apache.org/)
-  - HttpClient (http://jakarta.apache.org/httpcomponents/httpclient-3.x/) commons-httpclient:commons-httpclient:jar:3.1
-    License: Apache License  (http://www.apache.org/licenses/LICENSE-2.0)
-
-From: 'Apache Software Foundation' (http://www.apache.org)
-  - JDO API (http://db.apache.org/jdo) javax.jdo:jdo-api:jar:3.0.1
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Log4j (http://logging.apache.org/log4j/1.2/) log4j:log4j:bundle:1.2.17
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Annotations  org.apache.hadoop:hadoop-annotations:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Auth  org.apache.hadoop:hadoop-auth:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Client  org.apache.hadoop:hadoop-client:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Common  org.apache.hadoop:hadoop-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Common  org.apache.hadoop:hadoop-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop HDFS  org.apache.hadoop:hadoop-hdfs:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop HDFS  org.apache.hadoop:hadoop-hdfs:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-app  org.apache.hadoop:hadoop-mapreduce-client-app:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-common  org.apache.hadoop:hadoop-mapreduce-client-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-core  org.apache.hadoop:hadoop-mapreduce-client-core:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-hs  org.apache.hadoop:hadoop-mapreduce-client-hs:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-jobclient  org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-jobclient  org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-shuffle  org.apache.hadoop:hadoop-mapreduce-client-shuffle:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Mini-Cluster  org.apache.hadoop:hadoop-minicluster:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-api  org.apache.hadoop:hadoop-yarn-api:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-client  org.apache.hadoop:hadoop-yarn-client:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-common  org.apache.hadoop:hadoop-yarn-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-common  org.apache.hadoop:hadoop-yarn-server-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-nodemanager  org.apache.hadoop:hadoop-yarn-server-nodemanager:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-resourcemanager  org.apache.hadoop:hadoop-yarn-server-resourcemanager:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-tests  org.apache.hadoop:hadoop-yarn-server-tests:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-web-proxy  org.apache.hadoop:hadoop-yarn-server-web-proxy:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Couchbase, Inc.' (http://couchbase.com)
-  - Couchbase JVM Core IO (http://couchbase.com) com.couchbase.client:core-io:jar:1.3.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'e-movimento' (http://www.e-movimento.com)
-  - privileged accessor (http://code.google.com/p/privilegedaccessor/) com.e-movimento.tinytools:privilegedaccessor:jar:1.2.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'FasterXML' (http://fasterxml.com)
-  - Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-core-asl:jar:1.9.12
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JAX-RS provider for JSON content type (http://jackson.codehaus.org) org.codehaus.jackson:jackson-jaxrs:jar:1.9.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)    License: GNU Lesser General Public License (LGPL), Version 2.1  (http://www.fsf.org/licensing/licenses/lgpl.txt)
-  - Data Mapper for Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-mapper-asl:jar:1.9.12
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Xml Compatibility extensions for Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-xc:jar:1.9.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)    License: GNU Lesser General Public License (LGPL), Version 2.1  (http://www.fsf.org/licensing/licenses/lgpl.txt)
-
-From: 'FasterXML' (http://fasterxml.com/)
-  - Jackson-core (http://wiki.fasterxml.com/JacksonHome) com.fasterxml.jackson.core:jackson-core:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'GlassFish Community' (https://glassfish.dev.java.net)
-  - Java Servlet API (http://servlet-spec.java.net) javax.servlet:javax.servlet-api:jar:3.1.0
-    License: CDDL + GPLv2 with classpath exception  (https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html)
-  - javax.servlet API v.3.0 (http://jcp.org/en/jsr/detail?id=315) org.glassfish:javax.servlet:jar:3.1
-    License: CDDL + GPLv2 with classpath exception  (https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html)
-
-From: 'Google' (http://www.google.com/)
-  - Protocol Buffer Java API (http://code.google.com/p/protobuf) com.google.protobuf:protobuf-java:bundle:2.5.0
-    License: New BSD license  (http://www.opensource.org/licenses/bsd-license.php)
-
-From: 'Google, Inc.' (http://www.google.com)
-  - Google Guice - Core Library (http://code.google.com/p/google-guice/guice/) com.google.inject:guice:jar:3.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Google Guice - Extensions - Servlet (http://code.google.com/p/google-guice/extensions-parent/guice-servlet/) com.google.inject.extensions:guice-servlet:jar:3.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'jcraft' (http://www.jcraft.com/jsch)
-  - JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.42
-    License: BSD  (http://www.jcraft.com/jsch/LICENSE.txt)
-
-From: 'JDOM' (http://www.jdom.org)
-  - JDOM (http://www.jdom.org) org.jdom:jdom:jar:2.0.2
-    License: Similar to Apache License but with the acknowledgment clause removed  (https://raw.github.com/hunterhacker/jdom/master/LICENSE.txt)
-
-From: 'JolBox' (http://jolbox.com)
-  - BoneCP :: Core Library (http://jolbox.com/bonecp) com.jolbox:bonecp:bundle:0.8.0.RELEASE
-    License: Apache v2  (http://www.apache.org/licenses/LICENSE-2.0.html)
-
-From: 'JSON' (http://json.org/)
-  - JSON (JavaScript Object Notation) (http://www.json.org/java/index.html) org.json:json:jar:20090211
-    License: provided without support or warranty  (http://www.json.org/license.html)
-
-From: 'JUnit' (http://www.junit.org)
-  - JUnit (http://junit.org) junit:junit:jar:4.11
-    License: Common Public License Version 1.0  (http://www.opensource.org/licenses/cpl1.0.txt)
-
-From: 'Kohsuke Kawaguchi' (http://www.kohsuke.org/)
-  - args4j (http://args4j.kohsuke.org/args4j/) args4j:args4j:bundle:2.33
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-
-From: 'Mort Bay Consulting' (http://www.mortbay.com)
-  - Jetty Server (http://www.eclipse.org/jetty/jetty-parent/project/modules/jetty) org.mortbay.jetty:jetty:jar:6.1.26
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty Utilities (http://www.eclipse.org/jetty/jetty-parent/project/jetty-util) org.mortbay.jetty:jetty-util:jar:6.1.26
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-
-From: 'ObjectWeb' (http://www.objectweb.org/)
-  - ASM Core (http://asm.objectweb.org/asm/) asm:asm:jar:3.1
-
-  - ASM All (http://asm.objectweb.org/asm-all/) org.ow2.asm:asm-all:jar:5.1
-    License: BSD  (http://asm.objectweb.org/license.html)
-
-From: 'Oracle' (http://www.oracle.com)
-  - JavaMail API (compat) (http://kenai.com/projects/javamail/mail) javax.mail:mail:jar:1.4.5
-    License: CDDL  (http://www.sun.com/cddl)    License: GPLv2+CE  (https://glassfish.dev.java.net/public/CDDL+GPL.html)
-
-From: 'Oracle Corporation' (http://www.oracle.com/)
-  - jersey-client (https://jersey.java.net/jersey-client/) com.sun.jersey:jersey-client:jar:1.13
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-core (https://jersey.java.net/jersey-core/) com.sun.jersey:jersey-core:bundle:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-grizzly2 (https://jersey.java.net/jersey-grizzly2/) com.sun.jersey:jersey-grizzly2:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-json (https://jersey.java.net/jersey-json/) com.sun.jersey:jersey-json:jar:1.13
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-server (https://jersey.java.net/jersey-server/) com.sun.jersey:jersey-server:bundle:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-guice (https://jersey.java.net/jersey-contribs/jersey-guice/) com.sun.jersey.contribs:jersey-guice:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - Jersey Test Framework - Core (https://jersey.java.net/jersey-test-framework/jersey-test-framework-core/) com.sun.jersey.jersey-test-framework:jersey-test-framework-core:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - Jersey Test Framework - Grizzly 2 Module (https://jersey.java.net/jersey-test-framework/jersey-test-framework-grizzly2/) com.sun.jersey.jersey-test-framework:jersey-test-framework-grizzly2:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - JAXB RI (http://jaxb.java.net/) com.sun.xml.bind:jaxb-impl:jar:2.2.3-1
-    License: CDDL 1.1  (https://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - JAXB API bundle for GlassFish V3 (https://jaxb.dev.java.net/) javax.xml.bind:jaxb-api:jar:2.2.2
-    License: CDDL 1.1  (https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html)
-
-From: 'Oracle Corpration' (http://www.oracle.com)
-  - grizzly-framework (http://grizzly.java.net/grizzly-framework) org.glassfish.grizzly:grizzly-framework:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-http (http://grizzly.java.net/grizzly-http) org.glassfish.grizzly:grizzly-http:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-http-server (http://grizzly.java.net/grizzly-http-server) org.glassfish.grizzly:grizzly-http-server:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-http-servlet (http://grizzly.java.net/grizzly-http-servlet) org.glassfish.grizzly:grizzly-http-servlet:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-rcm (http://grizzly.java.net/grizzly-rcm) org.glassfish.grizzly:grizzly-rcm:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-
-From: 'QOS.ch' (http://www.qos.ch)
-  - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.7.7
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-  - SLF4J JCL Binding (http://www.slf4j.org) org.slf4j:slf4j-jcl:jar:1.6.3
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-  - SLF4J LOG4J-12 Binding (http://www.slf4j.org) org.slf4j:slf4j-log4j12:jar:1.7.5
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-
-From: 'ROME Project' (http://rome.dev.java.net)
-  - Rome HTTP Fetcher  net.java.dev.rome:rome-fetcher:jar:1.0.0
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Sun Microsystems' (http://www.sun.com)
-  - management-api (http://kenai.com/hg/gmbal~gf_common) org.glassfish.external:management-api:jar:3.0.0-b012
-    License: CDDL+GPL  (https://glassfish.dev.java.net/public/CDDL+GPL.html)
-  - gmbal-api-only (http://kenai.com/hg/gmbal~master) org.glassfish.gmbal:gmbal-api-only:jar:3.0.0-b023
-    License: CDDL+GPL  (https://glassfish.dev.java.net/public/CDDL+GPL.html)
-
-From: 'The Apache Software Foundation' (http://commons.apache.org/)
-  - Commons Configuration (http://commons.apache.org/${pom.artifactId.substring(8)}/) commons-configuration:commons-configuration:jar:1.6
-    License: The Apache Software License, Version 2.0  (/LICENSE.txt)
-
-From: 'The Apache Software Foundation' (http://jakarta.apache.org)
-  - Digester (http://jakarta.apache.org/commons/digester/) commons-digester:commons-digester:jar:1.8
-    License: The Apache Software License, Version 2.0  (/LICENSE.txt)
-  - EL (http://jakarta.apache.org/commons/el/) commons-el:commons-el:jar:1.0
-    License: The Apache Software License, Version 2.0  (/LICENSE.txt)
-
-From: 'The Apache Software Foundation' (http://www.apache.org/)
-  - Commons BeanUtils Core (http://commons.apache.org/beanutils/) commons-beanutils:commons-beanutils-core:jar:1.8.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons CLI (http://commons.apache.org/cli/) commons-cli:commons-cli:jar:1.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Commons Codec (http://commons.apache.org/proper/commons-codec/) commons-codec:commons-codec:jar:1.9
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Collections (http://commons.apache.org/collections/) commons-collections:commons-collections:jar:3.2.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Daemon (http://commons.apache.org/daemon/) commons-daemon:commons-daemon:jar:1.0.13
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:2.4
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.5
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Commons Logging (http://commons.apache.org/proper/commons-logging/) commons-logging:commons-logging:jar:1.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Net (http://commons.apache.org/net/) commons-net:commons-net:jar:3.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Ant Core (http://ant.apache.org/) org.apache.ant:ant:jar:1.9.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Ant Launcher (http://ant.apache.org/) org.apache.ant:ant-launcher:jar:1.9.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-active (http://www.apache.org/apache-asterixdb/asterix-active/) org.apache.asterix:asterix-active:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-algebra (http://www.apache.org/apache-asterixdb/asterix-algebra/) org.apache.asterix:asterix-algebra:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-app (http://www.apache.org/apache-asterixdb/asterix-app/) org.apache.asterix:asterix-app:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-common (http://www.apache.org/apache-asterixdb/asterix-common/) org.apache.asterix:asterix-common:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-events (http://www.apache.org/apache-asterixdb/asterix-events/) org.apache.asterix:asterix-events:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-external-data (http://www.apache.org/apache-asterixdb/asterix-external-data/) org.apache.asterix:asterix-external-data:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-fuzzyjoin (http://www.apache.org/apache-asterixdb/asterix-fuzzyjoin/) org.apache.asterix:asterix-fuzzyjoin:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-lang-aql (http://www.apache.org/apache-asterixdb/asterix-lang-aql/) org.apache.asterix:asterix-lang-aql:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-lang-common (http://www.apache.org/apache-asterixdb/asterix-lang-common/) org.apache.asterix:asterix-lang-common:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-lang-sqlpp (http://www.apache.org/apache-asterixdb/asterix-lang-sqlpp/) org.apache.asterix:asterix-lang-sqlpp:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-metadata (http://www.apache.org/apache-asterixdb/asterix-metadata/) org.apache.asterix:asterix-metadata:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-om (http://www.apache.org/apache-asterixdb/asterix-om/) org.apache.asterix:asterix-om:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-replication (http://www.apache.org/apache-asterixdb/asterix-replication/) org.apache.asterix:asterix-replication:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-runtime (http://www.apache.org/apache-asterixdb/asterix-runtime/) org.apache.asterix:asterix-runtime:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-test-framework (http://www.apache.org/apache-asterixdb/asterix-test-framework/) org.apache.asterix:asterix-test-framework:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-transactions (http://www.apache.org/apache-asterixdb/asterix-transactions/) org.apache.asterix:asterix-transactions:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Avro (http://avro.apache.org) org.apache.avro:avro:jar:1.7.4
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Compress (http://commons.apache.org/compress/) org.apache.commons:commons-compress:jar:1.4.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Lang (http://commons.apache.org/lang/) org.apache.commons:commons-lang3:jar:3.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Math (http://commons.apache.org/math/) org.apache.commons:commons-math:jar:2.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Ant Utilities (http://hive.apache.org/hive-ant) org.apache.hive:hive-ant:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Common (http://hive.apache.org/hive-common) org.apache.hive:hive-common:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Query Language (http://hive.apache.org/hive-exec) org.apache.hive:hive-exec:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Metastore (http://hive.apache.org/hive-metastore) org.apache.hive:hive-metastore:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Serde (http://hive.apache.org/hive-serde) org.apache.hive:hive-serde:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims (http://hive.apache.org/hive-shims) org.apache.hive:hive-shims:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims 0.20 (http://hive.apache.org/hive-shims-0.20) org.apache.hive.shims:hive-shims-0.20:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims 0.20S (http://hive.apache.org/hive-shims-0.20S) org.apache.hive.shims:hive-shims-0.20S:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims 0.23 (http://hive.apache.org/hive-shims-0.23) org.apache.hive.shims:hive-shims-0.23:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims Common (http://hive.apache.org/hive-shims-common) org.apache.hive.shims:hive-shims-common:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims Secure Common (http://hive.apache.org/hive-shims-common-secure) org.apache.hive.shims:hive-shims-common-secure:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache HttpClient (http://hc.apache.org/httpcomponents-client) org.apache.httpcomponents:httpclient:jar:4.5.2
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache HttpCore (http://hc.apache.org/httpcomponents-core-ga) org.apache.httpcomponents:httpcore:jar:4.4.4
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-common (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-common/) org.apache.hyracks:algebricks-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-compiler (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-compiler/) org.apache.hyracks:algebricks-compiler:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-core (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-core/) org.apache.hyracks:algebricks-core:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-data (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-data/) org.apache.hyracks:algebricks-data:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-rewriter (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-rewriter/) org.apache.hyracks:algebricks-rewriter:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-runtime (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-runtime/) org.apache.hyracks:algebricks-runtime:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-api (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-api/) org.apache.hyracks:hyracks-api:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-client (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-client/) org.apache.hyracks:hyracks-client:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-comm (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-comm/) org.apache.hyracks:hyracks-comm:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-control-cc (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-control/hyracks-control-cc/) org.apache.hyracks:hyracks-control-cc:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-control-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-control/hyracks-control-common/) org.apache.hyracks:hyracks-control-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-control-nc (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-control/hyracks-control-nc/) org.apache.hyracks:hyracks-control-nc:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-data-std (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-data/hyracks-data-std/) org.apache.hyracks:hyracks-data-std:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-dataflow-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-dataflow-common/) org.apache.hyracks:hyracks-dataflow-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-dataflow-std (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-dataflow-std/) org.apache.hyracks:hyracks-dataflow-std:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-hdfs-2.x (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-hdfs/hyracks-hdfs-2.x/) org.apache.hyracks:hyracks-hdfs-2.x:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-hdfs-core (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-hdfs/hyracks-hdfs-core/) org.apache.hyracks:hyracks-hdfs-core:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-ipc (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-ipc/) org.apache.hyracks:hyracks-ipc:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-net (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-net/) org.apache.hyracks:hyracks-net:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-bloomfilter (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-bloomfilter/) org.apache.hyracks:hyracks-storage-am-bloomfilter:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-btree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-btree/) org.apache.hyracks:hyracks-storage-am-btree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-common/) org.apache.hyracks:hyracks-storage-am-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-btree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-btree/) org.apache.hyracks:hyracks-storage-am-lsm-btree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-common/) org.apache.hyracks:hyracks-storage-am-lsm-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-invertedindex (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-invertedindex/) org.apache.hyracks:hyracks-storage-am-lsm-invertedindex:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-rtree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-rtree/) org.apache.hyracks:hyracks-storage-am-lsm-rtree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-rtree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-rtree/) org.apache.hyracks:hyracks-storage-am-rtree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-common/) org.apache.hyracks:hyracks-storage-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-util (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-util/) org.apache.hyracks:hyracks-util:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Velocity (http://velocity.apache.org/engine/releases/velocity-1.5/) org.apache.velocity:velocity:pom:1.5
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - jasper-compiler (http://tomcat.apache.org/jasper-compiler) tomcat:jasper-compiler:jar:5.5.23
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - jasper-runtime (http://tomcat.apache.org/jasper-runtime) tomcat:jasper-runtime:jar:5.5.23
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'The Codehaus' (http://codehaus.org)
-  - Groovy (http://groovy.codehaus.org/) org.codehaus.groovy:groovy-all:jar:2.1.6
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'The Netty Project' (http://netty.io/)
-  - The Netty Project (http://netty.io/) io.netty:netty:bundle:3.6.2.Final
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-
-From: 'Webtide' (http://webtide.com)
-  - Jetty :: Http Utility (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-http:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: IO Utility (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Security (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-security:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Server Core (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-server:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Servlet Handling (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-servlet:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Utilities (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Webapp Application Support (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-webapp:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: XML utilities (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-xml:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-
-From: 'xerial.org' (http://www.xerial.org/)
-  - Snappy for Java (http://code.google.com/p/snappy-java/) org.xerial.snappy:snappy-java:bundle:1.0.4.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-
-
-

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/target/test-classes/META-INF/LICENSE b/target/test-classes/META-INF/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/target/test-classes/META-INF/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   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.

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/test-classes/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/target/test-classes/META-INF/NOTICE b/target/test-classes/META-INF/NOTICE
deleted file mode 100644
index 6d778da..0000000
--- a/target/test-classes/META-INF/NOTICE
+++ /dev/null
@@ -1,8 +0,0 @@
-
-asterix-opt
-Copyright 2016 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-


[09/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/test/resources/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm
----------------------------------------------------------------------
diff --git a/src/test/resources/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm b/src/test/resources/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm
deleted file mode 100644
index 2bec6d3..0000000
--- a/src/test/resources/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm
+++ /dev/null
@@ -1,4 +0,0 @@
-[ "Live"
-, "Long"
-, "Prosper"
- ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/.plxarc
----------------------------------------------------------------------
diff --git a/target/.plxarc b/target/.plxarc
deleted file mode 100644
index 67ea6ee..0000000
--- a/target/.plxarc
+++ /dev/null
@@ -1 +0,0 @@
-maven-shared-archive-resources
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/asterix-opt-0.8.9-SNAPSHOT.jar
----------------------------------------------------------------------
diff --git a/target/asterix-opt-0.8.9-SNAPSHOT.jar b/target/asterix-opt-0.8.9-SNAPSHOT.jar
deleted file mode 100644
index 8990801..0000000
Binary files a/target/asterix-opt-0.8.9-SNAPSHOT.jar and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/checkstyle-checker.xml
----------------------------------------------------------------------
diff --git a/target/checkstyle-checker.xml b/target/checkstyle-checker.xml
deleted file mode 100644
index d6bd53a..0000000
--- a/target/checkstyle-checker.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
-        "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
-<module name="Checker"><module name="FileTabCharacter"/>
-</module>

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/checkstyle-result.xml
----------------------------------------------------------------------
diff --git a/target/checkstyle-result.xml b/target/checkstyle-result.xml
deleted file mode 100644
index 4620458..0000000
--- a/target/checkstyle-result.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<checkstyle version="6.11.2">
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/BADConstants.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobService.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Broker.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Channel.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/java/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/java/org/apache/asterix/bad/test/BADOptimizerTest.java">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/main/resources/git.properties">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/conf/asterix-build-configuration.xml">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/conf/cluster.xml">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/conf/hyracks-deployment.properties">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/conf/test.properties">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-create.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-subscribe.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/optimizerts/queries/channel/channel-unsubscribe.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.1.ddl.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.2.update.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_datasets/create_channel_check_datasets.3.query.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.1.ddl.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.2.update.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/create_channel_check_metadata/create_channel_check_metadata.3.query.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.1.ddl.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.2.update.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_datasets/drop_channel_check_datasets.3.query.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.1.ddl.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.2.update.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/drop_channel_check_metadata/drop_channel_check_metadata.3.query.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.ddl.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.2.update.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/queries/channel/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.3.query.aql">
-</file>
-<file name="/Users/stevenjacobs/asterix/asertixdb/asterixdb/asterix-opt/src/test/resources/runtimets/testsuite.xml">
-</file>
-</checkstyle>

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/checkstyle-rules.xml
----------------------------------------------------------------------
diff --git a/target/checkstyle-rules.xml b/target/checkstyle-rules.xml
deleted file mode 100644
index d6bd53a..0000000
--- a/target/checkstyle-rules.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
-        "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
-<module name="Checker"><module name="FileTabCharacter"/>
-</module>

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/META-INF/DEPENDENCIES
----------------------------------------------------------------------
diff --git a/target/classes/META-INF/DEPENDENCIES b/target/classes/META-INF/DEPENDENCIES
deleted file mode 100644
index 3c60591..0000000
--- a/target/classes/META-INF/DEPENDENCIES
+++ /dev/null
@@ -1,489 +0,0 @@
-// ------------------------------------------------------------------
-// Transitive dependencies of this project determined from the
-// maven pom organized by organization.
-// ------------------------------------------------------------------
-
-asterix-opt
-
-
-From: 'an unknown organization'
-  - AntLR Parser Generator (http://www.antlr.org/) antlr:antlr:jar:2.7.7
-    License: BSD License  (http://www.antlr.org/license.html)
-  - AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
-    License: Public Domain 
-  - Guava: Google Core Libraries for Java (http://code.google.com/p/guava-libraries/guava) com.google.guava:guava:bundle:18.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JSON.simple (http://code.google.com/p/json-simple/) com.googlecode.json-simple:json-simple:jar:1.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Microsoft Windows Azure Client API (https://github.com/WindowsAzure/azure-sdk-for-java) com.microsoft.windowsazure:microsoft-windowsazure-api:jar:0.4.4
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - rome (http://rometools.github.io/rome/) com.rometools:rome:jar:1.5.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - rome-utils (http://rometools.github.io/rome-utils/) com.rometools:rome-utils:jar:1.5.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - ParaNamer Core (http://paranamer.codehaus.org/paranamer) com.thoughtworks.paranamer:paranamer:jar:2.3
-    License: BSD  (LICENSE.txt)
-  - commons-beanutils  commons-beanutils:commons-beanutils:jar:1.7.0
-
-  - commons-logging-api  commons-logging:commons-logging-api:jar:1.0.4
-
-  - rxjava (https://github.com/ReactiveX/RxJava) io.reactivex:rxjava:jar:1.1.8
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JavaBeans Activation Framework (JAF) (http://java.sun.com/products/javabeans/jaf/index.jsp) javax.activation:activation:jar:1.1
-    License: Common Development and Distribution License (CDDL) v1.0  (https://glassfish.dev.java.net/public/CDDLv1.0.html)
-  - javax.inject (http://code.google.com/p/atinject/) javax.inject:javax.inject:jar:1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JDO2 API  javax.jdo:jdo2-api:jar:2.3-20090302111651
-
-  - servlet-api  javax.servlet:servlet-api:jar:2.5
-
-  - jsp-api  javax.servlet.jsp:jsp-api:jar:2.1
-
-  - Java Transaction API (http://java.sun.com/products/jta) javax.transaction:jta:jar:1.1
-
-  - Streaming API for XML  javax.xml.stream:stax-api:jar:1.0-2
-    License: GNU General Public Library  (http://www.gnu.org/licenses/gpl.txt)    License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0  (http://www.sun.com/cddl/cddl.html)
-  - jdom  jdom:jdom:jar:1.0
-
-  - An open source Java toolkit for Amazon S3 (http://jets3t.s3.amazonaws.com/index.html) net.java.dev.jets3t:jets3t:jar:0.6.1
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-  - ANTLR ST4 4.0.4 (http://www.stringtemplate.org) org.antlr:ST4:jar:4.0.4
-    License: BSD licence  (http://antlr.org/license.html)
-  - Antlr 3.4 Runtime (http://www.antlr.org) org.antlr:antlr-runtime:jar:3.4
-
-  - ANTLR StringTemplate (http://www.stringtemplate.org) org.antlr:stringtemplate:jar:3.2.1
-    License: BSD licence  (http://antlr.org/license.html)
-  - Apache Thrift (http://thrift.apache.org) org.apache.thrift:libfb303:pom:0.9.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Thrift (http://thrift.apache.org) org.apache.thrift:libthrift:pom:0.9.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - zookeeper  org.apache.zookeeper:zookeeper:pom:3.4.5
-
-  - Jettison  org.codehaus.jettison:jettison:bundle:1.1
-
-  - DataNucleus JDO API plugin (http://www.datanucleus.org) org.datanucleus:datanucleus-api-jdo:jar:3.2.6
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - DataNucleus Core (http://www.datanucleus.org) org.datanucleus:datanucleus-core:jar:3.2.10
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - DataNucleus RDBMS (http://www.datanucleus.org) org.datanucleus:datanucleus-rdbms:jar:3.2.9
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hamcrest Core (https://github.com/hamcrest/JavaHamcrest/hamcrest-core) org.hamcrest:hamcrest-core:jar:1.3
-    License: New BSD License  (http://www.opensource.org/licenses/bsd-license.php)
-  - ini4j (http://www.ini4j.org) org.ini4j:ini4j:jar:0.5.4
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JAXB2 Commons - Value Constructor Plugin (http://java.net/projects/jaxb2-commons/pages/value-constructor) org.jvnet.jaxb2_commons:jaxb2-value-constructor:jar:3.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - XZ for Java (http://tukaani.org/xz/java.html) org.tukaani:xz:jar:1.0
-    License: Public Domain 
-  - twitter4j-core (http://twitter4j.org/) org.twitter4j:twitter4j-core:jar:4.0.3
-    License: Apache License 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-  - twitter4j-stream (http://twitter4j.org/) org.twitter4j:twitter4j-stream:jar:4.0.3
-    License: Apache License 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-  - oro  oro:oro:jar:2.0.8
-
-  - rome  rome:rome:jar:1.0.1-modified-01
-
-  - StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Xerces2-j (https://xerces.apache.org/xerces2-j/) xerces:xercesImpl:jar:2.11.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - XML Commons External Components XML APIs (http://xml.apache.org/commons/components/external/) xml-apis:xml-apis:jar:1.4.01
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)    License: The SAX License  (http://www.saxproject.org/copying.html)    License: The W3C License  (http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.zip)
-  - xmlenc Library (http://xmlenc.sourceforge.net) xmlenc:xmlenc:jar:0.52
-    License: The BSD License  (http://www.opensource.org/licenses/bsd-license.php)
-
-From: 'Apache Software Foundation' (http://apache.org)
-  - Wicket Core (http://wicket.apache.org/wicket-core/wicket-core) org.apache.wicket:wicket-core:jar:1.5.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Wicket Request (http://maven.apache.org) org.apache.wicket:wicket-request:jar:1.5.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Wicket Util (http://maven.apache.org) org.apache.wicket:wicket-util:jar:1.5.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Apache Software Foundation' (http://db.apache.org/)
-  - Apache Derby Database Engine and Embedded JDBC Driver (http://db.apache.org/derby/derby/) org.apache.derby:derby:jar:10.10.1.1
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Apache Software Foundation' (http://jakarta.apache.org/)
-  - HttpClient (http://jakarta.apache.org/httpcomponents/httpclient-3.x/) commons-httpclient:commons-httpclient:jar:3.1
-    License: Apache License  (http://www.apache.org/licenses/LICENSE-2.0)
-
-From: 'Apache Software Foundation' (http://www.apache.org)
-  - JDO API (http://db.apache.org/jdo) javax.jdo:jdo-api:jar:3.0.1
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Log4j (http://logging.apache.org/log4j/1.2/) log4j:log4j:bundle:1.2.17
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Annotations  org.apache.hadoop:hadoop-annotations:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Auth  org.apache.hadoop:hadoop-auth:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Client  org.apache.hadoop:hadoop-client:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Common  org.apache.hadoop:hadoop-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Common  org.apache.hadoop:hadoop-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop HDFS  org.apache.hadoop:hadoop-hdfs:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop HDFS  org.apache.hadoop:hadoop-hdfs:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-app  org.apache.hadoop:hadoop-mapreduce-client-app:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-common  org.apache.hadoop:hadoop-mapreduce-client-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-core  org.apache.hadoop:hadoop-mapreduce-client-core:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-hs  org.apache.hadoop:hadoop-mapreduce-client-hs:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-jobclient  org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-jobclient  org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-shuffle  org.apache.hadoop:hadoop-mapreduce-client-shuffle:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Mini-Cluster  org.apache.hadoop:hadoop-minicluster:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-api  org.apache.hadoop:hadoop-yarn-api:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-client  org.apache.hadoop:hadoop-yarn-client:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-common  org.apache.hadoop:hadoop-yarn-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-common  org.apache.hadoop:hadoop-yarn-server-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-nodemanager  org.apache.hadoop:hadoop-yarn-server-nodemanager:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-resourcemanager  org.apache.hadoop:hadoop-yarn-server-resourcemanager:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-tests  org.apache.hadoop:hadoop-yarn-server-tests:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-web-proxy  org.apache.hadoop:hadoop-yarn-server-web-proxy:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Couchbase, Inc.' (http://couchbase.com)
-  - Couchbase JVM Core IO (http://couchbase.com) com.couchbase.client:core-io:jar:1.3.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'e-movimento' (http://www.e-movimento.com)
-  - privileged accessor (http://code.google.com/p/privilegedaccessor/) com.e-movimento.tinytools:privilegedaccessor:jar:1.2.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'FasterXML' (http://fasterxml.com)
-  - Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-core-asl:jar:1.9.12
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JAX-RS provider for JSON content type (http://jackson.codehaus.org) org.codehaus.jackson:jackson-jaxrs:jar:1.9.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)    License: GNU Lesser General Public License (LGPL), Version 2.1  (http://www.fsf.org/licensing/licenses/lgpl.txt)
-  - Data Mapper for Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-mapper-asl:jar:1.9.12
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Xml Compatibility extensions for Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-xc:jar:1.9.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)    License: GNU Lesser General Public License (LGPL), Version 2.1  (http://www.fsf.org/licensing/licenses/lgpl.txt)
-
-From: 'FasterXML' (http://fasterxml.com/)
-  - Jackson-core (http://wiki.fasterxml.com/JacksonHome) com.fasterxml.jackson.core:jackson-core:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'GlassFish Community' (https://glassfish.dev.java.net)
-  - Java Servlet API (http://servlet-spec.java.net) javax.servlet:javax.servlet-api:jar:3.1.0
-    License: CDDL + GPLv2 with classpath exception  (https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html)
-  - javax.servlet API v.3.0 (http://jcp.org/en/jsr/detail?id=315) org.glassfish:javax.servlet:jar:3.1
-    License: CDDL + GPLv2 with classpath exception  (https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html)
-
-From: 'Google' (http://www.google.com/)
-  - Protocol Buffer Java API (http://code.google.com/p/protobuf) com.google.protobuf:protobuf-java:bundle:2.5.0
-    License: New BSD license  (http://www.opensource.org/licenses/bsd-license.php)
-
-From: 'Google, Inc.' (http://www.google.com)
-  - Google Guice - Core Library (http://code.google.com/p/google-guice/guice/) com.google.inject:guice:jar:3.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Google Guice - Extensions - Servlet (http://code.google.com/p/google-guice/extensions-parent/guice-servlet/) com.google.inject.extensions:guice-servlet:jar:3.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'jcraft' (http://www.jcraft.com/jsch)
-  - JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.42
-    License: BSD  (http://www.jcraft.com/jsch/LICENSE.txt)
-
-From: 'JDOM' (http://www.jdom.org)
-  - JDOM (http://www.jdom.org) org.jdom:jdom:jar:2.0.2
-    License: Similar to Apache License but with the acknowledgment clause removed  (https://raw.github.com/hunterhacker/jdom/master/LICENSE.txt)
-
-From: 'JolBox' (http://jolbox.com)
-  - BoneCP :: Core Library (http://jolbox.com/bonecp) com.jolbox:bonecp:bundle:0.8.0.RELEASE
-    License: Apache v2  (http://www.apache.org/licenses/LICENSE-2.0.html)
-
-From: 'JSON' (http://json.org/)
-  - JSON (JavaScript Object Notation) (http://www.json.org/java/index.html) org.json:json:jar:20090211
-    License: provided without support or warranty  (http://www.json.org/license.html)
-
-From: 'JUnit' (http://www.junit.org)
-  - JUnit (http://junit.org) junit:junit:jar:4.11
-    License: Common Public License Version 1.0  (http://www.opensource.org/licenses/cpl1.0.txt)
-
-From: 'Kohsuke Kawaguchi' (http://www.kohsuke.org/)
-  - args4j (http://args4j.kohsuke.org/args4j/) args4j:args4j:bundle:2.33
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-
-From: 'Mort Bay Consulting' (http://www.mortbay.com)
-  - Jetty Server (http://www.eclipse.org/jetty/jetty-parent/project/modules/jetty) org.mortbay.jetty:jetty:jar:6.1.26
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty Utilities (http://www.eclipse.org/jetty/jetty-parent/project/jetty-util) org.mortbay.jetty:jetty-util:jar:6.1.26
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-
-From: 'ObjectWeb' (http://www.objectweb.org/)
-  - ASM Core (http://asm.objectweb.org/asm/) asm:asm:jar:3.1
-
-  - ASM All (http://asm.objectweb.org/asm-all/) org.ow2.asm:asm-all:jar:5.1
-    License: BSD  (http://asm.objectweb.org/license.html)
-
-From: 'Oracle' (http://www.oracle.com)
-  - JavaMail API (compat) (http://kenai.com/projects/javamail/mail) javax.mail:mail:jar:1.4.5
-    License: CDDL  (http://www.sun.com/cddl)    License: GPLv2+CE  (https://glassfish.dev.java.net/public/CDDL+GPL.html)
-
-From: 'Oracle Corporation' (http://www.oracle.com/)
-  - jersey-client (https://jersey.java.net/jersey-client/) com.sun.jersey:jersey-client:jar:1.13
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-core (https://jersey.java.net/jersey-core/) com.sun.jersey:jersey-core:bundle:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-grizzly2 (https://jersey.java.net/jersey-grizzly2/) com.sun.jersey:jersey-grizzly2:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-json (https://jersey.java.net/jersey-json/) com.sun.jersey:jersey-json:jar:1.13
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-server (https://jersey.java.net/jersey-server/) com.sun.jersey:jersey-server:bundle:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-guice (https://jersey.java.net/jersey-contribs/jersey-guice/) com.sun.jersey.contribs:jersey-guice:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - Jersey Test Framework - Core (https://jersey.java.net/jersey-test-framework/jersey-test-framework-core/) com.sun.jersey.jersey-test-framework:jersey-test-framework-core:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - Jersey Test Framework - Grizzly 2 Module (https://jersey.java.net/jersey-test-framework/jersey-test-framework-grizzly2/) com.sun.jersey.jersey-test-framework:jersey-test-framework-grizzly2:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - JAXB RI (http://jaxb.java.net/) com.sun.xml.bind:jaxb-impl:jar:2.2.3-1
-    License: CDDL 1.1  (https://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - JAXB API bundle for GlassFish V3 (https://jaxb.dev.java.net/) javax.xml.bind:jaxb-api:jar:2.2.2
-    License: CDDL 1.1  (https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html)
-
-From: 'Oracle Corpration' (http://www.oracle.com)
-  - grizzly-framework (http://grizzly.java.net/grizzly-framework) org.glassfish.grizzly:grizzly-framework:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-http (http://grizzly.java.net/grizzly-http) org.glassfish.grizzly:grizzly-http:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-http-server (http://grizzly.java.net/grizzly-http-server) org.glassfish.grizzly:grizzly-http-server:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-http-servlet (http://grizzly.java.net/grizzly-http-servlet) org.glassfish.grizzly:grizzly-http-servlet:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-rcm (http://grizzly.java.net/grizzly-rcm) org.glassfish.grizzly:grizzly-rcm:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-
-From: 'QOS.ch' (http://www.qos.ch)
-  - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.7.7
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-  - SLF4J JCL Binding (http://www.slf4j.org) org.slf4j:slf4j-jcl:jar:1.6.3
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-  - SLF4J LOG4J-12 Binding (http://www.slf4j.org) org.slf4j:slf4j-log4j12:jar:1.7.5
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-
-From: 'ROME Project' (http://rome.dev.java.net)
-  - Rome HTTP Fetcher  net.java.dev.rome:rome-fetcher:jar:1.0.0
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Sun Microsystems' (http://www.sun.com)
-  - management-api (http://kenai.com/hg/gmbal~gf_common) org.glassfish.external:management-api:jar:3.0.0-b012
-    License: CDDL+GPL  (https://glassfish.dev.java.net/public/CDDL+GPL.html)
-  - gmbal-api-only (http://kenai.com/hg/gmbal~master) org.glassfish.gmbal:gmbal-api-only:jar:3.0.0-b023
-    License: CDDL+GPL  (https://glassfish.dev.java.net/public/CDDL+GPL.html)
-
-From: 'The Apache Software Foundation' (http://commons.apache.org/)
-  - Commons Configuration (http://commons.apache.org/${pom.artifactId.substring(8)}/) commons-configuration:commons-configuration:jar:1.6
-    License: The Apache Software License, Version 2.0  (/LICENSE.txt)
-
-From: 'The Apache Software Foundation' (http://jakarta.apache.org)
-  - Digester (http://jakarta.apache.org/commons/digester/) commons-digester:commons-digester:jar:1.8
-    License: The Apache Software License, Version 2.0  (/LICENSE.txt)
-  - EL (http://jakarta.apache.org/commons/el/) commons-el:commons-el:jar:1.0
-    License: The Apache Software License, Version 2.0  (/LICENSE.txt)
-
-From: 'The Apache Software Foundation' (http://www.apache.org/)
-  - Commons BeanUtils Core (http://commons.apache.org/beanutils/) commons-beanutils:commons-beanutils-core:jar:1.8.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons CLI (http://commons.apache.org/cli/) commons-cli:commons-cli:jar:1.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Commons Codec (http://commons.apache.org/proper/commons-codec/) commons-codec:commons-codec:jar:1.9
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Collections (http://commons.apache.org/collections/) commons-collections:commons-collections:jar:3.2.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Daemon (http://commons.apache.org/daemon/) commons-daemon:commons-daemon:jar:1.0.13
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:2.4
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.5
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Commons Logging (http://commons.apache.org/proper/commons-logging/) commons-logging:commons-logging:jar:1.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Net (http://commons.apache.org/net/) commons-net:commons-net:jar:3.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Ant Core (http://ant.apache.org/) org.apache.ant:ant:jar:1.9.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Ant Launcher (http://ant.apache.org/) org.apache.ant:ant-launcher:jar:1.9.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-active (http://www.apache.org/apache-asterixdb/asterix-active/) org.apache.asterix:asterix-active:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-algebra (http://www.apache.org/apache-asterixdb/asterix-algebra/) org.apache.asterix:asterix-algebra:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-app (http://www.apache.org/apache-asterixdb/asterix-app/) org.apache.asterix:asterix-app:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-common (http://www.apache.org/apache-asterixdb/asterix-common/) org.apache.asterix:asterix-common:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-events (http://www.apache.org/apache-asterixdb/asterix-events/) org.apache.asterix:asterix-events:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-external-data (http://www.apache.org/apache-asterixdb/asterix-external-data/) org.apache.asterix:asterix-external-data:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-fuzzyjoin (http://www.apache.org/apache-asterixdb/asterix-fuzzyjoin/) org.apache.asterix:asterix-fuzzyjoin:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-lang-aql (http://www.apache.org/apache-asterixdb/asterix-lang-aql/) org.apache.asterix:asterix-lang-aql:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-lang-common (http://www.apache.org/apache-asterixdb/asterix-lang-common/) org.apache.asterix:asterix-lang-common:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-lang-sqlpp (http://www.apache.org/apache-asterixdb/asterix-lang-sqlpp/) org.apache.asterix:asterix-lang-sqlpp:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-metadata (http://www.apache.org/apache-asterixdb/asterix-metadata/) org.apache.asterix:asterix-metadata:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-om (http://www.apache.org/apache-asterixdb/asterix-om/) org.apache.asterix:asterix-om:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-replication (http://www.apache.org/apache-asterixdb/asterix-replication/) org.apache.asterix:asterix-replication:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-runtime (http://www.apache.org/apache-asterixdb/asterix-runtime/) org.apache.asterix:asterix-runtime:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-test-framework (http://www.apache.org/apache-asterixdb/asterix-test-framework/) org.apache.asterix:asterix-test-framework:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-transactions (http://www.apache.org/apache-asterixdb/asterix-transactions/) org.apache.asterix:asterix-transactions:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Avro (http://avro.apache.org) org.apache.avro:avro:jar:1.7.4
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Compress (http://commons.apache.org/compress/) org.apache.commons:commons-compress:jar:1.4.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Lang (http://commons.apache.org/lang/) org.apache.commons:commons-lang3:jar:3.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Math (http://commons.apache.org/math/) org.apache.commons:commons-math:jar:2.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Ant Utilities (http://hive.apache.org/hive-ant) org.apache.hive:hive-ant:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Common (http://hive.apache.org/hive-common) org.apache.hive:hive-common:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Query Language (http://hive.apache.org/hive-exec) org.apache.hive:hive-exec:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Metastore (http://hive.apache.org/hive-metastore) org.apache.hive:hive-metastore:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Serde (http://hive.apache.org/hive-serde) org.apache.hive:hive-serde:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims (http://hive.apache.org/hive-shims) org.apache.hive:hive-shims:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims 0.20 (http://hive.apache.org/hive-shims-0.20) org.apache.hive.shims:hive-shims-0.20:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims 0.20S (http://hive.apache.org/hive-shims-0.20S) org.apache.hive.shims:hive-shims-0.20S:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims 0.23 (http://hive.apache.org/hive-shims-0.23) org.apache.hive.shims:hive-shims-0.23:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims Common (http://hive.apache.org/hive-shims-common) org.apache.hive.shims:hive-shims-common:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims Secure Common (http://hive.apache.org/hive-shims-common-secure) org.apache.hive.shims:hive-shims-common-secure:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache HttpClient (http://hc.apache.org/httpcomponents-client) org.apache.httpcomponents:httpclient:jar:4.5.2
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache HttpCore (http://hc.apache.org/httpcomponents-core-ga) org.apache.httpcomponents:httpcore:jar:4.4.4
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-common (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-common/) org.apache.hyracks:algebricks-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-compiler (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-compiler/) org.apache.hyracks:algebricks-compiler:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-core (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-core/) org.apache.hyracks:algebricks-core:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-data (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-data/) org.apache.hyracks:algebricks-data:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-rewriter (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-rewriter/) org.apache.hyracks:algebricks-rewriter:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-runtime (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-runtime/) org.apache.hyracks:algebricks-runtime:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-api (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-api/) org.apache.hyracks:hyracks-api:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-client (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-client/) org.apache.hyracks:hyracks-client:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-comm (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-comm/) org.apache.hyracks:hyracks-comm:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-control-cc (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-control/hyracks-control-cc/) org.apache.hyracks:hyracks-control-cc:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-control-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-control/hyracks-control-common/) org.apache.hyracks:hyracks-control-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-control-nc (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-control/hyracks-control-nc/) org.apache.hyracks:hyracks-control-nc:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-data-std (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-data/hyracks-data-std/) org.apache.hyracks:hyracks-data-std:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-dataflow-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-dataflow-common/) org.apache.hyracks:hyracks-dataflow-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-dataflow-std (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-dataflow-std/) org.apache.hyracks:hyracks-dataflow-std:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-hdfs-2.x (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-hdfs/hyracks-hdfs-2.x/) org.apache.hyracks:hyracks-hdfs-2.x:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-hdfs-core (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-hdfs/hyracks-hdfs-core/) org.apache.hyracks:hyracks-hdfs-core:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-ipc (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-ipc/) org.apache.hyracks:hyracks-ipc:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-net (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-net/) org.apache.hyracks:hyracks-net:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-bloomfilter (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-bloomfilter/) org.apache.hyracks:hyracks-storage-am-bloomfilter:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-btree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-btree/) org.apache.hyracks:hyracks-storage-am-btree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-common/) org.apache.hyracks:hyracks-storage-am-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-btree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-btree/) org.apache.hyracks:hyracks-storage-am-lsm-btree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-common/) org.apache.hyracks:hyracks-storage-am-lsm-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-invertedindex (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-invertedindex/) org.apache.hyracks:hyracks-storage-am-lsm-invertedindex:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-rtree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-rtree/) org.apache.hyracks:hyracks-storage-am-lsm-rtree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-rtree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-rtree/) org.apache.hyracks:hyracks-storage-am-rtree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-common/) org.apache.hyracks:hyracks-storage-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-util (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-util/) org.apache.hyracks:hyracks-util:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Velocity (http://velocity.apache.org/engine/releases/velocity-1.5/) org.apache.velocity:velocity:pom:1.5
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - jasper-compiler (http://tomcat.apache.org/jasper-compiler) tomcat:jasper-compiler:jar:5.5.23
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - jasper-runtime (http://tomcat.apache.org/jasper-runtime) tomcat:jasper-runtime:jar:5.5.23
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'The Codehaus' (http://codehaus.org)
-  - Groovy (http://groovy.codehaus.org/) org.codehaus.groovy:groovy-all:jar:2.1.6
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'The Netty Project' (http://netty.io/)
-  - The Netty Project (http://netty.io/) io.netty:netty:bundle:3.6.2.Final
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-
-From: 'Webtide' (http://webtide.com)
-  - Jetty :: Http Utility (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-http:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: IO Utility (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Security (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-security:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Server Core (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-server:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Servlet Handling (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-servlet:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Utilities (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Webapp Application Support (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-webapp:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: XML utilities (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-xml:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-
-From: 'xerial.org' (http://www.xerial.org/)
-  - Snappy for Java (http://code.google.com/p/snappy-java/) org.xerial.snappy:snappy-java:bundle:1.0.4.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-
-
-

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/META-INF/LICENSE
----------------------------------------------------------------------
diff --git a/target/classes/META-INF/LICENSE b/target/classes/META-INF/LICENSE
deleted file mode 100644
index d645695..0000000
--- a/target/classes/META-INF/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   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.

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/target/classes/META-INF/NOTICE b/target/classes/META-INF/NOTICE
deleted file mode 100644
index 6d778da..0000000
--- a/target/classes/META-INF/NOTICE
+++ /dev/null
@@ -1,8 +0,0 @@
-
-asterix-opt
-Copyright 2016 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/git.properties
----------------------------------------------------------------------
diff --git a/target/classes/git.properties b/target/classes/git.properties
deleted file mode 100644
index 44f9457..0000000
--- a/target/classes/git.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-#Generated by Git-Commit-Id-Plugin
-#Thu Jun 02 10:54:34 PDT 2016
-git.build.user.email=sjaco002@ucr.edu
-git.build.host=Sisyphus.local
-git.dirty=false
-git.remote.origin.url=https\://github.com/apache/incubator-asterixdb/
-git.closest.tag.name=apache-asterixdb-0.8.8-incubating
-git.commit.id.describe-short=apache-asterixdb-0.8.8-incubating-2824
-git.commit.user.email=sjaco002@ucr.edu
-git.commit.time=20.05.2016 @ 12\:58\:28 PDT
-git.commit.message.full=Fixed Broker Field Names and updated tests
-git.build.version=0.8.9-SNAPSHOT
-git.commit.message.short=Fixed Broker Field Names and updated tests
-git.commit.id.abbrev=bcef8a3
-git.branch=steven/active
-git.build.user.name=Steven Glenn Jacobs
-git.closest.tag.commit.count=2824
-git.commit.id.describe=apache-asterixdb-0.8.8-incubating-2824-gbcef8a3
-git.commit.id=bcef8a3dac1dd3ee61e66c0746e137f71225f47a
-git.tags=
-git.build.time=02.06.2016 @ 10\:54\:34 PDT
-git.commit.user.name=Steven Jacobs

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/lang-extension/lang.txt
----------------------------------------------------------------------
diff --git a/target/classes/lang-extension/lang.txt b/target/classes/lang-extension/lang.txt
deleted file mode 100644
index 90edb91..0000000
--- a/target/classes/lang-extension/lang.txt
+++ /dev/null
@@ -1,179 +0,0 @@
-import org.apache.asterix.bad.lang.statement.BrokerDropStatement;
-import org.apache.asterix.bad.lang.statement.ChannelDropStatement;
-import org.apache.asterix.bad.lang.statement.ChannelSubscribeStatement;
-import org.apache.asterix.bad.lang.statement.ChannelUnsubscribeStatement;
-import org.apache.asterix.bad.lang.statement.CreateBrokerStatement;
-import org.apache.asterix.bad.lang.statement.CreateChannelStatement;
-
-
-@merge
-Statement SingleStatement() throws ParseException:
-{
-  // merge area 1
-  before:
-  after:
-}
-{
-  (
-    // merge area 2
-    before:
-    after:    | stmt = ChannelSubscriptionStatement())
-  {
-    // merge area 3
-  }
-}
-
-@merge
-Statement CreateStatement() throws ParseException:
-{
-  // merge area 1
-  before:
-  after:
-}
-{
-  (
-    // merge area 2
-    before:
-    after:    | stmt = ChannelSpecification() | stmt = BrokerSpecification())
-  {
-    // merge area 3
-  }
-}
-
-@merge
-Statement DropStatement() throws ParseException:
-{
-  // merge area 1
-  before:
-  after:
-}
-{
-  (
-    // merge area 2
-    before:
-    after:    | <CHANNEL> pairId = QualifiedName() ifExists = IfExists()
-      {
-        stmt = new ChannelDropStatement(pairId.first, pairId.second, ifExists);
-      }
-      	      | <BROKER> pairId = QualifiedName() ifExists = IfExists()	
-      {	
-        stmt = new BrokerDropStatement(pairId.first, pairId.second, ifExists);	
-      }
-      )
-  {
-    // merge area 3
-  }
-}
-
-@new
-CreateChannelStatement ChannelSpecification() throws ParseException:
-{
-  Pair<Identifier,Identifier> nameComponents = null;
-  FunctionSignature appliedFunction = null;
-  CreateChannelStatement ccs = null;
-  String fqFunctionName = null;
-  Expression period = null;
-}
-{
-  (
-    "repetitive" <CHANNEL>  nameComponents = QualifiedName()
-    <USING> appliedFunction = FunctionSignature()
-    "period" period = FunctionCallExpr()
-    {
-      ccs = new CreateChannelStatement(nameComponents.first,
-                                   nameComponents.second, appliedFunction, period);
-    }
-  )
-    {
-      return ccs;
-    }
-}
-
-@new
-CreateBrokerStatement BrokerSpecification() throws ParseException:
-{
-  CreateBrokerStatement cbs = null;
-  Pair<Identifier,Identifier> name = null;
-  String endPoint = null;
-}
-{
-  (
-    <BROKER>  name = QualifiedName()
-    <AT>  endPoint = StringLiteral()
-    {
-      cbs = new CreateBrokerStatement(name.first, name.second,endPoint);
-    }
-  )
-    {
-      return cbs;
-    }
-}
-
-@new
-Statement ChannelSubscriptionStatement() throws ParseException:
-{
-  Statement stmt = null;
-  Pair<Identifier,Identifier> nameComponents = null;
-  List<Expression> argList = new ArrayList<Expression>();
-  Expression tmp = null;
-  String id = null;
-  String subscriptionId = null;
-  Pair<Identifier,Identifier> brokerName = null;
-}
-{
-  (
-  "subscribe" <TO> nameComponents = QualifiedName()
-   <LEFTPAREN> (tmp = Expression()
-   {
-      argList.add(tmp);
-   }
-   (<COMMA> tmp = Expression()
-   {
-      argList.add(tmp);
-   }
-   )*)? <RIGHTPAREN> <ON> brokerName = QualifiedName()
-   {
-      stmt = new ChannelSubscribeStatement(nameComponents.first, nameComponents.second, argList, getVarCounter(), brokerName.first, brokerName.second, subscriptionId);
-   }
-   | "unsubscribe" id = StringLiteral() <FROM> nameComponents = QualifiedName()
-      {
-        setDataverses(new ArrayList<String>());
-        setDatasets(new ArrayList<String>());
-        VariableExpr varExp = new VariableExpr();
-        VarIdentifier var = new VarIdentifier();
-        varExp.setVar(var);
-        var.setValue("$subscriptionPlaceholder");
-        getCurrentScope().addNewVarSymbolToScope(varExp.getVar());
-        List<String> dataverses = getDataverses();
-        List<String> datasets = getDatasets();
-        // we remove the pointer to the dataverses and datasets
-        setDataverses(null);
-        setDatasets(null);
-        stmt = new ChannelUnsubscribeStatement(varExp, nameComponents.first, nameComponents.second, id, getVarCounter(), dataverses, datasets);
-      }
-     | "change" "subscription" subscriptionId = StringLiteral()  <ON> nameComponents = QualifiedName()
-       <LEFTPAREN> (tmp = Expression()
-       {
-         argList.add(tmp);
-       }
-       (<COMMA> tmp = Expression()
-       {
-         argList.add(tmp);
-       }
-       )*)? <RIGHTPAREN>
-        <TO> brokerName = QualifiedName()
-      {
-        stmt = new ChannelSubscribeStatement(nameComponents.first, nameComponents.second, argList, getVarCounter(), brokerName.first, brokerName.second, subscriptionId);
-      }
-    )
-    {
-      return stmt;
-    }
-}
-
-<DEFAULT,IN_DBL_BRACE>
-TOKEN [IGNORE_CASE]:
-{
-    <BROKER : "broker">
-  | <CHANNEL : "channel">
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/BADConstants$ChannelJobType.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/BADConstants$ChannelJobType.class b/target/classes/org/apache/asterix/bad/BADConstants$ChannelJobType.class
deleted file mode 100644
index a2fc05c..0000000
Binary files a/target/classes/org/apache/asterix/bad/BADConstants$ChannelJobType.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/BADConstants.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/BADConstants.class b/target/classes/org/apache/asterix/bad/BADConstants.class
deleted file mode 100644
index 0634fb1..0000000
Binary files a/target/classes/org/apache/asterix/bad/BADConstants.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/ChannelJobInfo.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/ChannelJobInfo.class b/target/classes/org/apache/asterix/bad/ChannelJobInfo.class
deleted file mode 100644
index 80761e2..0000000
Binary files a/target/classes/org/apache/asterix/bad/ChannelJobInfo.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/ChannelJobService.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/ChannelJobService.class b/target/classes/org/apache/asterix/bad/ChannelJobService.class
deleted file mode 100644
index 85733ea..0000000
Binary files a/target/classes/org/apache/asterix/bad/ChannelJobService.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADAQLParser$1.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADAQLParser$1.class b/target/classes/org/apache/asterix/bad/lang/BADAQLParser$1.class
deleted file mode 100644
index 88fe683..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADAQLParser$1.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADAQLParser$FunctionName.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADAQLParser$FunctionName.class b/target/classes/org/apache/asterix/bad/lang/BADAQLParser$FunctionName.class
deleted file mode 100644
index f3b37a8..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADAQLParser$FunctionName.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADAQLParser$IndexParams.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADAQLParser$IndexParams.class b/target/classes/org/apache/asterix/bad/lang/BADAQLParser$IndexParams.class
deleted file mode 100644
index 0494370..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADAQLParser$IndexParams.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADAQLParser$JJCalls.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADAQLParser$JJCalls.class b/target/classes/org/apache/asterix/bad/lang/BADAQLParser$JJCalls.class
deleted file mode 100644
index 09a7ab5..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADAQLParser$JJCalls.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADAQLParser$LookaheadSuccess.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADAQLParser$LookaheadSuccess.class b/target/classes/org/apache/asterix/bad/lang/BADAQLParser$LookaheadSuccess.class
deleted file mode 100644
index 862de60..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADAQLParser$LookaheadSuccess.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADAQLParser.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADAQLParser.class b/target/classes/org/apache/asterix/bad/lang/BADAQLParser.class
deleted file mode 100644
index 994a68c..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADAQLParser.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADAQLParserConstants.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADAQLParserConstants.class b/target/classes/org/apache/asterix/bad/lang/BADAQLParserConstants.class
deleted file mode 100644
index 80a8ace..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADAQLParserConstants.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADAQLParserTokenManager.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADAQLParserTokenManager.class b/target/classes/org/apache/asterix/bad/lang/BADAQLParserTokenManager.class
deleted file mode 100644
index fab3028..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADAQLParserTokenManager.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADCompilationProvider.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADCompilationProvider.class b/target/classes/org/apache/asterix/bad/lang/BADCompilationProvider.class
deleted file mode 100644
index 4632dc9..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADCompilationProvider.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADLangExtension$1.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADLangExtension$1.class b/target/classes/org/apache/asterix/bad/lang/BADLangExtension$1.class
deleted file mode 100644
index 63a35df..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADLangExtension$1.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADLangExtension.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADLangExtension.class b/target/classes/org/apache/asterix/bad/lang/BADLangExtension.class
deleted file mode 100644
index f2274af..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADLangExtension.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADParserFactory.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADParserFactory.class b/target/classes/org/apache/asterix/bad/lang/BADParserFactory.class
deleted file mode 100644
index 4d1fb2e..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADParserFactory.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorExtension$LazyHolder.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorExtension$LazyHolder.class b/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorExtension$LazyHolder.class
deleted file mode 100644
index 6566e18..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorExtension$LazyHolder.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.class b/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.class
deleted file mode 100644
index 4db5796..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.class b/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.class
deleted file mode 100644
index ad95bcf..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/BADStatementExecutor.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/BADStatementExecutor.class b/target/classes/org/apache/asterix/bad/lang/BADStatementExecutor.class
deleted file mode 100644
index c5be509..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/BADStatementExecutor.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/JavaCharStream.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/JavaCharStream.class b/target/classes/org/apache/asterix/bad/lang/JavaCharStream.class
deleted file mode 100644
index 9492408..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/JavaCharStream.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/ParseException.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/ParseException.class b/target/classes/org/apache/asterix/bad/lang/ParseException.class
deleted file mode 100644
index 90063d2..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/ParseException.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/Token.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/Token.class b/target/classes/org/apache/asterix/bad/lang/Token.class
deleted file mode 100644
index 5103c1f..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/Token.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/TokenMgrError.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/TokenMgrError.class b/target/classes/org/apache/asterix/bad/lang/TokenMgrError.class
deleted file mode 100644
index e288d27..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/TokenMgrError.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/statement/BrokerDropStatement.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/statement/BrokerDropStatement.class b/target/classes/org/apache/asterix/bad/lang/statement/BrokerDropStatement.class
deleted file mode 100644
index 4dd0352..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/statement/BrokerDropStatement.class and /dev/null differ


[08/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/statement/ChannelDropStatement.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/statement/ChannelDropStatement.class b/target/classes/org/apache/asterix/bad/lang/statement/ChannelDropStatement.class
deleted file mode 100644
index 131dacc..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/statement/ChannelDropStatement.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.class b/target/classes/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.class
deleted file mode 100644
index e90b4ab..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.class b/target/classes/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.class
deleted file mode 100644
index 7bdf66b..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.class b/target/classes/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.class
deleted file mode 100644
index 836e128..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/lang/statement/CreateChannelStatement.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/lang/statement/CreateChannelStatement.class b/target/classes/org/apache/asterix/bad/lang/statement/CreateChannelStatement.class
deleted file mode 100644
index 6d1292a..0000000
Binary files a/target/classes/org/apache/asterix/bad/lang/statement/CreateChannelStatement.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/BADMetadataExtension.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/BADMetadataExtension.class b/target/classes/org/apache/asterix/bad/metadata/BADMetadataExtension.class
deleted file mode 100644
index 8c9672b..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/BADMetadataExtension.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/BADMetadataIndexes.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/BADMetadataIndexes.class b/target/classes/org/apache/asterix/bad/metadata/BADMetadataIndexes.class
deleted file mode 100644
index 43f481e..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/BADMetadataIndexes.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.class b/target/classes/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.class
deleted file mode 100644
index 2665135..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/Broker.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/Broker.class b/target/classes/org/apache/asterix/bad/metadata/Broker.class
deleted file mode 100644
index dcc6cd7..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/Broker.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/BrokerSearchKey.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/BrokerSearchKey.class b/target/classes/org/apache/asterix/bad/metadata/BrokerSearchKey.class
deleted file mode 100644
index 77b613d..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/BrokerSearchKey.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/BrokerTupleTranslator.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/BrokerTupleTranslator.class b/target/classes/org/apache/asterix/bad/metadata/BrokerTupleTranslator.class
deleted file mode 100644
index 8f1a264..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/BrokerTupleTranslator.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/Channel.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/Channel.class b/target/classes/org/apache/asterix/bad/metadata/Channel.class
deleted file mode 100644
index 3ff2b80..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/Channel.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/ChannelEventsListener$1.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/ChannelEventsListener$1.class b/target/classes/org/apache/asterix/bad/metadata/ChannelEventsListener$1.class
deleted file mode 100644
index ab330fb..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/ChannelEventsListener$1.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/ChannelEventsListener.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/ChannelEventsListener.class b/target/classes/org/apache/asterix/bad/metadata/ChannelEventsListener.class
deleted file mode 100644
index 47e43c7..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/ChannelEventsListener.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/ChannelSearchKey.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/ChannelSearchKey.class b/target/classes/org/apache/asterix/bad/metadata/ChannelSearchKey.class
deleted file mode 100644
index 6e497d1..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/ChannelSearchKey.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/metadata/ChannelTupleTranslator.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/metadata/ChannelTupleTranslator.class b/target/classes/org/apache/asterix/bad/metadata/ChannelTupleTranslator.class
deleted file mode 100644
index dd25237..0000000
Binary files a/target/classes/org/apache/asterix/bad/metadata/ChannelTupleTranslator.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.class b/target/classes/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.class
deleted file mode 100644
index b16fe35..0000000
Binary files a/target/classes/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerOperator.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerOperator.class b/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerOperator.class
deleted file mode 100644
index 73cd26f..0000000
Binary files a/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerOperator.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.class b/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.class
deleted file mode 100644
index b8bb5e0..0000000
Binary files a/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.class b/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.class
deleted file mode 100644
index beb0875..0000000
Binary files a/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.class b/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.class
deleted file mode 100644
index c97f520..0000000
Binary files a/target/classes/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.class b/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.class
deleted file mode 100644
index a34bdcf..0000000
Binary files a/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorDescriptor.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable$1.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable$1.class b/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable$1.class
deleted file mode 100644
index 49b5567..0000000
Binary files a/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable$1.class and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.class
----------------------------------------------------------------------
diff --git a/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.class b/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.class
deleted file mode 100644
index 3f82914..0000000
Binary files a/target/classes/org/apache/asterix/bad/runtime/RepetitiveChannelOperatorNodePushable.class and /dev/null differ


[15/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
Fixed structure


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

Branch: refs/heads/master
Commit: 0921e3c9b8ccd2646f75b9769d9589cbb2720558
Parents: bdba1b8
Author: Steven Glenn Jacobs <sj...@ucr.edu>
Authored: Fri Sep 9 13:53:53 2016 -0700
Committer: Steven Glenn Jacobs <sj...@ucr.edu>
Committed: Fri Sep 9 13:53:53 2016 -0700

----------------------------------------------------------------------
 .gitignore                                      |   50 +
 asterix-opt/pom.xml                             |  206 +
 .../org/apache/asterix/bad/BADConstants.java    |   41 +
 .../org/apache/asterix/bad/ChannelJobInfo.java  |   48 +
 .../apache/asterix/bad/ChannelJobService.java   |  145 +
 .../bad/lang/BADCompilationProvider.java        |   52 +
 .../asterix/bad/lang/BADLangExtension.java      |  106 +
 .../asterix/bad/lang/BADParserFactory.java      |   38 +
 .../bad/lang/BADQueryTranslatorExtension.java   |   53 +
 .../bad/lang/BADQueryTranslatorFactory.java     |   41 +
 .../asterix/bad/lang/BADStatementExecutor.java  |   46 +
 .../bad/lang/statement/BrokerDropStatement.java |   99 +
 .../lang/statement/ChannelDropStatement.java    |  166 +
 .../statement/ChannelSubscribeStatement.java    |  202 +
 .../statement/ChannelUnsubscribeStatement.java  |  154 +
 .../lang/statement/CreateBrokerStatement.java   |  105 +
 .../lang/statement/CreateChannelStatement.java  |  373 ++
 .../bad/metadata/BADMetadataExtension.java      |  109 +
 .../bad/metadata/BADMetadataIndexes.java        |   66 +
 .../bad/metadata/BADMetadataRecordTypes.java    |   89 +
 .../org/apache/asterix/bad/metadata/Broker.java |   69 +
 .../asterix/bad/metadata/BrokerSearchKey.java   |   45 +
 .../bad/metadata/BrokerTupleTranslator.java     |  118 +
 .../apache/asterix/bad/metadata/Channel.java    |   96 +
 .../bad/metadata/ChannelEventsListener.java     |  237 +
 .../asterix/bad/metadata/ChannelSearchKey.java  |   45 +
 .../bad/metadata/ChannelTupleTranslator.java    |  159 +
 .../InsertBrokerNotifierForChannelRule.java     |  317 ++
 .../bad/runtime/NotifyBrokerOperator.java       |   90 +
 .../bad/runtime/NotifyBrokerPOperator.java      |  111 +
 .../bad/runtime/NotifyBrokerRuntime.java        |  138 +
 .../bad/runtime/NotifyBrokerRuntimeFactory.java |   55 +
 .../RepetitiveChannelOperatorDescriptor.java    |   83 +
 .../RepetitiveChannelOperatorNodePushable.java  |  125 +
 .../src/main/resources/lang-extension/lang.txt  |  179 +
 .../asterix/bad/test/BADExecutionTest.java      |   98 +
 .../asterix/bad/test/BADOptimizerTest.java      |   60 +
 .../conf/asterix-build-configuration.xml        |  110 +
 asterix-opt/src/test/resources/conf/cluster.xml |   49 +
 .../conf/hyracks-deployment.properties          |   21 +
 .../src/test/resources/conf/test.properties     |   22 +
 .../queries/channel/channel-create.aql          |   36 +
 .../queries/channel/channel-subscribe.aql       |   40 +
 .../queries/channel/channel-unsubscribe.aql     |   38 +
 .../results/channel/channel-create.plan         |   30 +
 .../results/channel/channel-subscribe.plan      |   44 +
 .../results/channel/channel-unsubscribe.plan    |   44 +
 .../create_channel_check_datasets.1.ddl.aql     |   34 +
 .../create_channel_check_datasets.2.update.aql  |    0
 .../create_channel_check_datasets.3.query.aql   |    7 +
 .../create_channel_check_metadata.1.ddl.aql     |   34 +
 .../create_channel_check_metadata.2.update.aql  |    0
 .../create_channel_check_metadata.3.query.aql   |    3 +
 .../drop_channel_check_datasets.1.ddl.aql       |   38 +
 .../drop_channel_check_datasets.2.update.aql    |    3 +
 .../drop_channel_check_datasets.3.query.aql     |    7 +
 .../drop_channel_check_metadata.1.ddl.aql       |   38 +
 .../drop_channel_check_metadata.2.update.aql    |    3 +
 .../drop_channel_check_metadata.3.query.aql     |    3 +
 ...scribe_channel_check_subscriptions.1.ddl.aql |   34 +
 ...ibe_channel_check_subscriptions.2.update.aql |    7 +
 ...ribe_channel_check_subscriptions.3.query.aql |    4 +
 .../create_channel_check_datasets.1.adm         |    3 +
 .../create_channel_check_metadata.1.adm         |    2 +
 .../drop_channel_check_datasets.1.adm           |    5 +
 .../drop_channel_check_metadata.1.adm           |    3 +
 .../subscribe_channel_check_subscriptions.1.adm |    4 +
 .../current/VERSION                             |    5 -
 .../dncp_block_verification.log.curr            |    0
 build/test/data/dfs/data/data1/current/VERSION  |    6 -
 build/test/data/dfs/data/data1/in_use.lock      |    1 -
 .../current/VERSION                             |    5 -
 build/test/data/dfs/data/data2/current/VERSION  |    6 -
 build/test/data/dfs/data/data2/in_use.lock      |    1 -
 .../current/VERSION                             |    5 -
 .../dncp_block_verification.log.curr            |    0
 build/test/data/dfs/data/data3/current/VERSION  |    6 -
 build/test/data/dfs/data/data3/in_use.lock      |    1 -
 .../current/VERSION                             |    5 -
 build/test/data/dfs/data/data4/current/VERSION  |    6 -
 build/test/data/dfs/data/data4/in_use.lock      |    1 -
 build/test/data/dfs/name1/current/VERSION       |    7 -
 .../edits_inprogress_0000000000000000001        |  Bin 1048576 -> 0 bytes
 .../name1/current/fsimage_0000000000000000000   |  Bin 204 -> 0 bytes
 .../current/fsimage_0000000000000000000.md5     |    1 -
 build/test/data/dfs/name1/current/seen_txid     |    1 -
 build/test/data/dfs/name1/in_use.lock           |    1 -
 build/test/data/dfs/name2/current/VERSION       |    7 -
 .../edits_inprogress_0000000000000000001        |  Bin 1048576 -> 0 bytes
 .../name2/current/fsimage_0000000000000000000   |  Bin 204 -> 0 bytes
 .../current/fsimage_0000000000000000000.md5     |    1 -
 build/test/data/dfs/name2/current/seen_txid     |    1 -
 build/test/data/dfs/name2/in_use.lock           |    1 -
 pom.xml                                         |  206 -
 .../org/apache/asterix/bad/BADConstants.java    |   41 -
 .../org/apache/asterix/bad/ChannelJobInfo.java  |   48 -
 .../apache/asterix/bad/ChannelJobService.java   |  145 -
 .../bad/lang/BADCompilationProvider.java        |   52 -
 .../asterix/bad/lang/BADLangExtension.java      |  106 -
 .../asterix/bad/lang/BADParserFactory.java      |   38 -
 .../bad/lang/BADQueryTranslatorExtension.java   |   53 -
 .../bad/lang/BADQueryTranslatorFactory.java     |   41 -
 .../asterix/bad/lang/BADStatementExecutor.java  |   46 -
 .../bad/lang/statement/BrokerDropStatement.java |   99 -
 .../lang/statement/ChannelDropStatement.java    |  166 -
 .../statement/ChannelSubscribeStatement.java    |  202 -
 .../statement/ChannelUnsubscribeStatement.java  |  154 -
 .../lang/statement/CreateBrokerStatement.java   |  105 -
 .../lang/statement/CreateChannelStatement.java  |  373 --
 .../bad/metadata/BADMetadataExtension.java      |  109 -
 .../bad/metadata/BADMetadataIndexes.java        |   66 -
 .../bad/metadata/BADMetadataRecordTypes.java    |   89 -
 .../org/apache/asterix/bad/metadata/Broker.java |   69 -
 .../asterix/bad/metadata/BrokerSearchKey.java   |   45 -
 .../bad/metadata/BrokerTupleTranslator.java     |  118 -
 .../apache/asterix/bad/metadata/Channel.java    |   96 -
 .../bad/metadata/ChannelEventsListener.java     |  237 -
 .../asterix/bad/metadata/ChannelSearchKey.java  |   45 -
 .../bad/metadata/ChannelTupleTranslator.java    |  159 -
 .../InsertBrokerNotifierForChannelRule.java     |  317 --
 .../bad/runtime/NotifyBrokerOperator.java       |   90 -
 .../bad/runtime/NotifyBrokerPOperator.java      |  111 -
 .../bad/runtime/NotifyBrokerRuntime.java        |  138 -
 .../bad/runtime/NotifyBrokerRuntimeFactory.java |   55 -
 .../RepetitiveChannelOperatorDescriptor.java    |   83 -
 .../RepetitiveChannelOperatorNodePushable.java  |  125 -
 src/main/resources/git.properties               |   22 -
 src/main/resources/lang-extension/lang.txt      |  179 -
 .../asterix/bad/test/BADExecutionTest.java      |   98 -
 .../asterix/bad/test/BADOptimizerTest.java      |   60 -
 .../conf/asterix-build-configuration.xml        |  110 -
 src/test/resources/conf/cluster.xml             |   49 -
 .../conf/hyracks-deployment.properties          |   21 -
 src/test/resources/conf/test.properties         |   22 -
 .../queries/channel/channel-create.aql          |   36 -
 .../queries/channel/channel-subscribe.aql       |   40 -
 .../queries/channel/channel-unsubscribe.aql     |   38 -
 .../results/channel/channel-create.plan         |   30 -
 .../results/channel/channel-subscribe.plan      |   44 -
 .../results/channel/channel-unsubscribe.plan    |   44 -
 .../create_channel_check_datasets.1.ddl.aql     |   34 -
 .../create_channel_check_datasets.2.update.aql  |    0
 .../create_channel_check_datasets.3.query.aql   |    7 -
 .../create_channel_check_metadata.1.ddl.aql     |   34 -
 .../create_channel_check_metadata.2.update.aql  |    0
 .../create_channel_check_metadata.3.query.aql   |    3 -
 .../drop_channel_check_datasets.1.ddl.aql       |   38 -
 .../drop_channel_check_datasets.2.update.aql    |    3 -
 .../drop_channel_check_datasets.3.query.aql     |    7 -
 .../drop_channel_check_metadata.1.ddl.aql       |   38 -
 .../drop_channel_check_metadata.2.update.aql    |    3 -
 .../drop_channel_check_metadata.3.query.aql     |    3 -
 ...scribe_channel_check_subscriptions.1.ddl.aql |   34 -
 ...ibe_channel_check_subscriptions.2.update.aql |    7 -
 ...ribe_channel_check_subscriptions.3.query.aql |    4 -
 .../create_channel_check_datasets.1.adm         |    3 -
 .../create_channel_check_metadata.1.adm         |    2 -
 .../drop_channel_check_datasets.1.adm           |    5 -
 .../drop_channel_check_metadata.1.adm           |    3 -
 .../subscribe_channel_check_subscriptions.1.adm |    4 -
 target/.plxarc                                  |    1 -
 target/asterix-opt-0.8.9-SNAPSHOT.jar           |  Bin 165124 -> 0 bytes
 target/checkstyle-checker.xml                   |    5 -
 target/checkstyle-result.xml                    |  119 -
 target/checkstyle-rules.xml                     |    5 -
 target/classes/META-INF/DEPENDENCIES            |  489 --
 target/classes/META-INF/LICENSE                 |  202 -
 target/classes/META-INF/NOTICE                  |    8 -
 target/classes/git.properties                   |   22 -
 target/classes/lang-extension/lang.txt          |  179 -
 .../bad/BADConstants$ChannelJobType.class       |  Bin 1190 -> 0 bytes
 .../org/apache/asterix/bad/BADConstants.class   |  Bin 1005 -> 0 bytes
 .../org/apache/asterix/bad/ChannelJobInfo.class |  Bin 1673 -> 0 bytes
 .../apache/asterix/bad/ChannelJobService.class  |  Bin 6182 -> 0 bytes
 .../asterix/bad/lang/BADAQLParser$1.class       |  Bin 240 -> 0 bytes
 .../bad/lang/BADAQLParser$FunctionName.class    |  Bin 725 -> 0 bytes
 .../bad/lang/BADAQLParser$IndexParams.class     |  Bin 794 -> 0 bytes
 .../asterix/bad/lang/BADAQLParser$JJCalls.class |  Bin 521 -> 0 bytes
 .../lang/BADAQLParser$LookaheadSuccess.class    |  Bin 567 -> 0 bytes
 .../apache/asterix/bad/lang/BADAQLParser.class  |  Bin 100260 -> 0 bytes
 .../bad/lang/BADAQLParserConstants.class        |  Bin 8427 -> 0 bytes
 .../bad/lang/BADAQLParserTokenManager.class     |  Bin 47691 -> 0 bytes
 .../bad/lang/BADCompilationProvider.class       |  Bin 1308 -> 0 bytes
 .../asterix/bad/lang/BADLangExtension$1.class   |  Bin 912 -> 0 bytes
 .../asterix/bad/lang/BADLangExtension.class     |  Bin 6111 -> 0 bytes
 .../asterix/bad/lang/BADParserFactory.class     |  Bin 855 -> 0 bytes
 ...BADQueryTranslatorExtension$LazyHolder.class |  Bin 1155 -> 0 bytes
 .../bad/lang/BADQueryTranslatorExtension.class  |  Bin 1573 -> 0 bytes
 .../bad/lang/BADQueryTranslatorFactory.class    |  Bin 1892 -> 0 bytes
 .../asterix/bad/lang/BADStatementExecutor.class |  Bin 1750 -> 0 bytes
 .../asterix/bad/lang/JavaCharStream.class       |  Bin 9889 -> 0 bytes
 .../asterix/bad/lang/ParseException.class       |  Bin 3760 -> 0 bytes
 .../org/apache/asterix/bad/lang/Token.class     |  Bin 1265 -> 0 bytes
 .../apache/asterix/bad/lang/TokenMgrError.class |  Bin 2865 -> 0 bytes
 .../lang/statement/BrokerDropStatement.class    |  Bin 5083 -> 0 bytes
 .../lang/statement/ChannelDropStatement.class   |  Bin 9347 -> 0 bytes
 .../statement/ChannelSubscribeStatement.class   |  Bin 10902 -> 0 bytes
 .../statement/ChannelUnsubscribeStatement.class |  Bin 4351 -> 0 bytes
 .../lang/statement/CreateBrokerStatement.class  |  Bin 5718 -> 0 bytes
 .../lang/statement/CreateChannelStatement.class |  Bin 23785 -> 0 bytes
 .../bad/metadata/BADMetadataExtension.class     |  Bin 4750 -> 0 bytes
 .../bad/metadata/BADMetadataIndexes.class       |  Bin 2816 -> 0 bytes
 .../bad/metadata/BADMetadataRecordTypes.class   |  Bin 3178 -> 0 bytes
 .../apache/asterix/bad/metadata/Broker.class    |  Bin 1509 -> 0 bytes
 .../asterix/bad/metadata/BrokerSearchKey.class  |  Bin 1266 -> 0 bytes
 .../bad/metadata/BrokerTupleTranslator.class    |  Bin 5829 -> 0 bytes
 .../apache/asterix/bad/metadata/Channel.class   |  Bin 2781 -> 0 bytes
 .../bad/metadata/ChannelEventsListener$1.class  |  Bin 906 -> 0 bytes
 .../bad/metadata/ChannelEventsListener.class    |  Bin 12124 -> 0 bytes
 .../asterix/bad/metadata/ChannelSearchKey.class |  Bin 1271 -> 0 bytes
 .../bad/metadata/ChannelTupleTranslator.class   |  Bin 7302 -> 0 bytes
 .../InsertBrokerNotifierForChannelRule.class    |  Bin 15855 -> 0 bytes
 .../bad/runtime/NotifyBrokerOperator.class      |  Bin 2629 -> 0 bytes
 .../bad/runtime/NotifyBrokerPOperator.class     |  Bin 7083 -> 0 bytes
 .../bad/runtime/NotifyBrokerRuntime.class       |  Bin 7215 -> 0 bytes
 .../runtime/NotifyBrokerRuntimeFactory.class    |  Bin 1944 -> 0 bytes
 .../RepetitiveChannelOperatorDescriptor.class   |  Bin 3383 -> 0 bytes
 ...epetitiveChannelOperatorNodePushable$1.class |  Bin 1000 -> 0 bytes
 .../RepetitiveChannelOperatorNodePushable.class |  Bin 4481 -> 0 bytes
 target/generated-resources/javacc/grammar.jj    | 2949 ------------
 .../apache/asterix/bad/lang/BADAQLParser.java   | 4407 ------------------
 .../asterix/bad/lang/BADAQLParserConstants.java |  454 --
 .../bad/lang/BADAQLParserTokenManager.java      | 3701 ---------------
 .../apache/asterix/bad/lang/JavaCharStream.java |  617 ---
 .../apache/asterix/bad/lang/ParseException.java |  187 -
 .../org/apache/asterix/bad/lang/Token.java      |  131 -
 .../apache/asterix/bad/lang/TokenMgrError.java  |  147 -
 target/maven-archiver/pom.properties            |    5 -
 .../META-INF/DEPENDENCIES                       |  489 --
 .../META-INF/LICENSE                            |  202 -
 .../META-INF/NOTICE                             |    8 -
 .../compile/default-compile/createdFiles.lst    |   49 -
 .../compile/default-compile/inputFiles.lst      |   39 -
 .../default-testCompile/createdFiles.lst        |    2 -
 .../default-testCompile/inputFiles.lst          |    2 -
 target/rat.txt                                  |   72 -
 target/test-classes/META-INF/DEPENDENCIES       |  489 --
 target/test-classes/META-INF/LICENSE            |  202 -
 target/test-classes/META-INF/NOTICE             |    8 -
 .../conf/asterix-build-configuration.xml        |  110 -
 target/test-classes/conf/cluster.xml            |   49 -
 .../conf/hyracks-deployment.properties          |   21 -
 target/test-classes/conf/test.properties        |   22 -
 .../queries/channel/channel-create.aql          |   36 -
 .../queries/channel/channel-subscribe.aql       |   40 -
 .../queries/channel/channel-unsubscribe.aql     |   38 -
 .../results/channel/channel-create.plan         |   30 -
 .../results/channel/channel-subscribe.plan      |   44 -
 .../results/channel/channel-unsubscribe.plan    |   44 -
 .../asterix/bad/test/BADExecutionTest.class     |  Bin 4444 -> 0 bytes
 .../asterix/bad/test/BADOptimizerTest.class     |  Bin 1922 -> 0 bytes
 .../create_channel_check_datasets.1.ddl.aql     |   34 -
 .../create_channel_check_datasets.2.update.aql  |    0
 .../create_channel_check_datasets.3.query.aql   |    7 -
 .../create_channel_check_metadata.1.ddl.aql     |   34 -
 .../create_channel_check_metadata.2.update.aql  |    0
 .../create_channel_check_metadata.3.query.aql   |    3 -
 .../drop_channel_check_datasets.1.ddl.aql       |   38 -
 .../drop_channel_check_datasets.2.update.aql    |    3 -
 .../drop_channel_check_datasets.3.query.aql     |    7 -
 .../drop_channel_check_metadata.1.ddl.aql       |   38 -
 .../drop_channel_check_metadata.2.update.aql    |    3 -
 .../drop_channel_check_metadata.3.query.aql     |    3 -
 ...scribe_channel_check_subscriptions.1.ddl.aql |   34 -
 ...ibe_channel_check_subscriptions.2.update.aql |    7 -
 ...ribe_channel_check_subscriptions.3.query.aql |    4 -
 .../create_channel_check_datasets.1.adm         |    3 -
 .../create_channel_check_metadata.1.adm         |    2 -
 .../drop_channel_check_datasets.1.adm           |    5 -
 .../drop_channel_check_metadata.1.adm           |    3 -
 .../subscribe_channel_check_subscriptions.1.adm |    4 -
 271 files changed, 4880 insertions(+), 20776 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..35234a6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,50 @@
+invIndex*
+primaryBTree*
+target
+.classpath
+.settings
+.project
+ClusterControllerService
+rttest
+mdtest
+ittest
+asterix_logs
+build
+asterixdb/asterix-app/src/test/resources/externallib
+asterixdb/asterix-app/opttest
+asterixdb/asterix-app/parserts
+asterixdb/asterix-app/library
+asterixdb/asterix-app/opt_parserts
+asterixdb/asterix-app/runtime_parserts
+asterixdb/asterix-app/data/csv/beer.csv
+asterixdb/asterix-installer/ittest
+asterixdb/asterix-installer/repliationtest
+asterixdb/asterix-installer/src/test/resources/clusterts/asterix-installer-*-SNAPSHOT-binary-assembly
+*-coredump
+*.pyc
+*.iml
+.idea
+*.ipr
+*.iws
+git.properties
+actual
+exception
+expected
+teststore1
+teststore2
+dev1
+dev2
+dev3
+dev4
+derby.log
+hadoop-conf-tmp
+metastore_db
+teststore
+output
+tmp
+dist
+*~
+.DS_Store
+*.swp
+.m2*
+�

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/pom.xml
----------------------------------------------------------------------
diff --git a/asterix-opt/pom.xml b/asterix-opt/pom.xml
new file mode 100644
index 0000000..72dcd33
--- /dev/null
+++ b/asterix-opt/pom.xml
@@ -0,0 +1,206 @@
+<!--
+ ! 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.
+ !-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.asterix</groupId>
+    <artifactId>apache-asterixdb</artifactId>
+    <version>0.8.9-SNAPSHOT</version>
+  </parent>
+  <artifactId>asterix-opt</artifactId>
+    <properties>
+    <asterix.version>0.8.9-SNAPSHOT</asterix.version>
+  </properties>
+    <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.asterix</groupId>
+        <artifactId>asterix-grammar-extension-maven-plugin</artifactId>
+        <version>${asterix.version}</version>
+        <configuration>
+          <base>${project.basedir}</base>
+          <gbase>../asterix-lang-aql/src/main/javacc/AQL.jj</gbase>
+          <gextension>src/main/resources/lang-extension/lang.txt</gextension>
+          <output>target/generated-resources/javacc/grammar.jj</output>
+          <parserClassName>BADAQLParser</parserClassName>
+          <packageName>org.apache.asterix.bad.lang</packageName>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>grammarix</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>javacc-maven-plugin</artifactId>
+        <version>2.6</version>
+        <executions>
+          <execution>
+            <id>javacc</id>
+            <goals>
+              <goal>javacc</goal>
+            </goals>
+            <configuration>
+              <isStatic>false</isStatic>
+              <javaUnicodeEscape>true</javaUnicodeEscape>
+              <sourceDirectory>target/generated-resources/javacc</sourceDirectory>
+            </configuration>
+          </execution>
+          <execution>
+            <id>javacc-jjdoc</id>
+            <goals>
+              <goal>jjdoc</goal>
+            </goals>
+            <phase>process-sources</phase>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.9</version>
+        <executions>
+          <execution>
+            <id>add-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${project.build.directory}/generated-sources/javacc/</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+        <plugin>
+          <groupId>org.eclipse.m2e</groupId>
+          <artifactId>lifecycle-mapping</artifactId>
+          <version>1.0.0</version>
+          <configuration>
+            <lifecycleMappingMetadata>
+              <pluginExecutions>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.apache.asterix</groupId>
+                    <artifactId>asterix-grammar-extension-maven-plugin</artifactId>
+                    <versionRange>[${asterix.version},)</versionRange>
+                    <goals>
+                      <goal>grammarix</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+                <pluginExecution>
+                  <pluginExecutionFilter>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>javacc-maven-plugin</artifactId>
+                    <versionRange>[2.6,)</versionRange>
+                    <goals>
+                      <goal>javacc</goal>
+                    </goals>
+                  </pluginExecutionFilter>
+                  <action>
+                    <ignore></ignore>
+                  </action>
+                </pluginExecution>
+              </pluginExecutions>
+            </lifecycleMappingMetadata>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.asterix</groupId>
+      <artifactId>asterix-om</artifactId>
+      <version>${project.version}</version>
+      <type>jar</type>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hyracks</groupId>
+      <artifactId>hyracks-test-support</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.asterix</groupId>
+      <artifactId>asterix-runtime</artifactId>
+      <version>${project.version}</version>
+      <type>jar</type>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hyracks</groupId>
+      <artifactId>algebricks-compiler</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hyracks</groupId>
+      <artifactId>hyracks-hdfs-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.asterix</groupId>
+      <artifactId>asterix-common</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.asterix</groupId>
+      <artifactId>asterix-test-framework</artifactId>
+      <version>${asterix.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.asterix</groupId>
+      <artifactId>asterix-active</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.asterix</groupId>
+      <artifactId>asterix-app</artifactId>
+      <version>${asterix.version}</version>
+      <type>jar</type>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.asterix</groupId>
+      <artifactId>asterix-app</artifactId>
+      <version>${asterix.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.asterix</groupId>
+      <artifactId>asterix-common</artifactId>
+      <version>${asterix.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/BADConstants.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/BADConstants.java b/asterix-opt/src/main/java/org/apache/asterix/bad/BADConstants.java
new file mode 100644
index 0000000..aeef031
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/BADConstants.java
@@ -0,0 +1,41 @@
+/*
+ * 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.asterix.bad;
+
+public interface BADConstants {
+    final String SubscriptionId = "subscriptionId";
+    final String BrokerName = "BrokerName";
+    final String BrokerDataverse = "DataverseName";
+    final String BrokerEndPoint = "BrokerEndPoint";
+    final String DeliveryTime = "deliveryTime";
+    final String ResultId = "resultId";
+    final String ChannelExecutionTime = "channelExecutionTime";
+    final String ChannelSubscriptionsType = "ChannelSubscriptionsType";
+    final String ChannelResultsType = "ChannelResultsType";
+    final String FEED_EXTENSION_NAME = "Feed";
+    final String CHANNEL_EXTENSION_NAME = "Subscriptions";
+    final String subscriptionEnding = "Results";
+    final String resultsEnding = "Channel";
+    final String BAD_METADATA_EXTENSION_NAME = "BADMetadataExtension";
+    final String BAD_DATAVERSE_NAME = "BAD";
+
+    public enum ChannelJobType {
+        REPETITIVE
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java b/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java
new file mode 100644
index 0000000..da0c43b
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java
@@ -0,0 +1,48 @@
+/*
+ * 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.asterix.bad;
+
+import java.util.List;
+
+import org.apache.asterix.active.ActiveJob;
+import org.apache.asterix.active.ActivityState;
+import org.apache.asterix.active.EntityId;
+import org.apache.asterix.bad.BADConstants.ChannelJobType;
+import org.apache.hyracks.api.job.JobId;
+import org.apache.hyracks.api.job.JobSpecification;
+
+public class ChannelJobInfo extends ActiveJob {
+
+    private static final long serialVersionUID = 1L;
+    private List<String> locations;
+
+    public ChannelJobInfo(EntityId entityId, JobId jobId, ActivityState state, JobSpecification spec) {
+        super(entityId, jobId, state, ChannelJobType.REPETITIVE, spec);
+    }
+
+    public List<String> getLocations() {
+        return locations;
+
+    }
+
+    public void setLocations(List<String> locations) {
+        this.locations = locations;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobService.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobService.java b/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobService.java
new file mode 100644
index 0000000..8310f70
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/ChannelJobService.java
@@ -0,0 +1,145 @@
+/*
+ * 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.asterix.bad;
+
+import java.io.BufferedReader;
+import java.io.DataOutputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.asterix.active.EntityId;
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.om.base.AOrderedList;
+import org.apache.asterix.om.base.AUUID;
+import org.apache.hyracks.api.client.HyracksConnection;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.job.JobId;
+import org.apache.hyracks.api.job.JobSpecification;
+import org.json.JSONException;
+
+/**
+ * Provides functionality for running channel jobs and communicating with Brokers
+ */
+public class ChannelJobService {
+
+    private static final Logger LOGGER = Logger.getLogger(ChannelJobService.class.getName());
+    IHyracksClientConnection hcc;
+
+    public ChannelJobService() throws AsterixException {
+
+    }
+
+    public void runChannelJob(JobSpecification channeljobSpec, String strIP, int port) throws Exception {
+        hcc = new HyracksConnection(strIP, port);
+        JobId jobId = hcc.startJob(channeljobSpec);
+        hcc.waitForCompletion(jobId);
+    }
+
+    public void sendBrokerNotificationsForChannel(EntityId activeJobId, String brokerEndpoint,
+            AOrderedList subscriptionIds, String channelExecutionTime) throws HyracksDataException {
+        String formattedString;
+        try {
+            formattedString = formatJSON(activeJobId, subscriptionIds, channelExecutionTime);
+        } catch (JSONException e) {
+            throw new HyracksDataException(e);
+        }
+        sendMessage(brokerEndpoint, formattedString);
+    }
+
+    public String formatJSON(EntityId activeJobId, AOrderedList subscriptionIds, String channelExecutionTime)
+            throws JSONException {
+        String JSON = "{ \"dataverseName\":\"" + activeJobId.getDataverse() + "\", \"channelName\":\""
+                + activeJobId.getEntityName() + "\", \"" + BADConstants.ChannelExecutionTime + "\":\""
+                + channelExecutionTime + "\", \"subscriptionIds\":[";
+        for (int i = 0; i < subscriptionIds.size(); i++) {
+            AUUID subId = (AUUID) subscriptionIds.getItem(i);
+            String subString = subId.toSimpleString();
+            JSON += "\"" + subString + "\"";
+            if (i < subscriptionIds.size() - 1) {
+                JSON += ",";
+            }
+        }
+        JSON += "]}";
+        return JSON;
+
+    }
+
+    public static void sendMessage(String targetURL, String urlParameters) {
+        HttpURLConnection connection = null;
+        try {
+            //Create connection
+            URL url = new URL(targetURL);
+            connection = (HttpURLConnection) url.openConnection();
+            connection.setRequestMethod("POST");
+            connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+
+            connection.setRequestProperty("Content-Length", Integer.toString(urlParameters.getBytes().length));
+            connection.setRequestProperty("Content-Language", "en-US");
+
+            connection.setUseCaches(false);
+            connection.setDoOutput(true);
+
+            //Send message
+            try {
+                DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
+                wr.writeBytes(urlParameters);
+                wr.close();
+            } catch (Exception e) {
+                throw new AsterixException("Broker connection failed to write", e);
+            }
+
+            if (LOGGER.isLoggable(Level.INFO)) {
+                int responseCode = connection.getResponseCode();
+                LOGGER.info("\nSending 'POST' request to URL : " + url);
+                LOGGER.info("Post parameters : " + urlParameters);
+                LOGGER.info("Response Code : " + responseCode);
+            }
+
+            BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+            String inputLine;
+            StringBuffer response = new StringBuffer();
+
+            while ((inputLine = in.readLine()) != null) {
+                response.append(inputLine);
+            }
+            in.close();
+
+            if (LOGGER.isLoggable(Level.INFO)) {
+                System.out.println(response.toString());
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (connection != null) {
+                connection.disconnect();
+            }
+        }
+    }
+
+    @Override
+    public String toString() {
+        return "ChannelJobService";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java
new file mode 100644
index 0000000..42036af
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java
@@ -0,0 +1,52 @@
+/*
+ * 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.asterix.bad.lang;
+
+import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslatorFactory;
+import org.apache.asterix.compiler.provider.ILangCompilationProvider;
+import org.apache.asterix.lang.aql.rewrites.AQLRewriterFactory;
+import org.apache.asterix.lang.aql.visitor.AQLAstPrintVisitorFactory;
+import org.apache.asterix.lang.common.base.IAstPrintVisitorFactory;
+import org.apache.asterix.lang.common.base.IParserFactory;
+import org.apache.asterix.lang.common.base.IRewriterFactory;
+import org.apache.asterix.translator.AqlExpressionToPlanTranslatorFactory;
+
+public class BADCompilationProvider implements ILangCompilationProvider {
+
+    @Override
+    public IParserFactory getParserFactory() {
+        return new BADParserFactory();
+    }
+
+    @Override
+    public IRewriterFactory getRewriterFactory() {
+        return new AQLRewriterFactory();
+    }
+
+    @Override
+    public IAstPrintVisitorFactory getAstPrintVisitorFactory() {
+        return new AQLAstPrintVisitorFactory();
+    }
+
+    @Override
+    public ILangExpressionToPlanTranslatorFactory getExpressionToPlanTranslatorFactory() {
+        return new AqlExpressionToPlanTranslatorFactory();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java
new file mode 100644
index 0000000..9832fe6
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java
@@ -0,0 +1,106 @@
+/*
+ * 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.asterix.bad.lang;
+
+import java.util.List;
+
+import org.apache.asterix.algebra.base.ILangExtension;
+import org.apache.asterix.bad.metadata.Broker;
+import org.apache.asterix.bad.metadata.BrokerSearchKey;
+import org.apache.asterix.bad.metadata.Channel;
+import org.apache.asterix.bad.metadata.ChannelSearchKey;
+import org.apache.asterix.common.api.ExtensionId;
+import org.apache.asterix.compiler.provider.ILangCompilationProvider;
+import org.apache.asterix.compiler.provider.SqlppCompilationProvider;
+import org.apache.asterix.metadata.MetadataManager;
+import org.apache.asterix.metadata.MetadataTransactionContext;
+import org.apache.commons.lang3.mutable.Mutable;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.common.utils.Pair;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
+import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.UnnestOperator;
+
+public class BADLangExtension implements ILangExtension {
+
+    public static final ExtensionId EXTENSION_ID = new ExtensionId(BADLangExtension.class.getSimpleName(), 0);
+
+    @Override
+    public ExtensionId getId() {
+        return EXTENSION_ID;
+    }
+
+    @Override
+    public void configure(List<Pair<String, String>> args) {
+    }
+
+    @Override
+    public ILangCompilationProvider getLangCompilationProvider(Language lang) {
+        switch (lang) {
+            case AQL:
+                return new BADCompilationProvider();
+            case SQLPP:
+                return new SqlppCompilationProvider();
+            default:
+                return null;
+        }
+    }
+
+    @Override
+    public ExtensionKind getExtensionKind() {
+        return ExtensionKind.LANG;
+    }
+
+    @Override
+    public boolean unnestToDataScan(Mutable<ILogicalOperator> opRef, IOptimizationContext context,
+            UnnestOperator unnestOp, ILogicalExpression unnestExpr, AbstractFunctionCallExpression functionCallExpr)
+                    throws AlgebricksException {
+        // TODO I dont need this?????
+        return false;
+    }
+
+    public static Broker getBroker(MetadataTransactionContext mdTxnCtx, String dataverseName, String brokerName)
+            throws AlgebricksException {
+        BrokerSearchKey brokerSearchKey = new BrokerSearchKey(dataverseName, brokerName);
+        List<Broker> brokers = MetadataManager.INSTANCE.getEntities(mdTxnCtx, brokerSearchKey);
+        if (brokers.isEmpty()) {
+            return null;
+        } else if (brokers.size() > 1) {
+            throw new AlgebricksException("Broker search key returned more than one broker");
+        } else {
+            return brokers.get(0);
+        }
+    }
+
+    public static Channel getChannel(MetadataTransactionContext mdTxnCtx, String dataverseName, String channelName)
+            throws AlgebricksException {
+        ChannelSearchKey channelSearchKey = new ChannelSearchKey(dataverseName, channelName);
+        List<Channel> channels = MetadataManager.INSTANCE.getEntities(mdTxnCtx, channelSearchKey);
+        if (channels.isEmpty()) {
+            return null;
+        } else if (channels.size() > 1) {
+            throw new AlgebricksException("Channel search key returned more than one channel");
+        } else {
+            return channels.get(0);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java
new file mode 100644
index 0000000..58bca17
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java
@@ -0,0 +1,38 @@
+/*
+ * 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.asterix.bad.lang;
+
+import java.io.Reader;
+
+import org.apache.asterix.lang.common.base.IParser;
+import org.apache.asterix.lang.common.base.IParserFactory;
+
+public class BADParserFactory implements IParserFactory {
+
+    @Override
+    public IParser createParser(String query) {
+        return new BADAQLParser(query);
+    }
+
+    @Override
+    public IParser createParser(Reader reader) {
+        return new BADAQLParser(reader);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java
new file mode 100644
index 0000000..4198230
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java
@@ -0,0 +1,53 @@
+/*
+ * 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.asterix.bad.lang;
+
+import java.util.List;
+
+import org.apache.asterix.app.cc.CompilerExtensionManager;
+import org.apache.asterix.app.cc.IStatementExecutorExtension;
+import org.apache.asterix.common.api.ExtensionId;
+import org.apache.asterix.runtime.util.AsterixAppContextInfo;
+import org.apache.asterix.translator.IStatementExecutorFactory;
+import org.apache.hyracks.algebricks.common.utils.Pair;
+
+public class BADQueryTranslatorExtension implements IStatementExecutorExtension {
+
+    public static final ExtensionId BAD_QUERY_TRANSLATOR_EXTENSION_ID = new ExtensionId(
+            BADQueryTranslatorExtension.class.getSimpleName(), 0);
+
+    private static class LazyHolder {
+        private static final IStatementExecutorFactory INSTANCE = new BADQueryTranslatorFactory(
+                (CompilerExtensionManager) AsterixAppContextInfo.INSTANCE.getExtensionManager());
+    }
+
+    @Override
+    public ExtensionId getId() {
+        return BAD_QUERY_TRANSLATOR_EXTENSION_ID;
+    }
+
+    @Override
+    public void configure(List<Pair<String, String>> args) {
+    }
+
+    @Override
+    public IStatementExecutorFactory getQueryTranslatorFactory() {
+        return LazyHolder.INSTANCE;
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
new file mode 100644
index 0000000..b8a6050
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
@@ -0,0 +1,41 @@
+/*
+ * 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.asterix.bad.lang;
+
+import java.util.List;
+
+import org.apache.asterix.app.cc.CompilerExtensionManager;
+import org.apache.asterix.app.translator.DefaultStatementExecutorFactory;
+import org.apache.asterix.app.translator.QueryTranslator;
+import org.apache.asterix.common.app.SessionConfig;
+import org.apache.asterix.compiler.provider.ILangCompilationProvider;
+import org.apache.asterix.lang.common.base.Statement;
+
+public class BADQueryTranslatorFactory extends DefaultStatementExecutorFactory {
+
+    public BADQueryTranslatorFactory(CompilerExtensionManager ccExtensionManager) {
+        super(ccExtensionManager);
+    }
+
+    @Override
+    public QueryTranslator create(List<Statement> statements, SessionConfig conf,
+            ILangCompilationProvider compilationProvider) {
+        return new BADStatementExecutor(statements, conf, compilationProvider, cExtensionManager);
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
new file mode 100644
index 0000000..1c17794
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
@@ -0,0 +1,46 @@
+/*
+ * 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.asterix.bad.lang;
+
+import java.util.List;
+
+import org.apache.asterix.app.cc.CompilerExtensionManager;
+import org.apache.asterix.app.translator.QueryTranslator;
+import org.apache.asterix.common.app.SessionConfig;
+import org.apache.asterix.compiler.provider.ILangCompilationProvider;
+import org.apache.asterix.lang.common.base.Statement;
+import org.apache.asterix.metadata.declared.AqlMetadataProvider;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+
+public class BADStatementExecutor extends QueryTranslator {
+
+    public BADStatementExecutor(List<Statement> aqlStatements, SessionConfig conf,
+            ILangCompilationProvider compliationProvider, CompilerExtensionManager ccExtensionManager) {
+        super(aqlStatements, conf, compliationProvider, ccExtensionManager);
+    }
+
+    @Override
+    protected void handleDataverseDropStatement(AqlMetadataProvider metadataProvider, Statement stmt,
+            IHyracksClientConnection hcc) throws Exception {
+        //super(metadataProvider, stmt, hcc);
+        //TODO: need to drop channels and brokers
+        //TODO: need to check if datasets or functions are in use by channels
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java
new file mode 100644
index 0000000..d89617b
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java
@@ -0,0 +1,99 @@
+/*
+ * 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.asterix.bad.lang.statement;
+
+import org.apache.asterix.algebra.extension.IExtensionStatement;
+import org.apache.asterix.app.translator.QueryTranslator;
+import org.apache.asterix.bad.lang.BADLangExtension;
+import org.apache.asterix.bad.metadata.Broker;
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+import org.apache.asterix.metadata.MetadataManager;
+import org.apache.asterix.metadata.MetadataTransactionContext;
+import org.apache.asterix.metadata.declared.AqlMetadataProvider;
+import org.apache.asterix.translator.IStatementExecutor;
+import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
+import org.apache.asterix.translator.IStatementExecutor.Stats;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+import org.apache.hyracks.api.dataset.IHyracksDataset;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class BrokerDropStatement implements IExtensionStatement {
+
+    private final Identifier dataverseName;
+    private final Identifier brokerName;
+    private boolean ifExists;
+
+    public BrokerDropStatement(Identifier dataverseName, Identifier brokerName, boolean ifExists) {
+        this.brokerName = brokerName;
+        this.dataverseName = dataverseName;
+        this.ifExists = ifExists;
+    }
+
+    public boolean getIfExists() {
+        return ifExists;
+    }
+
+    public Identifier getDataverseName() {
+        return dataverseName;
+    }
+
+    public Identifier getBrokerName() {
+        return brokerName;
+    }
+
+    @Override
+    public byte getKind() {
+        return Kind.EXTENSION;
+    }
+
+    @Override
+    public byte getCategory() {
+        return Category.DDL;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+        return null;
+    }
+
+    @Override
+    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
+            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
+                    throws HyracksDataException, AlgebricksException {
+        //TODO: dont drop a broker that's being used
+        MetadataTransactionContext mdTxnCtx = null;
+        try {
+            mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
+            metadataProvider.setMetadataTxnContext(mdTxnCtx);
+            Broker broker = BADLangExtension.getBroker(mdTxnCtx, dataverseName.getValue(), brokerName.getValue());
+            if (broker == null) {
+                throw new AlgebricksException("A broker with this name " + brokerName + " doesn't exist.");
+            }
+            MetadataManager.INSTANCE.deleteEntity(mdTxnCtx, broker);
+            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+        } catch (Exception e) {
+            QueryTranslator.abort(e, e, mdTxnCtx);
+            throw new HyracksDataException(e);
+        }
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
new file mode 100644
index 0000000..60fcf1f
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
@@ -0,0 +1,166 @@
+/*
+ * 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.asterix.bad.lang.statement;
+
+import org.apache.asterix.active.ActiveJobNotificationHandler;
+import org.apache.asterix.active.ActiveRuntimeId;
+import org.apache.asterix.active.EntityId;
+import org.apache.asterix.active.message.ActiveManagerMessage;
+import org.apache.asterix.algebra.extension.IExtensionStatement;
+import org.apache.asterix.app.translator.QueryTranslator;
+import org.apache.asterix.bad.BADConstants;
+import org.apache.asterix.bad.lang.BADLangExtension;
+import org.apache.asterix.bad.metadata.Channel;
+import org.apache.asterix.bad.metadata.ChannelEventsListener;
+import org.apache.asterix.bad.runtime.RepetitiveChannelOperatorNodePushable;
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.messaging.api.ICCMessageBroker;
+import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber;
+import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber.ActiveLifecycleEvent;
+import org.apache.asterix.external.feed.management.ActiveLifecycleEventSubscriber;
+import org.apache.asterix.lang.common.statement.DropDatasetStatement;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+import org.apache.asterix.metadata.MetadataManager;
+import org.apache.asterix.metadata.MetadataTransactionContext;
+import org.apache.asterix.metadata.declared.AqlMetadataProvider;
+import org.apache.asterix.runtime.util.AsterixAppContextInfo;
+import org.apache.asterix.translator.IStatementExecutor;
+import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
+import org.apache.asterix.translator.IStatementExecutor.Stats;
+import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+import org.apache.hyracks.api.dataset.IHyracksDataset;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class ChannelDropStatement implements IExtensionStatement {
+
+    private final Identifier dataverseName;
+    private final Identifier channelName;
+    private boolean ifExists;
+
+    public ChannelDropStatement(Identifier dataverseName, Identifier channelName, boolean ifExists) {
+        this.dataverseName = dataverseName;
+        this.channelName = channelName;
+        this.ifExists = ifExists;
+    }
+
+    public Identifier getDataverseName() {
+        return dataverseName;
+    }
+
+    public Identifier getChannelName() {
+        return channelName;
+    }
+
+    public boolean getIfExists() {
+        return ifExists;
+    }
+
+    @Override
+    public byte getKind() {
+        return Kind.EXTENSION;
+    }
+
+    @Override
+    public byte getCategory() {
+        return Category.DDL;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+        return null;
+    }
+
+    @Override
+    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
+            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
+                    throws HyracksDataException, AlgebricksException {
+        boolean txnActive = false;
+        EntityId entityId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, dataverseName.getValue(),
+                channelName.getValue());
+        ChannelEventsListener listener = (ChannelEventsListener) ActiveJobNotificationHandler.INSTANCE
+                .getActiveEntityListener(entityId);
+        IActiveLifecycleEventSubscriber eventSubscriber = new ActiveLifecycleEventSubscriber();
+        boolean subscriberRegistered = false;
+        Channel channel = null;
+
+        MetadataTransactionContext mdTxnCtx = null;
+        try {
+            mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
+            txnActive = true;
+            channel = BADLangExtension.getChannel(mdTxnCtx, dataverseName.getValue(), channelName.getValue());
+            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+            txnActive = false;
+            if (channel == null) {
+                if (ifExists) {
+                    MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+                    return;
+                } else {
+                    throw new AlgebricksException("There is no channel with this name " + channelName + ".");
+                }
+            }
+            if (listener != null) {
+                subscriberRegistered = listener.isChannelActive(entityId, eventSubscriber);
+            }
+            if (!subscriberRegistered) {
+                throw new AsterixException("Channel " + channelName + " is not running");
+            }
+
+            ICCMessageBroker messageBroker = (ICCMessageBroker) AsterixAppContextInfo.INSTANCE.getCCApplicationContext()
+                    .getMessageBroker();
+            AlgebricksAbsolutePartitionConstraint locations = channel.getPartitionConstraint();
+            int partition = 0;
+            for (String location : locations.getLocations()) {
+                messageBroker.sendApplicationMessageToNC(
+                        new ActiveManagerMessage(ActiveManagerMessage.STOP_ACTIVITY, "cc",
+                                new ActiveRuntimeId(channel.getChannelId(),
+                                        RepetitiveChannelOperatorNodePushable.class.getSimpleName(), partition++)),
+                        location);
+            }
+            eventSubscriber.assertEvent(ActiveLifecycleEvent.ACTIVE_JOB_ENDED);
+
+            //Drop the Channel Datasets
+            //TODO: Need to find some way to handle if this fails.
+            //TODO: Prevent datasets for Channels from being dropped elsewhere
+            DropDatasetStatement dropStmt = new DropDatasetStatement(dataverseName,
+                    new Identifier(channel.getResultsDatasetName()), true);
+            ((QueryTranslator) statementExecutor).handleDatasetDropStatement(metadataProvider, dropStmt, hcc);
+
+            dropStmt = new DropDatasetStatement(dataverseName, new Identifier(channel.getSubscriptionsDataset()), true);
+            ((QueryTranslator) statementExecutor).handleDatasetDropStatement(metadataProvider, dropStmt, hcc);
+
+            if (subscriberRegistered) {
+                listener.deregisterEventSubscriber(eventSubscriber);
+            }
+
+            //Remove the Channel Metadata
+            MetadataManager.INSTANCE.deleteEntity(mdTxnCtx, channel);
+            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+        } catch (Exception e) {
+            e.printStackTrace();
+            if (txnActive) {
+                QueryTranslator.abort(e, e, mdTxnCtx);
+            }
+            throw new HyracksDataException(e);
+        }
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java
new file mode 100644
index 0000000..bfa6bf1
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java
@@ -0,0 +1,202 @@
+/*
+ * 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.asterix.bad.lang.statement;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.asterix.algebra.extension.IExtensionStatement;
+import org.apache.asterix.app.translator.QueryTranslator;
+import org.apache.asterix.bad.BADConstants;
+import org.apache.asterix.bad.lang.BADLangExtension;
+import org.apache.asterix.bad.metadata.Broker;
+import org.apache.asterix.bad.metadata.Channel;
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.expression.FieldBinding;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.expression.RecordConstructor;
+import org.apache.asterix.lang.common.literal.StringLiteral;
+import org.apache.asterix.lang.common.statement.InsertStatement;
+import org.apache.asterix.lang.common.statement.Query;
+import org.apache.asterix.lang.common.statement.UpsertStatement;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+import org.apache.asterix.metadata.MetadataManager;
+import org.apache.asterix.metadata.MetadataTransactionContext;
+import org.apache.asterix.metadata.declared.AqlMetadataProvider;
+import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
+import org.apache.asterix.translator.IStatementExecutor;
+import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
+import org.apache.asterix.translator.IStatementExecutor.Stats;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+import org.apache.hyracks.api.dataset.IHyracksDataset;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class ChannelSubscribeStatement implements IExtensionStatement {
+
+    private final Identifier dataverseName;
+    private final Identifier channelName;
+    private final Identifier brokerDataverseName;
+    private final Identifier brokerName;
+    private final List<Expression> argList;
+    private final String subscriptionId;
+    private final int varCounter;
+
+    public ChannelSubscribeStatement(Identifier dataverseName, Identifier channelName, List<Expression> argList,
+            int varCounter, Identifier brokerDataverseName, Identifier brokerName, String subscriptionId) {
+        this.channelName = channelName;
+        this.dataverseName = dataverseName;
+        this.brokerDataverseName = brokerDataverseName;
+        this.brokerName = brokerName;
+        this.argList = argList;
+        this.subscriptionId = subscriptionId;
+        this.varCounter = varCounter;
+    }
+
+    public Identifier getDataverseName() {
+        return dataverseName;
+    }
+
+    public Identifier getBrokerDataverseName() {
+        return brokerDataverseName;
+    }
+
+    public Identifier getChannelName() {
+        return channelName;
+    }
+
+    public Identifier getBrokerName() {
+        return brokerName;
+    }
+
+    public List<Expression> getArgList() {
+        return argList;
+    }
+
+    public int getVarCounter() {
+        return varCounter;
+    }
+
+    public String getSubscriptionId() {
+        return subscriptionId;
+    }
+
+    @Override
+    public byte getKind() {
+        return Kind.EXTENSION;
+    }
+
+    @Override
+    public byte getCategory() {
+        return Category.QUERY;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+        return null;
+    }
+
+    @Override
+    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
+            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
+                    throws HyracksDataException, AlgebricksException {
+
+        MetadataTransactionContext mdTxnCtx = null;
+        try {
+            mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
+
+            Channel channel = BADLangExtension.getChannel(mdTxnCtx, dataverseName.getValue(), channelName.getValue());
+            if (channel == null) {
+                throw new AsterixException("There is no channel with this name " + channelName + ".");
+            }
+            Broker broker = BADLangExtension.getBroker(mdTxnCtx, brokerDataverseName.getValue(), brokerName.getValue());
+            if (broker == null) {
+                throw new AsterixException("There is no broker with this name " + brokerName + ".");
+            }
+
+            String subscriptionsDatasetName = channel.getSubscriptionsDataset();
+            List<String> returnField = new ArrayList<String>();
+            returnField.add(BADConstants.SubscriptionId);
+
+            if (argList.size() != channel.getFunction().getArity()) {
+                throw new AsterixException("Channel expected " + channel.getFunction().getArity()
+                        + " parameters but got " + argList.size());
+            }
+
+            Query subscriptionTuple = new Query(false);
+
+            List<FieldBinding> fb = new ArrayList<FieldBinding>();
+            LiteralExpr leftExpr = new LiteralExpr(new StringLiteral(BADConstants.BrokerDataverse));
+            Expression rightExpr = new LiteralExpr(new StringLiteral(broker.getDataverseName()));
+            fb.add(new FieldBinding(leftExpr, rightExpr));
+
+            leftExpr = new LiteralExpr(new StringLiteral(BADConstants.BrokerName));
+            rightExpr = new LiteralExpr(new StringLiteral(broker.getBrokerName()));
+            fb.add(new FieldBinding(leftExpr, rightExpr));
+
+            if (subscriptionId != null) {
+                leftExpr = new LiteralExpr(new StringLiteral(BADConstants.SubscriptionId));
+
+                List<Expression> UUIDList = new ArrayList<Expression>();
+                UUIDList.add(new LiteralExpr(new StringLiteral(subscriptionId)));
+                FunctionIdentifier function = AsterixBuiltinFunctions.UUID_CONSTRUCTOR;
+                FunctionSignature UUIDfunc = new FunctionSignature(function.getNamespace(), function.getName(),
+                        function.getArity());
+                CallExpr UUIDCall = new CallExpr(UUIDfunc, UUIDList);
+
+                rightExpr = UUIDCall;
+                fb.add(new FieldBinding(leftExpr, rightExpr));
+            }
+
+            for (int i = 0; i < argList.size(); i++) {
+                leftExpr = new LiteralExpr(new StringLiteral("param" + i));
+                rightExpr = argList.get(i);
+                fb.add(new FieldBinding(leftExpr, rightExpr));
+            }
+            RecordConstructor recordCon = new RecordConstructor(fb);
+            subscriptionTuple.setBody(recordCon);
+
+            subscriptionTuple.setVarCounter(varCounter);
+
+            if (subscriptionId == null) {
+                InsertStatement insert = new InsertStatement(dataverseName, new Identifier(subscriptionsDatasetName),
+                        subscriptionTuple, varCounter, false, returnField);
+                ((QueryTranslator) statementExecutor).handleInsertUpsertStatement(metadataProvider, insert, hcc, hdc,
+                        resultDelivery, stats, false);
+            } else {
+                UpsertStatement upsert = new UpsertStatement(dataverseName, new Identifier(subscriptionsDatasetName),
+                        subscriptionTuple, varCounter);
+                ((QueryTranslator) statementExecutor).handleInsertUpsertStatement(metadataProvider, upsert, hcc, hdc,
+                        resultDelivery, stats, false);
+            }
+
+            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+        } catch (Exception e) {
+            QueryTranslator.abort(e, e, mdTxnCtx);
+            throw new HyracksDataException(e);
+        }
+
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java
new file mode 100644
index 0000000..17e3ad2
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java
@@ -0,0 +1,154 @@
+/*
+ * 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.asterix.bad.lang.statement;
+
+import java.util.List;
+
+import org.apache.asterix.algebra.extension.IExtensionStatement;
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.lang.common.expression.VariableExpr;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+import org.apache.asterix.metadata.declared.AqlMetadataProvider;
+import org.apache.asterix.translator.IStatementExecutor;
+import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
+import org.apache.asterix.translator.IStatementExecutor.Stats;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+import org.apache.hyracks.api.dataset.IHyracksDataset;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class ChannelUnsubscribeStatement implements IExtensionStatement {
+
+    private final Identifier dataverseName;
+    private final Identifier channelName;
+    private final String subscriptionId;
+    private final int varCounter;
+    private VariableExpr vars;
+    private List<String> dataverses;
+    private List<String> datasets;
+
+    public ChannelUnsubscribeStatement(VariableExpr vars, Identifier dataverseName, Identifier channelName,
+            String subscriptionId, int varCounter, List<String> dataverses, List<String> datasets) {
+        this.vars = vars;
+        this.channelName = channelName;
+        this.dataverseName = dataverseName;
+        this.subscriptionId = subscriptionId;
+        this.varCounter = varCounter;
+        this.dataverses = dataverses;
+        this.datasets = datasets;
+    }
+
+    public Identifier getDataverseName() {
+        return dataverseName;
+    }
+
+    public VariableExpr getVariableExpr() {
+        return vars;
+    }
+
+    public Identifier getChannelName() {
+        return channelName;
+    }
+
+    public String getsubScriptionId() {
+        return subscriptionId;
+    }
+
+    public List<String> getDataverses() {
+        return dataverses;
+    }
+
+    public List<String> getDatasets() {
+        return datasets;
+    }
+
+    public int getVarCounter() {
+        return varCounter;
+    }
+
+    @Override
+    public byte getKind() {
+        return Kind.EXTENSION;
+    }
+
+    @Override
+    public byte getCategory() {
+        return Category.UPDATE;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+        return null;
+    }
+
+    @Override
+    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
+            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
+                    throws HyracksDataException, AlgebricksException {
+        /*  ChannelUnsubscribeStatement stmtChannelSub = (ChannelUnsubscribeStatement) stmt;
+        String dataverseName = getActiveDataverse(stmtChannelSub.getDataverseName());
+        Identifier channelName = stmtChannelSub.getChannelName();
+        MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
+        metadataProvider.setMetadataTxnContext(mdTxnCtx);
+        MetadataLockManager.INSTANCE.readChannelBegin(dataverseName, dataverseName + "." + channelName);
+        try {
+            Channel channel = MetadataManager.INSTANCE.getChannel(mdTxnCtx, dataverseName, channelName.getValue());
+            if (channel == null) {
+                throw new AsterixException("There is no channel with this name " + channelName + ".");
+            }
+            Identifier subscriptionsDatasetName = new Identifier(channel.getSubscriptionsDataset());
+        
+            VariableExpr vars = stmtChannelSub.getVariableExpr();
+        
+            //Need a condition to say subscription-id = sid
+            OperatorExpr condition = new OperatorExpr();
+            FieldAccessor fa = new FieldAccessor(vars, new Identifier(ActiveConstants.SubscriptionId));
+            condition.addOperand(fa);
+            condition.setCurrentop(true);
+            condition.addOperator("=");
+        
+            String sid = stmtChannelSub.getsubScriptionId();
+            List<Expression> UUIDList = new ArrayList<Expression>();
+            UUIDList.add(new LiteralExpr(new StringLiteral(sid)));
+        
+            FunctionIdentifier function = AsterixBuiltinFunctions.UUID_CONSTRUCTOR;
+            FunctionSignature UUIDfunc = new FunctionSignature(function.getNamespace(), function.getName(),
+                    function.getArity());
+            CallExpr UUIDCall = new CallExpr(UUIDfunc, UUIDList);
+        
+            condition.addOperand(UUIDCall);
+        
+            DeleteStatement delete = new DeleteStatement(vars, new Identifier(dataverseName), subscriptionsDatasetName,
+                    condition, stmtChannelSub.getVarCounter(), stmtChannelSub.getDataverses(),
+                    stmtChannelSub.getDatasets());
+            AqlDeleteRewriteVisitor visitor = new AqlDeleteRewriteVisitor();
+            delete.accept(visitor, null);
+        
+            handleDeleteStatement(metadataProvider, delete, hcc);
+            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+        
+        } catch (Exception e) {
+            abort(e, e, mdTxnCtx);
+            throw e;
+        } finally {
+            MetadataLockManager.INSTANCE.readChannelEnd(dataverseName, dataverseName + "." + channelName);
+        }*/
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java
new file mode 100644
index 0000000..5b480ae
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java
@@ -0,0 +1,105 @@
+/*
+ * 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.asterix.bad.lang.statement;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.asterix.algebra.extension.IExtensionStatement;
+import org.apache.asterix.app.translator.QueryTranslator;
+import org.apache.asterix.bad.lang.BADLangExtension;
+import org.apache.asterix.bad.metadata.Broker;
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+import org.apache.asterix.metadata.MetadataManager;
+import org.apache.asterix.metadata.MetadataTransactionContext;
+import org.apache.asterix.metadata.declared.AqlMetadataProvider;
+import org.apache.asterix.translator.IStatementExecutor;
+import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
+import org.apache.asterix.translator.IStatementExecutor.Stats;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+import org.apache.hyracks.api.dataset.IHyracksDataset;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class CreateBrokerStatement implements IExtensionStatement {
+
+    private static final Logger LOGGER = Logger.getLogger(CreateBrokerStatement.class.getName());
+    private final Identifier dataverseName;
+    private final Identifier brokerName;
+    private String endPointName;
+
+    public CreateBrokerStatement(Identifier dataverseName, Identifier brokerName, String endPointName) {
+        this.brokerName = brokerName;
+        this.dataverseName = dataverseName;
+        this.endPointName = endPointName;
+    }
+
+    public String getEndPointName() {
+        return endPointName;
+    }
+
+    public Identifier getDataverseName() {
+        return dataverseName;
+    }
+
+    public Identifier getBrokerName() {
+        return brokerName;
+    }
+
+    @Override
+    public byte getKind() {
+        return Kind.EXTENSION;
+    }
+
+    @Override
+    public byte getCategory() {
+        return Category.DDL;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+        return null;
+    }
+
+    @Override
+    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
+            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
+                    throws HyracksDataException, AlgebricksException {
+        MetadataTransactionContext mdTxnCtx = null;
+        try {
+            mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
+            metadataProvider.setMetadataTxnContext(mdTxnCtx);
+            Broker broker = BADLangExtension.getBroker(mdTxnCtx, dataverseName.getValue(), brokerName.getValue());
+            if (broker != null) {
+                throw new AlgebricksException("A broker with this name " + brokerName + " already exists.");
+            }
+            broker = new Broker(dataverseName.getValue(), brokerName.getValue(), endPointName);
+            MetadataManager.INSTANCE.addEntity(mdTxnCtx, broker);
+            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+        } catch (Exception e) {
+            if (mdTxnCtx != null) {
+                QueryTranslator.abort(e, e, mdTxnCtx);
+            }
+            LOGGER.log(Level.WARNING, "Failed creating a broker", e);
+            throw new HyracksDataException(e);
+        }
+    }
+}
\ No newline at end of file


[06/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParser.java
----------------------------------------------------------------------
diff --git a/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParser.java b/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParser.java
deleted file mode 100644
index 8e9ea5a..0000000
--- a/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParser.java
+++ /dev/null
@@ -1,4407 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. BADAQLParser.java */
-package org.apache.asterix.bad.lang;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.asterix.bad.lang.statement.BrokerDropStatement;
-import org.apache.asterix.bad.lang.statement.ChannelDropStatement;
-import org.apache.asterix.bad.lang.statement.ChannelSubscribeStatement;
-import org.apache.asterix.bad.lang.statement.ChannelUnsubscribeStatement;
-import org.apache.asterix.bad.lang.statement.CreateBrokerStatement;
-import org.apache.asterix.bad.lang.statement.CreateChannelStatement;
-import org.apache.asterix.common.annotations.AutoDataGen;
-import org.apache.asterix.common.annotations.DateBetweenYearsDataGen;
-import org.apache.asterix.common.annotations.DatetimeAddRandHoursDataGen;
-import org.apache.asterix.common.annotations.DatetimeBetweenYearsDataGen;
-import org.apache.asterix.common.annotations.FieldIntervalDataGen;
-import org.apache.asterix.common.annotations.FieldValFileDataGen;
-import org.apache.asterix.common.annotations.FieldValFileSameIndexDataGen;
-import org.apache.asterix.common.annotations.IRecordFieldDataGen;
-import org.apache.asterix.common.annotations.InsertRandIntDataGen;
-import org.apache.asterix.common.annotations.ListDataGen;
-import org.apache.asterix.common.annotations.ListValFileDataGen;
-import org.apache.asterix.common.annotations.SkipSecondaryIndexSearchExpressionAnnotation;
-import org.apache.asterix.common.annotations.TypeDataGen;
-import org.apache.asterix.common.annotations.UndeclaredFieldsDataGen;
-import org.apache.asterix.common.config.DatasetConfig.DatasetType;
-import org.apache.asterix.common.config.DatasetConfig.IndexType;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.common.functions.FunctionSignature;
-import org.apache.asterix.lang.aql.clause.DistinctClause;
-import org.apache.asterix.lang.aql.clause.ForClause;
-import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
-import org.apache.asterix.lang.aql.expression.UnionExpr;
-import org.apache.asterix.lang.aql.util.RangeMapBuilder;
-import org.apache.asterix.lang.common.base.Clause;
-import org.apache.asterix.lang.common.base.Expression;
-import org.apache.asterix.lang.common.base.IParser;
-import org.apache.asterix.lang.common.base.Literal;
-import org.apache.asterix.lang.common.base.Statement;
-import org.apache.asterix.lang.common.clause.GroupbyClause;
-import org.apache.asterix.lang.common.clause.LetClause;
-import org.apache.asterix.lang.common.clause.LimitClause;
-import org.apache.asterix.lang.common.clause.OrderbyClause;
-import org.apache.asterix.lang.common.clause.UpdateClause;
-import org.apache.asterix.lang.common.clause.WhereClause;
-import org.apache.asterix.lang.common.context.RootScopeFactory;
-import org.apache.asterix.lang.common.context.Scope;
-import org.apache.asterix.lang.common.expression.AbstractAccessor;
-import org.apache.asterix.lang.common.expression.CallExpr;
-import org.apache.asterix.lang.common.expression.FieldAccessor;
-import org.apache.asterix.lang.common.expression.FieldBinding;
-import org.apache.asterix.lang.common.expression.GbyVariableExpressionPair;
-import org.apache.asterix.lang.common.expression.IfExpr;
-import org.apache.asterix.lang.common.expression.IndexAccessor;
-import org.apache.asterix.lang.common.expression.ListConstructor;
-import org.apache.asterix.lang.common.expression.LiteralExpr;
-import org.apache.asterix.lang.common.expression.OperatorExpr;
-import org.apache.asterix.lang.common.expression.OrderedListTypeDefinition;
-import org.apache.asterix.lang.common.expression.QuantifiedExpression;
-import org.apache.asterix.lang.common.expression.RecordConstructor;
-import org.apache.asterix.lang.common.expression.RecordTypeDefinition;
-import org.apache.asterix.lang.common.expression.TypeExpression;
-import org.apache.asterix.lang.common.expression.TypeReferenceExpression;
-import org.apache.asterix.lang.common.expression.UnaryExpr;
-import org.apache.asterix.lang.common.expression.UnorderedListTypeDefinition;
-import org.apache.asterix.lang.common.expression.VariableExpr;
-import org.apache.asterix.lang.common.literal.DoubleLiteral;
-import org.apache.asterix.lang.common.literal.FalseLiteral;
-import org.apache.asterix.lang.common.literal.FloatLiteral;
-import org.apache.asterix.lang.common.literal.LongIntegerLiteral;
-import org.apache.asterix.lang.common.literal.MissingLiteral;
-import org.apache.asterix.lang.common.literal.NullLiteral;
-import org.apache.asterix.lang.common.literal.StringLiteral;
-import org.apache.asterix.lang.common.literal.TrueLiteral;
-import org.apache.asterix.lang.common.parser.ScopeChecker;
-import org.apache.asterix.lang.common.statement.CompactStatement;
-import org.apache.asterix.lang.common.statement.ConnectFeedStatement;
-import org.apache.asterix.lang.common.statement.CreateDataverseStatement;
-import org.apache.asterix.lang.common.statement.CreateFeedPolicyStatement;
-import org.apache.asterix.lang.common.statement.CreateFeedStatement;
-import org.apache.asterix.lang.common.statement.CreateFunctionStatement;
-import org.apache.asterix.lang.common.statement.CreateIndexStatement;
-import org.apache.asterix.lang.common.statement.CreatePrimaryFeedStatement;
-import org.apache.asterix.lang.common.statement.CreateSecondaryFeedStatement;
-import org.apache.asterix.lang.common.statement.DatasetDecl;
-import org.apache.asterix.lang.common.statement.DataverseDecl;
-import org.apache.asterix.lang.common.statement.DataverseDropStatement;
-import org.apache.asterix.lang.common.statement.DeleteStatement;
-import org.apache.asterix.lang.common.statement.DisconnectFeedStatement;
-import org.apache.asterix.lang.common.statement.DropDatasetStatement;
-import org.apache.asterix.lang.common.statement.ExternalDetailsDecl;
-import org.apache.asterix.lang.common.statement.FeedDropStatement;
-import org.apache.asterix.lang.common.statement.FeedPolicyDropStatement;
-import org.apache.asterix.lang.common.statement.FunctionDecl;
-import org.apache.asterix.lang.common.statement.FunctionDropStatement;
-import org.apache.asterix.lang.common.statement.IndexDropStatement;
-import org.apache.asterix.lang.common.statement.InsertStatement;
-import org.apache.asterix.lang.common.statement.InternalDetailsDecl;
-import org.apache.asterix.lang.common.statement.LoadStatement;
-import org.apache.asterix.lang.common.statement.NodeGroupDropStatement;
-import org.apache.asterix.lang.common.statement.NodegroupDecl;
-import org.apache.asterix.lang.common.statement.Query;
-import org.apache.asterix.lang.common.statement.RefreshExternalDatasetStatement;
-import org.apache.asterix.lang.common.statement.RunStatement;
-import org.apache.asterix.lang.common.statement.SetStatement;
-import org.apache.asterix.lang.common.statement.TypeDecl;
-import org.apache.asterix.lang.common.statement.TypeDropStatement;
-import org.apache.asterix.lang.common.statement.UpdateStatement;
-import org.apache.asterix.lang.common.statement.UpsertStatement;
-import org.apache.asterix.lang.common.statement.WriteStatement;
-import org.apache.asterix.lang.common.struct.Identifier;
-import org.apache.asterix.lang.common.struct.QuantifiedPair;
-import org.apache.asterix.lang.common.struct.VarIdentifier;
-import org.apache.asterix.metadata.utils.MetadataConstants;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-import org.apache.hyracks.algebricks.common.utils.Triple;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionAnnotation;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IndexedNLJoinExpressionAnnotation;
-import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
-import org.apache.xerces.util.IntStack;
-
-class BADAQLParser extends ScopeChecker implements IParser, BADAQLParserConstants {
-
-    // optimizer hints
-    private static final String AUTO_HINT = "auto";
-    private static final String BROADCAST_JOIN_HINT = "bcast";
-    private static final String COMPOSE_VAL_FILES_HINT = "compose-val-files";
-    private static final String DATE_BETWEEN_YEARS_HINT = "date-between-years";
-    private static final String DATETIME_ADD_RAND_HOURS_HINT = "datetime-add-rand-hours";
-    private static final String DATETIME_BETWEEN_YEARS_HINT = "datetime-between-years";
-    private static final String HASH_GROUP_BY_HINT = "hash";
-    private static final String INDEXED_NESTED_LOOP_JOIN_HINT = "indexnl";
-    private static final String INMEMORY_HINT = "inmem";
-    private static final String INSERT_RAND_INT_HINT = "insert-rand-int";
-    private static final String INTERVAL_HINT = "interval";
-    private static final String LIST_HINT = "list";
-    private static final String LIST_VAL_FILE_HINT = "list-val-file";
-    private static final String RANGE_HINT = "range";
-    private static final String SKIP_SECONDARY_INDEX_SEARCH_HINT = "skip-index";
-    private static final String VAL_FILE_HINT = "val-files";
-    private static final String VAL_FILE_SAME_INDEX_HINT = "val-file-same-idx";
-    private static final String GEN_FIELDS_HINT = "gen-fields";
-    // data generator hints
-    private static final String DGEN_HINT = "dgen";
-
-    private static class IndexParams {
-      public IndexType type;
-      public int gramLength;
-
-      public IndexParams(IndexType type, int gramLength) {
-        this.type = type;
-        this.gramLength = gramLength;
-      }
-    };
-
-    private static class FunctionName {
-       public String dataverse = null;
-       public String library = null;
-       public String function = null;
-       public String hint = null;
-    }
-
-    private static String getHint(Token t) {
-        if (t.specialToken == null) {
-            return null;
-        }
-        String s = t.specialToken.image;
-        int n = s.length();
-        if (n < 2) {
-            return null;
-        }
-        return s.substring(1).trim();
-    }
-
-    private static IRecordFieldDataGen parseFieldDataGen(String hint) throws ParseException {
-      IRecordFieldDataGen rfdg = null;
-      String splits[] = hint.split(" +");
-      if (splits[0].equals(VAL_FILE_HINT)) {
-        File[] valFiles = new File[splits.length - 1];
-        for (int k=1; k<splits.length; k++) {
-          valFiles[k-1] = new File(splits[k]);
-        }
-        rfdg = new FieldValFileDataGen(valFiles);
-      } else if (splits[0].equals(VAL_FILE_SAME_INDEX_HINT)) {
-        rfdg = new FieldValFileSameIndexDataGen(new File(splits[1]), splits[2]);
-      } else if (splits[0].equals(LIST_VAL_FILE_HINT)) {
-        rfdg = new ListValFileDataGen(new File(splits[1]), Integer.parseInt(splits[2]), Integer.parseInt(splits[3]));
-      } else if (splits[0].equals(LIST_HINT)) {
-        rfdg = new ListDataGen(Integer.parseInt(splits[1]), Integer.parseInt(splits[2]));
-      } else if (splits[0].equals(INTERVAL_HINT)) {
-        FieldIntervalDataGen.ValueType vt;
-        if (splits[1].equals("int")) {
-          vt = FieldIntervalDataGen.ValueType.INT;
-        } else if (splits[1].equals("long")) {
-          vt = FieldIntervalDataGen.ValueType.LONG;
-        } else if (splits[1].equals("float")) {
-          vt = FieldIntervalDataGen.ValueType.FLOAT;
-        } else if (splits[1].equals("double")) {
-          vt = FieldIntervalDataGen.ValueType.DOUBLE;
-        } else {
-          throw new ParseException("Unknown type for interval data gen: " + splits[1]);
-        }
-        rfdg = new FieldIntervalDataGen(vt, splits[2], splits[3]);
-      } else if (splits[0].equals(INSERT_RAND_INT_HINT)) {
-        rfdg = new InsertRandIntDataGen(splits[1], splits[2]);
-      } else if (splits[0].equals(DATE_BETWEEN_YEARS_HINT)) {
-        rfdg = new DateBetweenYearsDataGen(Integer.parseInt(splits[1]), Integer.parseInt(splits[2]));
-      } else if (splits[0].equals(DATETIME_BETWEEN_YEARS_HINT)) {
-        rfdg = new DatetimeBetweenYearsDataGen(Integer.parseInt(splits[1]), Integer.parseInt(splits[2]));
-      } else if (splits[0].equals(DATETIME_ADD_RAND_HOURS_HINT)) {
-        rfdg = new DatetimeAddRandHoursDataGen(Integer.parseInt(splits[1]), Integer.parseInt(splits[2]), splits[3]);
-      } else if (splits[0].equals(AUTO_HINT)) {
-        rfdg = new AutoDataGen(splits[1]);
-      }
-      return rfdg;
-    }
-
-    public BADAQLParser(String s){
-        this(new StringReader(s));
-        super.setInput(s);
-    }
-
-    public static void main(String args[]) throws ParseException, TokenMgrError, IOException, FileNotFoundException, AsterixException {
-        File file = new File(args[0]);
-        Reader fis = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
-        BADAQLParser parser = new BADAQLParser(fis);
-        List<Statement> st = parser.parse();
-        //st.accept(new AQLPrintVisitor(), 0);
-    }
-
-    public List<Statement> parse() throws AsterixException {
-        try {
-            return Statement();
-        } catch (Error e) {
-            // this is here as the JavaCharStream that's below the lexer somtimes throws Errors that are not handled
-            // by the ANTLR-generated lexer or parser (e.g it does this for invalid backslash u + 4 hex digits escapes)
-            throw new AsterixException(new ParseException(e.getMessage()));
-        } catch (ParseException e){
-            throw new AsterixException(e.getMessage());
-        }
-    }
-
-  final public LimitClause LimitClause() throws ParseException, ParseException {
-    LimitClause lc = new LimitClause();
-    Expression expr;
-    pushForbiddenScope(getCurrentScope());
-    jj_consume_token(LIMIT);
-    expr = Expression();
-                                     lc.setLimitExpr(expr);
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case OFFSET:
-      jj_consume_token(OFFSET);
-      expr = Expression();
-                                    lc.setOffset(expr);
-      break;
-    default:
-      jj_la1[0] = jj_gen;
-      ;
-    }
-    popForbiddenScope();
-    {if (true) return lc;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public String StringLiteral() throws ParseException, ParseException {
-    jj_consume_token(STRING_LITERAL);
-      {if (true) return removeQuotesAndEscapes(token.image);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public RefreshExternalDatasetStatement RefreshExternalDatasetStatement() throws ParseException, ParseException {
-  RefreshExternalDatasetStatement redss = new RefreshExternalDatasetStatement();
-  Pair<Identifier,Identifier> nameComponents = null;
-  String datasetName = null;
-    jj_consume_token(REFRESH);
-    jj_consume_token(EXTERNAL);
-    jj_consume_token(DATASET);
-    nameComponents = QualifiedName();
-    redss.setDataverseName(nameComponents.first);
-    redss.setDatasetName(nameComponents.second);
-    {if (true) return redss;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Statement CompactStatement() throws ParseException, ParseException {
-  Pair<Identifier,Identifier> nameComponents = null;
-  Statement stmt = null;
-    jj_consume_token(COMPACT);
-    jj_consume_token(DATASET);
-    nameComponents = QualifiedName();
-      stmt = new CompactStatement(nameComponents.first, nameComponents.second);
-      {if (true) return stmt;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression AndExpr() throws ParseException, ParseException {
-  OperatorExpr op = null;
-  Expression operand = null;
-    operand = RelExpr();
-    label_1:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case AND:
-        ;
-        break;
-      default:
-        jj_la1[1] = jj_gen;
-        break label_1;
-      }
-      jj_consume_token(AND);
-        if (op == null) {
-          op = new OperatorExpr();
-          op.addOperand(operand);
-        op.setCurrentop(true);
-        }
-        try{
-          op.addOperator(token.image);
-        } catch (AsterixException e){
-          {if (true) throw new ParseException(e.getMessage());}
-        }
-      operand = RelExpr();
-      op.addOperand(operand);
-    }
-      {if (true) return op==null? operand: op;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public TypeDecl TypeSpecification(String hint, boolean dgen) throws ParseException, ParseException {
-  Pair<Identifier,Identifier> nameComponents = null;
-  boolean ifNotExists = false;
-  TypeExpression typeExpr = null;
-    jj_consume_token(TYPE);
-    nameComponents = TypeName();
-    ifNotExists = IfNotExists();
-    jj_consume_token(AS);
-    typeExpr = TypeExpr();
-      long numValues = -1;
-      String filename = null;
-      if (dgen) {
-        String splits[] = hint.split(" +");
-        if (splits.length != 3) {
-          {if (true) throw new ParseException("Expecting /*+ dgen <filename> <numberOfItems> */");}
-        }
-        filename = splits[1];
-        numValues = Long.parseLong(splits[2]);
-      }
-      TypeDataGen tddg = new TypeDataGen(dgen, filename, numValues);
-      {if (true) return new TypeDecl(nameComponents.first, nameComponents.second, typeExpr, tddg, ifNotExists);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Statement WriteStatement() throws ParseException, ParseException {
-  String nodeName = null;
-  String fileName = null;
-  Query query;
-  String writerClass = null;
-  Pair<Identifier,Identifier> nameComponents = null;
-    jj_consume_token(WRITE);
-    jj_consume_token(OUTPUT);
-    jj_consume_token(TO);
-    nodeName = Identifier();
-    jj_consume_token(COLON);
-    fileName = StringLiteral();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case USING:
-      jj_consume_token(USING);
-      writerClass = StringLiteral();
-      break;
-    default:
-      jj_la1[2] = jj_gen;
-      ;
-    }
-      {if (true) return new WriteStatement(new Identifier(nodeName), fileName, writerClass);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Pair<Integer, Pair<List<String>, TypeExpression>> OpenField() throws ParseException, ParseException {
-  TypeExpression fieldType = null;
-  Pair<Integer, List<String>> fieldList = null;
-    fieldList = NestedField();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case COLON:
-      jj_consume_token(COLON);
-      fieldType = IndexedTypeExpr();
-      jj_consume_token(QUES);
-      break;
-    default:
-      jj_la1[3] = jj_gen;
-      ;
-    }
-    {if (true) return new Pair<Integer, Pair<List<String>, TypeExpression>>
-           (fieldList.first, new Pair<List<String>, TypeExpression>(fieldList.second, fieldType));}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public boolean IfExists() throws ParseException, ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case IF:
-      jj_consume_token(IF);
-      jj_consume_token(EXISTS);
-      {if (true) return true;}
-      break;
-    default:
-      jj_la1[4] = jj_gen;
-      ;
-    }
-      {if (true) return false;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression Index() throws ParseException, ParseException {
-    Expression expr = null;
-    jj_consume_token(LEFTBRACKET);
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case DATASET:
-    case EVERY:
-    case FOR:
-    case FROM:
-    case IF:
-    case LET:
-    case SOME:
-    case WITH:
-    case MINUS:
-    case PLUS:
-    case LEFTPAREN:
-    case LEFTBRACKET:
-    case LEFTBRACE:
-    case LEFTDBLBRACE:
-    case INTEGER_LITERAL:
-    case MISSING:
-    case NULL:
-    case TRUE:
-    case FALSE:
-    case DOUBLE_LITERAL:
-    case FLOAT_LITERAL:
-    case STRING_LITERAL:
-    case IDENTIFIER:
-    case VARIABLE:
-      expr = Expression();
-        if(expr.getKind() == Expression.Kind.LITERAL_EXPRESSION)
-        {
-            Literal lit = ((LiteralExpr)expr).getValue();
-            if(lit.getLiteralType() != Literal.Type.INTEGER &&
-               lit.getLiteralType() != Literal.Type.LONG) {
-                {if (true) throw new ParseException("Index should be an INTEGER");}
-            }
-        }
-      break;
-    case QUES:
-      jj_consume_token(QUES);
-      break;
-    default:
-      jj_la1[5] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    jj_consume_token(RIGHTBRACKET);
-      {if (true) return expr;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public IndexParams IndexType() throws ParseException, ParseException {
-  IndexType type = null;
-  int gramLength = 0;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case BTREE:
-      jj_consume_token(BTREE);
-      type = IndexType.BTREE;
-      break;
-    case RTREE:
-      jj_consume_token(RTREE);
-      type = IndexType.RTREE;
-      break;
-    case KEYWORD:
-      jj_consume_token(KEYWORD);
-      type = IndexType.LENGTH_PARTITIONED_WORD_INVIX;
-      break;
-    case NGRAM:
-      jj_consume_token(NGRAM);
-      jj_consume_token(LEFTPAREN);
-      jj_consume_token(INTEGER_LITERAL);
-      type = IndexType.LENGTH_PARTITIONED_NGRAM_INVIX;
-      gramLength = Integer.valueOf(token.image);
-      jj_consume_token(RIGHTPAREN);
-      break;
-    default:
-      jj_la1[6] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    {if (true) return new IndexParams(type, gramLength);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public CreateBrokerStatement BrokerSpecification() throws ParseException, ParseException {
-  CreateBrokerStatement cbs = null;
-  Pair<Identifier,Identifier> name = null;
-  String endPoint = null;
-    jj_consume_token(BROKER);
-    name = QualifiedName();
-    jj_consume_token(AT);
-    endPoint = StringLiteral();
-      cbs = new CreateBrokerStatement(name.first, name.second,endPoint);
-      {if (true) return cbs;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public FunctionDecl FunctionDeclaration() throws ParseException, ParseException {
-  FunctionDecl funcDecl;
-  FunctionSignature signature;
-  String functionName;
-  List<VarIdentifier> paramList = new ArrayList<VarIdentifier>();
-  Expression funcBody;
-  createNewScope();
-    jj_consume_token(DECLARE);
-    jj_consume_token(FUNCTION);
-    functionName = Identifier();
-    paramList = ParameterList();
-    jj_consume_token(LEFTBRACE);
-    funcBody = Expression();
-    jj_consume_token(RIGHTBRACE);
-      signature = new FunctionSignature(defaultDataverse, functionName, paramList.size());
-      getCurrentScope().addFunctionDescriptor(signature, false);
-      funcDecl = new FunctionDecl(signature, paramList, funcBody);
-      removeCurrentScope();
-      {if (true) return funcDecl;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Triple<Identifier,Identifier,Identifier> DoubleQualifiedName() throws ParseException, ParseException {
-  String first = null;
-  String second = null;
-  String third = null;
-    first = Identifier();
-    jj_consume_token(DOT);
-    second = Identifier();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case DOT:
-      jj_consume_token(DOT);
-      third = Identifier();
-      break;
-    default:
-      jj_la1[7] = jj_gen;
-      ;
-    }
-    Identifier id1 = null;
-    Identifier id2 = null;
-    Identifier id3 = null;
-    if (third == null) {
-      id2 = new Identifier(first);
-      id3 = new Identifier(second);
-    } else {
-      id1 = new Identifier(first);
-      id2 = new Identifier(second);
-      id3 = new Identifier(third);
-    }
-    {if (true) return new Triple<Identifier,Identifier,Identifier>(id1, id2, id3);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression MultExpr() throws ParseException, ParseException {
-  OperatorExpr op = null;
-  Expression operand = null;
-    operand = ExponentExpr();
-    label_2:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case DIV:
-      case IDIV:
-      case MOD:
-      case MUL:
-        ;
-        break;
-      default:
-        jj_la1[8] = jj_gen;
-        break label_2;
-      }
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case MUL:
-        jj_consume_token(MUL);
-        break;
-      case DIV:
-        jj_consume_token(DIV);
-        break;
-      case MOD:
-        jj_consume_token(MOD);
-        break;
-      case IDIV:
-        jj_consume_token(IDIV);
-        break;
-      default:
-        jj_la1[9] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-        if (op == null) {
-          op = new OperatorExpr();
-          op.addOperand(operand);
-          op.setCurrentop(true);
-        }
-        try{
-          op.addOperator(token.image);
-        } catch (AsterixException e){
-          {if (true) throw new ParseException(e.getMessage());}
-        }
-      operand = ExponentExpr();
-       op.addOperand(operand);
-    }
-       {if (true) return op==null?operand:op;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public InsertStatement InsertStatement() throws ParseException, ParseException {
-  Pair<Identifier,Identifier> nameComponents = null;
-  Pair<Integer, List<String>> returnField = new Pair<Integer, List<String>>(0, null);
-  boolean returnRecord = false;
-  Query query;
-  boolean upsert = false;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case INSERT:
-      jj_consume_token(INSERT);
-      break;
-    case UPSERT:
-      jj_consume_token(UPSERT);
-                      upsert = true;
-      break;
-    default:
-      jj_la1[10] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    jj_consume_token(INTO);
-    jj_consume_token(DATASET);
-    nameComponents = QualifiedName();
-    query = Query();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 2:
-    case RETURN:
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case RETURN:
-        jj_consume_token(RETURN);
-        jj_consume_token(1);
-                                      returnRecord = true;
-        break;
-      case 2:
-        jj_consume_token(2);
-        returnField = NestedField();
-        break;
-      default:
-        jj_la1[11] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-      break;
-    default:
-      jj_la1[12] = jj_gen;
-      ;
-    }
-      query.setTopLevel(true);
-      if(upsert){
-        {if (true) return new UpsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter());}
-      } else{
-        {if (true) return new InsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(),
-        returnRecord, returnField.second);}
-      }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression FunctionCallExpr() throws ParseException, ParseException {
-  CallExpr callExpr;
-  List<Expression> argList = new ArrayList<Expression>();
-  Expression tmp;
-  int arity = 0;
-  FunctionName funcName = null;
-  String hint = null;
-    funcName = FunctionName();
-      hint = funcName.hint;
-    jj_consume_token(LEFTPAREN);
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case DATASET:
-    case EVERY:
-    case FOR:
-    case FROM:
-    case IF:
-    case LET:
-    case SOME:
-    case WITH:
-    case MINUS:
-    case PLUS:
-    case LEFTPAREN:
-    case LEFTBRACKET:
-    case LEFTBRACE:
-    case LEFTDBLBRACE:
-    case INTEGER_LITERAL:
-    case MISSING:
-    case NULL:
-    case TRUE:
-    case FALSE:
-    case DOUBLE_LITERAL:
-    case FLOAT_LITERAL:
-    case STRING_LITERAL:
-    case IDENTIFIER:
-    case VARIABLE:
-      tmp = Expression();
-      argList.add(tmp);
-      arity ++;
-      label_3:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case COMMA:
-          ;
-          break;
-        default:
-          jj_la1[13] = jj_gen;
-          break label_3;
-        }
-        jj_consume_token(COMMA);
-        tmp = Expression();
-      argList.add(tmp);
-      arity++;
-      }
-      break;
-    default:
-      jj_la1[14] = jj_gen;
-      ;
-    }
-    jj_consume_token(RIGHTPAREN);
-      // TODO use funcName.library
-      String fqFunctionName = funcName.library == null ? funcName.function : funcName.library + "#" + funcName.function;
-      FunctionSignature signature
-        = lookupFunctionSignature(funcName.dataverse, fqFunctionName, arity);
-      if (signature == null) {
-        signature = new FunctionSignature(funcName.dataverse, fqFunctionName, arity);
-      }
-      callExpr = new CallExpr(signature,argList);
-      if (hint != null) {
-        if (hint.startsWith(INDEXED_NESTED_LOOP_JOIN_HINT)) {
-          callExpr.addHint(IndexedNLJoinExpressionAnnotation.INSTANCE);
-        } else if (hint.startsWith(SKIP_SECONDARY_INDEX_SEARCH_HINT)) {
-          callExpr.addHint(SkipSecondaryIndexSearchExpressionAnnotation.INSTANCE);
-        }
-      }
-      {if (true) return callExpr;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Clause Clause() throws ParseException, ParseException {
-  Clause clause;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case FOR:
-    case FROM:
-      clause = ForClause();
-      break;
-    case LET:
-    case WITH:
-      clause = LetClause();
-      break;
-    case WHERE:
-      clause = WhereClause();
-      break;
-    case ORDER:
-      clause = OrderbyClause();
-      break;
-    case GROUP:
-      clause = GroupClause();
-      break;
-    case LIMIT:
-      clause = LimitClause();
-      break;
-    case DISTINCT:
-      clause = DistinctClause();
-      break;
-    default:
-      jj_la1[15] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-      {if (true) return clause;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Pair<Integer, List<String>> NestedField() throws ParseException, ParseException {
-  List<String> exprList = new ArrayList<String>();
-  String lit = null;
-  int source = 0;
-    lit = Identifier();
-    boolean meetParens = false;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case LEFTPAREN:
-      jj_consume_token(LEFTPAREN);
-      jj_consume_token(RIGHTPAREN);
-        if(!lit.equals("meta")){
-            {if (true) throw new ParseException("The string before () has to be \u005c"meta\u005c".");}
-        }
-        meetParens = true;
-        source = 1;
-      break;
-    default:
-      jj_la1[16] = jj_gen;
-      ;
-    }
-    if(!meetParens){
-        exprList.add(lit);
-    }
-    label_4:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case DOT:
-        ;
-        break;
-      default:
-        jj_la1[17] = jj_gen;
-        break label_4;
-      }
-      jj_consume_token(DOT);
-      lit = Identifier();
-      exprList.add(lit);
-    }
-    {if (true) return new Pair<Integer, List<String>>(source, exprList);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression Literal() throws ParseException, ParseException {
-  LiteralExpr lit = new LiteralExpr();
-  String str = null;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case STRING_LITERAL:
-      str = StringLiteral();
-      lit.setValue(new StringLiteral(str));
-      break;
-    case INTEGER_LITERAL:
-      jj_consume_token(INTEGER_LITERAL);
-      lit.setValue(new LongIntegerLiteral(new Long(token.image)));
-      break;
-    case FLOAT_LITERAL:
-      jj_consume_token(FLOAT_LITERAL);
-      lit.setValue(new FloatLiteral(new Float(token.image)));
-      break;
-    case DOUBLE_LITERAL:
-      jj_consume_token(DOUBLE_LITERAL);
-      lit.setValue(new DoubleLiteral(new Double(token.image)));
-      break;
-    case MISSING:
-      jj_consume_token(MISSING);
-      lit.setValue(MissingLiteral.INSTANCE);
-      break;
-    case NULL:
-      jj_consume_token(NULL);
-      lit.setValue(NullLiteral.INSTANCE);
-      break;
-    case TRUE:
-      jj_consume_token(TRUE);
-      lit.setValue(TrueLiteral.INSTANCE);
-      break;
-    case FALSE:
-      jj_consume_token(FALSE);
-      lit.setValue(FalseLiteral.INSTANCE);
-      break;
-    default:
-      jj_la1[18] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-      {if (true) return lit;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression OperatorExpr() throws ParseException, ParseException {
-  OperatorExpr op = null;
-  Expression operand = null;
-    operand = AndExpr();
-    label_5:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case OR:
-        ;
-        break;
-      default:
-        jj_la1[19] = jj_gen;
-        break label_5;
-      }
-      jj_consume_token(OR);
-        if (op == null) {
-          op = new OperatorExpr();
-          op.addOperand(operand);
-        op.setCurrentop(true);
-        }
-        try{
-          op.addOperator(token.image);
-        } catch (AsterixException e){
-          {if (true) throw new ParseException(e.getMessage());}
-        }
-      operand = AndExpr();
-      op.addOperand(operand);
-    }
-      {if (true) return op==null? operand: op;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression AddExpr() throws ParseException, ParseException {
-  OperatorExpr op = null;
-  Expression operand = null;
-    operand = MultExpr();
-    label_6:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case MINUS:
-      case PLUS:
-        ;
-        break;
-      default:
-        jj_la1[20] = jj_gen;
-        break label_6;
-      }
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case PLUS:
-        jj_consume_token(PLUS);
-        break;
-      case MINUS:
-        jj_consume_token(MINUS);
-        break;
-      default:
-        jj_la1[21] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-        if (op == null) {
-          op = new OperatorExpr();
-        op.addOperand(operand);
-        op.setCurrentop(true);
-        }
-        try{
-          ((OperatorExpr)op).addOperator(token.image);
-        } catch (AsterixException e){
-          {if (true) throw new ParseException(e.getMessage());}
-        }
-      operand = MultExpr();
-      op.addOperand(operand);
-    }
-       {if (true) return op==null? operand: op;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Statement SetStatement() throws ParseException, ParseException {
-  String pn = null;
-  String pv = null;
-    jj_consume_token(SET);
-    pn = Identifier();
-    pv = StringLiteral();
-      {if (true) return new SetStatement(pn, pv);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public RunStatement RunStatement() throws ParseException, ParseException {
-  String system = null;
-  String tmp;
-  ArrayList<String> parameters = new  ArrayList<String>();
-  Pair<Identifier,Identifier> nameComponentsFrom = null;
-  Pair<Identifier,Identifier> nameComponentsTo = null;
-    jj_consume_token(RUN);
-    system = Identifier();
-    jj_consume_token(LEFTPAREN);
-    label_7:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case STRING_LITERAL:
-      case IDENTIFIER:
-        ;
-        break;
-      default:
-        jj_la1[22] = jj_gen;
-        break label_7;
-      }
-      tmp = Identifier();
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case COMMA:
-        jj_consume_token(COMMA);
-        break;
-      default:
-        jj_la1[23] = jj_gen;
-        ;
-      }
-      parameters.add(tmp);
-    }
-    jj_consume_token(RIGHTPAREN);
-    jj_consume_token(FROM);
-    jj_consume_token(DATASET);
-    nameComponentsFrom = QualifiedName();
-    jj_consume_token(TO);
-    jj_consume_token(DATASET);
-    nameComponentsTo = QualifiedName();
-      {if (true) return new RunStatement(system, parameters, nameComponentsFrom.first, nameComponentsFrom.second, nameComponentsTo.first, nameComponentsTo.second);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public List<Statement> Statement() throws ParseException, ParseException {
-  scopeStack.push(RootScopeFactory.createRootScope(this));
-  List<Statement> decls = new ArrayList<Statement>();
-  Statement stmt = null;
-    label_8:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 4:
-      case 5:
-      case 6:
-      case COMPACT:
-      case CONNECT:
-      case CREATE:
-      case DATASET:
-      case DECLARE:
-      case DELETE:
-      case DISCONNECT:
-      case DROP:
-      case EVERY:
-      case FOR:
-      case FROM:
-      case IF:
-      case INSERT:
-      case LET:
-      case LOAD:
-      case REFRESH:
-      case RUN:
-      case SET:
-      case SOME:
-      case UPDATE:
-      case UPSERT:
-      case USE:
-      case WITH:
-      case WRITE:
-      case MINUS:
-      case PLUS:
-      case LEFTPAREN:
-      case LEFTBRACKET:
-      case LEFTBRACE:
-      case LEFTDBLBRACE:
-      case INTEGER_LITERAL:
-      case MISSING:
-      case NULL:
-      case TRUE:
-      case FALSE:
-      case DOUBLE_LITERAL:
-      case FLOAT_LITERAL:
-      case STRING_LITERAL:
-      case IDENTIFIER:
-      case VARIABLE:
-        ;
-        break;
-      default:
-        jj_la1[24] = jj_gen;
-        break label_8;
-      }
-      stmt = SingleStatement();
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case 3:
-        jj_consume_token(3);
-        break;
-      default:
-        jj_la1[25] = jj_gen;
-        ;
-      }
-      decls.add(stmt);
-    }
-    jj_consume_token(0);
-    {if (true) return decls;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public String GetPolicy() throws ParseException, ParseException {
-  String policy = null;
-    jj_consume_token(USING);
-    jj_consume_token(POLICY);
-    policy = Identifier();
-     {if (true) return policy;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression FLWOGR() throws ParseException, ParseException {
-    FLWOGRExpression flworg = new FLWOGRExpression();
-    List<Clause> clauseList = new ArrayList<Clause>();
-    Expression returnExpr;
-    Clause tmp;
-    createNewScope();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case FOR:
-    case FROM:
-      tmp = ForClause();
-                          clauseList.add(tmp);
-      break;
-    case LET:
-    case WITH:
-      tmp = LetClause();
-                                                                     clauseList.add(tmp);
-      break;
-    default:
-      jj_la1[26] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    label_9:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case DISTINCT:
-      case FOR:
-      case FROM:
-      case GROUP:
-      case LET:
-      case LIMIT:
-      case ORDER:
-      case WHERE:
-      case WITH:
-        ;
-        break;
-      default:
-        jj_la1[27] = jj_gen;
-        break label_9;
-      }
-      tmp = Clause();
-                       clauseList.add(tmp);
-    }
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case RETURN:
-      jj_consume_token(RETURN);
-      break;
-    case SELECT:
-      jj_consume_token(SELECT);
-      break;
-    default:
-      jj_la1[28] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    returnExpr = Expression();
-       flworg.setClauseList(clauseList);
-       flworg.setReturnExpr(returnExpr);
-       removeCurrentScope();
-       {if (true) return flworg;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DistinctClause DistinctClause() throws ParseException, ParseException {
-  List<Expression> exprs = new ArrayList<Expression>();
-  Expression expr;
-    jj_consume_token(DISTINCT);
-    jj_consume_token(BY);
-    expr = Expression();
-    exprs.add(expr);
-    label_10:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case COMMA:
-        ;
-        break;
-      default:
-        jj_la1[29] = jj_gen;
-        break label_10;
-      }
-      jj_consume_token(COMMA);
-      expr = Expression();
-          exprs.add(expr);
-    }
-      {if (true) return new DistinctClause(exprs);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Identifier Field() throws ParseException, ParseException {
-  String ident = null;
-    jj_consume_token(DOT);
-    ident = Identifier();
-      {if (true) return new Identifier(ident);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public String Identifier() throws ParseException, ParseException {
-  String lit = null;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case IDENTIFIER:
-      jj_consume_token(IDENTIFIER);
-      {if (true) return token.image;}
-      break;
-    case STRING_LITERAL:
-      lit = StringLiteral();
-      {if (true) return lit;}
-      break;
-    default:
-      jj_la1[30] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-// Merged Non-terminal
-  final public Statement SingleStatement() throws ParseException, ParseException {
-  Statement stmt = null;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case USE:
-      stmt = DataverseDeclaration();
-      break;
-    case DECLARE:
-      stmt = FunctionDeclaration();
-      break;
-    case CREATE:
-      stmt = CreateStatement();
-      break;
-    case LOAD:
-      stmt = LoadStatement();
-      break;
-    case DROP:
-      stmt = DropStatement();
-      break;
-    case WRITE:
-      stmt = WriteStatement();
-      break;
-    case SET:
-      stmt = SetStatement();
-      break;
-    case INSERT:
-    case UPSERT:
-      stmt = InsertStatement();
-      break;
-    case DELETE:
-      stmt = DeleteStatement();
-      break;
-    case UPDATE:
-      stmt = UpdateStatement();
-      break;
-    case CONNECT:
-    case DISCONNECT:
-      stmt = FeedStatement();
-      break;
-    case COMPACT:
-      stmt = CompactStatement();
-      break;
-    case DATASET:
-    case EVERY:
-    case FOR:
-    case FROM:
-    case IF:
-    case LET:
-    case SOME:
-    case WITH:
-    case MINUS:
-    case PLUS:
-    case LEFTPAREN:
-    case LEFTBRACKET:
-    case LEFTBRACE:
-    case LEFTDBLBRACE:
-    case INTEGER_LITERAL:
-    case MISSING:
-    case NULL:
-    case TRUE:
-    case FALSE:
-    case DOUBLE_LITERAL:
-    case FLOAT_LITERAL:
-    case STRING_LITERAL:
-    case IDENTIFIER:
-    case VARIABLE:
-      stmt = Query();
-      break;
-    case REFRESH:
-      stmt = RefreshExternalDatasetStatement();
-      break;
-    case RUN:
-      stmt = RunStatement();
-      break;
-    case 4:
-    case 5:
-    case 6:
-      stmt = ChannelSubscriptionStatement();
-      break;
-    default:
-      jj_la1[31] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-  {if (true) return stmt;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Clause LetClause() throws ParseException, ParseException {
-    LetClause lc = new LetClause();
-    VariableExpr varExp;
-    Expression beExp;
-    extendCurrentScope();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case LET:
-      jj_consume_token(LET);
-      break;
-    case WITH:
-      jj_consume_token(WITH);
-      break;
-    default:
-      jj_la1[32] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    varExp = Variable();
-    jj_consume_token(ASSIGN);
-    beExp = Expression();
-      getCurrentScope().addNewVarSymbolToScope(varExp.getVar());
-      lc.setVarExpr(varExp);
-      lc.setBindingExpr(beExp);
-      {if (true) return lc;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public ListConstructor UnorderedListConstructor() throws ParseException, ParseException {
-      ListConstructor expr = new ListConstructor();
-      List<Expression> exprList = null;
-      expr.setType(ListConstructor.Type.UNORDERED_LIST_CONSTRUCTOR);
-    jj_consume_token(LEFTDBLBRACE);
-    exprList = ExpressionList();
-    jj_consume_token(RIGHTDBLBRACE);
-      expr.setExprList(exprList);
-      {if (true) return expr;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression PrimaryExpr() throws ParseException, ParseException {
-  Expression expr = null;
-    if (jj_2_1(2)) {
-      expr = FunctionCallExpr();
-    } else {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case INTEGER_LITERAL:
-      case MISSING:
-      case NULL:
-      case TRUE:
-      case FALSE:
-      case DOUBLE_LITERAL:
-      case FLOAT_LITERAL:
-      case STRING_LITERAL:
-        expr = Literal();
-        break;
-      case DATASET:
-        expr = DatasetAccessExpression();
-        break;
-      case VARIABLE:
-        expr = VariableRef();
-      if(((VariableExpr)expr).getIsNewVar() == true)
-        {if (true) throw new ParseException("can't find variable " + ((VariableExpr)expr).getVar());}
-        break;
-      case LEFTBRACKET:
-      case LEFTDBLBRACE:
-        expr = ListConstructor();
-        break;
-      case LEFTBRACE:
-        expr = RecordConstructor();
-        break;
-      case LEFTPAREN:
-        expr = ParenthesizedExpression();
-        break;
-      default:
-        jj_la1[33] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    }
-      {if (true) return expr;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression DatasetAccessExpression() throws ParseException, ParseException {
-  String funcName;
-  String arg1 = null;
-  String arg2 = null;
-  Expression nameArg;
-    jj_consume_token(DATASET);
-      funcName = token.image;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case STRING_LITERAL:
-    case IDENTIFIER:
-      arg1 = Identifier();
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case DOT:
-        jj_consume_token(DOT);
-        arg2 = Identifier();
-        break;
-      default:
-        jj_la1[34] = jj_gen;
-        ;
-      }
-      String name = arg2 == null ? arg1 : arg1 + "." + arg2;
-      LiteralExpr ds = new LiteralExpr();
-      ds.setValue( new StringLiteral(name) );
-      nameArg = ds;
-      if(arg2 != null){
-          addDataverse(arg1.toString());
-          addDataset(name);
-      } else {
-          addDataset(defaultDataverse + "." + name);
-      }
-      break;
-    case LEFTPAREN:
-      jj_consume_token(LEFTPAREN);
-      nameArg = Expression();
-      jj_consume_token(RIGHTPAREN);
-      break;
-    default:
-      jj_la1[35] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-      String dataverse = MetadataConstants.METADATA_DATAVERSE_NAME;
-      FunctionSignature signature = lookupFunctionSignature(dataverse, funcName, 1);
-      if (signature == null) {
-        signature = new FunctionSignature(dataverse, funcName, 1);
-      }
-      List<Expression> argList = new ArrayList<Expression>();
-      argList.add(nameArg);
-      {if (true) return new CallExpr(signature, argList);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Pair<Identifier,Identifier> QualifiedName() throws ParseException, ParseException {
-  String first = null;
-  String second = null;
-    first = Identifier();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case DOT:
-      jj_consume_token(DOT);
-      second = Identifier();
-      break;
-    default:
-      jj_la1[36] = jj_gen;
-      ;
-    }
-    Identifier id1 = null;
-    Identifier id2 = null;
-    if (second == null) {
-      id2 = new Identifier(first);
-    } else
-    {
-      id1 = new Identifier(first);
-      id2 = new Identifier(second);
-    }
-    {if (true) return new Pair<Identifier,Identifier>(id1, id2);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public UpdateClause UpdateClause() throws ParseException, ParseException {
-  Expression target = null;
-  Expression value = null ;
-  InsertStatement is = null;
-  DeleteStatement ds = null;
-  UpdateStatement us = null;
-  Expression condition = null;
-  UpdateClause ifbranch = null;
-  UpdateClause elsebranch = null;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case SET:
-      jj_consume_token(SET);
-      target = Expression();
-      jj_consume_token(ASSIGN);
-      value = Expression();
-      break;
-    case INSERT:
-    case UPSERT:
-      is = InsertStatement();
-      break;
-    case DELETE:
-      ds = DeleteStatement();
-      break;
-    case UPDATE:
-      us = UpdateStatement();
-      break;
-    case IF:
-      jj_consume_token(IF);
-      jj_consume_token(LEFTPAREN);
-      condition = Expression();
-      jj_consume_token(RIGHTPAREN);
-      jj_consume_token(THEN);
-      ifbranch = UpdateClause();
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case ELSE:
-        jj_consume_token(ELSE);
-        elsebranch = UpdateClause();
-        break;
-      default:
-        jj_la1[37] = jj_gen;
-        ;
-      }
-       {if (true) return new UpdateClause(target, value, is, ds, us, condition, ifbranch, elsebranch);}
-      break;
-    default:
-      jj_la1[38] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Clause ForClause() throws ParseException, ParseException {
-    ForClause fc = new ForClause();
-    VariableExpr varExp;
-    VariableExpr varPos = null;
-    Expression inExp;
-    extendCurrentScope();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case FOR:
-      jj_consume_token(FOR);
-      break;
-    case FROM:
-      jj_consume_token(FROM);
-      break;
-    default:
-      jj_la1[39] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    varExp = Variable();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case AT:
-      jj_consume_token(AT);
-      varPos = Variable();
-      break;
-    default:
-      jj_la1[40] = jj_gen;
-      ;
-    }
-    jj_consume_token(IN);
-    inExp = Expression();
-      fc.setVarExpr(varExp);
-      getCurrentScope().addNewVarSymbolToScope(varExp.getVar());
-      fc.setInExpr(inExp);
-      if (varPos != null) {
-        fc.setPosExpr(varPos);
-        getCurrentScope().addNewVarSymbolToScope(varPos.getVar());
-      }
-      {if (true) return fc;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Clause OrderbyClause() throws ParseException, ParseException {
-    OrderbyClause oc = new OrderbyClause();
-    Expression orderbyExpr;
-    List<Expression> orderbyList = new ArrayList<Expression>();
-    List<OrderbyClause.OrderModifier> modifierList = new ArrayList<OrderbyClause.OrderModifier >();
-    int numOfOrderby = 0;
-    jj_consume_token(ORDER);
-        String hint = getHint(token);
-        if (hint != null) {
-          if (hint.startsWith(INMEMORY_HINT)) {
-            String splits[] = hint.split(" +");
-            int numFrames = Integer.parseInt(splits[1]);
-            int numTuples = Integer.parseInt(splits[2]);
-            oc.setNumFrames(numFrames);
-            oc.setNumTuples(numTuples);
-          }
-          if (hint.startsWith(RANGE_HINT)) {
-            try{
-              oc.setRangeMap(RangeMapBuilder.parseHint(hint.substring(RANGE_HINT.length())));
-            } catch (AsterixException e) {
-              {if (true) throw new ParseException(e.getMessage());}
-            }
-          }
-        }
-    jj_consume_token(BY);
-    orderbyExpr = Expression();
-      orderbyList.add(orderbyExpr);
-      OrderbyClause.OrderModifier modif = OrderbyClause.OrderModifier.ASC;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case ASC:
-    case DESC:
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case ASC:
-        jj_consume_token(ASC);
-               modif = OrderbyClause.OrderModifier.ASC;
-        break;
-      case DESC:
-        jj_consume_token(DESC);
-                modif = OrderbyClause.OrderModifier.DESC;
-        break;
-      default:
-        jj_la1[41] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-      break;
-    default:
-      jj_la1[42] = jj_gen;
-      ;
-    }
-      modifierList.add(modif);
-    label_11:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case COMMA:
-        ;
-        break;
-      default:
-        jj_la1[43] = jj_gen;
-        break label_11;
-      }
-      jj_consume_token(COMMA);
-      orderbyExpr = Expression();
-      orderbyList.add(orderbyExpr);
-      modif = OrderbyClause.OrderModifier.ASC;
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case ASC:
-      case DESC:
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case ASC:
-          jj_consume_token(ASC);
-               modif = OrderbyClause.OrderModifier.ASC;
-          break;
-        case DESC:
-          jj_consume_token(DESC);
-                modif = OrderbyClause.OrderModifier.DESC;
-          break;
-        default:
-          jj_la1[44] = jj_gen;
-          jj_consume_token(-1);
-          throw new ParseException();
-        }
-        break;
-      default:
-        jj_la1[45] = jj_gen;
-        ;
-      }
-      modifierList.add(modif);
-    }
-      oc.setModifierList(modifierList);
-      oc.setOrderbyList(orderbyList);
-      {if (true) return oc;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression IfThenElse() throws ParseException, ParseException {
-  Expression condExpr;
-  Expression thenExpr;
-  Expression elseExpr;
-  IfExpr ifExpr = new IfExpr();
-    jj_consume_token(IF);
-    jj_consume_token(LEFTPAREN);
-    condExpr = Expression();
-    jj_consume_token(RIGHTPAREN);
-    jj_consume_token(THEN);
-    thenExpr = Expression();
-    jj_consume_token(ELSE);
-    elseExpr = Expression();
-      ifExpr.setCondExpr(condExpr);
-      ifExpr.setThenExpr(thenExpr);
-      ifExpr.setElseExpr(elseExpr);
-      {if (true) return ifExpr;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public void RecordField(RecordTypeDefinition recType) throws ParseException, ParseException {
-  String fieldName;
-  TypeExpression type = null;
-  boolean nullable = false;
-    fieldName = Identifier();
-      String hint = getHint(token);
-      IRecordFieldDataGen rfdg = hint != null ? parseFieldDataGen(hint) : null;
-    jj_consume_token(COLON);
-    type = TypeExpr();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case QUES:
-      jj_consume_token(QUES);
-                                       nullable = true;
-      break;
-    default:
-      jj_la1[46] = jj_gen;
-      ;
-    }
-      recType.addField(fieldName, type, nullable, rfdg);
-  }
-
-  final public Expression UnionExpr() throws ParseException, ParseException {
-    UnionExpr union = null;
-    Expression operand1 = null;
-    Expression operand2 = null;
-    operand1 = UnaryExpr();
-    label_12:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case UNION:
-        ;
-        break;
-      default:
-        jj_la1[47] = jj_gen;
-        break label_12;
-      }
-      jj_consume_token(UNION);
-      operand2 = UnaryExpr();
-          if (union == null) {
-             union = new UnionExpr();
-             union.addExpr(operand1);
-          }
-          union.addExpr(operand2);
-    }
-     {if (true) return (union == null)? operand1: union;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression RelExpr() throws ParseException, ParseException {
-  OperatorExpr op = null;
-  Expression operand = null;
-  boolean broadcast = false;
-  IExpressionAnnotation annotation = null;
-    operand = AddExpr();
-      if (operand instanceof VariableExpr) {
-        String hint = getHint(token);
-        if (hint != null && hint.equals(BROADCAST_JOIN_HINT)) {
-          broadcast = true;
-        }
-      }
-    if (jj_2_2(2)) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case LT:
-        jj_consume_token(LT);
-        break;
-      case GT:
-        jj_consume_token(GT);
-        break;
-      case LE:
-        jj_consume_token(LE);
-        break;
-      case GE:
-        jj_consume_token(GE);
-        break;
-      case EQ:
-        jj_consume_token(EQ);
-        break;
-      case NE:
-        jj_consume_token(NE);
-        break;
-      case SIMILAR:
-        jj_consume_token(SIMILAR);
-        break;
-      default:
-        jj_la1[48] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-          String mhint = getHint(token);
-          if (mhint != null) {
-            if (mhint.equals(INDEXED_NESTED_LOOP_JOIN_HINT)) {
-            annotation = IndexedNLJoinExpressionAnnotation.INSTANCE;
-          } else if (mhint.equals(SKIP_SECONDARY_INDEX_SEARCH_HINT)) {
-            annotation = SkipSecondaryIndexSearchExpressionAnnotation.INSTANCE;
-          }
-        }
-          if (op == null) {
-            op = new OperatorExpr();
-            op.addOperand(operand, broadcast);
-          op.setCurrentop(true);
-          broadcast = false;
-          }
-         try{
-           op.addOperator(token.image);
-         } catch (AsterixException e){
-           {if (true) throw new ParseException(e.getMessage());}
-         }
-      operand = AddExpr();
-         broadcast = false;
-         if (operand instanceof VariableExpr) {
-           String hint = getHint(token);
-           if (hint != null && hint.equals(BROADCAST_JOIN_HINT)) {
-             broadcast = true;
-           }
-         }
-         op.addOperand(operand, broadcast);
-    } else {
-      ;
-    }
-       if (annotation != null) {
-         op.addHint(annotation);
-       }
-       {if (true) return op==null? operand: op;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public String FilterField() throws ParseException, ParseException {
-  String filterField = null;
-    filterField = Identifier();
-      {if (true) return filterField;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public FunctionSignature ApplyFunction() throws ParseException, ParseException {
-  FunctionName functioName = null;
-  FunctionSignature funcSig = null;
-    jj_consume_token(APPLY);
-    jj_consume_token(FUNCTION);
-    functioName = FunctionName();
-       String fqFunctionName = functioName.library == null ? functioName.function : functioName.library + "#" + functioName.function;
-       {if (true) return new FunctionSignature(functioName.dataverse, fqFunctionName, 1);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public String CompactionPolicy() throws ParseException, ParseException {
-  String compactionPolicy = null;
-    compactionPolicy = Identifier();
-      {if (true) return compactionPolicy;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public FunctionName FunctionName() throws ParseException, ParseException {
-  String first = null;
-  String second = null;
-  String third = null;
-  boolean secondAfterDot = false;
-    first = Identifier();
-    FunctionName result = new FunctionName();
-    result.hint = getHint(token);
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case DOT:
-    case SYMBOLHASH:
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case DOT:
-        jj_consume_token(DOT);
-        second = Identifier();
-      secondAfterDot = true;
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case SYMBOLHASH:
-          jj_consume_token(SYMBOLHASH);
-          third = Identifier();
-          break;
-        default:
-          jj_la1[49] = jj_gen;
-          ;
-        }
-        break;
-      case SYMBOLHASH:
-        jj_consume_token(SYMBOLHASH);
-        second = Identifier();
-        break;
-      default:
-        jj_la1[50] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-      break;
-    default:
-      jj_la1[51] = jj_gen;
-      ;
-    }
-      if (second == null) {
-        result.dataverse = defaultDataverse;
-        result.library = null;
-        result.function = first;
-      } else if (third == null) {
-        if (secondAfterDot) {
-          result.dataverse = first;
-          result.library   = null;
-          result.function = second;
-        } else {
-          result.dataverse = defaultDataverse;
-          result.library   = first;
-          result.function = second;
-        }
-      } else {
-        result.dataverse = first;
-        result.library   = second;
-        result.function  = third;
-      }
-
-      if (result.function.equalsIgnoreCase("int")) {
-            result.function = "int64";
-      }
-      {if (true) return result;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public List<Expression> ExpressionList() throws ParseException, ParseException {
-      Expression expr = null;
-      List<Expression> list = null;
-      List<Expression> exprList = new ArrayList<Expression>();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case DATASET:
-    case EVERY:
-    case FOR:
-    case FROM:
-    case IF:
-    case LET:
-    case SOME:
-    case WITH:
-    case MINUS:
-    case PLUS:
-    case LEFTPAREN:
-    case LEFTBRACKET:
-    case LEFTBRACE:
-    case LEFTDBLBRACE:
-    case INTEGER_LITERAL:
-    case MISSING:
-    case NULL:
-    case TRUE:
-    case FALSE:
-    case DOUBLE_LITERAL:
-    case FLOAT_LITERAL:
-    case STRING_LITERAL:
-    case IDENTIFIER:
-    case VARIABLE:
-      expr = Expression();
-                            exprList.add(expr);
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case COMMA:
-        jj_consume_token(COMMA);
-        list = ExpressionList();
-                                                      exprList.addAll(list);
-        break;
-      default:
-        jj_la1[52] = jj_gen;
-        ;
-      }
-      break;
-    default:
-      jj_la1[53] = jj_gen;
-      ;
-    }
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case COMMA:
-      Comma();
-      break;
-    default:
-      jj_la1[54] = jj_gen;
-      ;
-    }
-        {if (true) return exprList;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DeleteStatement DeleteStatement() throws ParseException, ParseException {
-  VariableExpr var = null;
-  Expression condition = null;
-  Pair<Identifier, Identifier> nameComponents;
-  // This is related to the new metadata lock management
-  setDataverses(new ArrayList<String>());
-  setDatasets(new ArrayList<String>());
-    jj_consume_token(DELETE);
-    var = Variable();
-      getCurrentScope().addNewVarSymbolToScope(var.getVar());
-    jj_consume_token(FROM);
-    jj_consume_token(DATASET);
-    nameComponents = QualifiedName();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case WHERE:
-      jj_consume_token(WHERE);
-      condition = Expression();
-      break;
-    default:
-      jj_la1[55] = jj_gen;
-      ;
-    }
-      // First we get the dataverses and datasets that we want to lock
-      List<String> dataverses = getDataverses();
-      List<String> datasets = getDatasets();
-      // we remove the pointer to the dataverses and datasets
-      setDataverses(null);
-      setDatasets(null);
-      {if (true) return new DeleteStatement(var, nameComponents.first, nameComponents.second,
-          condition, getVarCounter(), dataverses, datasets);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Map<String,String> Properties() throws ParseException, ParseException {
-  Map<String,String> properties = new HashMap<String,String>();
-  Pair<String, String> property;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case LEFTPAREN:
-      jj_consume_token(LEFTPAREN);
-      property = Property();
-      properties.put(property.first, property.second);
-      label_13:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case COMMA:
-          ;
-          break;
-        default:
-          jj_la1[56] = jj_gen;
-          break label_13;
-        }
-        jj_consume_token(COMMA);
-        property = Property();
-      properties.put(property.first, property.second);
-      }
-      jj_consume_token(RIGHTPAREN);
-      break;
-    default:
-      jj_la1[57] = jj_gen;
-      ;
-    }
-      {if (true) return properties;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Clause GroupClause() throws ParseException, ParseException {
-    GroupbyClause gbc = new GroupbyClause();
-    // GbyVariableExpressionPair pair = new GbyVariableExpressionPair();
-    List<GbyVariableExpressionPair> vePairList = new ArrayList<GbyVariableExpressionPair>();
-    List<GbyVariableExpressionPair> decorPairList = new ArrayList<GbyVariableExpressionPair>();
-    Map<Expression, VariableExpr> withVarMap = new HashMap<Expression, VariableExpr>();
-    VariableExpr var = null;
-    VariableExpr withVar = null;
-    Expression expr = null;
-    VariableExpr decorVar = null;
-    Expression decorExpr = null;
-        Scope newScope = extendCurrentScopeNoPush(true);
-        // extendCurrentScope(true);
-
-    jj_consume_token(GROUP);
-         String hint = getHint(token);
-         if (hint != null && hint.equals(HASH_GROUP_BY_HINT)) {
-           gbc.setHashGroupByHint(true);
-         }
-    jj_consume_token(BY);
-    if (jj_2_3(2)) {
-      var = Variable();
-      newScope.addNewVarSymbolToScope(var.getVar());
-      jj_consume_token(ASSIGN);
-    } else {
-      ;
-    }
-    expr = Expression();
-         GbyVariableExpressionPair pair1 = new GbyVariableExpressionPair(var, expr);
-         vePairList.add(pair1);
-    label_14:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case COMMA:
-        ;
-        break;
-      default:
-        jj_la1[58] = jj_gen;
-        break label_14;
-      }
-      jj_consume_token(COMMA);
-      if (jj_2_4(2)) {
-        var = Variable();
-      newScope.addNewVarSymbolToScope(var.getVar());
-        jj_consume_token(ASSIGN);
-      } else {
-        ;
-      }
-      expr = Expression();
-           GbyVariableExpressionPair pair2 = new GbyVariableExpressionPair(var, expr);
-           vePairList.add(pair2);
-    }
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case DECOR:
-      jj_consume_token(DECOR);
-      decorVar = Variable();
-      jj_consume_token(ASSIGN);
-      decorExpr = Expression();
-         newScope.addNewVarSymbolToScope(decorVar.getVar());
-         GbyVariableExpressionPair pair3 = new GbyVariableExpressionPair(decorVar, decorExpr);
-         decorPairList.add(pair3);
-      label_15:
-      while (true) {
-        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-        case COMMA:
-          ;
-          break;
-        default:
-          jj_la1[59] = jj_gen;
-          break label_15;
-        }
-        jj_consume_token(COMMA);
-        jj_consume_token(DECOR);
-        decorVar = Variable();
-        jj_consume_token(ASSIGN);
-        decorExpr = Expression();
-             newScope.addNewVarSymbolToScope(decorVar.getVar());
-             GbyVariableExpressionPair pair4 = new GbyVariableExpressionPair(decorVar, decorExpr);
-             decorPairList.add(pair4);
-      }
-      break;
-    default:
-      jj_la1[60] = jj_gen;
-      ;
-    }
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case WITH:
-      jj_consume_token(WITH);
-      break;
-    case KEEPING:
-      jj_consume_token(KEEPING);
-      break;
-    default:
-      jj_la1[61] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    withVar = VariableRef();
-      if(withVar.getIsNewVar()==true)
-          {if (true) throw new ParseException("can't find variable " + withVar.getVar());}
-      withVarMap.put(withVar, withVar);
-      newScope.addNewVarSymbolToScope(withVar.getVar());
-    label_16:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case COMMA:
-        ;
-        break;
-      default:
-        jj_la1[62] = jj_gen;
-        break label_16;
-      }
-      jj_consume_token(COMMA);
-      withVar = VariableRef();
-      if(withVar.getIsNewVar()==true)
-          {if (true) throw new ParseException("can't find variable " + withVar.getVar());}
-      withVarMap.put(withVar, withVar);
-      newScope.addNewVarSymbolToScope(withVar.getVar());
-    }
-      gbc.setGbyPairList(vePairList);
-      gbc.setDecorPairList(decorPairList);
-      gbc.setWithVarMap(withVarMap);
-      replaceCurrentScope(newScope);
-      {if (true) return gbc;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public OrderedListTypeDefinition OrderedListTypeDef() throws ParseException, ParseException {
-  TypeExpression type = null;
-    jj_consume_token(LEFTBRACKET);
-    type = TypeExpr();
-    jj_consume_token(RIGHTBRACKET);
-    {if (true) return new OrderedListTypeDefinition(type);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public boolean IfNotExists() throws ParseException, ParseException {
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case IF:
-      jj_consume_token(IF);
-      jj_consume_token(IDENTIFIER);
-        if(!token.image.equals("not")){
-           {if (true) throw new ParseException("Expect word \u005c"not\u005c" at line " + token.beginLine + ", column "
-                         + token.beginColumn +"!");}
-        }
-      jj_consume_token(EXISTS);
-      {if (true) return true;}
-      break;
-    default:
-      jj_la1[63] = jj_gen;
-      ;
-    }
-      {if (true) return false;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression ListConstructor() throws ParseException, ParseException {
-    Expression expr = null;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case LEFTBRACKET:
-      expr = OrderedListConstructor();
-      break;
-    case LEFTDBLBRACE:
-      expr = UnorderedListConstructor();
-      break;
-    default:
-      jj_la1[64] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-      {if (true) return expr;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public LoadStatement LoadStatement() throws ParseException, ParseException {
-  Identifier dataverseName = null;
-  Identifier datasetName = null;
-  boolean alreadySorted = false;
-  String adapterName;
-  Map<String,String> properties;
-  Pair<Identifier,Identifier> nameComponents = null;
-    jj_consume_token(LOAD);
-    jj_consume_token(DATASET);
-    nameComponents = QualifiedName();
-      dataverseName = nameComponents.first;
-      datasetName = nameComponents.second;
-    jj_consume_token(USING);
-    adapterName = AdapterName();
-    properties = Configuration();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case PRESORTED:
-      jj_consume_token(PRESORTED);
-      alreadySorted = true;
-      break;
-    default:
-      jj_la1[65] = jj_gen;
-      ;
-    }
-      {if (true) return new LoadStatement(dataverseName, datasetName, adapterName, properties, alreadySorted);}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Statement ChannelSubscriptionStatement() throws ParseException, ParseException {
-  Statement stmt = null;
-  Pair<Identifier,Identifier> nameComponents = null;
-  List<Expression> argList = new ArrayList<Expression>();
-  Expression tmp = null;
-  String id = null;
-  String subscriptionId = null;
-  Pair<Identifier,Identifier> brokerName = null;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case 4:
-      jj_consume_token(4);
-      jj_consume_token(TO);
-      nameComponents = QualifiedName();
-      jj_consume_token(LEFTPAREN);
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case DATASET:
-      case EVERY:
-      case FOR:
-      case FROM:
-      case IF:
-      case LET:
-      case SOME:
-      case WITH:
-      case MINUS:
-      case PLUS:
-      case LEFTPAREN:
-      case LEFTBRACKET:
-      case LEFTBRACE:
-      case LEFTDBLBRACE:
-      case INTEGER_LITERAL:
-      case MISSING:
-      case NULL:
-      case TRUE:
-      case FALSE:
-      case DOUBLE_LITERAL:
-      case FLOAT_LITERAL:
-      case STRING_LITERAL:
-      case IDENTIFIER:
-      case VARIABLE:
-        tmp = Expression();
-      argList.add(tmp);
-        label_17:
-        while (true) {
-          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-          case COMMA:
-            ;
-            break;
-          default:
-            jj_la1[66] = jj_gen;
-            break label_17;
-          }
-          jj_consume_token(COMMA);
-          tmp = Expression();
-      argList.add(tmp);
-        }
-        break;
-      default:
-        jj_la1[67] = jj_gen;
-        ;
-      }
-      jj_consume_token(RIGHTPAREN);
-      jj_consume_token(ON);
-      brokerName = QualifiedName();
-      stmt = new ChannelSubscribeStatement(nameComponents.first, nameComponents.second, argList, getVarCounter(), brokerName.first, brokerName.second, subscriptionId);
-      break;
-    case 5:
-      jj_consume_token(5);
-      id = StringLiteral();
-      jj_consume_token(FROM);
-      nameComponents = QualifiedName();
-        setDataverses(new ArrayList<String>());
-        setDatasets(new ArrayList<String>());
-        VariableExpr varExp = new VariableExpr();
-        VarIdentifier var = new VarIdentifier();
-        varExp.setVar(var);
-        var.setValue("$subscriptionPlaceholder");
-        getCurrentScope().addNewVarSymbolToScope(varExp.getVar());
-        List<String> dataverses = getDataverses();
-        List<String> datasets = getDatasets();
-        // we remove the pointer to the dataverses and datasets
-        setDataverses(null);
-        setDatasets(null);
-        stmt = new ChannelUnsubscribeStatement(varExp, nameComponents.first, nameComponents.second, id, getVarCounter(), dataverses, datasets);
-      break;
-    case 6:
-      jj_consume_token(6);
-      jj_consume_token(7);
-      subscriptionId = StringLiteral();
-      jj_consume_token(ON);
-      nameComponents = QualifiedName();
-      jj_consume_token(LEFTPAREN);
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case DATASET:
-      case EVERY:
-      case FOR:
-      case FROM:
-      case IF:
-      case LET:
-      case SOME:
-      case WITH:
-      case MINUS:
-      case PLUS:
-      case LEFTPAREN:
-      case LEFTBRACKET:
-      case LEFTBRACE:
-      case LEFTDBLBRACE:
-      case INTEGER_LITERAL:
-      case MISSING:
-      case NULL:
-      case TRUE:
-      case FALSE:
-      case DOUBLE_LITERAL:
-      case FLOAT_LITERAL:
-      case STRING_LITERAL:
-      case IDENTIFIER:
-      case VARIABLE:
-        tmp = Expression();
-         argList.add(tmp);
-        label_18:
-        while (true) {
-          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-          case COMMA:
-            ;
-            break;
-          default:
-            jj_la1[68] = jj_gen;
-            break label_18;
-          }
-          jj_consume_token(COMMA);
-          tmp = Expression();
-         argList.add(tmp);
-        }
-        break;
-      default:
-        jj_la1[69] = jj_gen;
-        ;
-      }
-      jj_consume_token(RIGHTPAREN);
-      jj_consume_token(TO);
-      brokerName = QualifiedName();
-        stmt = new ChannelSubscribeStatement(nameComponents.first, nameComponents.second, argList, getVarCounter(), brokerName.first, brokerName.second, subscriptionId);
-      break;
-    default:
-      jj_la1[70] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-      {if (true) return stmt;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression UnaryExpr() throws ParseException, ParseException {
-    UnaryExpr uexpr = null;
-    Expression expr = null;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case MINUS:
-    case PLUS:
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case PLUS:
-        jj_consume_token(PLUS);
-        break;
-      case MINUS:
-        jj_consume_token(MINUS);
-        break;
-      default:
-        jj_la1[71] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-          uexpr = new UnaryExpr();
-          try{
-            uexpr.setExprType(token.image);
-          } catch (AsterixException e){
-            {if (true) throw new ParseException(e.getMessage());}
-          }
-      break;
-    default:
-      jj_la1[72] = jj_gen;
-      ;
-    }
-    expr = ValueExpr();
-        if(uexpr!=null){
-            ((UnaryExpr)uexpr).setExpr(expr);
-            {if (true) return uexpr;}
-        }
-        else{
-            {if (true) return expr;}
-        }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Query Query() throws ParseException, ParseException {
-  Query query = new Query(false);
-  // we set the pointers to the dataverses and datasets lists to fill them with entities to be locked
-  setDataverses(query.getDataverses());
-  setDatasets(query.getDatasets());
-  Expression expr;
-    expr = Expression();
-      query.setBody(expr);
-      query.setVarCounter(getVarCounter());
-      // we remove the pointers to the locked entities before we return the query object
-      setDataverses(null);
-      setDatasets(null);
-      {if (true) return query;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression ValueExpr() throws ParseException, ParseException {
-  Expression expr = null;
-  Identifier ident = null;
-  AbstractAccessor fa = null;
-  Expression indexExpr = null;
-    expr = PrimaryExpr();
-    label_19:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case LEFTBRACKET:
-      case DOT:
-        ;
-        break;
-      default:
-        jj_la1[73] = jj_gen;
-        break label_19;
-      }
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case DOT:
-        ident = Field();
-      fa = (fa == null ? new FieldAccessor(expr, ident)
-                       : new FieldAccessor(fa, ident));
-        break;
-      case LEFTBRACKET:
-        indexExpr = Index();
-      fa = (fa == null ? new IndexAccessor(expr, indexExpr)
-                       : new IndexAccessor(fa, indexExpr));
-        break;
-      default:
-        jj_la1[74] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    }
-      {if (true) return fa == null ? expr : fa;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public TypeReferenceExpression TypeReference() throws ParseException, ParseException {
-  String id = null;
-    id = Identifier();
-     if (id.equalsIgnoreCase("int")) {
-        id = "int64";
-     }
-
-     {if (true) return new TypeReferenceExpression(new Identifier(id));}
-    throw new Error("Missing return statement in function");
-  }
-
-// Merged Non-terminal
-  final public Statement DropStatement() throws ParseException, ParseException {
-  String id = null;
-  Pair<Identifier,Identifier> pairId = null;
-  Triple<Identifier,Identifier,Identifier> tripleId = null;
-  FunctionSignature funcSig = null;
-  boolean ifExists = false;
-  Statement stmt = null;
-    jj_consume_token(DROP);
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case DATASET:
-      jj_consume_token(DATASET);
-      pairId = QualifiedName();
-      ifExists = IfExists();
-        stmt = new DropDatasetStatement(pairId.first, pairId.second, ifExists);
-      break;
-    case INDEX:
-      jj_consume_token(INDEX);
-      tripleId = DoubleQualifiedName();
-      ifExists = IfExists();
-        stmt = new IndexDropStatement(tripleId.first, tripleId.second, tripleId.third, ifExists);
-      break;
-    case NODEGROUP:
-      jj_consume_token(NODEGROUP);
-      id = Identifier();
-      ifExists = IfExists();
-        stmt = new NodeGroupDropStatement(new Identifier(id), ifExists);
-      break;
-    case TYPE:
-      jj_consume_token(TYPE);
-      pairId = TypeName();
-      ifExists = IfExists();
-        stmt = new TypeDropStatement(pairId.first, pairId.second, ifExists);
-      break;
-    case DATAVERSE:
-      jj_consume_token(DATAVERSE);
-      id = Identifier();
-      ifExists = IfExists();
-        stmt = new DataverseDropStatement(new Identifier(id), ifExists);
-      break;
-    case FUNCTION:
-      jj_consume_token(FUNCTION);
-      funcSig = FunctionSignature();
-      ifExists = IfExists();
-        stmt = new FunctionDropStatement(funcSig, ifExists);
-      break;
-    case FEED:
-      jj_consume_token(FEED);
-      pairId = QualifiedName();
-      ifExists = IfExists();
-        stmt = new FeedDropStatement(pairId.first, pairId.second, ifExists);
-      break;
-    case INGESTION:
-      jj_consume_token(INGESTION);
-      jj_consume_token(POLICY);
-      pairId = QualifiedName();
-      ifExists = IfExists();
-        stmt = new FeedPolicyDropStatement(pairId.first, pairId.second, ifExists);
-      break;
-    case CHANNEL:
-      jj_consume_token(CHANNEL);
-      pairId = QualifiedName();
-      ifExists = IfExists();
-        stmt = new ChannelDropStatement(pairId.first, pairId.second, ifExists);
-      break;
-    case BROKER:
-      jj_consume_token(BROKER);
-      pairId = QualifiedName();
-      ifExists = IfExists();
-        stmt = new BrokerDropStatement(pairId.first, pairId.second, ifExists);
-      break;
-    default:
-      jj_la1[75] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-  {if (true) return stmt;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public Expression ParenthesizedExpression() throws ParseException, ParseException {
-  Expression expr;
-    jj_consume_token(LEFTPAREN);
-    expr = Expression();
-    jj_consume_token(RIGHTPAREN);
-      {if (true) return expr;}
-    throw new Error("Missing return statement in function");
-  }
-
-// Merged Non-terminal
-  final public Statement CreateStatement() throws ParseException, ParseException {
-  String hint = null;
-  boolean dgen = false;
-  Statement stmt = null;
-    jj_consume_token(CREATE);
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case TYPE:
-      hint = getHint(token);
-      if (hint != null && hint.startsWith(DGEN_HINT)) {
-        dgen = true;
-      }
-      stmt = TypeSpecification(hint, dgen);
-      break;
-    case NODEGROUP:
-      stmt = NodegroupSpecification();
-      break;
-    case DATASET:
-    case EXTERNAL:
-    case INTERNAL:
-    case TEMPORARY:
-      stmt = DatasetSpecification();
-      break;
-    case INDEX:
-      stmt = IndexSpecification();
-      break;
-    case DATAVERSE:
-      stmt = DataverseSpecification();
-      break;
-    case FUNCTION:
-      stmt = FunctionSpecification();
-      break;
-    case FEED:
-    case PRIMARY:
-    case SECONDARY:
-      stmt = FeedSpecification();
-      break;
-    case INGESTION:
-      stmt = FeedPolicySpecification();
-      break;
-    case 8:
-      stmt = ChannelSpecification();
-      break;
-    case BROKER:
-      stmt = BrokerSpecification();
-      break;
-    default:
-      jj_la1[76] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-  {if (true) return stmt;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public QuantifiedExpression QuantifiedExpression() throws ParseException, ParseException {
-  QuantifiedExpression qc = new QuantifiedExpression();
-  List<QuantifiedPair> quantifiedList = new ArrayList<QuantifiedPair>();
-  Expression satisfiesExpr;
-  VariableExpr var;
-  Expression inExpr;
-  QuantifiedPair pair;
-    createNewScope();
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case SOME:
-      jj_consume_token(SOME);
-                      qc.setQuantifier(QuantifiedExpression.Quantifier.SOME);
-      break;
-    case EVERY:
-      jj_consume_token(EVERY);
-                      qc.setQuantifier(QuantifiedExpression.Quantifier.EVERY);
-      break;
-    default:
-      jj_la1[77] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    var = Variable();
-    jj_consume_token(IN);
-    inExpr = Expression();
-      pair = new QuantifiedPair(var, inExpr);
-      getCurrentScope().addNewVarSymbolToScope(var.getVar());
-      quantifiedList.add(pair);
-    label_20:
-    while (true) {
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case COMMA:
-        ;
-        break;
-      default:
-        jj_la1[78] = jj_gen;
-        break label_20;
-      }
-      jj_consume_token(COMMA);
-      var = Variable();
-      jj_consume_token(IN);
-      inExpr = Expression();
-      pair = new QuantifiedPair(var, inExpr);
-      getCurrentScope().addNewVarSymbolToScope(var.getVar());
-      quantifiedList.add(pair);
-    }
-    jj_consume_token(SATISFIES);
-    satisfiesExpr = Expression();
-       qc.setSatisfiesExpr(satisfiesExpr);
-       qc.setQuantifiedList(quantifiedList);
-       removeCurrentScope();
-       {if (true) return qc;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public String AdapterName() throws ParseException, ParseException {
-  String adapterName = null;
-    adapterName = Identifier();
-      {if (true) return adapterName;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DataverseDecl DataverseDeclaration() throws ParseException, ParseException {
-  String dvName = null;
-    jj_consume_token(USE);
-    jj_consume_token(DATAVERSE);
-    dvName = Identifier();
-      defaultDataverse = dvName;
-      {if (true) return new DataverseDecl(new Identifier(dvName));}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public CreateFeedStatement FeedSpecification() throws ParseException, ParseException {
-  Pair<Identifier,Identifier> nameComponents = null;
-  boolean ifNotExists = false;
-  String adapterName = null;
-  Map<String,String> properties = null;
-  FunctionSignature appliedFunction = null;
-  CreateFeedStatement cfs = null;
-  Pair<Identifier,Identifier> sourceNameComponents = null;
-    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-    case SECONDARY:
-      jj_consume_token(SECONDARY);
-      jj_consume_token(FEED);
-      nameComponents = QualifiedName();
-      ifNotExists = IfNotExists();
-      jj_consume_token(FROM);
-      jj_consume_token(FEED);
-      sourceNameComponents = QualifiedName();
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case APPLY:
-        appliedFunction = ApplyFunction();
-        break;
-      default:
-        jj_la1[79] = jj_gen;
-        ;
-      }
-      cfs = new CreateSecondaryFeedStatement(nameComponents, sourceNameComponents, appliedFunction, ifNotExists);
-      break;
-    case FEED:
-    case PRIMARY:
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case PRIMARY:
-        jj_consume_token(PRIMARY);
-        break;
-      default:
-        jj_la1[80] = jj_gen;
-        ;
-      }
-      jj_consume_token(FEED);
-      nameComponents = QualifiedName();
-      ifNotExists = IfNotExists();
-      jj_consume_token(USING);
-      adapterName = AdapterName();
-      properties = Configuration();
-      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
-      case APPLY:
-        appliedFunction = ApplyFunction();
-        break;
-      default:
-        jj_la1[81] = jj_gen;
-        ;
-      }
-      cfs = new CreatePrimaryFeedStatement(nameComponents, adapterName, properties, appliedFunction, ifNotExists);
-      break;
-    default:
-      jj_la1[82] = jj_gen;
-      jj_consume_token(-1);
-      throw new ParseException();
-    }
-    {if (true) return cfs;}
-    throw new Error("Missing return statement in function");
-  }
-
-  final public FunctionSignature FunctionSignature() throws ParseException, ParseException {
-  FunctionName fctName = null;
-  int arity = 0;
-    fctName

<TRUNCATED>

[05/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParserConstants.java
----------------------------------------------------------------------
diff --git a/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParserConstants.java b/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParserConstants.java
deleted file mode 100644
index efb5946..0000000
--- a/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParserConstants.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. BADAQLParserConstants.java */
-package org.apache.asterix.bad.lang;
-
-
-/**
- * Token literal values and constants.
- * Generated by org.javacc.parser.OtherFilesGen#start()
- */
-public interface BADAQLParserConstants {
-
-  /** End of File. */
-  int EOF = 0;
-  /** RegularExpression Id. */
-  int BROKER = 10;
-  /** RegularExpression Id. */
-  int CHANNEL = 11;
-  /** RegularExpression Id. */
-  int APPLY = 12;
-  /** RegularExpression Id. */
-  int AS = 13;
-  /** RegularExpression Id. */
-  int ASC = 14;
-  /** RegularExpression Id. */
-  int AT = 15;
-  /** RegularExpression Id. */
-  int AUTOGENERATED = 16;
-  /** RegularExpression Id. */
-  int BTREE = 17;
-  /** RegularExpression Id. */
-  int BY = 18;
-  /** RegularExpression Id. */
-  int CLOSED = 19;
-  /** RegularExpression Id. */
-  int COMPACT = 20;
-  /** RegularExpression Id. */
-  int COMPACTION = 21;
-  /** RegularExpression Id. */
-  int CONNECT = 22;
-  /** RegularExpression Id. */
-  int CREATE = 23;
-  /** RegularExpression Id. */
-  int DATASET = 24;
-  /** RegularExpression Id. */
-  int DATAVERSE = 25;
-  /** RegularExpression Id. */
-  int DECLARE = 26;
-  /** RegularExpression Id. */
-  int DECOR = 27;
-  /** RegularExpression Id. */
-  int DEFINITION = 28;
-  /** RegularExpression Id. */
-  int DELETE = 29;
-  /** RegularExpression Id. */
-  int DESC = 30;
-  /** RegularExpression Id. */
-  int DISCONNECT = 31;
-  /** RegularExpression Id. */
-  int DISTINCT = 32;
-  /** RegularExpression Id. */
-  int DROP = 33;
-  /** RegularExpression Id. */
-  int ELSE = 34;
-  /** RegularExpression Id. */
-  int ENFORCED = 35;
-  /** RegularExpression Id. */
-  int EVERY = 36;
-  /** RegularExpression Id. */
-  int EXISTS = 37;
-  /** RegularExpression Id. */
-  int EXTERNAL = 38;
-  /** RegularExpression Id. */
-  int FEED = 39;
-  /** RegularExpression Id. */
-  int FILTER = 40;
-  /** RegularExpression Id. */
-  int FOR = 41;
-  /** RegularExpression Id. */
-  int FORMAT = 42;
-  /** RegularExpression Id. */
-  int FROM = 43;
-  /** RegularExpression Id. */
-  int FUNCTION = 44;
-  /** RegularExpression Id. */
-  int GROUP = 45;
-  /** RegularExpression Id. */
-  int HINTS = 46;
-  /** RegularExpression Id. */
-  int IF = 47;
-  /** RegularExpression Id. */
-  int IN = 48;
-  /** RegularExpression Id. */
-  int INDEX = 49;
-  /** RegularExpression Id. */
-  int INGESTION = 50;
-  /** RegularExpression Id. */
-  int INSERT = 51;
-  /** RegularExpression Id. */
-  int INTERNAL = 52;
-  /** RegularExpression Id. */
-  int INTO = 53;
-  /** RegularExpression Id. */
-  int KEY = 54;
-  /** RegularExpression Id. */
-  int KEYWORD = 55;
-  /** RegularExpression Id. */
-  int KEEPING = 56;
-  /** RegularExpression Id. */
-  int LET = 57;
-  /** RegularExpression Id. */
-  int LIMIT = 58;
-  /** RegularExpression Id. */
-  int LOAD = 59;
-  /** RegularExpression Id. */
-  int NGRAM = 60;
-  /** RegularExpression Id. */
-  int NODEGROUP = 61;
-  /** RegularExpression Id. */
-  int OFFSET = 62;
-  /** RegularExpression Id. */
-  int ON = 63;
-  /** RegularExpression Id. */
-  int OPEN = 64;
-  /** RegularExpression Id. */
-  int ORDER = 65;
-  /** RegularExpression Id. */
-  int OUTPUT = 66;
-  /** RegularExpression Id. */
-  int PATH = 67;
-  /** RegularExpression Id. */
-  int POLICY = 68;
-  /** RegularExpression Id. */
-  int PRESORTED = 69;
-  /** RegularExpression Id. */
-  int PRIMARY = 70;
-  /** RegularExpression Id. */
-  int REFRESH = 71;
-  /** RegularExpression Id. */
-  int RETURN = 72;
-  /** RegularExpression Id. */
-  int RTREE = 73;
-  /** RegularExpression Id. */
-  int RUN = 74;
-  /** RegularExpression Id. */
-  int SATISFIES = 75;
-  /** RegularExpression Id. */
-  int SECONDARY = 76;
-  /** RegularExpression Id. */
-  int SELECT = 77;
-  /** RegularExpression Id. */
-  int SET = 78;
-  /** RegularExpression Id. */
-  int SOME = 79;
-  /** RegularExpression Id. */
-  int TEMPORARY = 80;
-  /** RegularExpression Id. */
-  int THEN = 81;
-  /** RegularExpression Id. */
-  int TO = 82;
-  /** RegularExpression Id. */
-  int TYPE = 83;
-  /** RegularExpression Id. */
-  int UNION = 84;
-  /** RegularExpression Id. */
-  int UPDATE = 85;
-  /** RegularExpression Id. */
-  int UPSERT = 86;
-  /** RegularExpression Id. */
-  int USE = 87;
-  /** RegularExpression Id. */
-  int USING = 88;
-  /** RegularExpression Id. */
-  int WHERE = 89;
-  /** RegularExpression Id. */
-  int WITH = 90;
-  /** RegularExpression Id. */
-  int WRITE = 91;
-  /** RegularExpression Id. */
-  int CARET = 92;
-  /** RegularExpression Id. */
-  int DIV = 93;
-  /** RegularExpression Id. */
-  int IDIV = 94;
-  /** RegularExpression Id. */
-  int MINUS = 95;
-  /** RegularExpression Id. */
-  int MOD = 96;
-  /** RegularExpression Id. */
-  int MUL = 97;
-  /** RegularExpression Id. */
-  int PLUS = 98;
-  /** RegularExpression Id. */
-  int LEFTPAREN = 99;
-  /** RegularExpression Id. */
-  int RIGHTPAREN = 100;
-  /** RegularExpression Id. */
-  int LEFTBRACKET = 101;
-  /** RegularExpression Id. */
-  int RIGHTBRACKET = 102;
-  /** RegularExpression Id. */
-  int COLON = 103;
-  /** RegularExpression Id. */
-  int COMMA = 104;
-  /** RegularExpression Id. */
-  int DOT = 105;
-  /** RegularExpression Id. */
-  int QUES = 106;
-  /** RegularExpression Id. */
-  int LT = 107;
-  /** RegularExpression Id. */
-  int GT = 108;
-  /** RegularExpression Id. */
-  int LE = 109;
-  /** RegularExpression Id. */
-  int GE = 110;
-  /** RegularExpression Id. */
-  int EQ = 111;
-  /** RegularExpression Id. */
-  int NE = 112;
-  /** RegularExpression Id. */
-  int SIMILAR = 113;
-  /** RegularExpression Id. */
-  int ASSIGN = 114;
-  /** RegularExpression Id. */
-  int AND = 115;
-  /** RegularExpression Id. */
-  int OR = 116;
-  /** RegularExpression Id. */
-  int SYMBOLAT = 117;
-  /** RegularExpression Id. */
-  int SYMBOLHASH = 118;
-  /** RegularExpression Id. */
-  int LEFTBRACE = 119;
-  /** RegularExpression Id. */
-  int RIGHTBRACE = 120;
-  /** RegularExpression Id. */
-  int LEFTDBLBRACE = 121;
-  /** RegularExpression Id. */
-  int RIGHTDBLBRACE = 122;
-  /** RegularExpression Id. */
-  int INTEGER_LITERAL = 123;
-  /** RegularExpression Id. */
-  int MISSING = 124;
-  /** RegularExpression Id. */
-  int NULL = 125;
-  /** RegularExpression Id. */
-  int TRUE = 126;
-  /** RegularExpression Id. */
-  int FALSE = 127;
-  /** RegularExpression Id. */
-  int DIGIT = 128;
-  /** RegularExpression Id. */
-  int DOUBLE_LITERAL = 129;
-  /** RegularExpression Id. */
-  int FLOAT_LITERAL = 130;
-  /** RegularExpression Id. */
-  int DIGITS = 131;
-  /** RegularExpression Id. */
-  int LETTER = 132;
-  /** RegularExpression Id. */
-  int SPECIALCHARS = 133;
-  /** RegularExpression Id. */
-  int STRING_LITERAL = 134;
-  /** RegularExpression Id. */
-  int EscapeQuot = 135;
-  /** RegularExpression Id. */
-  int EscapeApos = 136;
-  /** RegularExpression Id. */
-  int EscapeBslash = 137;
-  /** RegularExpression Id. */
-  int EscapeSlash = 138;
-  /** RegularExpression Id. */
-  int EscapeBspace = 139;
-  /** RegularExpression Id. */
-  int EscapeFormf = 140;
-  /** RegularExpression Id. */
-  int EscapeNl = 141;
-  /** RegularExpression Id. */
-  int EscapeCr = 142;
-  /** RegularExpression Id. */
-  int EscapeTab = 143;
-  /** RegularExpression Id. */
-  int IDENTIFIER = 144;
-  /** RegularExpression Id. */
-  int VARIABLE = 145;
-
-  /** Lexical state. */
-  int DEFAULT = 0;
-  /** Lexical state. */
-  int IN_DBL_BRACE = 1;
-  /** Lexical state. */
-  int INSIDE_COMMENT = 2;
-
-  /** Literal token values. */
-  String[] tokenImage = {
-    "<EOF>",
-    "\"records\"",
-    "\"returning\"",
-    "\";\"",
-    "\"subscribe\"",
-    "\"unsubscribe\"",
-    "\"change\"",
-    "\"subscription\"",
-    "\"repetitive\"",
-    "\"period\"",
-    "\"broker\"",
-    "\"channel\"",
-    "\"apply\"",
-    "\"as\"",
-    "\"asc\"",
-    "\"at\"",
-    "\"autogenerated\"",
-    "\"btree\"",
-    "\"by\"",
-    "\"closed\"",
-    "\"compact\"",
-    "\"compaction\"",
-    "\"connect\"",
-    "\"create\"",
-    "\"dataset\"",
-    "\"dataverse\"",
-    "\"declare\"",
-    "\"decor\"",
-    "\"definition\"",
-    "\"delete\"",
-    "\"desc\"",
-    "\"disconnect\"",
-    "\"distinct\"",
-    "\"drop\"",
-    "\"else\"",
-    "\"enforced\"",
-    "\"every\"",
-    "\"exists\"",
-    "\"external\"",
-    "\"feed\"",
-    "\"filter\"",
-    "\"for\"",
-    "\"format\"",
-    "\"from\"",
-    "\"function\"",
-    "\"group\"",
-    "\"hints\"",
-    "\"if\"",
-    "\"in\"",
-    "\"index\"",
-    "\"ingestion\"",
-    "\"insert\"",
-    "\"internal\"",
-    "\"into\"",
-    "\"key\"",
-    "\"keyword\"",
-    "\"keeping\"",
-    "\"let\"",
-    "\"limit\"",
-    "\"load\"",
-    "\"ngram\"",
-    "\"nodegroup\"",
-    "\"offset\"",
-    "\"on\"",
-    "\"open\"",
-    "\"order\"",
-    "\"output\"",
-    "\"path\"",
-    "\"policy\"",
-    "\"pre-sorted\"",
-    "\"primary\"",
-    "\"refresh\"",
-    "\"return\"",
-    "\"rtree\"",
-    "\"run\"",
-    "\"satisfies\"",
-    "\"secondary\"",
-    "\"select\"",
-    "\"set\"",
-    "\"some\"",
-    "\"temporary\"",
-    "\"then\"",
-    "\"to\"",
-    "\"type\"",
-    "\"union\"",
-    "\"update\"",
-    "\"upsert\"",
-    "\"use\"",
-    "\"using\"",
-    "\"where\"",
-    "\"with\"",
-    "\"write\"",
-    "\"^\"",
-    "\"/\"",
-    "\"idiv\"",
-    "\"-\"",
-    "\"%\"",
-    "\"*\"",
-    "\"+\"",
-    "\"(\"",
-    "\")\"",
-    "\"[\"",
-    "\"]\"",
-    "\":\"",
-    "\",\"",
-    "\".\"",
-    "\"?\"",
-    "\"<\"",
-    "\">\"",
-    "\"<=\"",
-    "\">=\"",
-    "\"=\"",
-    "\"!=\"",
-    "\"~=\"",
-    "\":=\"",
-    "\"and\"",
-    "\"or\"",
-    "\"@\"",
-    "\"#\"",
-    "\"{\"",
-    "\"}\"",
-    "\"{{\"",
-    "\"}}\"",
-    "<INTEGER_LITERAL>",
-    "\"missing\"",
-    "\"null\"",
-    "\"true\"",
-    "\"false\"",
-    "<DIGIT>",
-    "<DOUBLE_LITERAL>",
-    "<FLOAT_LITERAL>",
-    "<DIGITS>",
-    "<LETTER>",
-    "<SPECIALCHARS>",
-    "<STRING_LITERAL>",
-    "\"\\\\\\\"\"",
-    "\"\\\\\\\'\"",
-    "\"\\\\\\\\\"",
-    "\"\\\\/\"",
-    "\"\\\\b\"",
-    "\"\\\\f\"",
-    "\"\\\\n\"",
-    "\"\\\\r\"",
-    "\"\\\\t\"",
-    "<IDENTIFIER>",
-    "<VARIABLE>",
-    "\" \"",
-    "\"\\t\"",
-    "\"\\r\"",
-    "\"\\n\"",
-    "<token of kind 150>",
-    "<token of kind 151>",
-    "\"/*\"",
-    "<token of kind 153>",
-    "\"/*\"",
-    "\"*/\"",
-    "<token of kind 156>",
-  };
-
-}


[14/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
new file mode 100644
index 0000000..d862052
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
@@ -0,0 +1,373 @@
+/*
+ * 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.asterix.bad.lang.statement;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.asterix.active.ActiveJobNotificationHandler;
+import org.apache.asterix.active.ActivityState;
+import org.apache.asterix.active.EntityId;
+import org.apache.asterix.algebra.extension.IExtensionStatement;
+import org.apache.asterix.app.translator.QueryTranslator;
+import org.apache.asterix.bad.BADConstants;
+import org.apache.asterix.bad.ChannelJobInfo;
+import org.apache.asterix.bad.lang.BADLangExtension;
+import org.apache.asterix.bad.metadata.Channel;
+import org.apache.asterix.bad.metadata.ChannelEventsListener;
+import org.apache.asterix.bad.runtime.RepetitiveChannelOperatorDescriptor;
+import org.apache.asterix.common.config.DatasetConfig.DatasetType;
+import org.apache.asterix.common.exceptions.AsterixException;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber;
+import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber.ActiveLifecycleEvent;
+import org.apache.asterix.external.feed.management.ActiveLifecycleEventSubscriber;
+import org.apache.asterix.file.JobSpecificationUtils;
+import org.apache.asterix.lang.aql.parser.AQLParserFactory;
+import org.apache.asterix.lang.common.base.Expression;
+import org.apache.asterix.lang.common.base.Statement;
+import org.apache.asterix.lang.common.expression.CallExpr;
+import org.apache.asterix.lang.common.expression.LiteralExpr;
+import org.apache.asterix.lang.common.literal.StringLiteral;
+import org.apache.asterix.lang.common.statement.DatasetDecl;
+import org.apache.asterix.lang.common.statement.IDatasetDetailsDecl;
+import org.apache.asterix.lang.common.statement.InsertStatement;
+import org.apache.asterix.lang.common.statement.InternalDetailsDecl;
+import org.apache.asterix.lang.common.struct.Identifier;
+import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
+import org.apache.asterix.metadata.MetadataException;
+import org.apache.asterix.metadata.MetadataManager;
+import org.apache.asterix.metadata.MetadataTransactionContext;
+import org.apache.asterix.metadata.declared.AqlMetadataProvider;
+import org.apache.asterix.metadata.entities.Function;
+import org.apache.asterix.om.base.temporal.ADurationParserFactory;
+import org.apache.asterix.runtime.util.AsterixAppContextInfo;
+import org.apache.asterix.runtime.util.AsterixClusterProperties;
+import org.apache.asterix.translator.IStatementExecutor;
+import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
+import org.apache.asterix.translator.IStatementExecutor.Stats;
+import org.apache.asterix.util.JobUtils;
+import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
+import org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint;
+import org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraintHelper;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.common.utils.Pair;
+import org.apache.hyracks.api.application.ICCApplicationContext;
+import org.apache.hyracks.api.client.ClusterControllerInfo;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
+import org.apache.hyracks.api.dataset.IHyracksDataset;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.apache.hyracks.api.job.JobSpecification;
+import org.apache.hyracks.dataflow.common.data.parsers.IValueParser;
+
+public class CreateChannelStatement implements IExtensionStatement {
+
+    private static final Logger LOGGER = Logger.getLogger(CreateChannelStatement.class.getName());
+
+    private final Identifier dataverseName;
+    private final Identifier channelName;
+    private final FunctionSignature function;
+    private final CallExpr period;
+    private String duration;
+    private InsertStatement channelResultsInsertQuery;
+    private String subscriptionsTableName;
+    private String resultsTableName;
+
+    public CreateChannelStatement(Identifier dataverseName, Identifier channelName, FunctionSignature function,
+            Expression period) {
+        this.channelName = channelName;
+        this.dataverseName = dataverseName;
+        this.function = function;
+        this.period = (CallExpr) period;
+        this.duration = "";
+    }
+
+    public Identifier getDataverseName() {
+        return dataverseName;
+    }
+
+    public Identifier getChannelName() {
+        return channelName;
+    }
+
+    public String getResultsName() {
+        return resultsTableName;
+    }
+
+    public String getSubscriptionsName() {
+        return subscriptionsTableName;
+    }
+
+    public String getDuration() {
+        return duration;
+    }
+
+    public FunctionSignature getFunction() {
+        return function;
+    }
+
+    public Expression getPeriod() {
+        return period;
+    }
+
+    public InsertStatement getChannelResultsInsertQuery() {
+        return channelResultsInsertQuery;
+    }
+
+    @Override
+    public byte getCategory() {
+        return Category.DDL;
+    }
+
+    @Override
+    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
+        return null;
+    }
+
+    public void initialize(MetadataTransactionContext mdTxnCtx, String subscriptionsTableName, String resultsTableName)
+            throws MetadataException, HyracksDataException {
+        Function lookup = MetadataManager.INSTANCE.getFunction(mdTxnCtx, function);
+        if (lookup == null) {
+            throw new MetadataException(" Unknown function " + function.getName());
+        }
+
+        if (!period.getFunctionSignature().getName().equals("duration")) {
+            throw new MetadataException(
+                    "Expected argument period as a duration, but got " + period.getFunctionSignature().getName() + ".");
+        }
+        duration = ((StringLiteral) ((LiteralExpr) period.getExprList().get(0)).getValue()).getValue();
+        IValueParser durationParser = ADurationParserFactory.INSTANCE.createValueParser();
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        DataOutputStream outputStream = new DataOutputStream(bos);
+        durationParser.parse(duration.toCharArray(), 0, duration.toCharArray().length, outputStream);
+        this.resultsTableName = resultsTableName;
+        this.subscriptionsTableName = subscriptionsTableName;
+
+    }
+
+    @Override
+    public byte getKind() {
+        return Kind.EXTENSION;
+    }
+
+    public Pair<JobSpecification, AlgebricksAbsolutePartitionConstraint> buildChannelJobSpec(String dataverseName,
+            String channelName, String duration, AqlMetadataProvider metadataProvider, JobSpecification channeljobSpec,
+            String strIP, int port) throws Exception {
+        JobSpecification spec = JobSpecificationUtils.createJobSpecification();
+        IOperatorDescriptor channelQueryExecuter;
+        AlgebricksPartitionConstraint executerPc;
+
+        Pair<IOperatorDescriptor, AlgebricksAbsolutePartitionConstraint> p = buildChannelRuntime(spec, dataverseName,
+                channelName, duration, channeljobSpec, strIP, port);
+        channelQueryExecuter = p.first;
+        executerPc = p.second;
+        AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, channelQueryExecuter, executerPc);
+        spec.addRoot(channelQueryExecuter);
+        return new Pair<>(spec, p.second);
+
+    }
+
+    public Pair<IOperatorDescriptor, AlgebricksAbsolutePartitionConstraint> buildChannelRuntime(
+            JobSpecification jobSpec, String dataverseName, String channelName, String duration,
+            JobSpecification channeljobSpec, String strIP, int port) throws Exception {
+        RepetitiveChannelOperatorDescriptor channelOp = new RepetitiveChannelOperatorDescriptor(jobSpec, dataverseName,
+                channelName, duration, channeljobSpec, strIP, port);
+
+        String partition = AsterixClusterProperties.INSTANCE.getClusterLocations().getLocations()[0];
+        Set<String> ncs = new HashSet<>(Arrays.asList(partition));
+        AlgebricksAbsolutePartitionConstraint partitionConstraint = new AlgebricksAbsolutePartitionConstraint(
+                ncs.toArray(new String[ncs.size()]));
+        return new Pair<IOperatorDescriptor, AlgebricksAbsolutePartitionConstraint>(channelOp, partitionConstraint);
+    }
+
+    private void createDatasets(IStatementExecutor statementExecutor, Identifier subscriptionsName,
+            Identifier resultsName, AqlMetadataProvider metadataProvider, IHyracksClientConnection hcc,
+            IHyracksDataset hdc, Stats stats) throws AsterixException, Exception {
+
+        Identifier subscriptionsTypeName = new Identifier(BADConstants.ChannelSubscriptionsType);
+        Identifier resultsTypeName = new Identifier(BADConstants.ChannelResultsType);
+        //Setup the subscriptions dataset
+        List<List<String>> partitionFields = new ArrayList<List<String>>();
+        List<Integer> keyIndicators = new ArrayList<Integer>();
+        keyIndicators.add(0);
+        List<String> fieldNames = new ArrayList<String>();
+        fieldNames.add(BADConstants.SubscriptionId);
+        partitionFields.add(fieldNames);
+        IDatasetDetailsDecl idd = new InternalDetailsDecl(partitionFields, keyIndicators, true, null, false);
+        DatasetDecl createSubscriptionsDataset = new DatasetDecl(dataverseName, subscriptionsName,
+                new Identifier("Metadata"), subscriptionsTypeName, null, null, null, null,
+                new HashMap<String, String>(), new HashMap<String, String>(), DatasetType.INTERNAL, idd, true);
+
+        //Setup the results dataset
+        partitionFields = new ArrayList<List<String>>();
+        fieldNames = new ArrayList<String>();
+        fieldNames.add(BADConstants.ResultId);
+        partitionFields.add(fieldNames);
+        idd = new InternalDetailsDecl(partitionFields, keyIndicators, true, null, false);
+        DatasetDecl createResultsDataset = new DatasetDecl(dataverseName, resultsName, new Identifier("Metadata"),
+                resultsTypeName, null, null, null, null, new HashMap<String, String>(), new HashMap<String, String>(),
+                DatasetType.INTERNAL, idd, true);
+
+        //Run both statements to create datasets
+        ((QueryTranslator) statementExecutor).handleCreateDatasetStatement(metadataProvider, createSubscriptionsDataset,
+                hcc);
+        ((QueryTranslator) statementExecutor).handleCreateDatasetStatement(metadataProvider, createResultsDataset, hcc);
+
+    }
+
+    private JobSpecification createChannelJob(IStatementExecutor statementExecutor, Identifier subscriptionsName,
+            Identifier resultsName, AqlMetadataProvider metadataProvider, IHyracksClientConnection hcc,
+            IHyracksDataset hdc, Stats stats) throws Exception {
+        StringBuilder builder = new StringBuilder();
+        builder.append("insert into dataset " + dataverseName + "." + resultsName + " ");
+        builder.append(" (" + " let $" + BADConstants.ChannelExecutionTime + " := current-datetime() \n");
+
+        builder.append("for $sub in dataset " + dataverseName + "." + subscriptionsName + "\n");
+        builder.append("for $broker in dataset Metadata.Broker\n");
+        builder.append("where $broker." + BADConstants.BrokerName + "= $sub." + BADConstants.BrokerName + "\n");
+        builder.append("and $broker." + BADConstants.BrokerDataverse + "= $sub." + BADConstants.BrokerDataverse + "\n");
+        builder.append(" for $result in " + function.getNamespace() + "." + function.getName() + "(");
+        int i = 0;
+        for (; i < function.getArity() - 1; i++) {
+            builder.append("$sub.param" + i + ",");
+        }
+        builder.append("$sub.param" + i + ")\n");
+        builder.append("return {\n");
+        builder.append("\"" + BADConstants.ChannelExecutionTime + "\":$" + BADConstants.ChannelExecutionTime + ",");
+        builder.append("\"" + BADConstants.SubscriptionId + "\":$sub." + BADConstants.SubscriptionId + ",");
+        builder.append("\"" + BADConstants.DeliveryTime + "\":current-datetime(),");
+        builder.append("\"result\":$result");
+        builder.append("}");
+        builder.append(")");
+        builder.append(" return records");
+        builder.append(";");
+        AQLParserFactory aqlFact = new AQLParserFactory();
+        List<Statement> fStatements = aqlFact.createParser(new StringReader(builder.toString())).parse();
+        return ((QueryTranslator) statementExecutor).handleInsertUpsertStatement(metadataProvider, fStatements.get(0),
+                hcc, hdc, ResultDelivery.ASYNC, stats, true);
+    }
+
+    @Override
+    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
+            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
+                    throws HyracksDataException, AlgebricksException {
+
+        //This function performs three tasks:
+        //1. Create datasets for the Channel
+        //2. Create the compiled Channel Job
+        //3. Create the metadata entry for the channel
+
+        //TODO: Figure out how to handle when a subset of the 3 tasks fails
+        //TODO: The compiled job will break if anything changes to the function or two datasets
+        // Need to make sure we do proper checking when altering these things
+
+        Identifier subscriptionsName = new Identifier(channelName + BADConstants.subscriptionEnding);
+        Identifier resultsName = new Identifier(channelName + BADConstants.resultsEnding);
+        EntityId entityId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, dataverseName.getValue(),
+                channelName.getValue());
+        ChannelEventsListener listener = (ChannelEventsListener) ActiveJobNotificationHandler.INSTANCE
+                .getActiveEntityListener(entityId);
+        IActiveLifecycleEventSubscriber eventSubscriber = new ActiveLifecycleEventSubscriber();
+        boolean subscriberRegistered = false;
+        Channel channel = null;
+
+        MetadataTransactionContext mdTxnCtx = null;
+        try {
+            mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
+            metadataProvider.setMetadataTxnContext(mdTxnCtx);
+            channel = BADLangExtension.getChannel(mdTxnCtx, dataverseName.getValue(), channelName.getValue());
+            if (channel != null) {
+                throw new AlgebricksException("A channel with this name " + channelName + " already exists.");
+            }
+            if (listener != null) {
+                subscriberRegistered = listener.isChannelActive(entityId, eventSubscriber);
+            }
+            if (subscriberRegistered) {
+                throw new AsterixException("Channel " + channelName + " is already running");
+            }
+            initialize(mdTxnCtx, subscriptionsName.getValue(), resultsName.getValue());
+            channel = new Channel(dataverseName.getValue(), channelName.getValue(), subscriptionsTableName,
+                    resultsTableName, function, duration);
+
+            //check if names are available before creating anything
+            if (MetadataManager.INSTANCE.getDataset(mdTxnCtx, dataverseName.getValue(),
+                    subscriptionsName.getValue()) != null) {
+                throw new AsterixException("The channel name:" + channelName + " is not available.");
+            }
+            if (MetadataManager.INSTANCE.getDataset(mdTxnCtx, dataverseName.getValue(),
+                    resultsName.getValue()) != null) {
+                throw new AsterixException("The channel name:" + channelName + " is not available.");
+            }
+
+            // Now we subscribe
+            if (listener == null) {
+                listener = new ChannelEventsListener(entityId);
+                ActiveJobNotificationHandler.INSTANCE.registerListener(listener);
+            }
+            listener.registerEventSubscriber(eventSubscriber);
+            subscriberRegistered = true;
+
+            //Create Channel Datasets
+            createDatasets(statementExecutor, subscriptionsName, resultsName, metadataProvider, hcc, hdc, stats);
+
+            //Create Channel Internal Job
+            JobSpecification channeljobSpec = createChannelJob(statementExecutor, subscriptionsName, resultsName,
+                    metadataProvider, hcc, hdc, stats);
+
+            //Create Channel Operator
+            ICCApplicationContext iCCApp = AsterixAppContextInfo.INSTANCE.getCCApplicationContext();
+            ClusterControllerInfo ccInfo = iCCApp.getCCContext().getClusterControllerInfo();
+            String strIP = ccInfo.getClientNetAddress();
+            int port = ccInfo.getClientNetPort();
+            Pair<JobSpecification, AlgebricksAbsolutePartitionConstraint> alteredJobSpec = buildChannelJobSpec(
+                    dataverseName.getValue(), channelName.getValue(), duration, metadataProvider, channeljobSpec, strIP,
+                    port);
+
+            channel.setPartitionConstraint(alteredJobSpec.second);
+
+            ChannelJobInfo channelJobInfo = new ChannelJobInfo(entityId, null, ActivityState.ACTIVE,
+                    alteredJobSpec.first);
+            alteredJobSpec.first.setProperty(ActiveJobNotificationHandler.ACTIVE_ENTITY_PROPERTY_NAME, channelJobInfo);
+            JobUtils.runJob(hcc, alteredJobSpec.first, false);
+
+            eventSubscriber.assertEvent(ActiveLifecycleEvent.ACTIVE_JOB_STARTED);
+
+            MetadataManager.INSTANCE.addEntity(mdTxnCtx, channel);
+            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+        } catch (Exception e) {
+            if (mdTxnCtx != null) {
+                QueryTranslator.abort(e, e, mdTxnCtx);
+            }
+            LOGGER.log(Level.WARNING, "Failed creating a channel", e);
+            throw new HyracksDataException(e);
+        }
+
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
new file mode 100644
index 0000000..9129b0f
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
@@ -0,0 +1,109 @@
+/*
+ * 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.asterix.bad.metadata;
+
+import java.rmi.RemoteException;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.asterix.bad.BADConstants;
+import org.apache.asterix.common.api.ExtensionId;
+import org.apache.asterix.common.exceptions.ACIDException;
+import org.apache.asterix.metadata.MetadataManager;
+import org.apache.asterix.metadata.MetadataTransactionContext;
+import org.apache.asterix.metadata.api.ExtensionMetadataDataset;
+import org.apache.asterix.metadata.api.IMetadataEntity;
+import org.apache.asterix.metadata.api.IMetadataExtension;
+import org.apache.asterix.metadata.api.IMetadataIndex;
+import org.apache.asterix.metadata.bootstrap.MetadataBootstrap;
+import org.apache.asterix.metadata.entities.Datatype;
+import org.apache.asterix.metadata.entities.Dataverse;
+import org.apache.asterix.metadata.entitytupletranslators.MetadataTupleTranslatorProvider;
+import org.apache.asterix.runtime.formats.NonTaggedDataFormat;
+import org.apache.hyracks.algebricks.common.utils.Pair;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+
+public class BADMetadataExtension implements IMetadataExtension {
+
+    public static final ExtensionId BAD_METADATA_EXTENSION_ID = new ExtensionId(
+            BADConstants.BAD_METADATA_EXTENSION_NAME, 0);
+    public static final Dataverse BAD_DATAVERSE = new Dataverse(BADConstants.BAD_DATAVERSE_NAME,
+            NonTaggedDataFormat.class.getName(), IMetadataEntity.PENDING_NO_OP);
+
+    public static final Datatype BAD_SUBSCRIPTION_DATATYPE = new Datatype(BADConstants.BAD_DATAVERSE_NAME,
+            BADConstants.ChannelSubscriptionsType, BADMetadataRecordTypes.channelSubscriptionsType, false);
+    public static final Datatype BAD_RESULT_DATATYPE = new Datatype(BADConstants.BAD_DATAVERSE_NAME,
+            BADConstants.ChannelResultsType, BADMetadataRecordTypes.channelResultsType, false);
+
+    @Override
+    public ExtensionId getId() {
+        return BAD_METADATA_EXTENSION_ID;
+    }
+
+    @Override
+    public void configure(List<Pair<String, String>> args) {
+        // do nothing??
+    }
+
+    @Override
+    public MetadataTupleTranslatorProvider getMetadataTupleTranslatorProvider() {
+        return new MetadataTupleTranslatorProvider();
+    }
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    public List<ExtensionMetadataDataset> getExtensionIndexes() {
+        try {
+            ExtensionMetadataDataset A = BADMetadataIndexes.CHANNEL_DATASET;
+            ExtensionMetadataDataset B = BADMetadataIndexes.BROKER_DATASET;
+            return Arrays.asList(BADMetadataIndexes.CHANNEL_DATASET, BADMetadataIndexes.BROKER_DATASET);
+        } catch (Throwable th) {
+            th.printStackTrace();
+            throw th;
+        }
+    }
+
+    @Override
+    public void initializeMetadata() throws HyracksDataException, RemoteException, ACIDException {
+        // enlist datasets
+        MetadataBootstrap.enlistMetadataDataset(BADMetadataIndexes.CHANNEL_DATASET);
+        MetadataBootstrap.enlistMetadataDataset(BADMetadataIndexes.BROKER_DATASET);
+        if (MetadataBootstrap.isNewUniverse()) {
+            MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
+            try {
+                // add metadata datasets
+                MetadataBootstrap.insertMetadataDatasets(mdTxnCtx,
+                        new IMetadataIndex[] { BADMetadataIndexes.CHANNEL_DATASET, BADMetadataIndexes.BROKER_DATASET });
+                // insert default dataverse
+                // TODO prevent user from dropping this dataverse
+                MetadataManager.INSTANCE.addDataverse(mdTxnCtx, BAD_DATAVERSE);
+                // insert default data type
+                MetadataManager.INSTANCE.addDatatype(mdTxnCtx, BAD_RESULT_DATATYPE);
+                MetadataManager.INSTANCE.addDatatype(mdTxnCtx, BAD_SUBSCRIPTION_DATATYPE);
+                // TODO prevent user from dropping these types
+                MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+            } catch (Exception e) {
+                e.printStackTrace();
+                MetadataManager.INSTANCE.abortTransaction(mdTxnCtx);
+            }
+        }
+        // local recovery?
+        // nothing for now
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
new file mode 100644
index 0000000..188f04f
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
@@ -0,0 +1,66 @@
+/*
+ * 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.asterix.bad.metadata;
+
+import java.util.Arrays;
+
+import org.apache.asterix.common.metadata.MetadataIndexImmutableProperties;
+import org.apache.asterix.metadata.api.ExtensionMetadataDataset;
+import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
+import org.apache.asterix.metadata.bootstrap.MetadataRecordTypes;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.IAType;
+
+public class BADMetadataIndexes {
+
+    public static final String INDEX_NAME_CHANNEL = "Channel";
+    public static final String INDEX_NAME_BROKER = "Broker";
+
+    public static final ExtensionMetadataDatasetId BAD_CHANNEL_INDEX_ID = new ExtensionMetadataDatasetId(
+            BADMetadataExtension.BAD_METADATA_EXTENSION_ID, INDEX_NAME_CHANNEL);
+    public static final MetadataIndexImmutableProperties PROPERTIES_CHANNEL = new MetadataIndexImmutableProperties(
+            INDEX_NAME_CHANNEL, MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID,
+            MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID);
+
+    public static final ExtensionMetadataDatasetId BAD_BROKER_INDEX_ID = new ExtensionMetadataDatasetId(
+            BADMetadataExtension.BAD_METADATA_EXTENSION_ID, INDEX_NAME_BROKER);
+    public static final MetadataIndexImmutableProperties PROPERTIES_BROKER = new MetadataIndexImmutableProperties(
+            INDEX_NAME_BROKER, MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID,
+            MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID);
+
+    public static final int NUM_FIELDS_CHANNEL_IDX = 3;
+    public static final int NUM_FIELDS_BROKER_IDX = 3;
+
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    public static final ExtensionMetadataDataset CHANNEL_DATASET = new ExtensionMetadataDataset(PROPERTIES_CHANNEL,
+            NUM_FIELDS_CHANNEL_IDX, new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING },
+            Arrays.asList(Arrays.asList(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
+                    Arrays.asList(BADMetadataRecordTypes.FIELD_NAME_CHANNEL_NAME)),
+            0, BADMetadataRecordTypes.CHANNEL_RECORDTYPE, true, new int[] { 0, 1 }, BAD_CHANNEL_INDEX_ID,
+            new ChannelTupleTranslator(true));
+
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    public static final ExtensionMetadataDataset BROKER_DATASET = new ExtensionMetadataDataset(PROPERTIES_BROKER,
+            NUM_FIELDS_BROKER_IDX, new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING },
+            Arrays.asList(Arrays.asList(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
+                    Arrays.asList(BADMetadataRecordTypes.FIELD_NAME_BROKER_NAME)),
+            0, BADMetadataRecordTypes.BROKER_RECORDTYPE, true, new int[] { 0, 1 }, BAD_BROKER_INDEX_ID,
+            new BrokerTupleTranslator(true));
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java
new file mode 100644
index 0000000..d95570f
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java
@@ -0,0 +1,89 @@
+/*
+ * 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.asterix.bad.metadata;
+
+import org.apache.asterix.bad.BADConstants;
+import org.apache.asterix.metadata.bootstrap.MetadataRecordTypes;
+import org.apache.asterix.om.types.ARecordType;
+import org.apache.asterix.om.types.BuiltinType;
+import org.apache.asterix.om.types.IAType;
+
+public class BADMetadataRecordTypes {
+
+    // --------------------------------------- Fields Names --------------------------------------//
+    public static final String FIELD_NAME_BROKER_NAME = "BrokerName";
+    public static final String FIELD_NAME_BROKER_ENDPOINT = "BrokerEndPoint";
+    public static final String FIELD_NAME_CHANNEL_DURATION = "Duration";
+    public static final String FIELD_NAME_CHANNEL_FUNCTION = "Function";
+    public static final String FIELD_NAME_CHANNEL_NAME = "ChannelName";
+    public static final String FIELD_NAME_CHANNEL_RESULTS_DATASET = "ResultsDatasetName";
+    public static final String FIELD_NAME_CHANNEL_SUBSCRIPTIONS_DATASET = "SubscriptionsDatasetName";
+    public static final String FIELD_NAME_DATAVERSE_NAME = "DataverseName";
+
+    // -------------------------------------- Subscriptions --------------------------------------//
+    private static final String[] subTypeFieldNames = { BADConstants.BrokerDataverse, BADConstants.BrokerName,
+            BADConstants.SubscriptionId };
+    private static final IAType[] subTypeFieldTypes = { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.AUUID };
+    public static final ARecordType channelSubscriptionsType = new ARecordType(BADConstants.ChannelSubscriptionsType,
+            subTypeFieldNames, subTypeFieldTypes, true);
+
+    // ---------------------------------------- Results --------------------------------------------//
+    private static final String[] resultTypeFieldNames = { BADConstants.ResultId, BADConstants.ChannelExecutionTime,
+            BADConstants.SubscriptionId, BADConstants.DeliveryTime };
+    private static final IAType[] resultTypeFieldTypes = { BuiltinType.AUUID, BuiltinType.ADATETIME, BuiltinType.AUUID,
+            BuiltinType.ADATETIME };
+    public static final ARecordType channelResultsType = new ARecordType(BADConstants.ChannelResultsType,
+            resultTypeFieldNames, resultTypeFieldTypes, true);
+
+    //------------------------------------------ Channel ----------------------------------------//     
+    public static final String RECORD_NAME_CHANNEL = "ChannelRecordType";
+    public static final int CHANNEL_ARECORD_DATAVERSE_NAME_FIELD_INDEX = 0;
+    public static final int CHANNEL_ARECORD_CHANNEL_NAME_FIELD_INDEX = 1;
+    public static final int CHANNEL_ARECORD_SUBSCRIPTIONS_NAME_FIELD_INDEX = 2;
+    public static final int CHANNEL_ARECORD_RESULTS_NAME_FIELD_INDEX = 3;
+    public static final int CHANNEL_ARECORD_FUNCTION_FIELD_INDEX = 4;
+    public static final int CHANNEL_ARECORD_DURATION_FIELD_INDEX = 5;
+    public static final ARecordType CHANNEL_RECORDTYPE = MetadataRecordTypes.createRecordType(
+            // RecordTypeName
+            RECORD_NAME_CHANNEL,
+            // FieldNames
+            new String[] { FIELD_NAME_DATAVERSE_NAME, FIELD_NAME_CHANNEL_NAME, FIELD_NAME_CHANNEL_SUBSCRIPTIONS_DATASET,
+                    FIELD_NAME_CHANNEL_RESULTS_DATASET, FIELD_NAME_CHANNEL_FUNCTION, FIELD_NAME_CHANNEL_DURATION },
+            // FieldTypes
+            new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING,
+                    BuiltinType.ASTRING, BuiltinType.ASTRING },
+            //IsOpen?
+            true);
+    //------------------------------------------ Broker ----------------------------------------//
+    public static final String RECORD_NAME_BROKER = "BrokerRecordType";
+    public static final int BROKER_DATAVERSE_NAME_FIELD_INDEX = 0;
+    public static final int BROKER_NAME_FIELD_INDEX = 1;
+    public static final int BROKER_ENDPOINT_FIELD_INDEX = 2;
+    public static final ARecordType BROKER_RECORDTYPE = MetadataRecordTypes.createRecordType(
+            // RecordTypeName
+            RECORD_NAME_BROKER,
+            // FieldNames
+            new String[] { FIELD_NAME_DATAVERSE_NAME, FIELD_NAME_BROKER_NAME, FIELD_NAME_BROKER_ENDPOINT },
+            // FieldTypes
+            new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING,
+                    BuiltinType.ASTRING, BuiltinType.ASTRING },
+            //IsOpen?
+            true);
+
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Broker.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Broker.java b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Broker.java
new file mode 100644
index 0000000..006f0dc
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Broker.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2009-2015 by The Regents of the University of California
+ * 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 from
+ *
+ * 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.asterix.bad.metadata;
+
+import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
+import org.apache.asterix.metadata.api.IExtensionMetadataEntity;
+
+/**
+ * Metadata describing a broker.
+ */
+public class Broker implements IExtensionMetadataEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    private final String dataverseName;
+    private final String brokerName;
+    private final String endPointName;
+
+    public Broker(String dataverseName, String brokerName, String endPointName) {
+        this.endPointName = endPointName;
+        this.dataverseName = dataverseName;
+        this.brokerName = brokerName;
+    }
+
+    public String getDataverseName() {
+        return dataverseName;
+    }
+
+    public String getBrokerName() {
+        return brokerName;
+    }
+
+    public String getEndPointName() {
+        return endPointName;
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        if (this == other) {
+            return true;
+        }
+        if (!(other instanceof Broker)) {
+            return false;
+        }
+        Broker otherDataset = (Broker) other;
+        if (!otherDataset.brokerName.equals(brokerName)) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public ExtensionMetadataDatasetId getDatasetId() {
+        return BADMetadataIndexes.BAD_BROKER_INDEX_ID;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java
new file mode 100644
index 0000000..b73e9e3
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java
@@ -0,0 +1,45 @@
+/*
+ * 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.asterix.bad.metadata;
+
+import org.apache.asterix.metadata.MetadataNode;
+import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
+import org.apache.asterix.metadata.api.IExtensionMetadataSearchKey;
+import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
+
+public class BrokerSearchKey implements IExtensionMetadataSearchKey {
+    private static final long serialVersionUID = 1L;
+    private final String dataverse;
+    private final String broker;
+
+    public BrokerSearchKey(String dataverse, String broker) {
+        this.dataverse = dataverse;
+        this.broker = broker;
+    }
+
+    @Override
+    public ExtensionMetadataDatasetId getDatasetId() {
+        return BADMetadataIndexes.BAD_BROKER_INDEX_ID;
+    }
+
+    @Override
+    public ITupleReference getSearchKey() {
+        return MetadataNode.createTuple(dataverse, broker);
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java
new file mode 100644
index 0000000..2b478f2
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2009-2013 by The Regents of the University of California
+ * 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 from
+ *
+ *     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.asterix.bad.metadata;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.IOException;
+
+import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
+import org.apache.asterix.metadata.MetadataException;
+import org.apache.asterix.metadata.entitytupletranslators.AbstractTupleTranslator;
+import org.apache.asterix.om.base.ARecord;
+import org.apache.asterix.om.base.AString;
+import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
+import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
+
+/**
+ * Translates a Channel metadata entity to an ITupleReference and vice versa.
+ */
+public class BrokerTupleTranslator extends AbstractTupleTranslator<Broker> {
+    // Field indexes of serialized Broker in a tuple.
+    // Key field.
+    public static final int BROKER_DATAVERSE_NAME_FIELD_INDEX = 0;
+
+    public static final int BROKER_NAME_FIELD_INDEX = 1;
+
+    // Payload field containing serialized broker.
+    public static final int BROKER_PAYLOAD_TUPLE_FIELD_INDEX = 2;
+
+    @SuppressWarnings("unchecked")
+    private ISerializerDeserializer<ARecord> recordSerDes = AqlSerializerDeserializerProvider.INSTANCE
+            .getSerializerDeserializer(BADMetadataRecordTypes.BROKER_RECORDTYPE);
+
+    @SuppressWarnings("unchecked")
+    public BrokerTupleTranslator(boolean getTuple) {
+        super(getTuple, BADMetadataIndexes.BROKER_DATASET.getFieldCount());
+    }
+
+    @Override
+    public Broker getMetadataEntityFromTuple(ITupleReference frameTuple) throws IOException {
+        byte[] serRecord = frameTuple.getFieldData(BROKER_PAYLOAD_TUPLE_FIELD_INDEX);
+        int recordStartOffset = frameTuple.getFieldStart(BROKER_PAYLOAD_TUPLE_FIELD_INDEX);
+        int recordLength = frameTuple.getFieldLength(BROKER_PAYLOAD_TUPLE_FIELD_INDEX);
+        ByteArrayInputStream stream = new ByteArrayInputStream(serRecord, recordStartOffset, recordLength);
+        DataInput in = new DataInputStream(stream);
+        ARecord channelRecord = recordSerDes.deserialize(in);
+        return createBrokerFromARecord(channelRecord);
+    }
+
+    private Broker createBrokerFromARecord(ARecord brokerRecord) {
+        Broker broker = null;
+        String dataverseName = ((AString) brokerRecord
+                .getValueByPos(BADMetadataRecordTypes.BROKER_DATAVERSE_NAME_FIELD_INDEX)).getStringValue();
+        String brokerName = ((AString) brokerRecord.getValueByPos(BADMetadataRecordTypes.BROKER_NAME_FIELD_INDEX))
+                .getStringValue();
+        String endPointName = ((AString) brokerRecord.getValueByPos(BADMetadataRecordTypes.BROKER_ENDPOINT_FIELD_INDEX))
+                .getStringValue();
+
+        broker = new Broker(dataverseName, brokerName, endPointName);
+        return broker;
+    }
+
+    @Override
+    public ITupleReference getTupleFromMetadataEntity(Broker broker) throws IOException, MetadataException {
+        // write the key in the first fields of the tuple
+
+        tupleBuilder.reset();
+        aString.setValue(broker.getDataverseName());
+        stringSerde.serialize(aString, tupleBuilder.getDataOutput());
+        tupleBuilder.addFieldEndOffset();
+
+        aString.setValue(broker.getBrokerName());
+        stringSerde.serialize(aString, tupleBuilder.getDataOutput());
+        tupleBuilder.addFieldEndOffset();
+
+        recordBuilder.reset(BADMetadataRecordTypes.BROKER_RECORDTYPE);
+
+        // write field 0
+        fieldValue.reset();
+        aString.setValue(broker.getDataverseName());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(BADMetadataRecordTypes.BROKER_DATAVERSE_NAME_FIELD_INDEX, fieldValue);
+
+        // write field 1
+        fieldValue.reset();
+        aString.setValue(broker.getBrokerName());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(BADMetadataRecordTypes.BROKER_NAME_FIELD_INDEX, fieldValue);
+
+        // write field 2
+        fieldValue.reset();
+        aString.setValue(broker.getEndPointName());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(BADMetadataRecordTypes.BROKER_ENDPOINT_FIELD_INDEX, fieldValue);
+
+        // write record
+        recordBuilder.write(tupleBuilder.getDataOutput(), true);
+
+        tupleBuilder.addFieldEndOffset();
+
+        tuple.reset(tupleBuilder.getFieldEndOffsets(), tupleBuilder.getByteArray());
+        return tuple;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Channel.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Channel.java b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Channel.java
new file mode 100644
index 0000000..1025748
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/Channel.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2009-2015 by The Regents of the University of California
+ * 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 from
+ *
+ * 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.asterix.bad.metadata;
+
+import org.apache.asterix.active.EntityId;
+import org.apache.asterix.bad.BADConstants;
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
+import org.apache.asterix.metadata.api.IExtensionMetadataEntity;
+import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
+
+/**
+ * Metadata describing a channel.
+ */
+public class Channel implements IExtensionMetadataEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /** A unique identifier for the channel */
+    protected final EntityId channelId;
+    private final String subscriptionsDatasetName;
+    private final String resultsDatasetName;
+    private final String duration;
+    private final FunctionSignature function;
+    private AlgebricksAbsolutePartitionConstraint partitionConstraint;
+
+    public Channel(String dataverseName, String channelName, String subscriptionsDataset, String resultsDataset,
+            FunctionSignature function, String duration) {
+        this.channelId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, dataverseName, channelName);
+        this.function = function;
+        this.duration = duration;
+        this.resultsDatasetName = resultsDataset;
+        this.subscriptionsDatasetName = subscriptionsDataset;
+    }
+
+    public EntityId getChannelId() {
+        return channelId;
+    }
+
+    public String getSubscriptionsDataset() {
+        return subscriptionsDatasetName;
+    }
+
+    public String getResultsDatasetName() {
+        return resultsDatasetName;
+    }
+
+    public String getDuration() {
+        return duration;
+    }
+
+    public FunctionSignature getFunction() {
+        return function;
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        if (this == other) {
+            return true;
+        }
+        if (!(other instanceof Channel)) {
+            return false;
+        }
+        Channel otherDataset = (Channel) other;
+        if (!otherDataset.channelId.equals(channelId)) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public ExtensionMetadataDatasetId getDatasetId() {
+        return BADMetadataIndexes.BAD_CHANNEL_INDEX_ID;
+    }
+
+    public AlgebricksAbsolutePartitionConstraint getPartitionConstraint() {
+        return partitionConstraint;
+    }
+
+    public void setPartitionConstraint(AlgebricksAbsolutePartitionConstraint partitionConstraint) {
+        this.partitionConstraint = partitionConstraint;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
new file mode 100644
index 0000000..b48478d
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
@@ -0,0 +1,237 @@
+/*
+ * 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.asterix.bad.metadata;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.asterix.active.ActiveEvent;
+import org.apache.asterix.active.ActiveJob;
+import org.apache.asterix.active.ActivityState;
+import org.apache.asterix.active.EntityId;
+import org.apache.asterix.active.IActiveEntityEventsListener;
+import org.apache.asterix.bad.BADConstants;
+import org.apache.asterix.bad.ChannelJobInfo;
+import org.apache.asterix.bad.runtime.RepetitiveChannelOperatorDescriptor;
+import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber;
+import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber.ActiveLifecycleEvent;
+import org.apache.asterix.external.feed.management.FeedConnectionId;
+import org.apache.asterix.runtime.util.AsterixAppContextInfo;
+import org.apache.hyracks.api.client.IHyracksClientConnection;
+import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
+import org.apache.hyracks.api.dataflow.OperatorDescriptorId;
+import org.apache.hyracks.api.job.JobId;
+import org.apache.hyracks.api.job.JobInfo;
+import org.apache.hyracks.api.job.JobSpecification;
+import org.apache.hyracks.api.job.JobStatus;
+import org.apache.log4j.Logger;
+
+public class ChannelEventsListener implements IActiveEntityEventsListener {
+    private static final Logger LOGGER = Logger.getLogger(ChannelEventsListener.class);
+    private final List<IActiveLifecycleEventSubscriber> subscribers;
+    private final Map<Long, ActiveJob> jobs;
+    private final Map<EntityId, ChannelJobInfo> jobInfos;
+    private EntityId entityId;
+
+    public ChannelEventsListener(EntityId entityId) {
+        this.entityId = entityId;
+        subscribers = new ArrayList<>();
+        jobs = new HashMap<>();
+        jobInfos = new HashMap<>();
+    }
+
+    @Override
+    public void notify(ActiveEvent event) {
+        try {
+            switch (event.getEventKind()) {
+                case JOB_START:
+                    handleJobStartEvent(event);
+                    break;
+                case JOB_FINISH:
+                    handleJobFinishEvent(event);
+                    break;
+                default:
+                    LOGGER.warn("Unknown Channel Event" + event);
+                    break;
+            }
+        } catch (Exception e) {
+            LOGGER.error("Unhandled Exception", e);
+        }
+    }
+
+    private synchronized void handleJobStartEvent(ActiveEvent message) throws Exception {
+        ActiveJob jobInfo = jobs.get(message.getJobId().getId());
+        handleJobStartMessage((ChannelJobInfo) jobInfo);
+    }
+
+    private synchronized void handleJobFinishEvent(ActiveEvent message) throws Exception {
+        ActiveJob jobInfo = jobs.get(message.getJobId().getId());
+        if (LOGGER.isInfoEnabled()) {
+            LOGGER.info("Channel Job finished for  " + jobInfo);
+        }
+        handleJobFinishMessage((ChannelJobInfo) jobInfo);
+    }
+
+    private synchronized void handleJobFinishMessage(ChannelJobInfo cInfo) throws Exception {
+        EntityId channelJobId = cInfo.getEntityId();
+
+        IHyracksClientConnection hcc = AsterixAppContextInfo.INSTANCE.getHcc();
+        JobInfo info = hcc.getJobInfo(cInfo.getJobId());
+        JobStatus status = info.getStatus();
+        boolean failure = status != null && status.equals(JobStatus.FAILURE);
+
+        jobInfos.remove(channelJobId);
+        jobs.remove(cInfo.getJobId().getId());
+        // notify event listeners
+        ActiveLifecycleEvent event = failure ? ActiveLifecycleEvent.ACTIVE_JOB_FAILED
+                : ActiveLifecycleEvent.ACTIVE_JOB_ENDED;
+        notifyEventSubscribers(event);
+    }
+
+    private void notifyEventSubscribers(ActiveLifecycleEvent event) {
+        if (subscribers != null && !subscribers.isEmpty()) {
+            for (IActiveLifecycleEventSubscriber subscriber : subscribers) {
+                subscriber.handleEvent(event);
+            }
+        }
+    }
+
+    private static synchronized void handleJobStartMessage(ChannelJobInfo cInfo) throws Exception {
+        List<OperatorDescriptorId> channelOperatorIds = new ArrayList<>();
+        Map<OperatorDescriptorId, IOperatorDescriptor> operators = cInfo.getSpec().getOperatorMap();
+        for (Entry<OperatorDescriptorId, IOperatorDescriptor> entry : operators.entrySet()) {
+            IOperatorDescriptor opDesc = entry.getValue();
+            if (opDesc instanceof RepetitiveChannelOperatorDescriptor) {
+                channelOperatorIds.add(opDesc.getOperatorId());
+            }
+        }
+
+        IHyracksClientConnection hcc = AsterixAppContextInfo.INSTANCE.getHcc();
+        JobInfo info = hcc.getJobInfo(cInfo.getJobId());
+        List<String> locations = new ArrayList<>();
+        for (OperatorDescriptorId channelOperatorId : channelOperatorIds) {
+            Map<Integer, String> operatorLocations = info.getOperatorLocations().get(channelOperatorId);
+            int nOperatorInstances = operatorLocations.size();
+            for (int i = 0; i < nOperatorInstances; i++) {
+                locations.add(operatorLocations.get(i));
+            }
+        }
+        // intakeLocations is an ordered list; 
+        // element at position i corresponds to location of i'th instance of operator
+        cInfo.setLocations(locations);
+        cInfo.setState(ActivityState.ACTIVE);
+    }
+
+    @Override
+    public void notifyJobCreation(JobId jobId, JobSpecification spec) {
+        EntityId channelId = null;
+        try {
+            for (IOperatorDescriptor opDesc : spec.getOperatorMap().values()) {
+                if (opDesc instanceof RepetitiveChannelOperatorDescriptor) {
+                    channelId = ((RepetitiveChannelOperatorDescriptor) opDesc).getEntityId();
+                    registerJob(channelId, jobId, spec);
+                    return;
+                }
+            }
+        } catch (Exception e) {
+            LOGGER.error(e);
+        }
+    }
+
+    public synchronized void registerJob(EntityId entityId, JobId jobId, JobSpecification jobSpec) {
+        if (jobs.get(jobId.getId()) != null) {
+            throw new IllegalStateException("Channel job already registered");
+        }
+        if (jobInfos.containsKey(jobId.getId())) {
+            throw new IllegalStateException("Channel job already registered");
+        }
+
+        ChannelJobInfo cInfo = new ChannelJobInfo(entityId, jobId, ActivityState.CREATED, jobSpec);
+        jobs.put(jobId.getId(), cInfo);
+        jobInfos.put(entityId, cInfo);
+
+        if (LOGGER.isInfoEnabled()) {
+            LOGGER.info("Registered channel job [" + jobId + "]" + " for channel " + entityId);
+        }
+
+        notifyEventSubscribers(ActiveLifecycleEvent.ACTIVE_JOB_STARTED);
+
+    }
+
+    public JobSpecification getJobSpecification(EntityId activeJobId) {
+        return jobInfos.get(activeJobId).getSpec();
+    }
+
+    public ChannelJobInfo getJobInfo(EntityId activeJobId) {
+        return jobInfos.get(activeJobId);
+    }
+
+    public synchronized void registerEventSubscriber(IActiveLifecycleEventSubscriber subscriber) {
+        subscribers.add(subscriber);
+    }
+
+    public void deregisterEventSubscriber(IActiveLifecycleEventSubscriber subscriber) {
+        subscribers.remove(subscriber);
+    }
+
+    public synchronized boolean isChannelActive(EntityId activeJobId, IActiveLifecycleEventSubscriber eventSubscriber) {
+        boolean active = false;
+        ChannelJobInfo cInfo = jobInfos.get(activeJobId);
+        if (cInfo != null) {
+            active = cInfo.getState().equals(ActivityState.ACTIVE);
+        }
+        if (active) {
+            registerEventSubscriber(eventSubscriber);
+        }
+        return active;
+    }
+
+    public ChannelJobInfo getFeedConnectJobInfo(EntityId activeJobId) {
+        return jobInfos.get(activeJobId);
+    }
+
+    public FeedConnectionId[] getConnections() {
+        return jobInfos.keySet().toArray(new FeedConnectionId[jobInfos.size()]);
+    }
+
+    @Override
+    public boolean isEntityActive() {
+        return !jobs.isEmpty();
+    }
+
+    @Override
+    public EntityId getEntityId() {
+        return entityId;
+    }
+
+    @Override
+    public boolean isEntityUsingDataset(String dataverseName, String datasetName) {
+        if (entityId.getDataverse().equals(dataverseName)) {
+            String subscriptionsName = entityId.getEntityName() + BADConstants.subscriptionEnding;
+            String resultsName = entityId.getEntityName() + BADConstants.resultsEnding;
+            if (datasetName.equals(subscriptionsName) || datasetName.equals(resultsName)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java
new file mode 100644
index 0000000..679548c
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java
@@ -0,0 +1,45 @@
+/*
+ * 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.asterix.bad.metadata;
+
+import org.apache.asterix.metadata.MetadataNode;
+import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
+import org.apache.asterix.metadata.api.IExtensionMetadataSearchKey;
+import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
+
+public class ChannelSearchKey implements IExtensionMetadataSearchKey {
+    private static final long serialVersionUID = 1L;
+    private final String dataverse;
+    private final String channel;
+
+    public ChannelSearchKey(String dataverse, String channel) {
+        this.dataverse = dataverse;
+        this.channel = channel;
+    }
+
+    @Override
+    public ExtensionMetadataDatasetId getDatasetId() {
+        return BADMetadataIndexes.BAD_CHANNEL_INDEX_ID;
+    }
+
+    @Override
+    public ITupleReference getSearchKey() {
+        return MetadataNode.createTuple(dataverse, channel);
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java
new file mode 100644
index 0000000..122905e
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2009-2013 by The Regents of the University of California
+ * 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 from
+ *
+ * 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.asterix.bad.metadata;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.IOException;
+
+import org.apache.asterix.common.functions.FunctionSignature;
+import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
+import org.apache.asterix.metadata.MetadataException;
+import org.apache.asterix.metadata.entitytupletranslators.AbstractTupleTranslator;
+import org.apache.asterix.om.base.ARecord;
+import org.apache.asterix.om.base.AString;
+import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
+import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
+
+/**
+ * Translates a Channel metadata entity to an ITupleReference and vice versa.
+ */
+public class ChannelTupleTranslator extends AbstractTupleTranslator<Channel> {
+    // Field indexes of serialized Feed in a tuple.
+    // Key field.
+    public static final int CHANNEL_DATAVERSE_NAME_FIELD_INDEX = 0;
+
+    public static final int CHANNEL_NAME_FIELD_INDEX = 1;
+
+    // Payload field containing serialized feed.
+    public static final int CHANNEL_PAYLOAD_TUPLE_FIELD_INDEX = 2;
+
+    @SuppressWarnings("unchecked")
+    private ISerializerDeserializer<ARecord> recordSerDes = AqlSerializerDeserializerProvider.INSTANCE
+            .getSerializerDeserializer(BADMetadataRecordTypes.CHANNEL_RECORDTYPE);
+
+    @SuppressWarnings("unchecked")
+    public ChannelTupleTranslator(boolean getTuple) {
+        super(getTuple, BADMetadataIndexes.CHANNEL_DATASET.getFieldCount());
+    }
+
+    @Override
+    public Channel getMetadataEntityFromTuple(ITupleReference frameTuple) throws IOException {
+        byte[] serRecord = frameTuple.getFieldData(CHANNEL_PAYLOAD_TUPLE_FIELD_INDEX);
+        int recordStartOffset = frameTuple.getFieldStart(CHANNEL_PAYLOAD_TUPLE_FIELD_INDEX);
+        int recordLength = frameTuple.getFieldLength(CHANNEL_PAYLOAD_TUPLE_FIELD_INDEX);
+        ByteArrayInputStream stream = new ByteArrayInputStream(serRecord, recordStartOffset, recordLength);
+        DataInput in = new DataInputStream(stream);
+        ARecord channelRecord = recordSerDes.deserialize(in);
+        return createChannelFromARecord(channelRecord);
+    }
+
+    private Channel createChannelFromARecord(ARecord channelRecord) {
+        Channel channel = null;
+        String dataverseName = ((AString) channelRecord
+                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_DATAVERSE_NAME_FIELD_INDEX)).getStringValue();
+        String channelName = ((AString) channelRecord
+                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_CHANNEL_NAME_FIELD_INDEX)).getStringValue();
+        String subscriptionsName = ((AString) channelRecord
+                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_SUBSCRIPTIONS_NAME_FIELD_INDEX)).getStringValue();
+        String resultsName = ((AString) channelRecord
+                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_RESULTS_NAME_FIELD_INDEX)).getStringValue();
+        String fName = ((AString) channelRecord
+                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_FUNCTION_FIELD_INDEX)).getStringValue();
+        String duration = ((AString) channelRecord
+                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_DURATION_FIELD_INDEX)).getStringValue();
+
+        FunctionSignature signature = null;
+
+        String[] qnameComponents = fName.split("\\.");
+        String functionDataverse;
+        String functionName;
+        if (qnameComponents.length == 2) {
+            functionDataverse = qnameComponents[0];
+            functionName = qnameComponents[1];
+        } else {
+            functionDataverse = dataverseName;
+            functionName = qnameComponents[0];
+        }
+
+        String[] nameComponents = functionName.split("@");
+        signature = new FunctionSignature(functionDataverse, nameComponents[0], Integer.parseInt(nameComponents[1]));
+
+        channel = new Channel(dataverseName, channelName, subscriptionsName, resultsName, signature, duration);
+        return channel;
+    }
+
+    @Override
+    public ITupleReference getTupleFromMetadataEntity(Channel channel) throws IOException, MetadataException {
+        // write the key in the first fields of the tuple
+
+        tupleBuilder.reset();
+        aString.setValue(channel.getChannelId().getDataverse());
+        stringSerde.serialize(aString, tupleBuilder.getDataOutput());
+        tupleBuilder.addFieldEndOffset();
+
+        aString.setValue(channel.getChannelId().getEntityName());
+        stringSerde.serialize(aString, tupleBuilder.getDataOutput());
+        tupleBuilder.addFieldEndOffset();
+
+        recordBuilder.reset(BADMetadataRecordTypes.CHANNEL_RECORDTYPE);
+
+        // write field 0
+        fieldValue.reset();
+        aString.setValue(channel.getChannelId().getDataverse());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_DATAVERSE_NAME_FIELD_INDEX, fieldValue);
+
+        // write field 1
+        fieldValue.reset();
+        aString.setValue(channel.getChannelId().getEntityName());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_CHANNEL_NAME_FIELD_INDEX, fieldValue);
+
+        // write field 2
+        fieldValue.reset();
+        aString.setValue(channel.getSubscriptionsDataset());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_SUBSCRIPTIONS_NAME_FIELD_INDEX, fieldValue);
+
+        // write field 3
+        fieldValue.reset();
+        aString.setValue(channel.getResultsDatasetName());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_RESULTS_NAME_FIELD_INDEX, fieldValue);
+
+        // write field 4
+        fieldValue.reset();
+        aString.setValue(channel.getFunction().toString());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_FUNCTION_FIELD_INDEX, fieldValue);
+
+        // write field 5
+        fieldValue.reset();
+        aString.setValue(channel.getDuration());
+        stringSerde.serialize(aString, fieldValue.getDataOutput());
+        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_DURATION_FIELD_INDEX, fieldValue);
+
+        // write record
+        recordBuilder.write(tupleBuilder.getDataOutput(), true);
+
+        tupleBuilder.addFieldEndOffset();
+
+        tuple.reset(tupleBuilder.getFieldEndOffsets(), tupleBuilder.getByteArray());
+        return tuple;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
----------------------------------------------------------------------
diff --git a/asterix-opt/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java b/asterix-opt/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
new file mode 100644
index 0000000..8e19fc0
--- /dev/null
+++ b/asterix-opt/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
@@ -0,0 +1,317 @@
+/*
+ * 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.asterix.bad.rules;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.asterix.active.EntityId;
+import org.apache.asterix.algebra.operators.CommitOperator;
+import org.apache.asterix.bad.BADConstants;
+import org.apache.asterix.bad.runtime.NotifyBrokerOperator;
+import org.apache.asterix.bad.runtime.NotifyBrokerPOperator;
+import org.apache.asterix.lang.common.util.FunctionUtil;
+import org.apache.asterix.metadata.declared.DatasetDataSource;
+import org.apache.asterix.om.base.AString;
+import org.apache.asterix.om.constants.AsterixConstantValue;
+import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
+import org.apache.commons.lang3.mutable.Mutable;
+import org.apache.commons.lang3.mutable.MutableObject;
+import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
+import org.apache.hyracks.algebricks.common.utils.Pair;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
+import org.apache.hyracks.algebricks.core.algebra.base.ILogicalPlan;
+import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
+import org.apache.hyracks.algebricks.core.algebra.base.LogicalOperatorTag;
+import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
+import org.apache.hyracks.algebricks.core.algebra.expressions.AggregateFunctionCallExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.ConstantExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression;
+import org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.DataSourceScanOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.DistinctOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.DistributeResultOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.ExtensionOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.GroupByOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.InsertDeleteUpsertOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.NestedTupleSourceOperator;
+import org.apache.hyracks.algebricks.core.algebra.operators.logical.ProjectOperator;
+import org.apache.hyracks.algebricks.core.algebra.plan.ALogicalPlanImpl;
+import org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
+
+public class InsertBrokerNotifierForChannelRule implements IAlgebraicRewriteRule {
+
+    @Override
+    public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
+            throws AlgebricksException {
+        return false;
+    }
+
+    @Override
+    public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
+            throws AlgebricksException {
+        AbstractLogicalOperator op1 = (AbstractLogicalOperator) opRef.getValue();
+        if (op1.getOperatorTag() != LogicalOperatorTag.DISTRIBUTE_RESULT) {
+            return false;
+        }
+        AbstractLogicalOperator op = (AbstractLogicalOperator) op1.getInputs().get(0).getValue();
+        if (op.getOperatorTag() != LogicalOperatorTag.EXTENSION_OPERATOR) {
+            return false;
+        }
+        ExtensionOperator eOp = (ExtensionOperator) op;
+        if (!(eOp.getDelegate() instanceof CommitOperator)) {
+            return false;
+        }
+        AbstractLogicalOperator descendantOp = (AbstractLogicalOperator) eOp.getInputs().get(0).getValue();
+        if (descendantOp.getOperatorTag() != LogicalOperatorTag.INSERT_DELETE_UPSERT) {
+            return false;
+        }
+        InsertDeleteUpsertOperator insertOp = (InsertDeleteUpsertOperator) descendantOp;
+        if (insertOp.getOperation() != InsertDeleteUpsertOperator.Kind.INSERT) {
+            return false;
+        }
+        DatasetDataSource dds = (DatasetDataSource) insertOp.getDataSource();
+        String datasetName = dds.getDataset().getDatasetName();
+        if (!dds.getDataset().getItemTypeDataverseName().equals("Metadata")
+                || !dds.getDataset().getItemTypeName().equals("ChannelResultsType")
+                || !datasetName.endsWith("Results")) {
+            return false;
+        }
+        String channelDataverse = dds.getDataset().getDataverseName();
+        //Now we know that we are inserting into results
+
+        String channelName = datasetName.substring(0, datasetName.length() - 7);
+        String subscriptionsName = channelName + "Subscriptions";
+        //TODO: Can we check here to see if there is a channel with such a name?
+
+        DataSourceScanOperator subscriptionsScan = (DataSourceScanOperator) findOp(op, subscriptionsName);
+        if (subscriptionsScan == null) {
+            return false;
+        }
+
+        //Now we want to make sure and set the commit to be a nonsink commit
+        ((CommitOperator) eOp.getDelegate()).setSink(false);
+
+        //Now we need to get the broker EndPoint 
+        LogicalVariable brokerEndpointVar = context.newVar();
+        AbstractLogicalOperator opAboveBrokersScan = findOp(op, "brokers");
+        AssignOperator assignOp = createbrokerEndPointAssignOperator(brokerEndpointVar, opAboveBrokersScan);
+        //now brokerNameVar holds the brokerName for use farther up in the plan
+
+        //Place assignOp between the scan and the op above it
+        assignOp.getInputs().addAll(opAboveBrokersScan.getInputs());
+        opAboveBrokersScan.getInputs().clear();
+        opAboveBrokersScan.getInputs().add(new MutableObject<ILogicalOperator>(assignOp));
+        context.computeAndSetTypeEnvironmentForOperator(assignOp);
+        context.computeAndSetTypeEnvironmentForOperator(opAboveBrokersScan);
+        context.computeAndSetTypeEnvironmentForOperator(eOp);
+
+        //get subscriptionIdVar
+        LogicalVariable subscriptionIdVar = subscriptionsScan.getVariables().get(0);
+
+        //The channelExecutionTime is created just before the scan
+        LogicalVariable channelExecutionVar = ((AssignOperator) subscriptionsScan.getInputs().get(0).getValue())
+                .getVariables().get(0);
+
+        ProjectOperator badProject = (ProjectOperator) findOp(op, "project");
+        badProject.getVariables().add(subscriptionIdVar);
+        badProject.getVariables().add(brokerEndpointVar);
+        badProject.getVariables().add(channelExecutionVar);
+        context.computeAndSetTypeEnvironmentForOperator(badProject);
+
+        //Create my brokerNotify plan above the extension Operator
+        ExtensionOperator dOp = createNotifyBrokerPlan(brokerEndpointVar, subscriptionIdVar, channelExecutionVar,
+                context, eOp, (DistributeResultOperator) op1, channelDataverse, channelName);
+
+        opRef.setValue(dOp);
+
+        return true;
+    }
+
+    private ExtensionOperator createNotifyBrokerPlan(LogicalVariable brokerEndpointVar,
+            LogicalVariable subscriptionIdVar, LogicalVariable channelExecutionVar, IOptimizationContext context,
+            ILogicalOperator eOp, DistributeResultOperator distributeOp, String channelDataverse, String channelName)
+                    throws AlgebricksException {
+        //create the Distinct Op
+        ArrayList<Mutable<ILogicalExpression>> expressions = new ArrayList<Mutable<ILogicalExpression>>();
+        VariableReferenceExpression vExpr = new VariableReferenceExpression(subscriptionIdVar);
+        expressions.add(new MutableObject<ILogicalExpression>(vExpr));
+        DistinctOperator distinctOp = new DistinctOperator(expressions);
+
+        //create the GroupBy Op
+        //And set the distinct as input
+        List<Pair<LogicalVariable, Mutable<ILogicalExpression>>> groupByList = new ArrayList<Pair<LogicalVariable, Mutable<ILogicalExpression>>>();
+        List<Pair<LogicalVariable, Mutable<ILogicalExpression>>> groupByDecorList = new ArrayList<Pair<LogicalVariable, Mutable<ILogicalExpression>>>();
+        List<ILogicalPlan> nestedPlans = new ArrayList<ILogicalPlan>();
+
+        //create group by operator
+        GroupByOperator groupbyOp = new GroupByOperator(groupByList, groupByDecorList, nestedPlans);
+        groupbyOp.addGbyExpression(null, new VariableReferenceExpression(brokerEndpointVar));
+        groupbyOp.addGbyExpression(null, new VariableReferenceExpression(channelExecutionVar));
+        groupbyOp.getInputs().add(new MutableObject<ILogicalOperator>(distinctOp));
+
+        //create nested plan for subscription ids in group by
+        NestedTupleSourceOperator nestedTupleSourceOp = new NestedTupleSourceOperator(
+                new MutableObject<ILogicalOperator>(groupbyOp));
+        //TODO: This is from translationcontext. It might be needed to make the variable exist outside of the subplan
+        //LogicalVariable subscriptionListVar = context.newSubplanOutputVar();
+        LogicalVariable subscriptionListVar = context.newVar();
+        List<LogicalVariable> aggVars = new ArrayList<LogicalVariable>();
+        aggVars.add(subscriptionListVar);
+        AggregateFunctionCallExpression funAgg = AsterixBuiltinFunctions.makeAggregateFunctionExpression(
+                AsterixBuiltinFunctions.LISTIFY, new ArrayList<Mutable<ILogicalExpression>>());
+        funAgg.getArguments()
+                .add(new MutableObject<ILogicalExpression>(new VariableReferenceExpression(subscriptionIdVar)));
+        List<Mutable<ILogicalExpression>> aggExpressions = new ArrayList<Mutable<ILogicalExpression>>();
+        aggExpressions.add(new MutableObject<ILogicalExpression>(funAgg));
+        AggregateOperator listifyOp = new AggregateOperator(aggVars, aggExpressions);
+        listifyOp.getInputs().add(new MutableObject<ILogicalOperator>(nestedTupleSourceOp));
+
+        //add nested plans
+        nestedPlans.add(new ALogicalPlanImpl(new MutableObject<ILogicalOperator>(listifyOp)));
+
+        //Create the NotifyBrokerOperator
+        NotifyBrokerOperator notifyBrokerOp = new NotifyBrokerOperator(brokerEndpointVar, subscriptionListVar,
+                channelExecutionVar);
+        EntityId activeId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, channelDataverse, channelName);
+        NotifyBrokerPOperator notifyBrokerPOp = new NotifyBrokerPOperator(activeId);
+        notifyBrokerOp.setPhysicalOperator(notifyBrokerPOp);
+        ExtensionOperator extensionOp = new ExtensionOperator(notifyBrokerOp);
+        extensionOp.setPhysicalOperator(notifyBrokerPOp);
+        extensionOp.getInputs().add(new MutableObject<ILogicalOperator>(groupbyOp));
+
+        //Set the input for the brokerNotify as the replicate operator
+        distinctOp.getInputs().add(new MutableObject<ILogicalOperator>(eOp));
+
+        //compute environment bottom up
+
+        context.computeAndSetTypeEnvironmentForOperator(distinctOp);
+        context.computeAndSetTypeEnvironmentForOperator(groupbyOp);
+        context.computeAndSetTypeEnvironmentForOperator(nestedTupleSourceOp);
+        context.computeAndSetTypeEnvironmentForOperator(listifyOp);
+        context.computeAndSetTypeEnvironmentForOperator(extensionOp);
+
+        return extensionOp;
+
+    }
+
+    @SuppressWarnings("unchecked")
+    private AssignOperator createbrokerEndPointAssignOperator(LogicalVariable brokerEndpointVar,
+            AbstractLogicalOperator opAboveBrokersScan) {
+        Mutable<ILogicalExpression> fieldRef = new MutableObject<ILogicalExpression>(
+                new ConstantExpression(new AsterixConstantValue(new AString(BADConstants.BrokerEndPoint))));
+        DataSourceScanOperator brokerScan = null;
+        for (Mutable<ILogicalOperator> subOp : opAboveBrokersScan.getInputs()) {
+            if (isBrokerScan((AbstractLogicalOperator) subOp.getValue())) {
+                brokerScan = (DataSourceScanOperator) subOp.getValue();
+            }
+        }
+        Mutable<ILogicalExpression> varRef = new MutableObject<ILogicalExpression>(
+                new VariableReferenceExpression(brokerScan.getVariables().get(2)));
+
+        ScalarFunctionCallExpression fieldAccessByName = new ScalarFunctionCallExpression(
+                FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.FIELD_ACCESS_BY_NAME), varRef, fieldRef);
+        ArrayList<LogicalVariable> varArray = new ArrayList<LogicalVariable>(1);
+        varArray.add(brokerEndpointVar);
+        ArrayList<Mutable<ILogicalExpression>> exprArray = new ArrayList<Mutable<ILogicalExpression>>(1);
+        exprArray.add(new MutableObject<ILogicalExpression>(fieldAccessByName));
+        return new AssignOperator(varArray, exprArray);
+    }
+
+    /*This function searches for the needed op
+     * If lookingForBrokers, find the op above the brokers scan
+     * Else find the suscbriptionsScan
+     */
+    private AbstractLogicalOperator findOp(AbstractLogicalOperator op, String lookingForString) {
+        if (!op.hasInputs()) {
+            return null;
+        }
+        for (Mutable<ILogicalOperator> subOp : op.getInputs()) {
+            if (lookingForString.equals("brokers")) {
+                if (isBrokerScan((AbstractLogicalOperator) subOp.getValue())) {
+                    return op;
+                } else {
+                    AbstractLogicalOperator nestedOp = findOp((AbstractLogicalOperator) subOp.getValue(),
+                            lookingForString);
+                    if (nestedOp != null) {
+                        return nestedOp;
+                    }
+                }
+
+            } else if (lookingForString.equals("project")) {
+                if (subOp.getValue().getOperatorTag() == LogicalOperatorTag.PROJECT) {
+                    return (AbstractLogicalOperator) subOp.getValue();
+                } else {
+                    AbstractLogicalOperator nestedOp = findOp((AbstractLogicalOperator) subOp.getValue(),
+                            lookingForString);
+                    if (nestedOp != null) {
+                        return nestedOp;
+                    }
+                }
+            }
+
+            else {
+                if (isSubscriptionsScan((AbstractLogicalOperator) subOp.getValue(), lookingForString)) {
+                    return (AbstractLogicalOperator) subOp.getValue();
+                } else {
+                    AbstractLogicalOperator nestedOp = findOp((AbstractLogicalOperator) subOp.getValue(),
+                            lookingForString);
+                    if (nestedOp != null) {
+                        return nestedOp;
+                    }
+                }
+
+            }
+        }
+        return null;
+    }
+
+    private boolean isBrokerScan(AbstractLogicalOperator op) {
+        if (op instanceof DataSourceScanOperator) {
+            if (((DataSourceScanOperator) op).getDataSource() instanceof DatasetDataSource) {
+                DatasetDataSource dds = (DatasetDataSource) ((DataSourceScanOperator) op).getDataSource();
+                if (dds.getDataset().getDataverseName().equals("Metadata")
+                        && dds.getDataset().getDatasetName().equals("Broker")) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    private boolean isSubscriptionsScan(AbstractLogicalOperator op, String subscriptionsName) {
+        if (op instanceof DataSourceScanOperator) {
+            if (((DataSourceScanOperator) op).getDataSource() instanceof DatasetDataSource) {
+                DatasetDataSource dds = (DatasetDataSource) ((DataSourceScanOperator) op).getDataSource();
+                if (dds.getDataset().getItemTypeDataverseName().equals("Metadata")
+                        && dds.getDataset().getItemTypeName().equals("ChannelSubscriptionsType")) {
+                    if (dds.getDataset().getDatasetName().equals(subscriptionsName)) {
+                        return true;
+                    }
+                }
+            }
+        }
+        return false;
+    }
+
+}


[04/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParserTokenManager.java
----------------------------------------------------------------------
diff --git a/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParserTokenManager.java b/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParserTokenManager.java
deleted file mode 100644
index e028a1a..0000000
--- a/target/generated-sources/javacc/org/apache/asterix/bad/lang/BADAQLParserTokenManager.java
+++ /dev/null
@@ -1,3701 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. BADAQLParserTokenManager.java */
-package org.apache.asterix.bad.lang;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.asterix.bad.lang.statement.BrokerDropStatement;
-import org.apache.asterix.bad.lang.statement.ChannelDropStatement;
-import org.apache.asterix.bad.lang.statement.ChannelSubscribeStatement;
-import org.apache.asterix.bad.lang.statement.ChannelUnsubscribeStatement;
-import org.apache.asterix.bad.lang.statement.CreateBrokerStatement;
-import org.apache.asterix.bad.lang.statement.CreateChannelStatement;
-import org.apache.asterix.common.annotations.AutoDataGen;
-import org.apache.asterix.common.annotations.DateBetweenYearsDataGen;
-import org.apache.asterix.common.annotations.DatetimeAddRandHoursDataGen;
-import org.apache.asterix.common.annotations.DatetimeBetweenYearsDataGen;
-import org.apache.asterix.common.annotations.FieldIntervalDataGen;
-import org.apache.asterix.common.annotations.FieldValFileDataGen;
-import org.apache.asterix.common.annotations.FieldValFileSameIndexDataGen;
-import org.apache.asterix.common.annotations.IRecordFieldDataGen;
-import org.apache.asterix.common.annotations.InsertRandIntDataGen;
-import org.apache.asterix.common.annotations.ListDataGen;
-import org.apache.asterix.common.annotations.ListValFileDataGen;
-import org.apache.asterix.common.annotations.SkipSecondaryIndexSearchExpressionAnnotation;
-import org.apache.asterix.common.annotations.TypeDataGen;
-import org.apache.asterix.common.annotations.UndeclaredFieldsDataGen;
-import org.apache.asterix.common.config.DatasetConfig.DatasetType;
-import org.apache.asterix.common.config.DatasetConfig.IndexType;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.common.functions.FunctionSignature;
-import org.apache.asterix.lang.aql.clause.DistinctClause;
-import org.apache.asterix.lang.aql.clause.ForClause;
-import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
-import org.apache.asterix.lang.aql.expression.UnionExpr;
-import org.apache.asterix.lang.aql.util.RangeMapBuilder;
-import org.apache.asterix.lang.common.base.Clause;
-import org.apache.asterix.lang.common.base.Expression;
-import org.apache.asterix.lang.common.base.IParser;
-import org.apache.asterix.lang.common.base.Literal;
-import org.apache.asterix.lang.common.base.Statement;
-import org.apache.asterix.lang.common.clause.GroupbyClause;
-import org.apache.asterix.lang.common.clause.LetClause;
-import org.apache.asterix.lang.common.clause.LimitClause;
-import org.apache.asterix.lang.common.clause.OrderbyClause;
-import org.apache.asterix.lang.common.clause.UpdateClause;
-import org.apache.asterix.lang.common.clause.WhereClause;
-import org.apache.asterix.lang.common.context.RootScopeFactory;
-import org.apache.asterix.lang.common.context.Scope;
-import org.apache.asterix.lang.common.expression.AbstractAccessor;
-import org.apache.asterix.lang.common.expression.CallExpr;
-import org.apache.asterix.lang.common.expression.FieldAccessor;
-import org.apache.asterix.lang.common.expression.FieldBinding;
-import org.apache.asterix.lang.common.expression.GbyVariableExpressionPair;
-import org.apache.asterix.lang.common.expression.IfExpr;
-import org.apache.asterix.lang.common.expression.IndexAccessor;
-import org.apache.asterix.lang.common.expression.ListConstructor;
-import org.apache.asterix.lang.common.expression.LiteralExpr;
-import org.apache.asterix.lang.common.expression.OperatorExpr;
-import org.apache.asterix.lang.common.expression.OrderedListTypeDefinition;
-import org.apache.asterix.lang.common.expression.QuantifiedExpression;
-import org.apache.asterix.lang.common.expression.RecordConstructor;
-import org.apache.asterix.lang.common.expression.RecordTypeDefinition;
-import org.apache.asterix.lang.common.expression.TypeExpression;
-import org.apache.asterix.lang.common.expression.TypeReferenceExpression;
-import org.apache.asterix.lang.common.expression.UnaryExpr;
-import org.apache.asterix.lang.common.expression.UnorderedListTypeDefinition;
-import org.apache.asterix.lang.common.expression.VariableExpr;
-import org.apache.asterix.lang.common.literal.DoubleLiteral;
-import org.apache.asterix.lang.common.literal.FalseLiteral;
-import org.apache.asterix.lang.common.literal.FloatLiteral;
-import org.apache.asterix.lang.common.literal.LongIntegerLiteral;
-import org.apache.asterix.lang.common.literal.MissingLiteral;
-import org.apache.asterix.lang.common.literal.NullLiteral;
-import org.apache.asterix.lang.common.literal.StringLiteral;
-import org.apache.asterix.lang.common.literal.TrueLiteral;
-import org.apache.asterix.lang.common.parser.ScopeChecker;
-import org.apache.asterix.lang.common.statement.CompactStatement;
-import org.apache.asterix.lang.common.statement.ConnectFeedStatement;
-import org.apache.asterix.lang.common.statement.CreateDataverseStatement;
-import org.apache.asterix.lang.common.statement.CreateFeedPolicyStatement;
-import org.apache.asterix.lang.common.statement.CreateFeedStatement;
-import org.apache.asterix.lang.common.statement.CreateFunctionStatement;
-import org.apache.asterix.lang.common.statement.CreateIndexStatement;
-import org.apache.asterix.lang.common.statement.CreatePrimaryFeedStatement;
-import org.apache.asterix.lang.common.statement.CreateSecondaryFeedStatement;
-import org.apache.asterix.lang.common.statement.DatasetDecl;
-import org.apache.asterix.lang.common.statement.DataverseDecl;
-import org.apache.asterix.lang.common.statement.DataverseDropStatement;
-import org.apache.asterix.lang.common.statement.DeleteStatement;
-import org.apache.asterix.lang.common.statement.DisconnectFeedStatement;
-import org.apache.asterix.lang.common.statement.DropDatasetStatement;
-import org.apache.asterix.lang.common.statement.ExternalDetailsDecl;
-import org.apache.asterix.lang.common.statement.FeedDropStatement;
-import org.apache.asterix.lang.common.statement.FeedPolicyDropStatement;
-import org.apache.asterix.lang.common.statement.FunctionDecl;
-import org.apache.asterix.lang.common.statement.FunctionDropStatement;
-import org.apache.asterix.lang.common.statement.IndexDropStatement;
-import org.apache.asterix.lang.common.statement.InsertStatement;
-import org.apache.asterix.lang.common.statement.InternalDetailsDecl;
-import org.apache.asterix.lang.common.statement.LoadStatement;
-import org.apache.asterix.lang.common.statement.NodeGroupDropStatement;
-import org.apache.asterix.lang.common.statement.NodegroupDecl;
-import org.apache.asterix.lang.common.statement.Query;
-import org.apache.asterix.lang.common.statement.RefreshExternalDatasetStatement;
-import org.apache.asterix.lang.common.statement.RunStatement;
-import org.apache.asterix.lang.common.statement.SetStatement;
-import org.apache.asterix.lang.common.statement.TypeDecl;
-import org.apache.asterix.lang.common.statement.TypeDropStatement;
-import org.apache.asterix.lang.common.statement.UpdateStatement;
-import org.apache.asterix.lang.common.statement.UpsertStatement;
-import org.apache.asterix.lang.common.statement.WriteStatement;
-import org.apache.asterix.lang.common.struct.Identifier;
-import org.apache.asterix.lang.common.struct.QuantifiedPair;
-import org.apache.asterix.lang.common.struct.VarIdentifier;
-import org.apache.asterix.metadata.utils.MetadataConstants;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-import org.apache.hyracks.algebricks.common.utils.Triple;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionAnnotation;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IndexedNLJoinExpressionAnnotation;
-import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
-import org.apache.xerces.util.IntStack;
-
-/** Token Manager. */
-public class BADAQLParserTokenManager implements BADAQLParserConstants
-{
-    public int commentDepth = 0;
-    public IntStack lexerStateStack = new IntStack();
-
-    public void pushState() {
-      lexerStateStack.push( curLexState );
-    }
-
-    public void popState(String token) {
-      if (lexerStateStack.size() > 0) {
-         SwitchTo( lexerStateStack.pop() );
-      } else {
-         int errorLine = input_stream.getEndLine();
-         int errorColumn = input_stream.getEndColumn();
-         String msg = "Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered \u005c"" + token
-             + "\u005c" but state stack is empty.";
-         throw new TokenMgrError(msg, -1);
-      }
-    }
-
-  /** Debug output. */
-  public  java.io.PrintStream debugStream = System.out;
-  /** Set debug output. */
-  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private int jjStopAtPos(int pos, int kind)
-{
-   jjmatchedKind = kind;
-   jjmatchedPos = pos;
-   return pos + 1;
-}
-private int jjMoveStringLiteralDfa0_0()
-{
-   switch(curChar)
-   {
-      case 9:
-         jjmatchedKind = 147;
-         return jjMoveNfa_0(0, 0);
-      case 10:
-         jjmatchedKind = 149;
-         return jjMoveNfa_0(0, 0);
-      case 13:
-         jjmatchedKind = 148;
-         return jjMoveNfa_0(0, 0);
-      case 32:
-         jjmatchedKind = 146;
-         return jjMoveNfa_0(0, 0);
-      case 33:
-         return jjMoveStringLiteralDfa1_0(0x0L, 0x1000000000000L, 0x0L);
-      case 35:
-         jjmatchedKind = 118;
-         return jjMoveNfa_0(0, 0);
-      case 37:
-         jjmatchedKind = 96;
-         return jjMoveNfa_0(0, 0);
-      case 40:
-         jjmatchedKind = 99;
-         return jjMoveNfa_0(0, 0);
-      case 41:
-         jjmatchedKind = 100;
-         return jjMoveNfa_0(0, 0);
-      case 42:
-         jjmatchedKind = 97;
-         return jjMoveNfa_0(0, 0);
-      case 43:
-         jjmatchedKind = 98;
-         return jjMoveNfa_0(0, 0);
-      case 44:
-         jjmatchedKind = 104;
-         return jjMoveNfa_0(0, 0);
-      case 45:
-         jjmatchedKind = 95;
-         return jjMoveNfa_0(0, 0);
-      case 46:
-         jjmatchedKind = 105;
-         return jjMoveNfa_0(0, 0);
-      case 47:
-         jjmatchedKind = 93;
-         return jjMoveStringLiteralDfa1_0(0x0L, 0x0L, 0x1000000L);
-      case 58:
-         jjmatchedKind = 103;
-         return jjMoveStringLiteralDfa1_0(0x0L, 0x4000000000000L, 0x0L);
-      case 59:
-         jjmatchedKind = 3;
-         return jjMoveNfa_0(0, 0);
-      case 60:
-         jjmatchedKind = 107;
-         return jjMoveStringLiteralDfa1_0(0x0L, 0x200000000000L, 0x0L);
-      case 61:
-         jjmatchedKind = 111;
-         return jjMoveNfa_0(0, 0);
-      case 62:
-         jjmatchedKind = 108;
-         return jjMoveStringLiteralDfa1_0(0x0L, 0x400000000000L, 0x0L);
-      case 63:
-         jjmatchedKind = 106;
-         return jjMoveNfa_0(0, 0);
-      case 64:
-         jjmatchedKind = 117;
-         return jjMoveNfa_0(0, 0);
-      case 66:
-         return jjMoveStringLiteralDfa1_0(0x400L, 0x0L, 0x0L);
-      case 67:
-         return jjMoveStringLiteralDfa1_0(0x800L, 0x0L, 0x0L);
-      case 91:
-         jjmatchedKind = 101;
-         return jjMoveNfa_0(0, 0);
-      case 93:
-         jjmatchedKind = 102;
-         return jjMoveNfa_0(0, 0);
-      case 94:
-         jjmatchedKind = 92;
-         return jjMoveNfa_0(0, 0);
-      case 97:
-         return jjMoveStringLiteralDfa1_0(0x1f000L, 0x8000000000000L, 0x0L);
-      case 98:
-         return jjMoveStringLiteralDfa1_0(0x60400L, 0x0L, 0x0L);
-      case 99:
-         return jjMoveStringLiteralDfa1_0(0xf80840L, 0x0L, 0x0L);
-      case 100:
-         return jjMoveStringLiteralDfa1_0(0x3ff000000L, 0x0L, 0x0L);
-      case 101:
-         return jjMoveStringLiteralDfa1_0(0x7c00000000L, 0x0L, 0x0L);
-      case 102:
-         return jjMoveStringLiteralDfa1_0(0x1f8000000000L, 0x8000000000000000L, 0x0L);
-      case 103:
-         return jjMoveStringLiteralDfa1_0(0x200000000000L, 0x0L, 0x0L);
-      case 104:
-         return jjMoveStringLiteralDfa1_0(0x400000000000L, 0x0L, 0x0L);
-      case 105:
-         return jjMoveStringLiteralDfa1_0(0x3f800000000000L, 0x40000000L, 0x0L);
-      case 107:
-         return jjMoveStringLiteralDfa1_0(0x1c0000000000000L, 0x0L, 0x0L);
-      case 108:
-         return jjMoveStringLiteralDfa1_0(0xe00000000000000L, 0x0L, 0x0L);
-      case 109:
-         return jjMoveStringLiteralDfa1_0(0x0L, 0x1000000000000000L, 0x0L);
-      case 110:
-         return jjMoveStringLiteralDfa1_0(0x3000000000000000L, 0x2000000000000000L, 0x0L);
-      case 111:
-         return jjMoveStringLiteralDfa1_0(0xc000000000000000L, 0x10000000000007L, 0x0L);
-      case 112:
-         return jjMoveStringLiteralDfa1_0(0x200L, 0x78L, 0x0L);
-      case 114:
-         return jjMoveStringLiteralDfa1_0(0x106L, 0x780L, 0x0L);
-      case 115:
-         return jjMoveStringLiteralDfa1_0(0x90L, 0xf800L, 0x0L);
-      case 116:
-         return jjMoveStringLiteralDfa1_0(0x0L, 0x40000000000f0000L, 0x0L);
-      case 117:
-         return jjMoveStringLiteralDfa1_0(0x20L, 0x1f00000L, 0x0L);
-      case 119:
-         return jjMoveStringLiteralDfa1_0(0x0L, 0xe000000L, 0x0L);
-      case 123:
-         jjmatchedKind = 119;
-         return jjMoveStringLiteralDfa1_0(0x0L, 0x200000000000000L, 0x0L);
-      case 125:
-         jjmatchedKind = 120;
-         return jjMoveNfa_0(0, 0);
-      case 126:
-         return jjMoveStringLiteralDfa1_0(0x0L, 0x2000000000000L, 0x0L);
-      default :
-         return jjMoveNfa_0(0, 0);
-   }
-}
-private int jjMoveStringLiteralDfa1_0(long active0, long active1, long active2)
-{
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 0);
-   }
-   switch(curChar)
-   {
-      case 42:
-         if ((active2 & 0x1000000L) != 0L)
-         {
-            jjmatchedKind = 152;
-            jjmatchedPos = 1;
-         }
-         break;
-      case 61:
-         if ((active1 & 0x200000000000L) != 0L)
-         {
-            jjmatchedKind = 109;
-            jjmatchedPos = 1;
-         }
-         else if ((active1 & 0x400000000000L) != 0L)
-         {
-            jjmatchedKind = 110;
-            jjmatchedPos = 1;
-         }
-         else if ((active1 & 0x1000000000000L) != 0L)
-         {
-            jjmatchedKind = 112;
-            jjmatchedPos = 1;
-         }
-         else if ((active1 & 0x2000000000000L) != 0L)
-         {
-            jjmatchedKind = 113;
-            jjmatchedPos = 1;
-         }
-         else if ((active1 & 0x4000000000000L) != 0L)
-         {
-            jjmatchedKind = 114;
-            jjmatchedPos = 1;
-         }
-         break;
-      case 72:
-         return jjMoveStringLiteralDfa2_0(active0, 0x800L, active1, 0L, active2, 0L);
-      case 82:
-         return jjMoveStringLiteralDfa2_0(active0, 0x400L, active1, 0L, active2, 0L);
-      case 97:
-         return jjMoveStringLiteralDfa2_0(active0, 0x3000000L, active1, 0x8000000000000808L, active2, 0L);
-      case 100:
-         return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x40000000L, active2, 0L);
-      case 101:
-         return jjMoveStringLiteralDfa2_0(active0, 0x3c000807c000306L, active1, 0x17180L, active2, 0L);
-      case 102:
-         if ((active0 & 0x800000000000L) != 0L)
-         {
-            jjmatchedKind = 47;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_0(active0, 0x4000000000000000L, active1, 0L, active2, 0L);
-      case 103:
-         return jjMoveStringLiteralDfa2_0(active0, 0x1000000000000000L, active1, 0L, active2, 0L);
-      case 104:
-         return jjMoveStringLiteralDfa2_0(active0, 0x840L, active1, 0x2020000L, active2, 0L);
-      case 105:
-         return jjMoveStringLiteralDfa2_0(active0, 0x400410180000000L, active1, 0x1000000004000000L, active2, 0L);
-      case 108:
-         return jjMoveStringLiteralDfa2_0(active0, 0x400080000L, active1, 0L, active2, 0L);
-      case 110:
-         if ((active0 & 0x1000000000000L) != 0L)
-         {
-            jjmatchedKind = 48;
-            jjmatchedPos = 1;
-         }
-         else if ((active0 & 0x8000000000000000L) != 0L)
-         {
-            jjmatchedKind = 63;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_0(active0, 0x3e000800000020L, active1, 0x8000000100000L, active2, 0L);
-      case 111:
-         if ((active1 & 0x40000L) != 0L)
-         {
-            jjmatchedKind = 82;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_0(active0, 0x2800060000700000L, active1, 0x8010L, active2, 0L);
-      case 112:
-         return jjMoveStringLiteralDfa2_0(active0, 0x1000L, active1, 0x600001L, active2, 0L);
-      case 114:
-         if ((active1 & 0x10000000000000L) != 0L)
-         {
-            jjmatchedKind = 116;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_0(active0, 0x280200800400L, active1, 0x4000000008000062L, active2, 0L);
-      case 115:
-         if ((active0 & 0x2000L) != 0L)
-         {
-            jjmatchedKind = 13;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_0(active0, 0x4000L, active1, 0x1800000L, active2, 0L);
-      case 116:
-         if ((active0 & 0x8000L) != 0L)
-         {
-            jjmatchedKind = 15;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_0(active0, 0x20000L, active1, 0x200L, active2, 0L);
-      case 117:
-         return jjMoveStringLiteralDfa2_0(active0, 0x100000010090L, active1, 0x2000000000000404L, active2, 0L);
-      case 118:
-         return jjMoveStringLiteralDfa2_0(active0, 0x1000000000L, active1, 0L, active2, 0L);
-      case 120:
-         return jjMoveStringLiteralDfa2_0(active0, 0x6000000000L, active1, 0L, active2, 0L);
-      case 121:
-         if ((active0 & 0x40000L) != 0L)
-         {
-            jjmatchedKind = 18;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x80000L, active2, 0L);
-      case 123:
-         if ((active1 & 0x200000000000000L) != 0L)
-         {
-            jjmatchedKind = 121;
-            jjmatchedPos = 1;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 1);
-}
-private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1, long old2, long active2)
-{
-   if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L)
-      return jjMoveNfa_0(0, 1);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 1);
-   }
-   switch(curChar)
-   {
-      case 65:
-         return jjMoveStringLiteralDfa3_0(active0, 0x800L, active1, 0L);
-      case 79:
-         return jjMoveStringLiteralDfa3_0(active0, 0x400L, active1, 0L);
-      case 97:
-         return jjMoveStringLiteralDfa3_0(active0, 0x800000000000840L, active1, 0L);
-      case 98:
-         return jjMoveStringLiteralDfa3_0(active0, 0x90L, active1, 0L);
-      case 99:
-         if ((active0 & 0x4000L) != 0L)
-         {
-            jjmatchedKind = 14;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_0(active0, 0xc000002L, active1, 0x1000L);
-      case 100:
-         if ((active1 & 0x8000000000000L) != 0L)
-         {
-            jjmatchedKind = 115;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_0(active0, 0x2002000000000000L, active1, 0x200002L);
-      case 101:
-         if ((active1 & 0x800000L) != 0L)
-         {
-            jjmatchedKind = 87;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_0(active0, 0x100009000800000L, active1, 0x2020021L);
-      case 102:
-         return jjMoveStringLiteralDfa3_0(active0, 0x4000000810000000L, active1, 0x80L);
-      case 103:
-         return jjMoveStringLiteralDfa3_0(active0, 0x4000000000000L, active1, 0L);
-      case 105:
-         return jjMoveStringLiteralDfa3_0(active0, 0x2000000000L, active1, 0x49100040L);
-      case 108:
-         return jjMoveStringLiteralDfa3_0(active0, 0x10020000000L, active1, 0xa000000000002010L);
-      case 109:
-         return jjMoveStringLiteralDfa3_0(active0, 0x400000000300000L, active1, 0x18000L);
-      case 110:
-         if ((active1 & 0x400L) != 0L)
-         {
-            jjmatchedKind = 74;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_0(active0, 0x500000400000L, active1, 0L);
-      case 111:
-         return jjMoveStringLiteralDfa3_0(active0, 0x280200080400L, active1, 0L);
-      case 112:
-         return jjMoveStringLiteralDfa3_0(active0, 0x1100L, active1, 0x80000L);
-      case 114:
-         if ((active0 & 0x20000000000L) != 0L)
-         {
-            jjmatchedKind = 41;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_0(active0, 0x1000040000020200L, active1, 0x200L);
-      case 115:
-         return jjMoveStringLiteralDfa3_0(active0, 0x80005c0000020L, active1, 0x1000000000400000L);
-      case 116:
-         if ((active0 & 0x200000000000000L) != 0L)
-         {
-            jjmatchedKind = 57;
-            jjmatchedPos = 2;
-         }
-         else if ((active1 & 0x4000L) != 0L)
-         {
-            jjmatchedKind = 78;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_0(active0, 0x30004003010004L, active1, 0x400090cL);
-      case 117:
-         return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x4000000000000000L);
-      case 121:
-         if ((active0 & 0x40000000000000L) != 0L)
-         {
-            jjmatchedKind = 54;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_0(active0, 0x80000000000000L, active1, 0L);
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 2);
-}
-private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_0(0, 2);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 2);
-   }
-   switch(curChar)
-   {
-      case 45:
-         return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x20L);
-      case 75:
-         return jjMoveStringLiteralDfa4_0(active0, 0x400L, active1, 0L);
-      case 78:
-         return jjMoveStringLiteralDfa4_0(active0, 0x800L, active1, 0L);
-      case 97:
-         return jjMoveStringLiteralDfa4_0(active0, 0x1000000003800000L, active1, 0x200000L);
-      case 99:
-         if ((active0 & 0x40000000L) != 0L)
-         {
-            jjmatchedKind = 30;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_0(active0, 0x100080000000L, active1, 0L);
-      case 100:
-         if ((active0 & 0x8000000000L) != 0L)
-         {
-            jjmatchedKind = 39;
-            jjmatchedPos = 3;
-         }
-         else if ((active0 & 0x800000000000000L) != 0L)
-         {
-            jjmatchedKind = 59;
-            jjmatchedPos = 3;
-         }
-         break;
-      case 101:
-         if ((active0 & 0x400000000L) != 0L)
-         {
-            jjmatchedKind = 34;
-            jjmatchedPos = 3;
-         }
-         else if ((active1 & 0x8000L) != 0L)
-         {
-            jjmatchedKind = 79;
-            jjmatchedPos = 3;
-         }
-         else if ((active1 & 0x80000L) != 0L)
-         {
-            jjmatchedKind = 83;
-            jjmatchedPos = 3;
-         }
-         else if ((active1 & 0x4000000000000000L) != 0L)
-         {
-            jjmatchedKind = 126;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_0(active0, 0x201e004020020100L, active1, 0x402202L);
-      case 104:
-         if ((active1 & 0x8L) != 0L)
-         {
-            jjmatchedKind = 67;
-            jjmatchedPos = 3;
-         }
-         else if ((active1 & 0x4000000L) != 0L)
-         {
-            jjmatchedKind = 90;
-            jjmatchedPos = 3;
-         }
-         break;
-      case 105:
-         return jjMoveStringLiteralDfa4_0(active0, 0x400000010000200L, active1, 0x810L);
-      case 107:
-         return jjMoveStringLiteralDfa4_0(active0, 0x400L, active1, 0L);
-      case 108:
-         if ((active1 & 0x2000000000000000L) != 0L)
-         {
-            jjmatchedKind = 125;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_0(active0, 0x4001000L, active1, 0L);
-      case 109:
-         if ((active0 & 0x80000000000L) != 0L)
-         {
-            jjmatchedKind = 43;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L, active1, 0x40L);
-      case 110:
-         if ((active1 & 0x1L) != 0L)
-         {
-            jjmatchedKind = 64;
-            jjmatchedPos = 3;
-         }
-         else if ((active1 & 0x20000L) != 0L)
-         {
-            jjmatchedKind = 81;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_0(active0, 0x400840L, active1, 0x1000000L);
-      case 111:
-         if ((active0 & 0x20000000000000L) != 0L)
-         {
-            jjmatchedKind = 53;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_0(active0, 0x808010002L, active1, 0x101000L);
-      case 112:
-         if ((active0 & 0x200000000L) != 0L)
-         {
-            jjmatchedKind = 33;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_0(active0, 0x100000000300000L, active1, 0x10004L);
-      case 114:
-         return jjMoveStringLiteralDfa4_0(active0, 0x1000000000L, active1, 0x2000080L);
-      case 115:
-         return jjMoveStringLiteralDfa4_0(active0, 0x4000002000080090L, active1, 0x9000000000000000L);
-      case 116:
-         return jjMoveStringLiteralDfa4_0(active0, 0x410100000000L, active1, 0x8000000L);
-      case 117:
-         return jjMoveStringLiteralDfa4_0(active0, 0x200000000024L, active1, 0x100L);
-      case 118:
-         if ((active1 & 0x40000000L) != 0L)
-         {
-            jjmatchedKind = 94;
-            jjmatchedPos = 3;
-         }
-         break;
-      case 119:
-         return jjMoveStringLiteralDfa4_0(active0, 0x80000000000000L, active1, 0L);
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 3);
-}
-private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_0(0, 3);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 3);
-   }
-   switch(curChar)
-   {
-      case 69:
-         return jjMoveStringLiteralDfa5_0(active0, 0x400L, active1, 0L);
-      case 78:
-         return jjMoveStringLiteralDfa5_0(active0, 0x800L, active1, 0L);
-      case 97:
-         return jjMoveStringLiteralDfa5_0(active0, 0x40004300000L, active1, 0x40L);
-      case 98:
-         return jjMoveStringLiteralDfa5_0(active0, 0x20L, active1, 0L);
-      case 99:
-         return jjMoveStringLiteralDfa5_0(active0, 0x90L, active1, 0x2010L);
-      case 101:
-         if ((active0 & 0x20000L) != 0L)
-         {
-            jjmatchedKind = 17;
-            jjmatchedPos = 4;
-         }
-         else if ((active1 & 0x200L) != 0L)
-         {
-            jjmatchedKind = 73;
-            jjmatchedPos = 4;
-         }
-         else if ((active1 & 0x2000000L) != 0L)
-         {
-            jjmatchedKind = 89;
-            jjmatchedPos = 4;
-         }
-         else if ((active1 & 0x8000000L) != 0L)
-         {
-            jjmatchedKind = 91;
-            jjmatchedPos = 4;
-         }
-         else if ((active1 & 0x8000000000000000L) != 0L)
-         {
-            jjmatchedKind = 127;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_0(active0, 0x4000010000480400L, active1, 0x80L);
-      case 103:
-         if ((active1 & 0x1000000L) != 0L)
-         {
-            jjmatchedKind = 88;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_0(active0, 0x2000000000010040L, active1, 0L);
-      case 105:
-         return jjMoveStringLiteralDfa5_0(active0, 0x100000100000000L, active1, 0x1000000000000000L);
-      case 109:
-         if ((active0 & 0x1000000000000000L) != 0L)
-         {
-            jjmatchedKind = 60;
-            jjmatchedPos = 4;
-         }
-         break;
-      case 110:
-         if ((active1 & 0x100000L) != 0L)
-         {
-            jjmatchedKind = 84;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_0(active0, 0x10000800L, active1, 0x1000L);
-      case 111:
-         return jjMoveStringLiteralDfa5_0(active0, 0x80000080000200L, active1, 0x10000L);
-      case 112:
-         if ((active0 & 0x200000000000L) != 0L)
-         {
-            jjmatchedKind = 45;
-            jjmatchedPos = 4;
-         }
-         break;
-      case 114:
-         if ((active0 & 0x8000000L) != 0L)
-         {
-            jjmatchedKind = 27;
-            jjmatchedPos = 4;
-         }
-         else if ((active1 & 0x2L) != 0L)
-         {
-            jjmatchedKind = 65;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_0(active0, 0x18004800000006L, active1, 0x400100L);
-      case 115:
-         if ((active0 & 0x400000000000L) != 0L)
-         {
-            jjmatchedKind = 46;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_0(active0, 0x4000001000000L, active1, 0x820L);
-      case 116:
-         if ((active0 & 0x400000000000000L) != 0L)
-         {
-            jjmatchedKind = 58;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_0(active0, 0x102020800100L, active1, 0x200000L);
-      case 117:
-         return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x4L);
-      case 118:
-         return jjMoveStringLiteralDfa5_0(active0, 0x2000000L, active1, 0L);
-      case 120:
-         if ((active0 & 0x2000000000000L) != 0L)
-         {
-            jjmatchedKind = 49;
-            jjmatchedPos = 4;
-         }
-         break;
-      case 121:
-         if ((active0 & 0x1000L) != 0L)
-         {
-            jjmatchedKind = 12;
-            jjmatchedPos = 4;
-         }
-         else if ((active0 & 0x1000000000L) != 0L)
-         {
-            jjmatchedKind = 36;
-            jjmatchedPos = 4;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 4);
-}
-private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_0(0, 4);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 4);
-   }
-   switch(curChar)
-   {
-      case 69:
-         return jjMoveStringLiteralDfa6_0(active0, 0x800L, active1, 0L);
-      case 82:
-         if ((active0 & 0x400L) != 0L)
-         {
-            jjmatchedKind = 10;
-            jjmatchedPos = 5;
-         }
-         break;
-      case 99:
-         return jjMoveStringLiteralDfa6_0(active0, 0x800700000L, active1, 0L);
-      case 100:
-         if ((active0 & 0x200L) != 0L)
-         {
-            jjmatchedKind = 9;
-            jjmatchedPos = 5;
-         }
-         else if ((active0 & 0x80000L) != 0L)
-         {
-            jjmatchedKind = 19;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_0(active0, 0x2L, active1, 0x1000L);
-      case 101:
-         if ((active0 & 0x40L) != 0L)
-         {
-            jjmatchedKind = 6;
-            jjmatchedPos = 5;
-         }
-         else if ((active0 & 0x800000L) != 0L)
-         {
-            jjmatchedKind = 23;
-            jjmatchedPos = 5;
-         }
-         else if ((active0 & 0x20000000L) != 0L)
-         {
-            jjmatchedKind = 29;
-            jjmatchedPos = 5;
-         }
-         else if ((active1 & 0x200000L) != 0L)
-         {
-            jjmatchedKind = 85;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_0(active0, 0x3010800L, active1, 0L);
-      case 102:
-         return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x800L);
-      case 105:
-         return jjMoveStringLiteralDfa6_0(active0, 0x100010000100L, active1, 0L);
-      case 110:
-         if ((active1 & 0x100L) != 0L)
-         {
-            jjmatchedKind = 72;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_0(active0, 0x110004180000004L, active1, 0x1000000000000000L);
-      case 111:
-         return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x20L);
-      case 114:
-         if ((active0 & 0x400L) != 0L)
-         {
-            jjmatchedKind = 10;
-            jjmatchedPos = 5;
-         }
-         else if ((active0 & 0x10000000000L) != 0L)
-         {
-            jjmatchedKind = 40;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_0(active0, 0x2080000004000090L, active1, 0x10040L);
-      case 115:
-         if ((active0 & 0x2000000000L) != 0L)
-         {
-            jjmatchedKind = 37;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_0(active0, 0x20L, active1, 0x80L);
-      case 116:
-         if ((active0 & 0x40000000000L) != 0L)
-         {
-            jjmatchedKind = 42;
-            jjmatchedPos = 5;
-         }
-         else if ((active0 & 0x8000000000000L) != 0L)
-         {
-            jjmatchedKind = 51;
-            jjmatchedPos = 5;
-         }
-         else if ((active0 & 0x4000000000000000L) != 0L)
-         {
-            jjmatchedKind = 62;
-            jjmatchedPos = 5;
-         }
-         else if ((active1 & 0x4L) != 0L)
-         {
-            jjmatchedKind = 66;
-            jjmatchedPos = 5;
-         }
-         else if ((active1 & 0x2000L) != 0L)
-         {
-            jjmatchedKind = 77;
-            jjmatchedPos = 5;
-         }
-         else if ((active1 & 0x400000L) != 0L)
-         {
-            jjmatchedKind = 86;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_0(active0, 0x4000000000000L, active1, 0L);
-      case 121:
-         if ((active1 & 0x10L) != 0L)
-         {
-            jjmatchedKind = 68;
-            jjmatchedPos = 5;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 5);
-}
-private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_0(0, 5);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 5);
-   }
-   switch(curChar)
-   {
-      case 76:
-         if ((active0 & 0x800L) != 0L)
-         {
-            jjmatchedKind = 11;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 97:
-         return jjMoveStringLiteralDfa7_0(active0, 0x10004000000000L, active1, 0x11000L);
-      case 99:
-         return jjMoveStringLiteralDfa7_0(active0, 0x100000020L, active1, 0L);
-      case 100:
-         if ((active0 & 0x80000000000000L) != 0L)
-         {
-            jjmatchedKind = 55;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 101:
-         if ((active0 & 0x4000000L) != 0L)
-         {
-            jjmatchedKind = 26;
-            jjmatchedPos = 6;
-         }
-         return jjMoveStringLiteralDfa7_0(active0, 0x800000000L, active1, 0L);
-      case 103:
-         if ((active0 & 0x100000000000000L) != 0L)
-         {
-            jjmatchedKind = 56;
-            jjmatchedPos = 6;
-         }
-         else if ((active1 & 0x1000000000000000L) != 0L)
-         {
-            jjmatchedKind = 124;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 104:
-         if ((active1 & 0x80L) != 0L)
-         {
-            jjmatchedKind = 71;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 105:
-         return jjMoveStringLiteralDfa7_0(active0, 0x4000000000094L, active1, 0x800L);
-      case 108:
-         if ((active0 & 0x800L) != 0L)
-         {
-            jjmatchedKind = 11;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 110:
-         return jjMoveStringLiteralDfa7_0(active0, 0x80010000L, active1, 0L);
-      case 111:
-         return jjMoveStringLiteralDfa7_0(active0, 0x2000100000000000L, active1, 0L);
-      case 114:
-         return jjMoveStringLiteralDfa7_0(active0, 0x2000000L, active1, 0x20L);
-      case 115:
-         if ((active0 & 0x2L) != 0L)
-         {
-            jjmatchedKind = 1;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 116:
-         if ((active0 & 0x100000L) != 0L)
-         {
-            jjmatchedKind = 20;
-            jjmatchedPos = 6;
-         }
-         else if ((active0 & 0x400000L) != 0L)
-         {
-            jjmatchedKind = 22;
-            jjmatchedPos = 6;
-         }
-         else if ((active0 & 0x1000000L) != 0L)
-         {
-            jjmatchedKind = 24;
-            jjmatchedPos = 6;
-         }
-         return jjMoveStringLiteralDfa7_0(active0, 0x10200100L, active1, 0L);
-      case 121:
-         if ((active1 & 0x40L) != 0L)
-         {
-            jjmatchedKind = 70;
-            jjmatchedPos = 6;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 6);
-}
-private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_0(0, 6);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 6);
-   }
-   switch(curChar)
-   {
-      case 98:
-         return jjMoveStringLiteralDfa8_0(active0, 0x10L, active1, 0L);
-      case 100:
-         if ((active0 & 0x800000000L) != 0L)
-         {
-            jjmatchedKind = 35;
-            jjmatchedPos = 7;
-         }
-         break;
-      case 101:
-         return jjMoveStringLiteralDfa8_0(active0, 0x80010000L, active1, 0x800L);
-      case 105:
-         return jjMoveStringLiteralDfa8_0(active0, 0x10200100L, active1, 0L);
-      case 108:
-         if ((active0 & 0x4000000000L) != 0L)
-         {
-            jjmatchedKind = 38;
-            jjmatchedPos = 7;
-         }
-         else if ((active0 & 0x10000000000000L) != 0L)
-         {
-            jjmatchedKind = 52;
-            jjmatchedPos = 7;
-         }
-         break;
-      case 110:
-         if ((active0 & 0x100000000000L) != 0L)
-         {
-            jjmatchedKind = 44;
-            jjmatchedPos = 7;
-         }
-         return jjMoveStringLiteralDfa8_0(active0, 0x4L, active1, 0L);
-      case 111:
-         return jjMoveStringLiteralDfa8_0(active0, 0x4000000000000L, active1, 0L);
-      case 112:
-         return jjMoveStringLiteralDfa8_0(active0, 0x80L, active1, 0L);
-      case 114:
-         return jjMoveStringLiteralDfa8_0(active0, 0x20L, active1, 0x11000L);
-      case 115:
-         return jjMoveStringLiteralDfa8_0(active0, 0x2000000L, active1, 0L);
-      case 116:
-         if ((active0 & 0x100000000L) != 0L)
-         {
-            jjmatchedKind = 32;
-            jjmatchedPos = 7;
-         }
-         return jjMoveStringLiteralDfa8_0(active0, 0L, active1, 0x20L);
-      case 117:
-         return jjMoveStringLiteralDfa8_0(active0, 0x2000000000000000L, active1, 0L);
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 7);
-}
-private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_0(0, 7);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 7);
-   }
-   switch(curChar)
-   {
-      case 99:
-         return jjMoveStringLiteralDfa9_0(active0, 0x80000000L, active1, 0L);
-      case 101:
-         if ((active0 & 0x10L) != 0L)
-         {
-            jjmatchedKind = 4;
-            jjmatchedPos = 8;
-         }
-         else if ((active0 & 0x2000000L) != 0L)
-         {
-            jjmatchedKind = 25;
-            jjmatchedPos = 8;
-         }
-         return jjMoveStringLiteralDfa9_0(active0, 0L, active1, 0x20L);
-      case 103:
-         if ((active0 & 0x4L) != 0L)
-         {
-            jjmatchedKind = 2;
-            jjmatchedPos = 8;
-         }
-         break;
-      case 105:
-         return jjMoveStringLiteralDfa9_0(active0, 0x20L, active1, 0L);
-      case 110:
-         if ((active0 & 0x4000000000000L) != 0L)
-         {
-            jjmatchedKind = 50;
-            jjmatchedPos = 8;
-         }
-         break;
-      case 111:
-         return jjMoveStringLiteralDfa9_0(active0, 0x10200000L, active1, 0L);
-      case 112:
-         if ((active0 & 0x2000000000000000L) != 0L)
-         {
-            jjmatchedKind = 61;
-            jjmatchedPos = 8;
-         }
-         break;
-      case 114:
-         return jjMoveStringLiteralDfa9_0(active0, 0x10000L, active1, 0L);
-      case 115:
-         if ((active1 & 0x800L) != 0L)
-         {
-            jjmatchedKind = 75;
-            jjmatchedPos = 8;
-         }
-         break;
-      case 116:
-         return jjMoveStringLiteralDfa9_0(active0, 0x80L, active1, 0L);
-      case 118:
-         return jjMoveStringLiteralDfa9_0(active0, 0x100L, active1, 0L);
-      case 121:
-         if ((active1 & 0x1000L) != 0L)
-         {
-            jjmatchedKind = 76;
-            jjmatchedPos = 8;
-         }
-         else if ((active1 & 0x10000L) != 0L)
-         {
-            jjmatchedKind = 80;
-            jjmatchedPos = 8;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 8);
-}
-private int jjMoveStringLiteralDfa9_0(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_0(0, 8);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 8);
-   }
-   switch(curChar)
-   {
-      case 97:
-         return jjMoveStringLiteralDfa10_0(active0, 0x10000L, active1, 0L);
-      case 98:
-         return jjMoveStringLiteralDfa10_0(active0, 0x20L, active1, 0L);
-      case 100:
-         if ((active1 & 0x20L) != 0L)
-         {
-            jjmatchedKind = 69;
-            jjmatchedPos = 9;
-         }
-         break;
-      case 101:
-         if ((active0 & 0x100L) != 0L)
-         {
-            jjmatchedKind = 8;
-            jjmatchedPos = 9;
-         }
-         break;
-      case 105:
-         return jjMoveStringLiteralDfa10_0(active0, 0x80L, active1, 0L);
-      case 110:
-         if ((active0 & 0x200000L) != 0L)
-         {
-            jjmatchedKind = 21;
-            jjmatchedPos = 9;
-         }
-         else if ((active0 & 0x10000000L) != 0L)
-         {
-            jjmatchedKind = 28;
-            jjmatchedPos = 9;
-         }
-         break;
-      case 116:
-         if ((active0 & 0x80000000L) != 0L)
-         {
-            jjmatchedKind = 31;
-            jjmatchedPos = 9;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 9);
-}
-private int jjMoveStringLiteralDfa10_0(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_0(0, 9);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 9);
-   }
-   switch(curChar)
-   {
-      case 101:
-         if ((active0 & 0x20L) != 0L)
-         {
-            jjmatchedKind = 5;
-            jjmatchedPos = 10;
-         }
-         break;
-      case 111:
-         return jjMoveStringLiteralDfa11_0(active0, 0x80L);
-      case 116:
-         return jjMoveStringLiteralDfa11_0(active0, 0x10000L);
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 10);
-}
-private int jjMoveStringLiteralDfa11_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjMoveNfa_0(0, 10);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 10);
-   }
-   switch(curChar)
-   {
-      case 101:
-         return jjMoveStringLiteralDfa12_0(active0, 0x10000L);
-      case 110:
-         if ((active0 & 0x80L) != 0L)
-         {
-            jjmatchedKind = 7;
-            jjmatchedPos = 11;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 11);
-}
-private int jjMoveStringLiteralDfa12_0(long old0, long active0)
-{
-   if (((active0 &= old0)) == 0L)
-      return jjMoveNfa_0(0, 11);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_0(0, 11);
-   }
-   switch(curChar)
-   {
-      case 100:
-         if ((active0 & 0x10000L) != 0L)
-         {
-            jjmatchedKind = 16;
-            jjmatchedPos = 12;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_0(0, 12);
-}
-static final long[] jjbitVec0 = {
-   0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-static final long[] jjbitVec2 = {
-   0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-private int jjMoveNfa_0(int startState, int curPos)
-{
-   int strKind = jjmatchedKind;
-   int strPos = jjmatchedPos;
-   int seenUpto;
-   input_stream.backup(seenUpto = curPos + 1);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) { throw new Error("Internal Error"); }
-   curPos = 0;
-   int startsAt = 0;
-   jjnewStateCnt = 54;
-   int i = 1;
-   jjstateSet[0] = startState;
-   int kind = 0x7fffffff;
-   for (;;)
-   {
-      if (++jjround == 0x7fffffff)
-         ReInitRounds();
-      if (curChar < 64)
-      {
-         long l = 1L << curChar;
-         do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((0x3ff000000000000L & l) != 0L)
-                  {
-                     if (kind > 123)
-                        kind = 123;
-                     jjCheckNAddStates(0, 8);
-                  }
-                  else if ((0x201000000000L & l) != 0L)
-                  {
-                     if (kind > 133)
-                        kind = 133;
-                  }
-                  else if (curChar == 47)
-                     jjAddStates(9, 10);
-                  else if (curChar == 46)
-                     jjCheckNAddTwoStates(43, 44);
-                  else if (curChar == 39)
-                     jjCheckNAddStates(11, 13);
-                  else if (curChar == 34)
-                     jjCheckNAddStates(14, 16);
-                  if (curChar == 36)
-                     jjstateSet[jjnewStateCnt++] = 28;
-                  break;
-               case 1:
-               case 5:
-                  if (curChar == 34)
-                     jjCheckNAddStates(14, 16);
-                  break;
-               case 2:
-                  if ((0xfffffffbffffffffL & l) != 0L)
-                     jjCheckNAddStates(14, 16);
-                  break;
-               case 3:
-                  if (curChar == 34 && kind > 134)
-                     kind = 134;
-                  break;
-               case 7:
-                  if (curChar == 47)
-                     jjCheckNAddStates(14, 16);
-                  break;
-               case 13:
-               case 17:
-                  if (curChar == 39)
-                     jjCheckNAddStates(11, 13);
-                  break;
-               case 14:
-                  if ((0xffffff7fffffffffL & l) != 0L)
-                     jjCheckNAddStates(11, 13);
-                  break;
-               case 15:
-                  if (curChar == 39 && kind > 134)
-                     kind = 134;
-                  break;
-               case 19:
-                  if (curChar == 47)
-                     jjCheckNAddStates(11, 13);
-                  break;
-               case 26:
-                  if ((0x3ff201000000000L & l) == 0L)
-                     break;
-                  if (kind > 144)
-                     kind = 144;
-                  jjstateSet[jjnewStateCnt++] = 26;
-                  break;
-               case 27:
-                  if (curChar == 36)
-                     jjstateSet[jjnewStateCnt++] = 28;
-                  break;
-               case 29:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 145)
-                     kind = 145;
-                  jjstateSet[jjnewStateCnt++] = 29;
-                  break;
-               case 30:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 123)
-                     kind = 123;
-                  jjCheckNAddStates(0, 8);
-                  break;
-               case 31:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 123)
-                     kind = 123;
-                  jjCheckNAdd(31);
-                  break;
-               case 32:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 129)
-                     kind = 129;
-                  jjCheckNAdd(32);
-                  break;
-               case 33:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 129)
-                     kind = 129;
-                  jjCheckNAddTwoStates(33, 34);
-                  break;
-               case 34:
-                  if (curChar == 46)
-                     jjCheckNAdd(35);
-                  break;
-               case 35:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 129)
-                     kind = 129;
-                  jjCheckNAdd(35);
-                  break;
-               case 36:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(36, 37);
-                  break;
-               case 38:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 130)
-                     kind = 130;
-                  jjCheckNAddTwoStates(38, 39);
-                  break;
-               case 39:
-                  if (curChar == 46)
-                     jjCheckNAdd(40);
-                  break;
-               case 40:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(40, 37);
-                  break;
-               case 41:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 131)
-                     kind = 131;
-                  jjCheckNAdd(41);
-                  break;
-               case 42:
-                  if (curChar == 46)
-                     jjCheckNAddTwoStates(43, 44);
-                  break;
-               case 43:
-                  if ((0x3ff000000000000L & l) == 0L)
-                     break;
-                  if (kind > 129)
-                     kind = 129;
-                  jjCheckNAdd(43);
-                  break;
-               case 44:
-                  if ((0x3ff000000000000L & l) != 0L)
-                     jjCheckNAddTwoStates(44, 37);
-                  break;
-               case 45:
-                  if (curChar == 47)
-                     jjAddStates(9, 10);
-                  break;
-               case 46:
-                  if (curChar == 47)
-                     jjCheckNAddTwoStates(47, 48);
-                  break;
-               case 47:
-                  if ((0xfffffffffffffbffL & l) != 0L)
-                     jjCheckNAddTwoStates(47, 48);
-                  break;
-               case 48:
-                  if (curChar == 10 && kind > 150)
-                     kind = 150;
-                  break;
-               case 49:
-                  if (curChar != 47)
-                     break;
-                  if (kind > 151)
-                     kind = 151;
-                  jjCheckNAddStates(17, 19);
-                  break;
-               case 50:
-                  if ((0xffffffffffffdbffL & l) == 0L)
-                     break;
-                  if (kind > 151)
-                     kind = 151;
-                  jjCheckNAddStates(17, 19);
-                  break;
-               case 51:
-                  if ((0x2400L & l) != 0L && kind > 151)
-                     kind = 151;
-                  break;
-               case 52:
-                  if (curChar == 10 && kind > 151)
-                     kind = 151;
-                  break;
-               case 53:
-                  if (curChar == 13)
-                     jjstateSet[jjnewStateCnt++] = 52;
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else if (curChar < 128)
-      {
-         long l = 1L << (curChar & 077);
-         do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 0:
-                  if ((0x7fffffe07fffffeL & l) != 0L)
-                  {
-                     if (kind > 144)
-                        kind = 144;
-                     jjCheckNAdd(26);
-                  }
-                  else if (curChar == 95)
-                  {
-                     if (kind > 133)
-                        kind = 133;
-                  }
-                  break;
-               case 2:
-                  if ((0xffffffffefffffffL & l) != 0L)
-                     jjCheckNAddStates(14, 16);
-                  break;
-               case 4:
-                  if (curChar == 92)
-                     jjAddStates(20, 27);
-                  break;
-               case 6:
-                  if (curChar == 92)
-                     jjCheckNAddStates(14, 16);
-                  break;
-               case 8:
-                  if (curChar == 98)
-                     jjCheckNAddStates(14, 16);
-                  break;
-               case 9:
-                  if (curChar == 102)
-                     jjCheckNAddStates(14, 16);
-                  break;
-               case 10:
-                  if (curChar == 110)
-                     jjCheckNAddStates(14, 16);
-                  break;
-               case 11:
-                  if (curChar == 114)
-                     jjCheckNAddStates(14, 16);
-                  break;
-               case 12:
-                  if (curChar == 116)
-                     jjCheckNAddStates(14, 16);
-                  break;
-               case 14:
-                  if ((0xffffffffefffffffL & l) != 0L)
-                     jjCheckNAddStates(11, 13);
-                  break;
-               case 16:
-                  if (curChar == 92)
-                     jjAddStates(28, 35);
-                  break;
-               case 18:
-                  if (curChar == 92)
-                     jjCheckNAddStates(11, 13);
-                  break;
-               case 20:
-                  if (curChar == 98)
-                     jjCheckNAddStates(11, 13);
-                  break;
-               case 21:
-                  if (curChar == 102)
-                     jjCheckNAddStates(11, 13);
-                  break;
-               case 22:
-                  if (curChar == 110)
-                     jjCheckNAddStates(11, 13);
-                  break;
-               case 23:
-                  if (curChar == 114)
-                     jjCheckNAddStates(11, 13);
-                  break;
-               case 24:
-                  if (curChar == 116)
-                     jjCheckNAddStates(11, 13);
-                  break;
-               case 25:
-                  if ((0x7fffffe07fffffeL & l) == 0L)
-                     break;
-                  if (kind > 144)
-                     kind = 144;
-                  jjCheckNAdd(26);
-                  break;
-               case 26:
-                  if ((0x7fffffe87fffffeL & l) == 0L)
-                     break;
-                  if (kind > 144)
-                     kind = 144;
-                  jjCheckNAdd(26);
-                  break;
-               case 28:
-                  if ((0x7fffffe07fffffeL & l) == 0L)
-                     break;
-                  if (kind > 145)
-                     kind = 145;
-                  jjCheckNAdd(29);
-                  break;
-               case 29:
-                  if ((0x7fffffe87fffffeL & l) == 0L)
-                     break;
-                  if (kind > 145)
-                     kind = 145;
-                  jjCheckNAdd(29);
-                  break;
-               case 37:
-                  if ((0x4000000040L & l) != 0L && kind > 130)
-                     kind = 130;
-                  break;
-               case 47:
-                  jjAddStates(36, 37);
-                  break;
-               case 50:
-                  if (kind > 151)
-                     kind = 151;
-                  jjAddStates(17, 19);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      else
-      {
-         int hiByte = (int)(curChar >> 8);
-         int i1 = hiByte >> 6;
-         long l1 = 1L << (hiByte & 077);
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
-         do
-         {
-            switch(jjstateSet[--i])
-            {
-               case 2:
-                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
-                     jjAddStates(14, 16);
-                  break;
-               case 14:
-                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
-                     jjAddStates(11, 13);
-                  break;
-               case 47:
-                  if (jjCanMove_0(hiByte, i1, i2, l1, l2))
-                     jjAddStates(36, 37);
-                  break;
-               case 50:
-                  if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
-                     break;
-                  if (kind > 151)
-                     kind = 151;
-                  jjAddStates(17, 19);
-                  break;
-               default : break;
-            }
-         } while(i != startsAt);
-      }
-      if (kind != 0x7fffffff)
-      {
-         jjmatchedKind = kind;
-         jjmatchedPos = curPos;
-         kind = 0x7fffffff;
-      }
-      ++curPos;
-      if ((i = jjnewStateCnt) == (startsAt = 54 - (jjnewStateCnt = startsAt)))
-         break;
-      try { curChar = input_stream.readChar(); }
-      catch(java.io.IOException e) { break; }
-   }
-   if (jjmatchedPos > strPos)
-      return curPos;
-
-   int toRet = Math.max(curPos, seenUpto);
-
-   if (curPos < toRet)
-      for (i = toRet - Math.min(curPos, seenUpto); i-- > 0; )
-         try { curChar = input_stream.readChar(); }
-         catch(java.io.IOException e) { throw new Error("Internal Error : Please send a bug report."); }
-
-   if (jjmatchedPos < strPos)
-   {
-      jjmatchedKind = strKind;
-      jjmatchedPos = strPos;
-   }
-   else if (jjmatchedPos == strPos && jjmatchedKind > strKind)
-      jjmatchedKind = strKind;
-
-   return toRet;
-}
-private int jjMoveStringLiteralDfa0_1()
-{
-   switch(curChar)
-   {
-      case 9:
-         jjmatchedKind = 147;
-         return jjMoveNfa_1(0, 0);
-      case 10:
-         jjmatchedKind = 149;
-         return jjMoveNfa_1(0, 0);
-      case 13:
-         jjmatchedKind = 148;
-         return jjMoveNfa_1(0, 0);
-      case 32:
-         jjmatchedKind = 146;
-         return jjMoveNfa_1(0, 0);
-      case 33:
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x1000000000000L, 0x0L);
-      case 35:
-         jjmatchedKind = 118;
-         return jjMoveNfa_1(0, 0);
-      case 37:
-         jjmatchedKind = 96;
-         return jjMoveNfa_1(0, 0);
-      case 40:
-         jjmatchedKind = 99;
-         return jjMoveNfa_1(0, 0);
-      case 41:
-         jjmatchedKind = 100;
-         return jjMoveNfa_1(0, 0);
-      case 42:
-         jjmatchedKind = 97;
-         return jjMoveNfa_1(0, 0);
-      case 43:
-         jjmatchedKind = 98;
-         return jjMoveNfa_1(0, 0);
-      case 44:
-         jjmatchedKind = 104;
-         return jjMoveNfa_1(0, 0);
-      case 45:
-         jjmatchedKind = 95;
-         return jjMoveNfa_1(0, 0);
-      case 46:
-         jjmatchedKind = 105;
-         return jjMoveNfa_1(0, 0);
-      case 47:
-         jjmatchedKind = 93;
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x0L, 0x1000000L);
-      case 58:
-         jjmatchedKind = 103;
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x4000000000000L, 0x0L);
-      case 60:
-         jjmatchedKind = 107;
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x200000000000L, 0x0L);
-      case 61:
-         jjmatchedKind = 111;
-         return jjMoveNfa_1(0, 0);
-      case 62:
-         jjmatchedKind = 108;
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x400000000000L, 0x0L);
-      case 63:
-         jjmatchedKind = 106;
-         return jjMoveNfa_1(0, 0);
-      case 64:
-         jjmatchedKind = 117;
-         return jjMoveNfa_1(0, 0);
-      case 66:
-         return jjMoveStringLiteralDfa1_1(0x400L, 0x0L, 0x0L);
-      case 67:
-         return jjMoveStringLiteralDfa1_1(0x800L, 0x0L, 0x0L);
-      case 91:
-         jjmatchedKind = 101;
-         return jjMoveNfa_1(0, 0);
-      case 93:
-         jjmatchedKind = 102;
-         return jjMoveNfa_1(0, 0);
-      case 94:
-         jjmatchedKind = 92;
-         return jjMoveNfa_1(0, 0);
-      case 97:
-         return jjMoveStringLiteralDfa1_1(0x1f000L, 0x8000000000000L, 0x0L);
-      case 98:
-         return jjMoveStringLiteralDfa1_1(0x60400L, 0x0L, 0x0L);
-      case 99:
-         return jjMoveStringLiteralDfa1_1(0xf80800L, 0x0L, 0x0L);
-      case 100:
-         return jjMoveStringLiteralDfa1_1(0x3ff000000L, 0x0L, 0x0L);
-      case 101:
-         return jjMoveStringLiteralDfa1_1(0x7c00000000L, 0x0L, 0x0L);
-      case 102:
-         return jjMoveStringLiteralDfa1_1(0x1f8000000000L, 0x8000000000000000L, 0x0L);
-      case 103:
-         return jjMoveStringLiteralDfa1_1(0x200000000000L, 0x0L, 0x0L);
-      case 104:
-         return jjMoveStringLiteralDfa1_1(0x400000000000L, 0x0L, 0x0L);
-      case 105:
-         return jjMoveStringLiteralDfa1_1(0x3f800000000000L, 0x40000000L, 0x0L);
-      case 107:
-         return jjMoveStringLiteralDfa1_1(0x1c0000000000000L, 0x0L, 0x0L);
-      case 108:
-         return jjMoveStringLiteralDfa1_1(0xe00000000000000L, 0x0L, 0x0L);
-      case 109:
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x1000000000000000L, 0x0L);
-      case 110:
-         return jjMoveStringLiteralDfa1_1(0x3000000000000000L, 0x2000000000000000L, 0x0L);
-      case 111:
-         return jjMoveStringLiteralDfa1_1(0xc000000000000000L, 0x10000000000007L, 0x0L);
-      case 112:
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x78L, 0x0L);
-      case 114:
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x780L, 0x0L);
-      case 115:
-         return jjMoveStringLiteralDfa1_1(0x0L, 0xf800L, 0x0L);
-      case 116:
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x40000000000f0000L, 0x0L);
-      case 117:
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x1f00000L, 0x0L);
-      case 119:
-         return jjMoveStringLiteralDfa1_1(0x0L, 0xe000000L, 0x0L);
-      case 123:
-         jjmatchedKind = 119;
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x200000000000000L, 0x0L);
-      case 125:
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x400000000000000L, 0x0L);
-      case 126:
-         return jjMoveStringLiteralDfa1_1(0x0L, 0x2000000000000L, 0x0L);
-      default :
-         return jjMoveNfa_1(0, 0);
-   }
-}
-private int jjMoveStringLiteralDfa1_1(long active0, long active1, long active2)
-{
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_1(0, 0);
-   }
-   switch(curChar)
-   {
-      case 42:
-         if ((active2 & 0x1000000L) != 0L)
-         {
-            jjmatchedKind = 152;
-            jjmatchedPos = 1;
-         }
-         break;
-      case 61:
-         if ((active1 & 0x200000000000L) != 0L)
-         {
-            jjmatchedKind = 109;
-            jjmatchedPos = 1;
-         }
-         else if ((active1 & 0x400000000000L) != 0L)
-         {
-            jjmatchedKind = 110;
-            jjmatchedPos = 1;
-         }
-         else if ((active1 & 0x1000000000000L) != 0L)
-         {
-            jjmatchedKind = 112;
-            jjmatchedPos = 1;
-         }
-         else if ((active1 & 0x2000000000000L) != 0L)
-         {
-            jjmatchedKind = 113;
-            jjmatchedPos = 1;
-         }
-         else if ((active1 & 0x4000000000000L) != 0L)
-         {
-            jjmatchedKind = 114;
-            jjmatchedPos = 1;
-         }
-         break;
-      case 72:
-         return jjMoveStringLiteralDfa2_1(active0, 0x800L, active1, 0L, active2, 0L);
-      case 82:
-         return jjMoveStringLiteralDfa2_1(active0, 0x400L, active1, 0L, active2, 0L);
-      case 97:
-         return jjMoveStringLiteralDfa2_1(active0, 0x3000000L, active1, 0x8000000000000808L, active2, 0L);
-      case 100:
-         return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x40000000L, active2, 0L);
-      case 101:
-         return jjMoveStringLiteralDfa2_1(active0, 0x3c000807c000000L, active1, 0x17180L, active2, 0L);
-      case 102:
-         if ((active0 & 0x800000000000L) != 0L)
-         {
-            jjmatchedKind = 47;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_1(active0, 0x4000000000000000L, active1, 0L, active2, 0L);
-      case 103:
-         return jjMoveStringLiteralDfa2_1(active0, 0x1000000000000000L, active1, 0L, active2, 0L);
-      case 104:
-         return jjMoveStringLiteralDfa2_1(active0, 0x800L, active1, 0x2020000L, active2, 0L);
-      case 105:
-         return jjMoveStringLiteralDfa2_1(active0, 0x400410180000000L, active1, 0x1000000004000000L, active2, 0L);
-      case 108:
-         return jjMoveStringLiteralDfa2_1(active0, 0x400080000L, active1, 0L, active2, 0L);
-      case 110:
-         if ((active0 & 0x1000000000000L) != 0L)
-         {
-            jjmatchedKind = 48;
-            jjmatchedPos = 1;
-         }
-         else if ((active0 & 0x8000000000000000L) != 0L)
-         {
-            jjmatchedKind = 63;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_1(active0, 0x3e000800000000L, active1, 0x8000000100000L, active2, 0L);
-      case 111:
-         if ((active1 & 0x40000L) != 0L)
-         {
-            jjmatchedKind = 82;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_1(active0, 0x2800060000700000L, active1, 0x8010L, active2, 0L);
-      case 112:
-         return jjMoveStringLiteralDfa2_1(active0, 0x1000L, active1, 0x600001L, active2, 0L);
-      case 114:
-         if ((active1 & 0x10000000000000L) != 0L)
-         {
-            jjmatchedKind = 116;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_1(active0, 0x280200800400L, active1, 0x4000000008000062L, active2, 0L);
-      case 115:
-         if ((active0 & 0x2000L) != 0L)
-         {
-            jjmatchedKind = 13;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_1(active0, 0x4000L, active1, 0x1800000L, active2, 0L);
-      case 116:
-         if ((active0 & 0x8000L) != 0L)
-         {
-            jjmatchedKind = 15;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_1(active0, 0x20000L, active1, 0x200L, active2, 0L);
-      case 117:
-         return jjMoveStringLiteralDfa2_1(active0, 0x100000010000L, active1, 0x2000000000000404L, active2, 0L);
-      case 118:
-         return jjMoveStringLiteralDfa2_1(active0, 0x1000000000L, active1, 0L, active2, 0L);
-      case 120:
-         return jjMoveStringLiteralDfa2_1(active0, 0x6000000000L, active1, 0L, active2, 0L);
-      case 121:
-         if ((active0 & 0x40000L) != 0L)
-         {
-            jjmatchedKind = 18;
-            jjmatchedPos = 1;
-         }
-         return jjMoveStringLiteralDfa2_1(active0, 0L, active1, 0x80000L, active2, 0L);
-      case 123:
-         if ((active1 & 0x200000000000000L) != 0L)
-         {
-            jjmatchedKind = 121;
-            jjmatchedPos = 1;
-         }
-         break;
-      case 125:
-         if ((active1 & 0x400000000000000L) != 0L)
-         {
-            jjmatchedKind = 122;
-            jjmatchedPos = 1;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_1(0, 1);
-}
-private int jjMoveStringLiteralDfa2_1(long old0, long active0, long old1, long active1, long old2, long active2)
-{
-   if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L)
-      return jjMoveNfa_1(0, 1);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_1(0, 1);
-   }
-   switch(curChar)
-   {
-      case 65:
-         return jjMoveStringLiteralDfa3_1(active0, 0x800L, active1, 0L);
-      case 79:
-         return jjMoveStringLiteralDfa3_1(active0, 0x400L, active1, 0L);
-      case 97:
-         return jjMoveStringLiteralDfa3_1(active0, 0x800000000000800L, active1, 0L);
-      case 99:
-         if ((active0 & 0x4000L) != 0L)
-         {
-            jjmatchedKind = 14;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_1(active0, 0xc000000L, active1, 0x1000L);
-      case 100:
-         if ((active1 & 0x8000000000000L) != 0L)
-         {
-            jjmatchedKind = 115;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_1(active0, 0x2002000000000000L, active1, 0x200002L);
-      case 101:
-         if ((active1 & 0x800000L) != 0L)
-         {
-            jjmatchedKind = 87;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_1(active0, 0x100009000800000L, active1, 0x2020021L);
-      case 102:
-         return jjMoveStringLiteralDfa3_1(active0, 0x4000000810000000L, active1, 0x80L);
-      case 103:
-         return jjMoveStringLiteralDfa3_1(active0, 0x4000000000000L, active1, 0L);
-      case 105:
-         return jjMoveStringLiteralDfa3_1(active0, 0x2000000000L, active1, 0x49100040L);
-      case 108:
-         return jjMoveStringLiteralDfa3_1(active0, 0x10020000000L, active1, 0xa000000000002010L);
-      case 109:
-         return jjMoveStringLiteralDfa3_1(active0, 0x400000000300000L, active1, 0x18000L);
-      case 110:
-         if ((active1 & 0x400L) != 0L)
-         {
-            jjmatchedKind = 74;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_1(active0, 0x500000400000L, active1, 0L);
-      case 111:
-         return jjMoveStringLiteralDfa3_1(active0, 0x280200080400L, active1, 0L);
-      case 112:
-         return jjMoveStringLiteralDfa3_1(active0, 0x1000L, active1, 0x80000L);
-      case 114:
-         if ((active0 & 0x20000000000L) != 0L)
-         {
-            jjmatchedKind = 41;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_1(active0, 0x1000040000020000L, active1, 0x200L);
-      case 115:
-         return jjMoveStringLiteralDfa3_1(active0, 0x80005c0000000L, active1, 0x1000000000400000L);
-      case 116:
-         if ((active0 & 0x200000000000000L) != 0L)
-         {
-            jjmatchedKind = 57;
-            jjmatchedPos = 2;
-         }
-         else if ((active1 & 0x4000L) != 0L)
-         {
-            jjmatchedKind = 78;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_1(active0, 0x30004003010000L, active1, 0x400090cL);
-      case 117:
-         return jjMoveStringLiteralDfa3_1(active0, 0L, active1, 0x4000000000000000L);
-      case 121:
-         if ((active0 & 0x40000000000000L) != 0L)
-         {
-            jjmatchedKind = 54;
-            jjmatchedPos = 2;
-         }
-         return jjMoveStringLiteralDfa3_1(active0, 0x80000000000000L, active1, 0L);
-      default :
-         break;
-   }
-   return jjMoveNfa_1(0, 2);
-}
-private int jjMoveStringLiteralDfa3_1(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_1(0, 2);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_1(0, 2);
-   }
-   switch(curChar)
-   {
-      case 45:
-         return jjMoveStringLiteralDfa4_1(active0, 0L, active1, 0x20L);
-      case 75:
-         return jjMoveStringLiteralDfa4_1(active0, 0x400L, active1, 0L);
-      case 78:
-         return jjMoveStringLiteralDfa4_1(active0, 0x800L, active1, 0L);
-      case 97:
-         return jjMoveStringLiteralDfa4_1(active0, 0x1000000003800000L, active1, 0x200000L);
-      case 99:
-         if ((active0 & 0x40000000L) != 0L)
-         {
-            jjmatchedKind = 30;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_1(active0, 0x100080000000L, active1, 0L);
-      case 100:
-         if ((active0 & 0x8000000000L) != 0L)
-         {
-            jjmatchedKind = 39;
-            jjmatchedPos = 3;
-         }
-         else if ((active0 & 0x800000000000000L) != 0L)
-         {
-            jjmatchedKind = 59;
-            jjmatchedPos = 3;
-         }
-         break;
-      case 101:
-         if ((active0 & 0x400000000L) != 0L)
-         {
-            jjmatchedKind = 34;
-            jjmatchedPos = 3;
-         }
-         else if ((active1 & 0x8000L) != 0L)
-         {
-            jjmatchedKind = 79;
-            jjmatchedPos = 3;
-         }
-         else if ((active1 & 0x80000L) != 0L)
-         {
-            jjmatchedKind = 83;
-            jjmatchedPos = 3;
-         }
-         else if ((active1 & 0x4000000000000000L) != 0L)
-         {
-            jjmatchedKind = 126;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_1(active0, 0x201e004020020000L, active1, 0x402202L);
-      case 104:
-         if ((active1 & 0x8L) != 0L)
-         {
-            jjmatchedKind = 67;
-            jjmatchedPos = 3;
-         }
-         else if ((active1 & 0x4000000L) != 0L)
-         {
-            jjmatchedKind = 90;
-            jjmatchedPos = 3;
-         }
-         break;
-      case 105:
-         return jjMoveStringLiteralDfa4_1(active0, 0x400000010000000L, active1, 0x810L);
-      case 107:
-         return jjMoveStringLiteralDfa4_1(active0, 0x400L, active1, 0L);
-      case 108:
-         if ((active1 & 0x2000000000000000L) != 0L)
-         {
-            jjmatchedKind = 125;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_1(active0, 0x4001000L, active1, 0L);
-      case 109:
-         if ((active0 & 0x80000000000L) != 0L)
-         {
-            jjmatchedKind = 43;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_1(active0, 0x40000000000L, active1, 0x40L);
-      case 110:
-         if ((active1 & 0x1L) != 0L)
-         {
-            jjmatchedKind = 64;
-            jjmatchedPos = 3;
-         }
-         else if ((active1 & 0x20000L) != 0L)
-         {
-            jjmatchedKind = 81;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_1(active0, 0x400800L, active1, 0x1000000L);
-      case 111:
-         if ((active0 & 0x20000000000000L) != 0L)
-         {
-            jjmatchedKind = 53;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_1(active0, 0x808010000L, active1, 0x101000L);
-      case 112:
-         if ((active0 & 0x200000000L) != 0L)
-         {
-            jjmatchedKind = 33;
-            jjmatchedPos = 3;
-         }
-         return jjMoveStringLiteralDfa4_1(active0, 0x100000000300000L, active1, 0x10004L);
-      case 114:
-         return jjMoveStringLiteralDfa4_1(active0, 0x1000000000L, active1, 0x2000080L);
-      case 115:
-         return jjMoveStringLiteralDfa4_1(active0, 0x4000002000080000L, active1, 0x9000000000000000L);
-      case 116:
-         return jjMoveStringLiteralDfa4_1(active0, 0x410100000000L, active1, 0x8000000L);
-      case 117:
-         return jjMoveStringLiteralDfa4_1(active0, 0x200000000000L, active1, 0x100L);
-      case 118:
-         if ((active1 & 0x40000000L) != 0L)
-         {
-            jjmatchedKind = 94;
-            jjmatchedPos = 3;
-         }
-         break;
-      case 119:
-         return jjMoveStringLiteralDfa4_1(active0, 0x80000000000000L, active1, 0L);
-      default :
-         break;
-   }
-   return jjMoveNfa_1(0, 3);
-}
-private int jjMoveStringLiteralDfa4_1(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_1(0, 3);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_1(0, 3);
-   }
-   switch(curChar)
-   {
-      case 69:
-         return jjMoveStringLiteralDfa5_1(active0, 0x400L, active1, 0L);
-      case 78:
-         return jjMoveStringLiteralDfa5_1(active0, 0x800L, active1, 0L);
-      case 97:
-         return jjMoveStringLiteralDfa5_1(active0, 0x40004300000L, active1, 0x40L);
-      case 99:
-         return jjMoveStringLiteralDfa5_1(active0, 0L, active1, 0x2010L);
-      case 101:
-         if ((active0 & 0x20000L) != 0L)
-         {
-            jjmatchedKind = 17;
-            jjmatchedPos = 4;
-         }
-         else if ((active1 & 0x200L) != 0L)
-         {
-            jjmatchedKind = 73;
-            jjmatchedPos = 4;
-         }
-         else if ((active1 & 0x2000000L) != 0L)
-         {
-            jjmatchedKind = 89;
-            jjmatchedPos = 4;
-         }
-         else if ((active1 & 0x8000000L) != 0L)
-         {
-            jjmatchedKind = 91;
-            jjmatchedPos = 4;
-         }
-         else if ((active1 & 0x8000000000000000L) != 0L)
-         {
-            jjmatchedKind = 127;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_1(active0, 0x4000010000480400L, active1, 0x80L);
-      case 103:
-         if ((active1 & 0x1000000L) != 0L)
-         {
-            jjmatchedKind = 88;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_1(active0, 0x2000000000010000L, active1, 0L);
-      case 105:
-         return jjMoveStringLiteralDfa5_1(active0, 0x100000100000000L, active1, 0x1000000000000000L);
-      case 109:
-         if ((active0 & 0x1000000000000000L) != 0L)
-         {
-            jjmatchedKind = 60;
-            jjmatchedPos = 4;
-         }
-         break;
-      case 110:
-         if ((active1 & 0x100000L) != 0L)
-         {
-            jjmatchedKind = 84;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_1(active0, 0x10000800L, active1, 0x1000L);
-      case 111:
-         return jjMoveStringLiteralDfa5_1(active0, 0x80000080000000L, active1, 0x10000L);
-      case 112:
-         if ((active0 & 0x200000000000L) != 0L)
-         {
-            jjmatchedKind = 45;
-            jjmatchedPos = 4;
-         }
-         break;
-      case 114:
-         if ((active0 & 0x8000000L) != 0L)
-         {
-            jjmatchedKind = 27;
-            jjmatchedPos = 4;
-         }
-         else if ((active1 & 0x2L) != 0L)
-         {
-            jjmatchedKind = 65;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_1(active0, 0x18004800000000L, active1, 0x400100L);
-      case 115:
-         if ((active0 & 0x400000000000L) != 0L)
-         {
-            jjmatchedKind = 46;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_1(active0, 0x4000001000000L, active1, 0x820L);
-      case 116:
-         if ((active0 & 0x400000000000000L) != 0L)
-         {
-            jjmatchedKind = 58;
-            jjmatchedPos = 4;
-         }
-         return jjMoveStringLiteralDfa5_1(active0, 0x102020800000L, active1, 0x200000L);
-      case 117:
-         return jjMoveStringLiteralDfa5_1(active0, 0L, active1, 0x4L);
-      case 118:
-         return jjMoveStringLiteralDfa5_1(active0, 0x2000000L, active1, 0L);
-      case 120:
-         if ((active0 & 0x2000000000000L) != 0L)
-         {
-            jjmatchedKind = 49;
-            jjmatchedPos = 4;
-         }
-         break;
-      case 121:
-         if ((active0 & 0x1000L) != 0L)
-         {
-            jjmatchedKind = 12;
-            jjmatchedPos = 4;
-         }
-         else if ((active0 & 0x1000000000L) != 0L)
-         {
-            jjmatchedKind = 36;
-            jjmatchedPos = 4;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_1(0, 4);
-}
-private int jjMoveStringLiteralDfa5_1(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_1(0, 4);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_1(0, 4);
-   }
-   switch(curChar)
-   {
-      case 69:
-         return jjMoveStringLiteralDfa6_1(active0, 0x800L, active1, 0L);
-      case 82:
-         if ((active0 & 0x400L) != 0L)
-         {
-            jjmatchedKind = 10;
-            jjmatchedPos = 5;
-         }
-         break;
-      case 99:
-         return jjMoveStringLiteralDfa6_1(active0, 0x800700000L, active1, 0L);
-      case 100:
-         if ((active0 & 0x80000L) != 0L)
-         {
-            jjmatchedKind = 19;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_1(active0, 0L, active1, 0x1000L);
-      case 101:
-         if ((active0 & 0x800000L) != 0L)
-         {
-            jjmatchedKind = 23;
-            jjmatchedPos = 5;
-         }
-         else if ((active0 & 0x20000000L) != 0L)
-         {
-            jjmatchedKind = 29;
-            jjmatchedPos = 5;
-         }
-         else if ((active1 & 0x200000L) != 0L)
-         {
-            jjmatchedKind = 85;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_1(active0, 0x3010800L, active1, 0L);
-      case 102:
-         return jjMoveStringLiteralDfa6_1(active0, 0L, active1, 0x800L);
-      case 105:
-         return jjMoveStringLiteralDfa6_1(active0, 0x100010000000L, active1, 0L);
-      case 110:
-         if ((active1 & 0x100L) != 0L)
-         {
-            jjmatchedKind = 72;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_1(active0, 0x110004180000000L, active1, 0x1000000000000000L);
-      case 111:
-         return jjMoveStringLiteralDfa6_1(active0, 0L, active1, 0x20L);
-      case 114:
-         if ((active0 & 0x400L) != 0L)
-         {
-            jjmatchedKind = 10;
-            jjmatchedPos = 5;
-         }
-         else if ((active0 & 0x10000000000L) != 0L)
-         {
-            jjmatchedKind = 40;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_1(active0, 0x2080000004000000L, active1, 0x10040L);
-      case 115:
-         if ((active0 & 0x2000000000L) != 0L)
-         {
-            jjmatchedKind = 37;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_1(active0, 0L, active1, 0x80L);
-      case 116:
-         if ((active0 & 0x40000000000L) != 0L)
-         {
-            jjmatchedKind = 42;
-            jjmatchedPos = 5;
-         }
-         else if ((active0 & 0x8000000000000L) != 0L)
-         {
-            jjmatchedKind = 51;
-            jjmatchedPos = 5;
-         }
-         else if ((active0 & 0x4000000000000000L) != 0L)
-         {
-            jjmatchedKind = 62;
-            jjmatchedPos = 5;
-         }
-         else if ((active1 & 0x4L) != 0L)
-         {
-            jjmatchedKind = 66;
-            jjmatchedPos = 5;
-         }
-         else if ((active1 & 0x2000L) != 0L)
-         {
-            jjmatchedKind = 77;
-            jjmatchedPos = 5;
-         }
-         else if ((active1 & 0x400000L) != 0L)
-         {
-            jjmatchedKind = 86;
-            jjmatchedPos = 5;
-         }
-         return jjMoveStringLiteralDfa6_1(active0, 0x4000000000000L, active1, 0L);
-      case 121:
-         if ((active1 & 0x10L) != 0L)
-         {
-            jjmatchedKind = 68;
-            jjmatchedPos = 5;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_1(0, 5);
-}
-private int jjMoveStringLiteralDfa6_1(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_1(0, 5);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_1(0, 5);
-   }
-   switch(curChar)
-   {
-      case 76:
-         if ((active0 & 0x800L) != 0L)
-         {
-            jjmatchedKind = 11;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 97:
-         return jjMoveStringLiteralDfa7_1(active0, 0x10004000000000L, active1, 0x11000L);
-      case 99:
-         return jjMoveStringLiteralDfa7_1(active0, 0x100000000L, active1, 0L);
-      case 100:
-         if ((active0 & 0x80000000000000L) != 0L)
-         {
-            jjmatchedKind = 55;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 101:
-         if ((active0 & 0x4000000L) != 0L)
-         {
-            jjmatchedKind = 26;
-            jjmatchedPos = 6;
-         }
-         return jjMoveStringLiteralDfa7_1(active0, 0x800000000L, active1, 0L);
-      case 103:
-         if ((active0 & 0x100000000000000L) != 0L)
-         {
-            jjmatchedKind = 56;
-            jjmatchedPos = 6;
-         }
-         else if ((active1 & 0x1000000000000000L) != 0L)
-         {
-            jjmatchedKind = 124;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 104:
-         if ((active1 & 0x80L) != 0L)
-         {
-            jjmatchedKind = 71;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 105:
-         return jjMoveStringLiteralDfa7_1(active0, 0x4000000000000L, active1, 0x800L);
-      case 108:
-         if ((active0 & 0x800L) != 0L)
-         {
-            jjmatchedKind = 11;
-            jjmatchedPos = 6;
-         }
-         break;
-      case 110:
-         return jjMoveStringLiteralDfa7_1(active0, 0x80010000L, active1, 0L);
-      case 111:
-         return jjMoveStringLiteralDfa7_1(active0, 0x2000100000000000L, active1, 0L);
-      case 114:
-         return jjMoveStringLiteralDfa7_1(active0, 0x2000000L, active1, 0x20L);
-      case 116:
-         if ((active0 & 0x100000L) != 0L)
-         {
-            jjmatchedKind = 20;
-            jjmatchedPos = 6;
-         }
-         else if ((active0 & 0x400000L) != 0L)
-         {
-            jjmatchedKind = 22;
-            jjmatchedPos = 6;
-         }
-         else if ((active0 & 0x1000000L) != 0L)
-         {
-            jjmatchedKind = 24;
-            jjmatchedPos = 6;
-         }
-         return jjMoveStringLiteralDfa7_1(active0, 0x10200000L, active1, 0L);
-      case 121:
-         if ((active1 & 0x40L) != 0L)
-         {
-            jjmatchedKind = 70;
-            jjmatchedPos = 6;
-         }
-         break;
-      default :
-         break;
-   }
-   return jjMoveNfa_1(0, 6);
-}
-private int jjMoveStringLiteralDfa7_1(long old0, long active0, long old1, long active1)
-{
-   if (((active0 &= old0) | (active1 &= old1)) == 0L)
-      return jjMoveNfa_1(0, 6);
-   try { curChar = input_stream.readChar(); }
-   catch(java.io.IOException e) {
-   return jjMoveNfa_1(0, 6);
-   }
-   switch(curChar)
-   {
-      case 100:
-         if ((active0 & 0x800000000L) != 0L)
-         {
-            jjmatchedKind = 35;
-            jjmatchedPos = 7;
-         }
-         break;
-      case 101:
-         return jjMoveStringLiteralDfa8_1(active0, 0x80010000L, active1, 0x800L);
-      case 105:
-         return jjMoveStringLiteralDfa8_1(active0, 0x10200000L, active1, 0L);
-      case 108:
-         if ((active0 & 0x4000000000L) != 0L)
-         {
-      

<TRUNCATED>

[12/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/asterix-opt/src/test/resources/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm
----------------------------------------------------------------------
diff --git a/asterix-opt/src/test/resources/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm b/asterix-opt/src/test/resources/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm
new file mode 100644
index 0000000..2bec6d3
--- /dev/null
+++ b/asterix-opt/src/test/resources/runtimets/results/channels/subscribe_channel_check_subscriptions/subscribe_channel_check_subscriptions.1.adm
@@ -0,0 +1,4 @@
+[ "Live"
+, "Long"
+, "Prosper"
+ ]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data1/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data1/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION b/build/test/data/dfs/data/data1/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
deleted file mode 100644
index 7b1e796..0000000
--- a/build/test/data/dfs/data/data1/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
+++ /dev/null
@@ -1,5 +0,0 @@
-#Fri Sep 09 10:35:37 PDT 2016
-namespaceID=404750972
-cTime=0
-blockpoolID=BP-1853864992-192.168.8.104-1473442535767
-layoutVersion=-47

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data1/current/BP-1853864992-192.168.8.104-1473442535767/dncp_block_verification.log.curr
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data1/current/BP-1853864992-192.168.8.104-1473442535767/dncp_block_verification.log.curr b/build/test/data/dfs/data/data1/current/BP-1853864992-192.168.8.104-1473442535767/dncp_block_verification.log.curr
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data1/current/VERSION
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data1/current/VERSION b/build/test/data/dfs/data/data1/current/VERSION
deleted file mode 100644
index a58b113..0000000
--- a/build/test/data/dfs/data/data1/current/VERSION
+++ /dev/null
@@ -1,6 +0,0 @@
-#Fri Sep 09 10:35:37 PDT 2016
-storageID=DS-142611376-192.168.8.104-52719-1473442537270
-clusterID=testClusterID
-cTime=0
-storageType=DATA_NODE
-layoutVersion=-47

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data1/in_use.lock
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data1/in_use.lock b/build/test/data/dfs/data/data1/in_use.lock
deleted file mode 100644
index e2d3355..0000000
--- a/build/test/data/dfs/data/data1/in_use.lock
+++ /dev/null
@@ -1 +0,0 @@
-44184@Sisyphus.local
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data2/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data2/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION b/build/test/data/dfs/data/data2/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
deleted file mode 100644
index 7b1e796..0000000
--- a/build/test/data/dfs/data/data2/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
+++ /dev/null
@@ -1,5 +0,0 @@
-#Fri Sep 09 10:35:37 PDT 2016
-namespaceID=404750972
-cTime=0
-blockpoolID=BP-1853864992-192.168.8.104-1473442535767
-layoutVersion=-47

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data2/current/VERSION
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data2/current/VERSION b/build/test/data/dfs/data/data2/current/VERSION
deleted file mode 100644
index a58b113..0000000
--- a/build/test/data/dfs/data/data2/current/VERSION
+++ /dev/null
@@ -1,6 +0,0 @@
-#Fri Sep 09 10:35:37 PDT 2016
-storageID=DS-142611376-192.168.8.104-52719-1473442537270
-clusterID=testClusterID
-cTime=0
-storageType=DATA_NODE
-layoutVersion=-47

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data2/in_use.lock
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data2/in_use.lock b/build/test/data/dfs/data/data2/in_use.lock
deleted file mode 100644
index e2d3355..0000000
--- a/build/test/data/dfs/data/data2/in_use.lock
+++ /dev/null
@@ -1 +0,0 @@
-44184@Sisyphus.local
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data3/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data3/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION b/build/test/data/dfs/data/data3/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
deleted file mode 100644
index 7b1e796..0000000
--- a/build/test/data/dfs/data/data3/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
+++ /dev/null
@@ -1,5 +0,0 @@
-#Fri Sep 09 10:35:37 PDT 2016
-namespaceID=404750972
-cTime=0
-blockpoolID=BP-1853864992-192.168.8.104-1473442535767
-layoutVersion=-47

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data3/current/BP-1853864992-192.168.8.104-1473442535767/dncp_block_verification.log.curr
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data3/current/BP-1853864992-192.168.8.104-1473442535767/dncp_block_verification.log.curr b/build/test/data/dfs/data/data3/current/BP-1853864992-192.168.8.104-1473442535767/dncp_block_verification.log.curr
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data3/current/VERSION
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data3/current/VERSION b/build/test/data/dfs/data/data3/current/VERSION
deleted file mode 100644
index 7e828bf..0000000
--- a/build/test/data/dfs/data/data3/current/VERSION
+++ /dev/null
@@ -1,6 +0,0 @@
-#Fri Sep 09 10:35:37 PDT 2016
-storageID=DS-178448150-192.168.8.104-52786-1473442537270
-clusterID=testClusterID
-cTime=0
-storageType=DATA_NODE
-layoutVersion=-47

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data3/in_use.lock
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data3/in_use.lock b/build/test/data/dfs/data/data3/in_use.lock
deleted file mode 100644
index e2d3355..0000000
--- a/build/test/data/dfs/data/data3/in_use.lock
+++ /dev/null
@@ -1 +0,0 @@
-44184@Sisyphus.local
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data4/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data4/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION b/build/test/data/dfs/data/data4/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
deleted file mode 100644
index 7b1e796..0000000
--- a/build/test/data/dfs/data/data4/current/BP-1853864992-192.168.8.104-1473442535767/current/VERSION
+++ /dev/null
@@ -1,5 +0,0 @@
-#Fri Sep 09 10:35:37 PDT 2016
-namespaceID=404750972
-cTime=0
-blockpoolID=BP-1853864992-192.168.8.104-1473442535767
-layoutVersion=-47

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data4/current/VERSION
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data4/current/VERSION b/build/test/data/dfs/data/data4/current/VERSION
deleted file mode 100644
index 7e828bf..0000000
--- a/build/test/data/dfs/data/data4/current/VERSION
+++ /dev/null
@@ -1,6 +0,0 @@
-#Fri Sep 09 10:35:37 PDT 2016
-storageID=DS-178448150-192.168.8.104-52786-1473442537270
-clusterID=testClusterID
-cTime=0
-storageType=DATA_NODE
-layoutVersion=-47

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/data/data4/in_use.lock
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/data/data4/in_use.lock b/build/test/data/dfs/data/data4/in_use.lock
deleted file mode 100644
index e2d3355..0000000
--- a/build/test/data/dfs/data/data4/in_use.lock
+++ /dev/null
@@ -1 +0,0 @@
-44184@Sisyphus.local
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name1/current/VERSION
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name1/current/VERSION b/build/test/data/dfs/name1/current/VERSION
deleted file mode 100644
index 71ca2e0..0000000
--- a/build/test/data/dfs/name1/current/VERSION
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Sep 09 10:35:35 PDT 2016
-namespaceID=404750972
-clusterID=testClusterID
-cTime=0
-storageType=NAME_NODE
-blockpoolID=BP-1853864992-192.168.8.104-1473442535767
-layoutVersion=-47

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name1/current/edits_inprogress_0000000000000000001
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name1/current/edits_inprogress_0000000000000000001 b/build/test/data/dfs/name1/current/edits_inprogress_0000000000000000001
deleted file mode 100644
index f1ff235..0000000
Binary files a/build/test/data/dfs/name1/current/edits_inprogress_0000000000000000001 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name1/current/fsimage_0000000000000000000
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name1/current/fsimage_0000000000000000000 b/build/test/data/dfs/name1/current/fsimage_0000000000000000000
deleted file mode 100644
index c22c27e..0000000
Binary files a/build/test/data/dfs/name1/current/fsimage_0000000000000000000 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name1/current/fsimage_0000000000000000000.md5
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name1/current/fsimage_0000000000000000000.md5 b/build/test/data/dfs/name1/current/fsimage_0000000000000000000.md5
deleted file mode 100644
index 645a3b7..0000000
--- a/build/test/data/dfs/name1/current/fsimage_0000000000000000000.md5
+++ /dev/null
@@ -1 +0,0 @@
-b8bf059807312f9ac971661b83eb3c56 *fsimage_0000000000000000000

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name1/current/seen_txid
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name1/current/seen_txid b/build/test/data/dfs/name1/current/seen_txid
deleted file mode 100644
index d00491f..0000000
--- a/build/test/data/dfs/name1/current/seen_txid
+++ /dev/null
@@ -1 +0,0 @@
-1

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name1/in_use.lock
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name1/in_use.lock b/build/test/data/dfs/name1/in_use.lock
deleted file mode 100644
index e2d3355..0000000
--- a/build/test/data/dfs/name1/in_use.lock
+++ /dev/null
@@ -1 +0,0 @@
-44184@Sisyphus.local
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name2/current/VERSION
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name2/current/VERSION b/build/test/data/dfs/name2/current/VERSION
deleted file mode 100644
index 71ca2e0..0000000
--- a/build/test/data/dfs/name2/current/VERSION
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Sep 09 10:35:35 PDT 2016
-namespaceID=404750972
-clusterID=testClusterID
-cTime=0
-storageType=NAME_NODE
-blockpoolID=BP-1853864992-192.168.8.104-1473442535767
-layoutVersion=-47

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name2/current/edits_inprogress_0000000000000000001
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name2/current/edits_inprogress_0000000000000000001 b/build/test/data/dfs/name2/current/edits_inprogress_0000000000000000001
deleted file mode 100644
index f1ff235..0000000
Binary files a/build/test/data/dfs/name2/current/edits_inprogress_0000000000000000001 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name2/current/fsimage_0000000000000000000
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name2/current/fsimage_0000000000000000000 b/build/test/data/dfs/name2/current/fsimage_0000000000000000000
deleted file mode 100644
index c22c27e..0000000
Binary files a/build/test/data/dfs/name2/current/fsimage_0000000000000000000 and /dev/null differ

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name2/current/fsimage_0000000000000000000.md5
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name2/current/fsimage_0000000000000000000.md5 b/build/test/data/dfs/name2/current/fsimage_0000000000000000000.md5
deleted file mode 100644
index 645a3b7..0000000
--- a/build/test/data/dfs/name2/current/fsimage_0000000000000000000.md5
+++ /dev/null
@@ -1 +0,0 @@
-b8bf059807312f9ac971661b83eb3c56 *fsimage_0000000000000000000

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name2/current/seen_txid
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name2/current/seen_txid b/build/test/data/dfs/name2/current/seen_txid
deleted file mode 100644
index d00491f..0000000
--- a/build/test/data/dfs/name2/current/seen_txid
+++ /dev/null
@@ -1 +0,0 @@
-1

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/build/test/data/dfs/name2/in_use.lock
----------------------------------------------------------------------
diff --git a/build/test/data/dfs/name2/in_use.lock b/build/test/data/dfs/name2/in_use.lock
deleted file mode 100644
index e2d3355..0000000
--- a/build/test/data/dfs/name2/in_use.lock
+++ /dev/null
@@ -1 +0,0 @@
-44184@Sisyphus.local
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 72dcd33..0000000
--- a/pom.xml
+++ /dev/null
@@ -1,206 +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.
- !-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.asterix</groupId>
-    <artifactId>apache-asterixdb</artifactId>
-    <version>0.8.9-SNAPSHOT</version>
-  </parent>
-  <artifactId>asterix-opt</artifactId>
-    <properties>
-    <asterix.version>0.8.9-SNAPSHOT</asterix.version>
-  </properties>
-    <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.asterix</groupId>
-        <artifactId>asterix-grammar-extension-maven-plugin</artifactId>
-        <version>${asterix.version}</version>
-        <configuration>
-          <base>${project.basedir}</base>
-          <gbase>../asterix-lang-aql/src/main/javacc/AQL.jj</gbase>
-          <gextension>src/main/resources/lang-extension/lang.txt</gextension>
-          <output>target/generated-resources/javacc/grammar.jj</output>
-          <parserClassName>BADAQLParser</parserClassName>
-          <packageName>org.apache.asterix.bad.lang</packageName>
-        </configuration>
-        <executions>
-          <execution>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>grammarix</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>javacc-maven-plugin</artifactId>
-        <version>2.6</version>
-        <executions>
-          <execution>
-            <id>javacc</id>
-            <goals>
-              <goal>javacc</goal>
-            </goals>
-            <configuration>
-              <isStatic>false</isStatic>
-              <javaUnicodeEscape>true</javaUnicodeEscape>
-              <sourceDirectory>target/generated-resources/javacc</sourceDirectory>
-            </configuration>
-          </execution>
-          <execution>
-            <id>javacc-jjdoc</id>
-            <goals>
-              <goal>jjdoc</goal>
-            </goals>
-            <phase>process-sources</phase>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>build-helper-maven-plugin</artifactId>
-        <version>1.9</version>
-        <executions>
-          <execution>
-            <id>add-source</id>
-            <phase>generate-sources</phase>
-            <goals>
-              <goal>add-source</goal>
-            </goals>
-            <configuration>
-              <sources>
-                <source>${project.build.directory}/generated-sources/javacc/</source>
-              </sources>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-    <pluginManagement>
-      <plugins>
-            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
-        <plugin>
-          <groupId>org.eclipse.m2e</groupId>
-          <artifactId>lifecycle-mapping</artifactId>
-          <version>1.0.0</version>
-          <configuration>
-            <lifecycleMappingMetadata>
-              <pluginExecutions>
-                <pluginExecution>
-                  <pluginExecutionFilter>
-                    <groupId>org.apache.asterix</groupId>
-                    <artifactId>asterix-grammar-extension-maven-plugin</artifactId>
-                    <versionRange>[${asterix.version},)</versionRange>
-                    <goals>
-                      <goal>grammarix</goal>
-                    </goals>
-                  </pluginExecutionFilter>
-                  <action>
-                    <ignore></ignore>
-                  </action>
-                </pluginExecution>
-                <pluginExecution>
-                  <pluginExecutionFilter>
-                    <groupId>org.codehaus.mojo</groupId>
-                    <artifactId>javacc-maven-plugin</artifactId>
-                    <versionRange>[2.6,)</versionRange>
-                    <goals>
-                      <goal>javacc</goal>
-                    </goals>
-                  </pluginExecutionFilter>
-                  <action>
-                    <ignore></ignore>
-                  </action>
-                </pluginExecution>
-              </pluginExecutions>
-            </lifecycleMappingMetadata>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-om</artifactId>
-      <version>${project.version}</version>
-      <type>jar</type>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hyracks</groupId>
-      <artifactId>hyracks-test-support</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-runtime</artifactId>
-      <version>${project.version}</version>
-      <type>jar</type>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hyracks</groupId>
-      <artifactId>algebricks-compiler</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.hyracks</groupId>
-      <artifactId>hyracks-hdfs-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-common</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-test-framework</artifactId>
-      <version>${asterix.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-active</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-app</artifactId>
-      <version>${asterix.version}</version>
-      <type>jar</type>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-app</artifactId>
-      <version>${asterix.version}</version>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.asterix</groupId>
-      <artifactId>asterix-common</artifactId>
-      <version>${asterix.version}</version>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/BADConstants.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/BADConstants.java b/src/main/java/org/apache/asterix/bad/BADConstants.java
deleted file mode 100644
index aeef031..0000000
--- a/src/main/java/org/apache/asterix/bad/BADConstants.java
+++ /dev/null
@@ -1,41 +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.asterix.bad;
-
-public interface BADConstants {
-    final String SubscriptionId = "subscriptionId";
-    final String BrokerName = "BrokerName";
-    final String BrokerDataverse = "DataverseName";
-    final String BrokerEndPoint = "BrokerEndPoint";
-    final String DeliveryTime = "deliveryTime";
-    final String ResultId = "resultId";
-    final String ChannelExecutionTime = "channelExecutionTime";
-    final String ChannelSubscriptionsType = "ChannelSubscriptionsType";
-    final String ChannelResultsType = "ChannelResultsType";
-    final String FEED_EXTENSION_NAME = "Feed";
-    final String CHANNEL_EXTENSION_NAME = "Subscriptions";
-    final String subscriptionEnding = "Results";
-    final String resultsEnding = "Channel";
-    final String BAD_METADATA_EXTENSION_NAME = "BADMetadataExtension";
-    final String BAD_DATAVERSE_NAME = "BAD";
-
-    public enum ChannelJobType {
-        REPETITIVE
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java b/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java
deleted file mode 100644
index da0c43b..0000000
--- a/src/main/java/org/apache/asterix/bad/ChannelJobInfo.java
+++ /dev/null
@@ -1,48 +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.asterix.bad;
-
-import java.util.List;
-
-import org.apache.asterix.active.ActiveJob;
-import org.apache.asterix.active.ActivityState;
-import org.apache.asterix.active.EntityId;
-import org.apache.asterix.bad.BADConstants.ChannelJobType;
-import org.apache.hyracks.api.job.JobId;
-import org.apache.hyracks.api.job.JobSpecification;
-
-public class ChannelJobInfo extends ActiveJob {
-
-    private static final long serialVersionUID = 1L;
-    private List<String> locations;
-
-    public ChannelJobInfo(EntityId entityId, JobId jobId, ActivityState state, JobSpecification spec) {
-        super(entityId, jobId, state, ChannelJobType.REPETITIVE, spec);
-    }
-
-    public List<String> getLocations() {
-        return locations;
-
-    }
-
-    public void setLocations(List<String> locations) {
-        this.locations = locations;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/ChannelJobService.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/ChannelJobService.java b/src/main/java/org/apache/asterix/bad/ChannelJobService.java
deleted file mode 100644
index 8310f70..0000000
--- a/src/main/java/org/apache/asterix/bad/ChannelJobService.java
+++ /dev/null
@@ -1,145 +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.asterix.bad;
-
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.asterix.active.EntityId;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.om.base.AOrderedList;
-import org.apache.asterix.om.base.AUUID;
-import org.apache.hyracks.api.client.HyracksConnection;
-import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.job.JobId;
-import org.apache.hyracks.api.job.JobSpecification;
-import org.json.JSONException;
-
-/**
- * Provides functionality for running channel jobs and communicating with Brokers
- */
-public class ChannelJobService {
-
-    private static final Logger LOGGER = Logger.getLogger(ChannelJobService.class.getName());
-    IHyracksClientConnection hcc;
-
-    public ChannelJobService() throws AsterixException {
-
-    }
-
-    public void runChannelJob(JobSpecification channeljobSpec, String strIP, int port) throws Exception {
-        hcc = new HyracksConnection(strIP, port);
-        JobId jobId = hcc.startJob(channeljobSpec);
-        hcc.waitForCompletion(jobId);
-    }
-
-    public void sendBrokerNotificationsForChannel(EntityId activeJobId, String brokerEndpoint,
-            AOrderedList subscriptionIds, String channelExecutionTime) throws HyracksDataException {
-        String formattedString;
-        try {
-            formattedString = formatJSON(activeJobId, subscriptionIds, channelExecutionTime);
-        } catch (JSONException e) {
-            throw new HyracksDataException(e);
-        }
-        sendMessage(brokerEndpoint, formattedString);
-    }
-
-    public String formatJSON(EntityId activeJobId, AOrderedList subscriptionIds, String channelExecutionTime)
-            throws JSONException {
-        String JSON = "{ \"dataverseName\":\"" + activeJobId.getDataverse() + "\", \"channelName\":\""
-                + activeJobId.getEntityName() + "\", \"" + BADConstants.ChannelExecutionTime + "\":\""
-                + channelExecutionTime + "\", \"subscriptionIds\":[";
-        for (int i = 0; i < subscriptionIds.size(); i++) {
-            AUUID subId = (AUUID) subscriptionIds.getItem(i);
-            String subString = subId.toSimpleString();
-            JSON += "\"" + subString + "\"";
-            if (i < subscriptionIds.size() - 1) {
-                JSON += ",";
-            }
-        }
-        JSON += "]}";
-        return JSON;
-
-    }
-
-    public static void sendMessage(String targetURL, String urlParameters) {
-        HttpURLConnection connection = null;
-        try {
-            //Create connection
-            URL url = new URL(targetURL);
-            connection = (HttpURLConnection) url.openConnection();
-            connection.setRequestMethod("POST");
-            connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
-
-            connection.setRequestProperty("Content-Length", Integer.toString(urlParameters.getBytes().length));
-            connection.setRequestProperty("Content-Language", "en-US");
-
-            connection.setUseCaches(false);
-            connection.setDoOutput(true);
-
-            //Send message
-            try {
-                DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
-                wr.writeBytes(urlParameters);
-                wr.close();
-            } catch (Exception e) {
-                throw new AsterixException("Broker connection failed to write", e);
-            }
-
-            if (LOGGER.isLoggable(Level.INFO)) {
-                int responseCode = connection.getResponseCode();
-                LOGGER.info("\nSending 'POST' request to URL : " + url);
-                LOGGER.info("Post parameters : " + urlParameters);
-                LOGGER.info("Response Code : " + responseCode);
-            }
-
-            BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
-            String inputLine;
-            StringBuffer response = new StringBuffer();
-
-            while ((inputLine = in.readLine()) != null) {
-                response.append(inputLine);
-            }
-            in.close();
-
-            if (LOGGER.isLoggable(Level.INFO)) {
-                System.out.println(response.toString());
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        } finally {
-            if (connection != null) {
-                connection.disconnect();
-            }
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "ChannelJobService";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java b/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java
deleted file mode 100644
index 42036af..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/BADCompilationProvider.java
+++ /dev/null
@@ -1,52 +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.asterix.bad.lang;
-
-import org.apache.asterix.algebra.base.ILangExpressionToPlanTranslatorFactory;
-import org.apache.asterix.compiler.provider.ILangCompilationProvider;
-import org.apache.asterix.lang.aql.rewrites.AQLRewriterFactory;
-import org.apache.asterix.lang.aql.visitor.AQLAstPrintVisitorFactory;
-import org.apache.asterix.lang.common.base.IAstPrintVisitorFactory;
-import org.apache.asterix.lang.common.base.IParserFactory;
-import org.apache.asterix.lang.common.base.IRewriterFactory;
-import org.apache.asterix.translator.AqlExpressionToPlanTranslatorFactory;
-
-public class BADCompilationProvider implements ILangCompilationProvider {
-
-    @Override
-    public IParserFactory getParserFactory() {
-        return new BADParserFactory();
-    }
-
-    @Override
-    public IRewriterFactory getRewriterFactory() {
-        return new AQLRewriterFactory();
-    }
-
-    @Override
-    public IAstPrintVisitorFactory getAstPrintVisitorFactory() {
-        return new AQLAstPrintVisitorFactory();
-    }
-
-    @Override
-    public ILangExpressionToPlanTranslatorFactory getExpressionToPlanTranslatorFactory() {
-        return new AqlExpressionToPlanTranslatorFactory();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java b/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java
deleted file mode 100644
index 9832fe6..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/BADLangExtension.java
+++ /dev/null
@@ -1,106 +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.asterix.bad.lang;
-
-import java.util.List;
-
-import org.apache.asterix.algebra.base.ILangExtension;
-import org.apache.asterix.bad.metadata.Broker;
-import org.apache.asterix.bad.metadata.BrokerSearchKey;
-import org.apache.asterix.bad.metadata.Channel;
-import org.apache.asterix.bad.metadata.ChannelSearchKey;
-import org.apache.asterix.common.api.ExtensionId;
-import org.apache.asterix.compiler.provider.ILangCompilationProvider;
-import org.apache.asterix.compiler.provider.SqlppCompilationProvider;
-import org.apache.asterix.metadata.MetadataManager;
-import org.apache.asterix.metadata.MetadataTransactionContext;
-import org.apache.commons.lang3.mutable.Mutable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
-import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.UnnestOperator;
-
-public class BADLangExtension implements ILangExtension {
-
-    public static final ExtensionId EXTENSION_ID = new ExtensionId(BADLangExtension.class.getSimpleName(), 0);
-
-    @Override
-    public ExtensionId getId() {
-        return EXTENSION_ID;
-    }
-
-    @Override
-    public void configure(List<Pair<String, String>> args) {
-    }
-
-    @Override
-    public ILangCompilationProvider getLangCompilationProvider(Language lang) {
-        switch (lang) {
-            case AQL:
-                return new BADCompilationProvider();
-            case SQLPP:
-                return new SqlppCompilationProvider();
-            default:
-                return null;
-        }
-    }
-
-    @Override
-    public ExtensionKind getExtensionKind() {
-        return ExtensionKind.LANG;
-    }
-
-    @Override
-    public boolean unnestToDataScan(Mutable<ILogicalOperator> opRef, IOptimizationContext context,
-            UnnestOperator unnestOp, ILogicalExpression unnestExpr, AbstractFunctionCallExpression functionCallExpr)
-                    throws AlgebricksException {
-        // TODO I dont need this?????
-        return false;
-    }
-
-    public static Broker getBroker(MetadataTransactionContext mdTxnCtx, String dataverseName, String brokerName)
-            throws AlgebricksException {
-        BrokerSearchKey brokerSearchKey = new BrokerSearchKey(dataverseName, brokerName);
-        List<Broker> brokers = MetadataManager.INSTANCE.getEntities(mdTxnCtx, brokerSearchKey);
-        if (brokers.isEmpty()) {
-            return null;
-        } else if (brokers.size() > 1) {
-            throw new AlgebricksException("Broker search key returned more than one broker");
-        } else {
-            return brokers.get(0);
-        }
-    }
-
-    public static Channel getChannel(MetadataTransactionContext mdTxnCtx, String dataverseName, String channelName)
-            throws AlgebricksException {
-        ChannelSearchKey channelSearchKey = new ChannelSearchKey(dataverseName, channelName);
-        List<Channel> channels = MetadataManager.INSTANCE.getEntities(mdTxnCtx, channelSearchKey);
-        if (channels.isEmpty()) {
-            return null;
-        } else if (channels.size() > 1) {
-            throw new AlgebricksException("Channel search key returned more than one channel");
-        } else {
-            return channels.get(0);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java b/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java
deleted file mode 100644
index 58bca17..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/BADParserFactory.java
+++ /dev/null
@@ -1,38 +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.asterix.bad.lang;
-
-import java.io.Reader;
-
-import org.apache.asterix.lang.common.base.IParser;
-import org.apache.asterix.lang.common.base.IParserFactory;
-
-public class BADParserFactory implements IParserFactory {
-
-    @Override
-    public IParser createParser(String query) {
-        return new BADAQLParser(query);
-    }
-
-    @Override
-    public IParser createParser(Reader reader) {
-        return new BADAQLParser(reader);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java b/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java
deleted file mode 100644
index 4198230..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorExtension.java
+++ /dev/null
@@ -1,53 +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.asterix.bad.lang;
-
-import java.util.List;
-
-import org.apache.asterix.app.cc.CompilerExtensionManager;
-import org.apache.asterix.app.cc.IStatementExecutorExtension;
-import org.apache.asterix.common.api.ExtensionId;
-import org.apache.asterix.runtime.util.AsterixAppContextInfo;
-import org.apache.asterix.translator.IStatementExecutorFactory;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-
-public class BADQueryTranslatorExtension implements IStatementExecutorExtension {
-
-    public static final ExtensionId BAD_QUERY_TRANSLATOR_EXTENSION_ID = new ExtensionId(
-            BADQueryTranslatorExtension.class.getSimpleName(), 0);
-
-    private static class LazyHolder {
-        private static final IStatementExecutorFactory INSTANCE = new BADQueryTranslatorFactory(
-                (CompilerExtensionManager) AsterixAppContextInfo.INSTANCE.getExtensionManager());
-    }
-
-    @Override
-    public ExtensionId getId() {
-        return BAD_QUERY_TRANSLATOR_EXTENSION_ID;
-    }
-
-    @Override
-    public void configure(List<Pair<String, String>> args) {
-    }
-
-    @Override
-    public IStatementExecutorFactory getQueryTranslatorFactory() {
-        return LazyHolder.INSTANCE;
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java b/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
deleted file mode 100644
index b8a6050..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/BADQueryTranslatorFactory.java
+++ /dev/null
@@ -1,41 +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.asterix.bad.lang;
-
-import java.util.List;
-
-import org.apache.asterix.app.cc.CompilerExtensionManager;
-import org.apache.asterix.app.translator.DefaultStatementExecutorFactory;
-import org.apache.asterix.app.translator.QueryTranslator;
-import org.apache.asterix.common.app.SessionConfig;
-import org.apache.asterix.compiler.provider.ILangCompilationProvider;
-import org.apache.asterix.lang.common.base.Statement;
-
-public class BADQueryTranslatorFactory extends DefaultStatementExecutorFactory {
-
-    public BADQueryTranslatorFactory(CompilerExtensionManager ccExtensionManager) {
-        super(ccExtensionManager);
-    }
-
-    @Override
-    public QueryTranslator create(List<Statement> statements, SessionConfig conf,
-            ILangCompilationProvider compilationProvider) {
-        return new BADStatementExecutor(statements, conf, compilationProvider, cExtensionManager);
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java b/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
deleted file mode 100644
index 1c17794..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/BADStatementExecutor.java
+++ /dev/null
@@ -1,46 +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.asterix.bad.lang;
-
-import java.util.List;
-
-import org.apache.asterix.app.cc.CompilerExtensionManager;
-import org.apache.asterix.app.translator.QueryTranslator;
-import org.apache.asterix.common.app.SessionConfig;
-import org.apache.asterix.compiler.provider.ILangCompilationProvider;
-import org.apache.asterix.lang.common.base.Statement;
-import org.apache.asterix.metadata.declared.AqlMetadataProvider;
-import org.apache.hyracks.api.client.IHyracksClientConnection;
-
-public class BADStatementExecutor extends QueryTranslator {
-
-    public BADStatementExecutor(List<Statement> aqlStatements, SessionConfig conf,
-            ILangCompilationProvider compliationProvider, CompilerExtensionManager ccExtensionManager) {
-        super(aqlStatements, conf, compliationProvider, ccExtensionManager);
-    }
-
-    @Override
-    protected void handleDataverseDropStatement(AqlMetadataProvider metadataProvider, Statement stmt,
-            IHyracksClientConnection hcc) throws Exception {
-        //super(metadataProvider, stmt, hcc);
-        //TODO: need to drop channels and brokers
-        //TODO: need to check if datasets or functions are in use by channels
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java b/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java
deleted file mode 100644
index d89617b..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/statement/BrokerDropStatement.java
+++ /dev/null
@@ -1,99 +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.asterix.bad.lang.statement;
-
-import org.apache.asterix.algebra.extension.IExtensionStatement;
-import org.apache.asterix.app.translator.QueryTranslator;
-import org.apache.asterix.bad.lang.BADLangExtension;
-import org.apache.asterix.bad.metadata.Broker;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.lang.common.struct.Identifier;
-import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
-import org.apache.asterix.metadata.MetadataManager;
-import org.apache.asterix.metadata.MetadataTransactionContext;
-import org.apache.asterix.metadata.declared.AqlMetadataProvider;
-import org.apache.asterix.translator.IStatementExecutor;
-import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
-import org.apache.asterix.translator.IStatementExecutor.Stats;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.apache.hyracks.api.dataset.IHyracksDataset;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-
-public class BrokerDropStatement implements IExtensionStatement {
-
-    private final Identifier dataverseName;
-    private final Identifier brokerName;
-    private boolean ifExists;
-
-    public BrokerDropStatement(Identifier dataverseName, Identifier brokerName, boolean ifExists) {
-        this.brokerName = brokerName;
-        this.dataverseName = dataverseName;
-        this.ifExists = ifExists;
-    }
-
-    public boolean getIfExists() {
-        return ifExists;
-    }
-
-    public Identifier getDataverseName() {
-        return dataverseName;
-    }
-
-    public Identifier getBrokerName() {
-        return brokerName;
-    }
-
-    @Override
-    public byte getKind() {
-        return Kind.EXTENSION;
-    }
-
-    @Override
-    public byte getCategory() {
-        return Category.DDL;
-    }
-
-    @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
-        return null;
-    }
-
-    @Override
-    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
-            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
-                    throws HyracksDataException, AlgebricksException {
-        //TODO: dont drop a broker that's being used
-        MetadataTransactionContext mdTxnCtx = null;
-        try {
-            mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
-            metadataProvider.setMetadataTxnContext(mdTxnCtx);
-            Broker broker = BADLangExtension.getBroker(mdTxnCtx, dataverseName.getValue(), brokerName.getValue());
-            if (broker == null) {
-                throw new AlgebricksException("A broker with this name " + brokerName + " doesn't exist.");
-            }
-            MetadataManager.INSTANCE.deleteEntity(mdTxnCtx, broker);
-            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
-        } catch (Exception e) {
-            QueryTranslator.abort(e, e, mdTxnCtx);
-            throw new HyracksDataException(e);
-        }
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java b/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
deleted file mode 100644
index 60fcf1f..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/statement/ChannelDropStatement.java
+++ /dev/null
@@ -1,166 +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.asterix.bad.lang.statement;
-
-import org.apache.asterix.active.ActiveJobNotificationHandler;
-import org.apache.asterix.active.ActiveRuntimeId;
-import org.apache.asterix.active.EntityId;
-import org.apache.asterix.active.message.ActiveManagerMessage;
-import org.apache.asterix.algebra.extension.IExtensionStatement;
-import org.apache.asterix.app.translator.QueryTranslator;
-import org.apache.asterix.bad.BADConstants;
-import org.apache.asterix.bad.lang.BADLangExtension;
-import org.apache.asterix.bad.metadata.Channel;
-import org.apache.asterix.bad.metadata.ChannelEventsListener;
-import org.apache.asterix.bad.runtime.RepetitiveChannelOperatorNodePushable;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.common.messaging.api.ICCMessageBroker;
-import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber;
-import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber.ActiveLifecycleEvent;
-import org.apache.asterix.external.feed.management.ActiveLifecycleEventSubscriber;
-import org.apache.asterix.lang.common.statement.DropDatasetStatement;
-import org.apache.asterix.lang.common.struct.Identifier;
-import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
-import org.apache.asterix.metadata.MetadataManager;
-import org.apache.asterix.metadata.MetadataTransactionContext;
-import org.apache.asterix.metadata.declared.AqlMetadataProvider;
-import org.apache.asterix.runtime.util.AsterixAppContextInfo;
-import org.apache.asterix.translator.IStatementExecutor;
-import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
-import org.apache.asterix.translator.IStatementExecutor.Stats;
-import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.apache.hyracks.api.dataset.IHyracksDataset;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-
-public class ChannelDropStatement implements IExtensionStatement {
-
-    private final Identifier dataverseName;
-    private final Identifier channelName;
-    private boolean ifExists;
-
-    public ChannelDropStatement(Identifier dataverseName, Identifier channelName, boolean ifExists) {
-        this.dataverseName = dataverseName;
-        this.channelName = channelName;
-        this.ifExists = ifExists;
-    }
-
-    public Identifier getDataverseName() {
-        return dataverseName;
-    }
-
-    public Identifier getChannelName() {
-        return channelName;
-    }
-
-    public boolean getIfExists() {
-        return ifExists;
-    }
-
-    @Override
-    public byte getKind() {
-        return Kind.EXTENSION;
-    }
-
-    @Override
-    public byte getCategory() {
-        return Category.DDL;
-    }
-
-    @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
-        return null;
-    }
-
-    @Override
-    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
-            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
-                    throws HyracksDataException, AlgebricksException {
-        boolean txnActive = false;
-        EntityId entityId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, dataverseName.getValue(),
-                channelName.getValue());
-        ChannelEventsListener listener = (ChannelEventsListener) ActiveJobNotificationHandler.INSTANCE
-                .getActiveEntityListener(entityId);
-        IActiveLifecycleEventSubscriber eventSubscriber = new ActiveLifecycleEventSubscriber();
-        boolean subscriberRegistered = false;
-        Channel channel = null;
-
-        MetadataTransactionContext mdTxnCtx = null;
-        try {
-            mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
-            txnActive = true;
-            channel = BADLangExtension.getChannel(mdTxnCtx, dataverseName.getValue(), channelName.getValue());
-            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
-            txnActive = false;
-            if (channel == null) {
-                if (ifExists) {
-                    MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
-                    return;
-                } else {
-                    throw new AlgebricksException("There is no channel with this name " + channelName + ".");
-                }
-            }
-            if (listener != null) {
-                subscriberRegistered = listener.isChannelActive(entityId, eventSubscriber);
-            }
-            if (!subscriberRegistered) {
-                throw new AsterixException("Channel " + channelName + " is not running");
-            }
-
-            ICCMessageBroker messageBroker = (ICCMessageBroker) AsterixAppContextInfo.INSTANCE.getCCApplicationContext()
-                    .getMessageBroker();
-            AlgebricksAbsolutePartitionConstraint locations = channel.getPartitionConstraint();
-            int partition = 0;
-            for (String location : locations.getLocations()) {
-                messageBroker.sendApplicationMessageToNC(
-                        new ActiveManagerMessage(ActiveManagerMessage.STOP_ACTIVITY, "cc",
-                                new ActiveRuntimeId(channel.getChannelId(),
-                                        RepetitiveChannelOperatorNodePushable.class.getSimpleName(), partition++)),
-                        location);
-            }
-            eventSubscriber.assertEvent(ActiveLifecycleEvent.ACTIVE_JOB_ENDED);
-
-            //Drop the Channel Datasets
-            //TODO: Need to find some way to handle if this fails.
-            //TODO: Prevent datasets for Channels from being dropped elsewhere
-            DropDatasetStatement dropStmt = new DropDatasetStatement(dataverseName,
-                    new Identifier(channel.getResultsDatasetName()), true);
-            ((QueryTranslator) statementExecutor).handleDatasetDropStatement(metadataProvider, dropStmt, hcc);
-
-            dropStmt = new DropDatasetStatement(dataverseName, new Identifier(channel.getSubscriptionsDataset()), true);
-            ((QueryTranslator) statementExecutor).handleDatasetDropStatement(metadataProvider, dropStmt, hcc);
-
-            if (subscriberRegistered) {
-                listener.deregisterEventSubscriber(eventSubscriber);
-            }
-
-            //Remove the Channel Metadata
-            MetadataManager.INSTANCE.deleteEntity(mdTxnCtx, channel);
-            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
-        } catch (Exception e) {
-            e.printStackTrace();
-            if (txnActive) {
-                QueryTranslator.abort(e, e, mdTxnCtx);
-            }
-            throw new HyracksDataException(e);
-        }
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java b/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java
deleted file mode 100644
index bfa6bf1..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/statement/ChannelSubscribeStatement.java
+++ /dev/null
@@ -1,202 +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.asterix.bad.lang.statement;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.asterix.algebra.extension.IExtensionStatement;
-import org.apache.asterix.app.translator.QueryTranslator;
-import org.apache.asterix.bad.BADConstants;
-import org.apache.asterix.bad.lang.BADLangExtension;
-import org.apache.asterix.bad.metadata.Broker;
-import org.apache.asterix.bad.metadata.Channel;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.common.functions.FunctionSignature;
-import org.apache.asterix.lang.common.base.Expression;
-import org.apache.asterix.lang.common.expression.CallExpr;
-import org.apache.asterix.lang.common.expression.FieldBinding;
-import org.apache.asterix.lang.common.expression.LiteralExpr;
-import org.apache.asterix.lang.common.expression.RecordConstructor;
-import org.apache.asterix.lang.common.literal.StringLiteral;
-import org.apache.asterix.lang.common.statement.InsertStatement;
-import org.apache.asterix.lang.common.statement.Query;
-import org.apache.asterix.lang.common.statement.UpsertStatement;
-import org.apache.asterix.lang.common.struct.Identifier;
-import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
-import org.apache.asterix.metadata.MetadataManager;
-import org.apache.asterix.metadata.MetadataTransactionContext;
-import org.apache.asterix.metadata.declared.AqlMetadataProvider;
-import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
-import org.apache.asterix.translator.IStatementExecutor;
-import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
-import org.apache.asterix.translator.IStatementExecutor.Stats;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
-import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.apache.hyracks.api.dataset.IHyracksDataset;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-
-public class ChannelSubscribeStatement implements IExtensionStatement {
-
-    private final Identifier dataverseName;
-    private final Identifier channelName;
-    private final Identifier brokerDataverseName;
-    private final Identifier brokerName;
-    private final List<Expression> argList;
-    private final String subscriptionId;
-    private final int varCounter;
-
-    public ChannelSubscribeStatement(Identifier dataverseName, Identifier channelName, List<Expression> argList,
-            int varCounter, Identifier brokerDataverseName, Identifier brokerName, String subscriptionId) {
-        this.channelName = channelName;
-        this.dataverseName = dataverseName;
-        this.brokerDataverseName = brokerDataverseName;
-        this.brokerName = brokerName;
-        this.argList = argList;
-        this.subscriptionId = subscriptionId;
-        this.varCounter = varCounter;
-    }
-
-    public Identifier getDataverseName() {
-        return dataverseName;
-    }
-
-    public Identifier getBrokerDataverseName() {
-        return brokerDataverseName;
-    }
-
-    public Identifier getChannelName() {
-        return channelName;
-    }
-
-    public Identifier getBrokerName() {
-        return brokerName;
-    }
-
-    public List<Expression> getArgList() {
-        return argList;
-    }
-
-    public int getVarCounter() {
-        return varCounter;
-    }
-
-    public String getSubscriptionId() {
-        return subscriptionId;
-    }
-
-    @Override
-    public byte getKind() {
-        return Kind.EXTENSION;
-    }
-
-    @Override
-    public byte getCategory() {
-        return Category.QUERY;
-    }
-
-    @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
-        return null;
-    }
-
-    @Override
-    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
-            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
-                    throws HyracksDataException, AlgebricksException {
-
-        MetadataTransactionContext mdTxnCtx = null;
-        try {
-            mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
-
-            Channel channel = BADLangExtension.getChannel(mdTxnCtx, dataverseName.getValue(), channelName.getValue());
-            if (channel == null) {
-                throw new AsterixException("There is no channel with this name " + channelName + ".");
-            }
-            Broker broker = BADLangExtension.getBroker(mdTxnCtx, brokerDataverseName.getValue(), brokerName.getValue());
-            if (broker == null) {
-                throw new AsterixException("There is no broker with this name " + brokerName + ".");
-            }
-
-            String subscriptionsDatasetName = channel.getSubscriptionsDataset();
-            List<String> returnField = new ArrayList<String>();
-            returnField.add(BADConstants.SubscriptionId);
-
-            if (argList.size() != channel.getFunction().getArity()) {
-                throw new AsterixException("Channel expected " + channel.getFunction().getArity()
-                        + " parameters but got " + argList.size());
-            }
-
-            Query subscriptionTuple = new Query(false);
-
-            List<FieldBinding> fb = new ArrayList<FieldBinding>();
-            LiteralExpr leftExpr = new LiteralExpr(new StringLiteral(BADConstants.BrokerDataverse));
-            Expression rightExpr = new LiteralExpr(new StringLiteral(broker.getDataverseName()));
-            fb.add(new FieldBinding(leftExpr, rightExpr));
-
-            leftExpr = new LiteralExpr(new StringLiteral(BADConstants.BrokerName));
-            rightExpr = new LiteralExpr(new StringLiteral(broker.getBrokerName()));
-            fb.add(new FieldBinding(leftExpr, rightExpr));
-
-            if (subscriptionId != null) {
-                leftExpr = new LiteralExpr(new StringLiteral(BADConstants.SubscriptionId));
-
-                List<Expression> UUIDList = new ArrayList<Expression>();
-                UUIDList.add(new LiteralExpr(new StringLiteral(subscriptionId)));
-                FunctionIdentifier function = AsterixBuiltinFunctions.UUID_CONSTRUCTOR;
-                FunctionSignature UUIDfunc = new FunctionSignature(function.getNamespace(), function.getName(),
-                        function.getArity());
-                CallExpr UUIDCall = new CallExpr(UUIDfunc, UUIDList);
-
-                rightExpr = UUIDCall;
-                fb.add(new FieldBinding(leftExpr, rightExpr));
-            }
-
-            for (int i = 0; i < argList.size(); i++) {
-                leftExpr = new LiteralExpr(new StringLiteral("param" + i));
-                rightExpr = argList.get(i);
-                fb.add(new FieldBinding(leftExpr, rightExpr));
-            }
-            RecordConstructor recordCon = new RecordConstructor(fb);
-            subscriptionTuple.setBody(recordCon);
-
-            subscriptionTuple.setVarCounter(varCounter);
-
-            if (subscriptionId == null) {
-                InsertStatement insert = new InsertStatement(dataverseName, new Identifier(subscriptionsDatasetName),
-                        subscriptionTuple, varCounter, false, returnField);
-                ((QueryTranslator) statementExecutor).handleInsertUpsertStatement(metadataProvider, insert, hcc, hdc,
-                        resultDelivery, stats, false);
-            } else {
-                UpsertStatement upsert = new UpsertStatement(dataverseName, new Identifier(subscriptionsDatasetName),
-                        subscriptionTuple, varCounter);
-                ((QueryTranslator) statementExecutor).handleInsertUpsertStatement(metadataProvider, upsert, hcc, hdc,
-                        resultDelivery, stats, false);
-            }
-
-            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
-        } catch (Exception e) {
-            QueryTranslator.abort(e, e, mdTxnCtx);
-            throw new HyracksDataException(e);
-        }
-
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java b/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java
deleted file mode 100644
index 17e3ad2..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/statement/ChannelUnsubscribeStatement.java
+++ /dev/null
@@ -1,154 +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.asterix.bad.lang.statement;
-
-import java.util.List;
-
-import org.apache.asterix.algebra.extension.IExtensionStatement;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.lang.common.expression.VariableExpr;
-import org.apache.asterix.lang.common.struct.Identifier;
-import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
-import org.apache.asterix.metadata.declared.AqlMetadataProvider;
-import org.apache.asterix.translator.IStatementExecutor;
-import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
-import org.apache.asterix.translator.IStatementExecutor.Stats;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.apache.hyracks.api.dataset.IHyracksDataset;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-
-public class ChannelUnsubscribeStatement implements IExtensionStatement {
-
-    private final Identifier dataverseName;
-    private final Identifier channelName;
-    private final String subscriptionId;
-    private final int varCounter;
-    private VariableExpr vars;
-    private List<String> dataverses;
-    private List<String> datasets;
-
-    public ChannelUnsubscribeStatement(VariableExpr vars, Identifier dataverseName, Identifier channelName,
-            String subscriptionId, int varCounter, List<String> dataverses, List<String> datasets) {
-        this.vars = vars;
-        this.channelName = channelName;
-        this.dataverseName = dataverseName;
-        this.subscriptionId = subscriptionId;
-        this.varCounter = varCounter;
-        this.dataverses = dataverses;
-        this.datasets = datasets;
-    }
-
-    public Identifier getDataverseName() {
-        return dataverseName;
-    }
-
-    public VariableExpr getVariableExpr() {
-        return vars;
-    }
-
-    public Identifier getChannelName() {
-        return channelName;
-    }
-
-    public String getsubScriptionId() {
-        return subscriptionId;
-    }
-
-    public List<String> getDataverses() {
-        return dataverses;
-    }
-
-    public List<String> getDatasets() {
-        return datasets;
-    }
-
-    public int getVarCounter() {
-        return varCounter;
-    }
-
-    @Override
-    public byte getKind() {
-        return Kind.EXTENSION;
-    }
-
-    @Override
-    public byte getCategory() {
-        return Category.UPDATE;
-    }
-
-    @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
-        return null;
-    }
-
-    @Override
-    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
-            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
-                    throws HyracksDataException, AlgebricksException {
-        /*  ChannelUnsubscribeStatement stmtChannelSub = (ChannelUnsubscribeStatement) stmt;
-        String dataverseName = getActiveDataverse(stmtChannelSub.getDataverseName());
-        Identifier channelName = stmtChannelSub.getChannelName();
-        MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
-        metadataProvider.setMetadataTxnContext(mdTxnCtx);
-        MetadataLockManager.INSTANCE.readChannelBegin(dataverseName, dataverseName + "." + channelName);
-        try {
-            Channel channel = MetadataManager.INSTANCE.getChannel(mdTxnCtx, dataverseName, channelName.getValue());
-            if (channel == null) {
-                throw new AsterixException("There is no channel with this name " + channelName + ".");
-            }
-            Identifier subscriptionsDatasetName = new Identifier(channel.getSubscriptionsDataset());
-        
-            VariableExpr vars = stmtChannelSub.getVariableExpr();
-        
-            //Need a condition to say subscription-id = sid
-            OperatorExpr condition = new OperatorExpr();
-            FieldAccessor fa = new FieldAccessor(vars, new Identifier(ActiveConstants.SubscriptionId));
-            condition.addOperand(fa);
-            condition.setCurrentop(true);
-            condition.addOperator("=");
-        
-            String sid = stmtChannelSub.getsubScriptionId();
-            List<Expression> UUIDList = new ArrayList<Expression>();
-            UUIDList.add(new LiteralExpr(new StringLiteral(sid)));
-        
-            FunctionIdentifier function = AsterixBuiltinFunctions.UUID_CONSTRUCTOR;
-            FunctionSignature UUIDfunc = new FunctionSignature(function.getNamespace(), function.getName(),
-                    function.getArity());
-            CallExpr UUIDCall = new CallExpr(UUIDfunc, UUIDList);
-        
-            condition.addOperand(UUIDCall);
-        
-            DeleteStatement delete = new DeleteStatement(vars, new Identifier(dataverseName), subscriptionsDatasetName,
-                    condition, stmtChannelSub.getVarCounter(), stmtChannelSub.getDataverses(),
-                    stmtChannelSub.getDatasets());
-            AqlDeleteRewriteVisitor visitor = new AqlDeleteRewriteVisitor();
-            delete.accept(visitor, null);
-        
-            handleDeleteStatement(metadataProvider, delete, hcc);
-            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
-        
-        } catch (Exception e) {
-            abort(e, e, mdTxnCtx);
-            throw e;
-        } finally {
-            MetadataLockManager.INSTANCE.readChannelEnd(dataverseName, dataverseName + "." + channelName);
-        }*/
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java b/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java
deleted file mode 100644
index 5b480ae..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/statement/CreateBrokerStatement.java
+++ /dev/null
@@ -1,105 +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.asterix.bad.lang.statement;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.asterix.algebra.extension.IExtensionStatement;
-import org.apache.asterix.app.translator.QueryTranslator;
-import org.apache.asterix.bad.lang.BADLangExtension;
-import org.apache.asterix.bad.metadata.Broker;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.lang.common.struct.Identifier;
-import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
-import org.apache.asterix.metadata.MetadataManager;
-import org.apache.asterix.metadata.MetadataTransactionContext;
-import org.apache.asterix.metadata.declared.AqlMetadataProvider;
-import org.apache.asterix.translator.IStatementExecutor;
-import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
-import org.apache.asterix.translator.IStatementExecutor.Stats;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.apache.hyracks.api.dataset.IHyracksDataset;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-
-public class CreateBrokerStatement implements IExtensionStatement {
-
-    private static final Logger LOGGER = Logger.getLogger(CreateBrokerStatement.class.getName());
-    private final Identifier dataverseName;
-    private final Identifier brokerName;
-    private String endPointName;
-
-    public CreateBrokerStatement(Identifier dataverseName, Identifier brokerName, String endPointName) {
-        this.brokerName = brokerName;
-        this.dataverseName = dataverseName;
-        this.endPointName = endPointName;
-    }
-
-    public String getEndPointName() {
-        return endPointName;
-    }
-
-    public Identifier getDataverseName() {
-        return dataverseName;
-    }
-
-    public Identifier getBrokerName() {
-        return brokerName;
-    }
-
-    @Override
-    public byte getKind() {
-        return Kind.EXTENSION;
-    }
-
-    @Override
-    public byte getCategory() {
-        return Category.DDL;
-    }
-
-    @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
-        return null;
-    }
-
-    @Override
-    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
-            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
-                    throws HyracksDataException, AlgebricksException {
-        MetadataTransactionContext mdTxnCtx = null;
-        try {
-            mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
-            metadataProvider.setMetadataTxnContext(mdTxnCtx);
-            Broker broker = BADLangExtension.getBroker(mdTxnCtx, dataverseName.getValue(), brokerName.getValue());
-            if (broker != null) {
-                throw new AlgebricksException("A broker with this name " + brokerName + " already exists.");
-            }
-            broker = new Broker(dataverseName.getValue(), brokerName.getValue(), endPointName);
-            MetadataManager.INSTANCE.addEntity(mdTxnCtx, broker);
-            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
-        } catch (Exception e) {
-            if (mdTxnCtx != null) {
-                QueryTranslator.abort(e, e, mdTxnCtx);
-            }
-            LOGGER.log(Level.WARNING, "Failed creating a broker", e);
-            throw new HyracksDataException(e);
-        }
-    }
-}
\ No newline at end of file


[11/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java b/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
deleted file mode 100644
index d862052..0000000
--- a/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
+++ /dev/null
@@ -1,373 +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.asterix.bad.lang.statement;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.asterix.active.ActiveJobNotificationHandler;
-import org.apache.asterix.active.ActivityState;
-import org.apache.asterix.active.EntityId;
-import org.apache.asterix.algebra.extension.IExtensionStatement;
-import org.apache.asterix.app.translator.QueryTranslator;
-import org.apache.asterix.bad.BADConstants;
-import org.apache.asterix.bad.ChannelJobInfo;
-import org.apache.asterix.bad.lang.BADLangExtension;
-import org.apache.asterix.bad.metadata.Channel;
-import org.apache.asterix.bad.metadata.ChannelEventsListener;
-import org.apache.asterix.bad.runtime.RepetitiveChannelOperatorDescriptor;
-import org.apache.asterix.common.config.DatasetConfig.DatasetType;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.common.functions.FunctionSignature;
-import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber;
-import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber.ActiveLifecycleEvent;
-import org.apache.asterix.external.feed.management.ActiveLifecycleEventSubscriber;
-import org.apache.asterix.file.JobSpecificationUtils;
-import org.apache.asterix.lang.aql.parser.AQLParserFactory;
-import org.apache.asterix.lang.common.base.Expression;
-import org.apache.asterix.lang.common.base.Statement;
-import org.apache.asterix.lang.common.expression.CallExpr;
-import org.apache.asterix.lang.common.expression.LiteralExpr;
-import org.apache.asterix.lang.common.literal.StringLiteral;
-import org.apache.asterix.lang.common.statement.DatasetDecl;
-import org.apache.asterix.lang.common.statement.IDatasetDetailsDecl;
-import org.apache.asterix.lang.common.statement.InsertStatement;
-import org.apache.asterix.lang.common.statement.InternalDetailsDecl;
-import org.apache.asterix.lang.common.struct.Identifier;
-import org.apache.asterix.lang.common.visitor.base.ILangVisitor;
-import org.apache.asterix.metadata.MetadataException;
-import org.apache.asterix.metadata.MetadataManager;
-import org.apache.asterix.metadata.MetadataTransactionContext;
-import org.apache.asterix.metadata.declared.AqlMetadataProvider;
-import org.apache.asterix.metadata.entities.Function;
-import org.apache.asterix.om.base.temporal.ADurationParserFactory;
-import org.apache.asterix.runtime.util.AsterixAppContextInfo;
-import org.apache.asterix.runtime.util.AsterixClusterProperties;
-import org.apache.asterix.translator.IStatementExecutor;
-import org.apache.asterix.translator.IStatementExecutor.ResultDelivery;
-import org.apache.asterix.translator.IStatementExecutor.Stats;
-import org.apache.asterix.util.JobUtils;
-import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
-import org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint;
-import org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraintHelper;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-import org.apache.hyracks.api.application.ICCApplicationContext;
-import org.apache.hyracks.api.client.ClusterControllerInfo;
-import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
-import org.apache.hyracks.api.dataset.IHyracksDataset;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-import org.apache.hyracks.api.job.JobSpecification;
-import org.apache.hyracks.dataflow.common.data.parsers.IValueParser;
-
-public class CreateChannelStatement implements IExtensionStatement {
-
-    private static final Logger LOGGER = Logger.getLogger(CreateChannelStatement.class.getName());
-
-    private final Identifier dataverseName;
-    private final Identifier channelName;
-    private final FunctionSignature function;
-    private final CallExpr period;
-    private String duration;
-    private InsertStatement channelResultsInsertQuery;
-    private String subscriptionsTableName;
-    private String resultsTableName;
-
-    public CreateChannelStatement(Identifier dataverseName, Identifier channelName, FunctionSignature function,
-            Expression period) {
-        this.channelName = channelName;
-        this.dataverseName = dataverseName;
-        this.function = function;
-        this.period = (CallExpr) period;
-        this.duration = "";
-    }
-
-    public Identifier getDataverseName() {
-        return dataverseName;
-    }
-
-    public Identifier getChannelName() {
-        return channelName;
-    }
-
-    public String getResultsName() {
-        return resultsTableName;
-    }
-
-    public String getSubscriptionsName() {
-        return subscriptionsTableName;
-    }
-
-    public String getDuration() {
-        return duration;
-    }
-
-    public FunctionSignature getFunction() {
-        return function;
-    }
-
-    public Expression getPeriod() {
-        return period;
-    }
-
-    public InsertStatement getChannelResultsInsertQuery() {
-        return channelResultsInsertQuery;
-    }
-
-    @Override
-    public byte getCategory() {
-        return Category.DDL;
-    }
-
-    @Override
-    public <R, T> R accept(ILangVisitor<R, T> visitor, T arg) throws AsterixException {
-        return null;
-    }
-
-    public void initialize(MetadataTransactionContext mdTxnCtx, String subscriptionsTableName, String resultsTableName)
-            throws MetadataException, HyracksDataException {
-        Function lookup = MetadataManager.INSTANCE.getFunction(mdTxnCtx, function);
-        if (lookup == null) {
-            throw new MetadataException(" Unknown function " + function.getName());
-        }
-
-        if (!period.getFunctionSignature().getName().equals("duration")) {
-            throw new MetadataException(
-                    "Expected argument period as a duration, but got " + period.getFunctionSignature().getName() + ".");
-        }
-        duration = ((StringLiteral) ((LiteralExpr) period.getExprList().get(0)).getValue()).getValue();
-        IValueParser durationParser = ADurationParserFactory.INSTANCE.createValueParser();
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        DataOutputStream outputStream = new DataOutputStream(bos);
-        durationParser.parse(duration.toCharArray(), 0, duration.toCharArray().length, outputStream);
-        this.resultsTableName = resultsTableName;
-        this.subscriptionsTableName = subscriptionsTableName;
-
-    }
-
-    @Override
-    public byte getKind() {
-        return Kind.EXTENSION;
-    }
-
-    public Pair<JobSpecification, AlgebricksAbsolutePartitionConstraint> buildChannelJobSpec(String dataverseName,
-            String channelName, String duration, AqlMetadataProvider metadataProvider, JobSpecification channeljobSpec,
-            String strIP, int port) throws Exception {
-        JobSpecification spec = JobSpecificationUtils.createJobSpecification();
-        IOperatorDescriptor channelQueryExecuter;
-        AlgebricksPartitionConstraint executerPc;
-
-        Pair<IOperatorDescriptor, AlgebricksAbsolutePartitionConstraint> p = buildChannelRuntime(spec, dataverseName,
-                channelName, duration, channeljobSpec, strIP, port);
-        channelQueryExecuter = p.first;
-        executerPc = p.second;
-        AlgebricksPartitionConstraintHelper.setPartitionConstraintInJobSpec(spec, channelQueryExecuter, executerPc);
-        spec.addRoot(channelQueryExecuter);
-        return new Pair<>(spec, p.second);
-
-    }
-
-    public Pair<IOperatorDescriptor, AlgebricksAbsolutePartitionConstraint> buildChannelRuntime(
-            JobSpecification jobSpec, String dataverseName, String channelName, String duration,
-            JobSpecification channeljobSpec, String strIP, int port) throws Exception {
-        RepetitiveChannelOperatorDescriptor channelOp = new RepetitiveChannelOperatorDescriptor(jobSpec, dataverseName,
-                channelName, duration, channeljobSpec, strIP, port);
-
-        String partition = AsterixClusterProperties.INSTANCE.getClusterLocations().getLocations()[0];
-        Set<String> ncs = new HashSet<>(Arrays.asList(partition));
-        AlgebricksAbsolutePartitionConstraint partitionConstraint = new AlgebricksAbsolutePartitionConstraint(
-                ncs.toArray(new String[ncs.size()]));
-        return new Pair<IOperatorDescriptor, AlgebricksAbsolutePartitionConstraint>(channelOp, partitionConstraint);
-    }
-
-    private void createDatasets(IStatementExecutor statementExecutor, Identifier subscriptionsName,
-            Identifier resultsName, AqlMetadataProvider metadataProvider, IHyracksClientConnection hcc,
-            IHyracksDataset hdc, Stats stats) throws AsterixException, Exception {
-
-        Identifier subscriptionsTypeName = new Identifier(BADConstants.ChannelSubscriptionsType);
-        Identifier resultsTypeName = new Identifier(BADConstants.ChannelResultsType);
-        //Setup the subscriptions dataset
-        List<List<String>> partitionFields = new ArrayList<List<String>>();
-        List<Integer> keyIndicators = new ArrayList<Integer>();
-        keyIndicators.add(0);
-        List<String> fieldNames = new ArrayList<String>();
-        fieldNames.add(BADConstants.SubscriptionId);
-        partitionFields.add(fieldNames);
-        IDatasetDetailsDecl idd = new InternalDetailsDecl(partitionFields, keyIndicators, true, null, false);
-        DatasetDecl createSubscriptionsDataset = new DatasetDecl(dataverseName, subscriptionsName,
-                new Identifier("Metadata"), subscriptionsTypeName, null, null, null, null,
-                new HashMap<String, String>(), new HashMap<String, String>(), DatasetType.INTERNAL, idd, true);
-
-        //Setup the results dataset
-        partitionFields = new ArrayList<List<String>>();
-        fieldNames = new ArrayList<String>();
-        fieldNames.add(BADConstants.ResultId);
-        partitionFields.add(fieldNames);
-        idd = new InternalDetailsDecl(partitionFields, keyIndicators, true, null, false);
-        DatasetDecl createResultsDataset = new DatasetDecl(dataverseName, resultsName, new Identifier("Metadata"),
-                resultsTypeName, null, null, null, null, new HashMap<String, String>(), new HashMap<String, String>(),
-                DatasetType.INTERNAL, idd, true);
-
-        //Run both statements to create datasets
-        ((QueryTranslator) statementExecutor).handleCreateDatasetStatement(metadataProvider, createSubscriptionsDataset,
-                hcc);
-        ((QueryTranslator) statementExecutor).handleCreateDatasetStatement(metadataProvider, createResultsDataset, hcc);
-
-    }
-
-    private JobSpecification createChannelJob(IStatementExecutor statementExecutor, Identifier subscriptionsName,
-            Identifier resultsName, AqlMetadataProvider metadataProvider, IHyracksClientConnection hcc,
-            IHyracksDataset hdc, Stats stats) throws Exception {
-        StringBuilder builder = new StringBuilder();
-        builder.append("insert into dataset " + dataverseName + "." + resultsName + " ");
-        builder.append(" (" + " let $" + BADConstants.ChannelExecutionTime + " := current-datetime() \n");
-
-        builder.append("for $sub in dataset " + dataverseName + "." + subscriptionsName + "\n");
-        builder.append("for $broker in dataset Metadata.Broker\n");
-        builder.append("where $broker." + BADConstants.BrokerName + "= $sub." + BADConstants.BrokerName + "\n");
-        builder.append("and $broker." + BADConstants.BrokerDataverse + "= $sub." + BADConstants.BrokerDataverse + "\n");
-        builder.append(" for $result in " + function.getNamespace() + "." + function.getName() + "(");
-        int i = 0;
-        for (; i < function.getArity() - 1; i++) {
-            builder.append("$sub.param" + i + ",");
-        }
-        builder.append("$sub.param" + i + ")\n");
-        builder.append("return {\n");
-        builder.append("\"" + BADConstants.ChannelExecutionTime + "\":$" + BADConstants.ChannelExecutionTime + ",");
-        builder.append("\"" + BADConstants.SubscriptionId + "\":$sub." + BADConstants.SubscriptionId + ",");
-        builder.append("\"" + BADConstants.DeliveryTime + "\":current-datetime(),");
-        builder.append("\"result\":$result");
-        builder.append("}");
-        builder.append(")");
-        builder.append(" return records");
-        builder.append(";");
-        AQLParserFactory aqlFact = new AQLParserFactory();
-        List<Statement> fStatements = aqlFact.createParser(new StringReader(builder.toString())).parse();
-        return ((QueryTranslator) statementExecutor).handleInsertUpsertStatement(metadataProvider, fStatements.get(0),
-                hcc, hdc, ResultDelivery.ASYNC, stats, true);
-    }
-
-    @Override
-    public void handle(IStatementExecutor statementExecutor, AqlMetadataProvider metadataProvider,
-            IHyracksClientConnection hcc, IHyracksDataset hdc, ResultDelivery resultDelivery, Stats stats)
-                    throws HyracksDataException, AlgebricksException {
-
-        //This function performs three tasks:
-        //1. Create datasets for the Channel
-        //2. Create the compiled Channel Job
-        //3. Create the metadata entry for the channel
-
-        //TODO: Figure out how to handle when a subset of the 3 tasks fails
-        //TODO: The compiled job will break if anything changes to the function or two datasets
-        // Need to make sure we do proper checking when altering these things
-
-        Identifier subscriptionsName = new Identifier(channelName + BADConstants.subscriptionEnding);
-        Identifier resultsName = new Identifier(channelName + BADConstants.resultsEnding);
-        EntityId entityId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, dataverseName.getValue(),
-                channelName.getValue());
-        ChannelEventsListener listener = (ChannelEventsListener) ActiveJobNotificationHandler.INSTANCE
-                .getActiveEntityListener(entityId);
-        IActiveLifecycleEventSubscriber eventSubscriber = new ActiveLifecycleEventSubscriber();
-        boolean subscriberRegistered = false;
-        Channel channel = null;
-
-        MetadataTransactionContext mdTxnCtx = null;
-        try {
-            mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
-            metadataProvider.setMetadataTxnContext(mdTxnCtx);
-            channel = BADLangExtension.getChannel(mdTxnCtx, dataverseName.getValue(), channelName.getValue());
-            if (channel != null) {
-                throw new AlgebricksException("A channel with this name " + channelName + " already exists.");
-            }
-            if (listener != null) {
-                subscriberRegistered = listener.isChannelActive(entityId, eventSubscriber);
-            }
-            if (subscriberRegistered) {
-                throw new AsterixException("Channel " + channelName + " is already running");
-            }
-            initialize(mdTxnCtx, subscriptionsName.getValue(), resultsName.getValue());
-            channel = new Channel(dataverseName.getValue(), channelName.getValue(), subscriptionsTableName,
-                    resultsTableName, function, duration);
-
-            //check if names are available before creating anything
-            if (MetadataManager.INSTANCE.getDataset(mdTxnCtx, dataverseName.getValue(),
-                    subscriptionsName.getValue()) != null) {
-                throw new AsterixException("The channel name:" + channelName + " is not available.");
-            }
-            if (MetadataManager.INSTANCE.getDataset(mdTxnCtx, dataverseName.getValue(),
-                    resultsName.getValue()) != null) {
-                throw new AsterixException("The channel name:" + channelName + " is not available.");
-            }
-
-            // Now we subscribe
-            if (listener == null) {
-                listener = new ChannelEventsListener(entityId);
-                ActiveJobNotificationHandler.INSTANCE.registerListener(listener);
-            }
-            listener.registerEventSubscriber(eventSubscriber);
-            subscriberRegistered = true;
-
-            //Create Channel Datasets
-            createDatasets(statementExecutor, subscriptionsName, resultsName, metadataProvider, hcc, hdc, stats);
-
-            //Create Channel Internal Job
-            JobSpecification channeljobSpec = createChannelJob(statementExecutor, subscriptionsName, resultsName,
-                    metadataProvider, hcc, hdc, stats);
-
-            //Create Channel Operator
-            ICCApplicationContext iCCApp = AsterixAppContextInfo.INSTANCE.getCCApplicationContext();
-            ClusterControllerInfo ccInfo = iCCApp.getCCContext().getClusterControllerInfo();
-            String strIP = ccInfo.getClientNetAddress();
-            int port = ccInfo.getClientNetPort();
-            Pair<JobSpecification, AlgebricksAbsolutePartitionConstraint> alteredJobSpec = buildChannelJobSpec(
-                    dataverseName.getValue(), channelName.getValue(), duration, metadataProvider, channeljobSpec, strIP,
-                    port);
-
-            channel.setPartitionConstraint(alteredJobSpec.second);
-
-            ChannelJobInfo channelJobInfo = new ChannelJobInfo(entityId, null, ActivityState.ACTIVE,
-                    alteredJobSpec.first);
-            alteredJobSpec.first.setProperty(ActiveJobNotificationHandler.ACTIVE_ENTITY_PROPERTY_NAME, channelJobInfo);
-            JobUtils.runJob(hcc, alteredJobSpec.first, false);
-
-            eventSubscriber.assertEvent(ActiveLifecycleEvent.ACTIVE_JOB_STARTED);
-
-            MetadataManager.INSTANCE.addEntity(mdTxnCtx, channel);
-            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
-        } catch (Exception e) {
-            if (mdTxnCtx != null) {
-                QueryTranslator.abort(e, e, mdTxnCtx);
-            }
-            LOGGER.log(Level.WARNING, "Failed creating a channel", e);
-            throw new HyracksDataException(e);
-        }
-
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java b/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
deleted file mode 100644
index 9129b0f..0000000
--- a/src/main/java/org/apache/asterix/bad/metadata/BADMetadataExtension.java
+++ /dev/null
@@ -1,109 +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.asterix.bad.metadata;
-
-import java.rmi.RemoteException;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.asterix.bad.BADConstants;
-import org.apache.asterix.common.api.ExtensionId;
-import org.apache.asterix.common.exceptions.ACIDException;
-import org.apache.asterix.metadata.MetadataManager;
-import org.apache.asterix.metadata.MetadataTransactionContext;
-import org.apache.asterix.metadata.api.ExtensionMetadataDataset;
-import org.apache.asterix.metadata.api.IMetadataEntity;
-import org.apache.asterix.metadata.api.IMetadataExtension;
-import org.apache.asterix.metadata.api.IMetadataIndex;
-import org.apache.asterix.metadata.bootstrap.MetadataBootstrap;
-import org.apache.asterix.metadata.entities.Datatype;
-import org.apache.asterix.metadata.entities.Dataverse;
-import org.apache.asterix.metadata.entitytupletranslators.MetadataTupleTranslatorProvider;
-import org.apache.asterix.runtime.formats.NonTaggedDataFormat;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
-
-public class BADMetadataExtension implements IMetadataExtension {
-
-    public static final ExtensionId BAD_METADATA_EXTENSION_ID = new ExtensionId(
-            BADConstants.BAD_METADATA_EXTENSION_NAME, 0);
-    public static final Dataverse BAD_DATAVERSE = new Dataverse(BADConstants.BAD_DATAVERSE_NAME,
-            NonTaggedDataFormat.class.getName(), IMetadataEntity.PENDING_NO_OP);
-
-    public static final Datatype BAD_SUBSCRIPTION_DATATYPE = new Datatype(BADConstants.BAD_DATAVERSE_NAME,
-            BADConstants.ChannelSubscriptionsType, BADMetadataRecordTypes.channelSubscriptionsType, false);
-    public static final Datatype BAD_RESULT_DATATYPE = new Datatype(BADConstants.BAD_DATAVERSE_NAME,
-            BADConstants.ChannelResultsType, BADMetadataRecordTypes.channelResultsType, false);
-
-    @Override
-    public ExtensionId getId() {
-        return BAD_METADATA_EXTENSION_ID;
-    }
-
-    @Override
-    public void configure(List<Pair<String, String>> args) {
-        // do nothing??
-    }
-
-    @Override
-    public MetadataTupleTranslatorProvider getMetadataTupleTranslatorProvider() {
-        return new MetadataTupleTranslatorProvider();
-    }
-
-    @SuppressWarnings("rawtypes")
-    @Override
-    public List<ExtensionMetadataDataset> getExtensionIndexes() {
-        try {
-            ExtensionMetadataDataset A = BADMetadataIndexes.CHANNEL_DATASET;
-            ExtensionMetadataDataset B = BADMetadataIndexes.BROKER_DATASET;
-            return Arrays.asList(BADMetadataIndexes.CHANNEL_DATASET, BADMetadataIndexes.BROKER_DATASET);
-        } catch (Throwable th) {
-            th.printStackTrace();
-            throw th;
-        }
-    }
-
-    @Override
-    public void initializeMetadata() throws HyracksDataException, RemoteException, ACIDException {
-        // enlist datasets
-        MetadataBootstrap.enlistMetadataDataset(BADMetadataIndexes.CHANNEL_DATASET);
-        MetadataBootstrap.enlistMetadataDataset(BADMetadataIndexes.BROKER_DATASET);
-        if (MetadataBootstrap.isNewUniverse()) {
-            MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
-            try {
-                // add metadata datasets
-                MetadataBootstrap.insertMetadataDatasets(mdTxnCtx,
-                        new IMetadataIndex[] { BADMetadataIndexes.CHANNEL_DATASET, BADMetadataIndexes.BROKER_DATASET });
-                // insert default dataverse
-                // TODO prevent user from dropping this dataverse
-                MetadataManager.INSTANCE.addDataverse(mdTxnCtx, BAD_DATAVERSE);
-                // insert default data type
-                MetadataManager.INSTANCE.addDatatype(mdTxnCtx, BAD_RESULT_DATATYPE);
-                MetadataManager.INSTANCE.addDatatype(mdTxnCtx, BAD_SUBSCRIPTION_DATATYPE);
-                // TODO prevent user from dropping these types
-                MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
-            } catch (Exception e) {
-                e.printStackTrace();
-                MetadataManager.INSTANCE.abortTransaction(mdTxnCtx);
-            }
-        }
-        // local recovery?
-        // nothing for now
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java b/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
deleted file mode 100644
index 188f04f..0000000
--- a/src/main/java/org/apache/asterix/bad/metadata/BADMetadataIndexes.java
+++ /dev/null
@@ -1,66 +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.asterix.bad.metadata;
-
-import java.util.Arrays;
-
-import org.apache.asterix.common.metadata.MetadataIndexImmutableProperties;
-import org.apache.asterix.metadata.api.ExtensionMetadataDataset;
-import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
-import org.apache.asterix.metadata.bootstrap.MetadataRecordTypes;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-
-public class BADMetadataIndexes {
-
-    public static final String INDEX_NAME_CHANNEL = "Channel";
-    public static final String INDEX_NAME_BROKER = "Broker";
-
-    public static final ExtensionMetadataDatasetId BAD_CHANNEL_INDEX_ID = new ExtensionMetadataDatasetId(
-            BADMetadataExtension.BAD_METADATA_EXTENSION_ID, INDEX_NAME_CHANNEL);
-    public static final MetadataIndexImmutableProperties PROPERTIES_CHANNEL = new MetadataIndexImmutableProperties(
-            INDEX_NAME_CHANNEL, MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID,
-            MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID);
-
-    public static final ExtensionMetadataDatasetId BAD_BROKER_INDEX_ID = new ExtensionMetadataDatasetId(
-            BADMetadataExtension.BAD_METADATA_EXTENSION_ID, INDEX_NAME_BROKER);
-    public static final MetadataIndexImmutableProperties PROPERTIES_BROKER = new MetadataIndexImmutableProperties(
-            INDEX_NAME_BROKER, MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID,
-            MetadataIndexImmutableProperties.FIRST_AVAILABLE_EXTENSION_METADATA_DATASET_ID);
-
-    public static final int NUM_FIELDS_CHANNEL_IDX = 3;
-    public static final int NUM_FIELDS_BROKER_IDX = 3;
-
-    @SuppressWarnings({ "rawtypes", "unchecked" })
-    public static final ExtensionMetadataDataset CHANNEL_DATASET = new ExtensionMetadataDataset(PROPERTIES_CHANNEL,
-            NUM_FIELDS_CHANNEL_IDX, new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING },
-            Arrays.asList(Arrays.asList(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
-                    Arrays.asList(BADMetadataRecordTypes.FIELD_NAME_CHANNEL_NAME)),
-            0, BADMetadataRecordTypes.CHANNEL_RECORDTYPE, true, new int[] { 0, 1 }, BAD_CHANNEL_INDEX_ID,
-            new ChannelTupleTranslator(true));
-
-    @SuppressWarnings({ "rawtypes", "unchecked" })
-    public static final ExtensionMetadataDataset BROKER_DATASET = new ExtensionMetadataDataset(PROPERTIES_BROKER,
-            NUM_FIELDS_BROKER_IDX, new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING },
-            Arrays.asList(Arrays.asList(MetadataRecordTypes.FIELD_NAME_DATAVERSE_NAME),
-                    Arrays.asList(BADMetadataRecordTypes.FIELD_NAME_BROKER_NAME)),
-            0, BADMetadataRecordTypes.BROKER_RECORDTYPE, true, new int[] { 0, 1 }, BAD_BROKER_INDEX_ID,
-            new BrokerTupleTranslator(true));
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java b/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java
deleted file mode 100644
index d95570f..0000000
--- a/src/main/java/org/apache/asterix/bad/metadata/BADMetadataRecordTypes.java
+++ /dev/null
@@ -1,89 +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.asterix.bad.metadata;
-
-import org.apache.asterix.bad.BADConstants;
-import org.apache.asterix.metadata.bootstrap.MetadataRecordTypes;
-import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.BuiltinType;
-import org.apache.asterix.om.types.IAType;
-
-public class BADMetadataRecordTypes {
-
-    // --------------------------------------- Fields Names --------------------------------------//
-    public static final String FIELD_NAME_BROKER_NAME = "BrokerName";
-    public static final String FIELD_NAME_BROKER_ENDPOINT = "BrokerEndPoint";
-    public static final String FIELD_NAME_CHANNEL_DURATION = "Duration";
-    public static final String FIELD_NAME_CHANNEL_FUNCTION = "Function";
-    public static final String FIELD_NAME_CHANNEL_NAME = "ChannelName";
-    public static final String FIELD_NAME_CHANNEL_RESULTS_DATASET = "ResultsDatasetName";
-    public static final String FIELD_NAME_CHANNEL_SUBSCRIPTIONS_DATASET = "SubscriptionsDatasetName";
-    public static final String FIELD_NAME_DATAVERSE_NAME = "DataverseName";
-
-    // -------------------------------------- Subscriptions --------------------------------------//
-    private static final String[] subTypeFieldNames = { BADConstants.BrokerDataverse, BADConstants.BrokerName,
-            BADConstants.SubscriptionId };
-    private static final IAType[] subTypeFieldTypes = { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.AUUID };
-    public static final ARecordType channelSubscriptionsType = new ARecordType(BADConstants.ChannelSubscriptionsType,
-            subTypeFieldNames, subTypeFieldTypes, true);
-
-    // ---------------------------------------- Results --------------------------------------------//
-    private static final String[] resultTypeFieldNames = { BADConstants.ResultId, BADConstants.ChannelExecutionTime,
-            BADConstants.SubscriptionId, BADConstants.DeliveryTime };
-    private static final IAType[] resultTypeFieldTypes = { BuiltinType.AUUID, BuiltinType.ADATETIME, BuiltinType.AUUID,
-            BuiltinType.ADATETIME };
-    public static final ARecordType channelResultsType = new ARecordType(BADConstants.ChannelResultsType,
-            resultTypeFieldNames, resultTypeFieldTypes, true);
-
-    //------------------------------------------ Channel ----------------------------------------//     
-    public static final String RECORD_NAME_CHANNEL = "ChannelRecordType";
-    public static final int CHANNEL_ARECORD_DATAVERSE_NAME_FIELD_INDEX = 0;
-    public static final int CHANNEL_ARECORD_CHANNEL_NAME_FIELD_INDEX = 1;
-    public static final int CHANNEL_ARECORD_SUBSCRIPTIONS_NAME_FIELD_INDEX = 2;
-    public static final int CHANNEL_ARECORD_RESULTS_NAME_FIELD_INDEX = 3;
-    public static final int CHANNEL_ARECORD_FUNCTION_FIELD_INDEX = 4;
-    public static final int CHANNEL_ARECORD_DURATION_FIELD_INDEX = 5;
-    public static final ARecordType CHANNEL_RECORDTYPE = MetadataRecordTypes.createRecordType(
-            // RecordTypeName
-            RECORD_NAME_CHANNEL,
-            // FieldNames
-            new String[] { FIELD_NAME_DATAVERSE_NAME, FIELD_NAME_CHANNEL_NAME, FIELD_NAME_CHANNEL_SUBSCRIPTIONS_DATASET,
-                    FIELD_NAME_CHANNEL_RESULTS_DATASET, FIELD_NAME_CHANNEL_FUNCTION, FIELD_NAME_CHANNEL_DURATION },
-            // FieldTypes
-            new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING,
-                    BuiltinType.ASTRING, BuiltinType.ASTRING },
-            //IsOpen?
-            true);
-    //------------------------------------------ Broker ----------------------------------------//
-    public static final String RECORD_NAME_BROKER = "BrokerRecordType";
-    public static final int BROKER_DATAVERSE_NAME_FIELD_INDEX = 0;
-    public static final int BROKER_NAME_FIELD_INDEX = 1;
-    public static final int BROKER_ENDPOINT_FIELD_INDEX = 2;
-    public static final ARecordType BROKER_RECORDTYPE = MetadataRecordTypes.createRecordType(
-            // RecordTypeName
-            RECORD_NAME_BROKER,
-            // FieldNames
-            new String[] { FIELD_NAME_DATAVERSE_NAME, FIELD_NAME_BROKER_NAME, FIELD_NAME_BROKER_ENDPOINT },
-            // FieldTypes
-            new IAType[] { BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING, BuiltinType.ASTRING,
-                    BuiltinType.ASTRING, BuiltinType.ASTRING },
-            //IsOpen?
-            true);
-
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/metadata/Broker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/metadata/Broker.java b/src/main/java/org/apache/asterix/bad/metadata/Broker.java
deleted file mode 100644
index 006f0dc..0000000
--- a/src/main/java/org/apache/asterix/bad/metadata/Broker.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2009-2015 by The Regents of the University of California
- * 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 from
- *
- * 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.asterix.bad.metadata;
-
-import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
-import org.apache.asterix.metadata.api.IExtensionMetadataEntity;
-
-/**
- * Metadata describing a broker.
- */
-public class Broker implements IExtensionMetadataEntity {
-
-    private static final long serialVersionUID = 1L;
-
-    private final String dataverseName;
-    private final String brokerName;
-    private final String endPointName;
-
-    public Broker(String dataverseName, String brokerName, String endPointName) {
-        this.endPointName = endPointName;
-        this.dataverseName = dataverseName;
-        this.brokerName = brokerName;
-    }
-
-    public String getDataverseName() {
-        return dataverseName;
-    }
-
-    public String getBrokerName() {
-        return brokerName;
-    }
-
-    public String getEndPointName() {
-        return endPointName;
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (this == other) {
-            return true;
-        }
-        if (!(other instanceof Broker)) {
-            return false;
-        }
-        Broker otherDataset = (Broker) other;
-        if (!otherDataset.brokerName.equals(brokerName)) {
-            return false;
-        }
-        return true;
-    }
-
-    @Override
-    public ExtensionMetadataDatasetId getDatasetId() {
-        return BADMetadataIndexes.BAD_BROKER_INDEX_ID;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java b/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java
deleted file mode 100644
index b73e9e3..0000000
--- a/src/main/java/org/apache/asterix/bad/metadata/BrokerSearchKey.java
+++ /dev/null
@@ -1,45 +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.asterix.bad.metadata;
-
-import org.apache.asterix.metadata.MetadataNode;
-import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
-import org.apache.asterix.metadata.api.IExtensionMetadataSearchKey;
-import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
-
-public class BrokerSearchKey implements IExtensionMetadataSearchKey {
-    private static final long serialVersionUID = 1L;
-    private final String dataverse;
-    private final String broker;
-
-    public BrokerSearchKey(String dataverse, String broker) {
-        this.dataverse = dataverse;
-        this.broker = broker;
-    }
-
-    @Override
-    public ExtensionMetadataDatasetId getDatasetId() {
-        return BADMetadataIndexes.BAD_BROKER_INDEX_ID;
-    }
-
-    @Override
-    public ITupleReference getSearchKey() {
-        return MetadataNode.createTuple(dataverse, broker);
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java b/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java
deleted file mode 100644
index 2b478f2..0000000
--- a/src/main/java/org/apache/asterix/bad/metadata/BrokerTupleTranslator.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2009-2013 by The Regents of the University of California
- * 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 from
- *
- *     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.asterix.bad.metadata;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.IOException;
-
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.metadata.MetadataException;
-import org.apache.asterix.metadata.entitytupletranslators.AbstractTupleTranslator;
-import org.apache.asterix.om.base.ARecord;
-import org.apache.asterix.om.base.AString;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
-import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
-
-/**
- * Translates a Channel metadata entity to an ITupleReference and vice versa.
- */
-public class BrokerTupleTranslator extends AbstractTupleTranslator<Broker> {
-    // Field indexes of serialized Broker in a tuple.
-    // Key field.
-    public static final int BROKER_DATAVERSE_NAME_FIELD_INDEX = 0;
-
-    public static final int BROKER_NAME_FIELD_INDEX = 1;
-
-    // Payload field containing serialized broker.
-    public static final int BROKER_PAYLOAD_TUPLE_FIELD_INDEX = 2;
-
-    @SuppressWarnings("unchecked")
-    private ISerializerDeserializer<ARecord> recordSerDes = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BADMetadataRecordTypes.BROKER_RECORDTYPE);
-
-    @SuppressWarnings("unchecked")
-    public BrokerTupleTranslator(boolean getTuple) {
-        super(getTuple, BADMetadataIndexes.BROKER_DATASET.getFieldCount());
-    }
-
-    @Override
-    public Broker getMetadataEntityFromTuple(ITupleReference frameTuple) throws IOException {
-        byte[] serRecord = frameTuple.getFieldData(BROKER_PAYLOAD_TUPLE_FIELD_INDEX);
-        int recordStartOffset = frameTuple.getFieldStart(BROKER_PAYLOAD_TUPLE_FIELD_INDEX);
-        int recordLength = frameTuple.getFieldLength(BROKER_PAYLOAD_TUPLE_FIELD_INDEX);
-        ByteArrayInputStream stream = new ByteArrayInputStream(serRecord, recordStartOffset, recordLength);
-        DataInput in = new DataInputStream(stream);
-        ARecord channelRecord = recordSerDes.deserialize(in);
-        return createBrokerFromARecord(channelRecord);
-    }
-
-    private Broker createBrokerFromARecord(ARecord brokerRecord) {
-        Broker broker = null;
-        String dataverseName = ((AString) brokerRecord
-                .getValueByPos(BADMetadataRecordTypes.BROKER_DATAVERSE_NAME_FIELD_INDEX)).getStringValue();
-        String brokerName = ((AString) brokerRecord.getValueByPos(BADMetadataRecordTypes.BROKER_NAME_FIELD_INDEX))
-                .getStringValue();
-        String endPointName = ((AString) brokerRecord.getValueByPos(BADMetadataRecordTypes.BROKER_ENDPOINT_FIELD_INDEX))
-                .getStringValue();
-
-        broker = new Broker(dataverseName, brokerName, endPointName);
-        return broker;
-    }
-
-    @Override
-    public ITupleReference getTupleFromMetadataEntity(Broker broker) throws IOException, MetadataException {
-        // write the key in the first fields of the tuple
-
-        tupleBuilder.reset();
-        aString.setValue(broker.getDataverseName());
-        stringSerde.serialize(aString, tupleBuilder.getDataOutput());
-        tupleBuilder.addFieldEndOffset();
-
-        aString.setValue(broker.getBrokerName());
-        stringSerde.serialize(aString, tupleBuilder.getDataOutput());
-        tupleBuilder.addFieldEndOffset();
-
-        recordBuilder.reset(BADMetadataRecordTypes.BROKER_RECORDTYPE);
-
-        // write field 0
-        fieldValue.reset();
-        aString.setValue(broker.getDataverseName());
-        stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(BADMetadataRecordTypes.BROKER_DATAVERSE_NAME_FIELD_INDEX, fieldValue);
-
-        // write field 1
-        fieldValue.reset();
-        aString.setValue(broker.getBrokerName());
-        stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(BADMetadataRecordTypes.BROKER_NAME_FIELD_INDEX, fieldValue);
-
-        // write field 2
-        fieldValue.reset();
-        aString.setValue(broker.getEndPointName());
-        stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(BADMetadataRecordTypes.BROKER_ENDPOINT_FIELD_INDEX, fieldValue);
-
-        // write record
-        recordBuilder.write(tupleBuilder.getDataOutput(), true);
-
-        tupleBuilder.addFieldEndOffset();
-
-        tuple.reset(tupleBuilder.getFieldEndOffsets(), tupleBuilder.getByteArray());
-        return tuple;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/metadata/Channel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/metadata/Channel.java b/src/main/java/org/apache/asterix/bad/metadata/Channel.java
deleted file mode 100644
index 1025748..0000000
--- a/src/main/java/org/apache/asterix/bad/metadata/Channel.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright 2009-2015 by The Regents of the University of California
- * 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 from
- *
- * 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.asterix.bad.metadata;
-
-import org.apache.asterix.active.EntityId;
-import org.apache.asterix.bad.BADConstants;
-import org.apache.asterix.common.functions.FunctionSignature;
-import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
-import org.apache.asterix.metadata.api.IExtensionMetadataEntity;
-import org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint;
-
-/**
- * Metadata describing a channel.
- */
-public class Channel implements IExtensionMetadataEntity {
-
-    private static final long serialVersionUID = 1L;
-
-    /** A unique identifier for the channel */
-    protected final EntityId channelId;
-    private final String subscriptionsDatasetName;
-    private final String resultsDatasetName;
-    private final String duration;
-    private final FunctionSignature function;
-    private AlgebricksAbsolutePartitionConstraint partitionConstraint;
-
-    public Channel(String dataverseName, String channelName, String subscriptionsDataset, String resultsDataset,
-            FunctionSignature function, String duration) {
-        this.channelId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, dataverseName, channelName);
-        this.function = function;
-        this.duration = duration;
-        this.resultsDatasetName = resultsDataset;
-        this.subscriptionsDatasetName = subscriptionsDataset;
-    }
-
-    public EntityId getChannelId() {
-        return channelId;
-    }
-
-    public String getSubscriptionsDataset() {
-        return subscriptionsDatasetName;
-    }
-
-    public String getResultsDatasetName() {
-        return resultsDatasetName;
-    }
-
-    public String getDuration() {
-        return duration;
-    }
-
-    public FunctionSignature getFunction() {
-        return function;
-    }
-
-    @Override
-    public boolean equals(Object other) {
-        if (this == other) {
-            return true;
-        }
-        if (!(other instanceof Channel)) {
-            return false;
-        }
-        Channel otherDataset = (Channel) other;
-        if (!otherDataset.channelId.equals(channelId)) {
-            return false;
-        }
-        return true;
-    }
-
-    @Override
-    public ExtensionMetadataDatasetId getDatasetId() {
-        return BADMetadataIndexes.BAD_CHANNEL_INDEX_ID;
-    }
-
-    public AlgebricksAbsolutePartitionConstraint getPartitionConstraint() {
-        return partitionConstraint;
-    }
-
-    public void setPartitionConstraint(AlgebricksAbsolutePartitionConstraint partitionConstraint) {
-        this.partitionConstraint = partitionConstraint;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java b/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
deleted file mode 100644
index b48478d..0000000
--- a/src/main/java/org/apache/asterix/bad/metadata/ChannelEventsListener.java
+++ /dev/null
@@ -1,237 +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.asterix.bad.metadata;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.asterix.active.ActiveEvent;
-import org.apache.asterix.active.ActiveJob;
-import org.apache.asterix.active.ActivityState;
-import org.apache.asterix.active.EntityId;
-import org.apache.asterix.active.IActiveEntityEventsListener;
-import org.apache.asterix.bad.BADConstants;
-import org.apache.asterix.bad.ChannelJobInfo;
-import org.apache.asterix.bad.runtime.RepetitiveChannelOperatorDescriptor;
-import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber;
-import org.apache.asterix.external.feed.api.IActiveLifecycleEventSubscriber.ActiveLifecycleEvent;
-import org.apache.asterix.external.feed.management.FeedConnectionId;
-import org.apache.asterix.runtime.util.AsterixAppContextInfo;
-import org.apache.hyracks.api.client.IHyracksClientConnection;
-import org.apache.hyracks.api.dataflow.IOperatorDescriptor;
-import org.apache.hyracks.api.dataflow.OperatorDescriptorId;
-import org.apache.hyracks.api.job.JobId;
-import org.apache.hyracks.api.job.JobInfo;
-import org.apache.hyracks.api.job.JobSpecification;
-import org.apache.hyracks.api.job.JobStatus;
-import org.apache.log4j.Logger;
-
-public class ChannelEventsListener implements IActiveEntityEventsListener {
-    private static final Logger LOGGER = Logger.getLogger(ChannelEventsListener.class);
-    private final List<IActiveLifecycleEventSubscriber> subscribers;
-    private final Map<Long, ActiveJob> jobs;
-    private final Map<EntityId, ChannelJobInfo> jobInfos;
-    private EntityId entityId;
-
-    public ChannelEventsListener(EntityId entityId) {
-        this.entityId = entityId;
-        subscribers = new ArrayList<>();
-        jobs = new HashMap<>();
-        jobInfos = new HashMap<>();
-    }
-
-    @Override
-    public void notify(ActiveEvent event) {
-        try {
-            switch (event.getEventKind()) {
-                case JOB_START:
-                    handleJobStartEvent(event);
-                    break;
-                case JOB_FINISH:
-                    handleJobFinishEvent(event);
-                    break;
-                default:
-                    LOGGER.warn("Unknown Channel Event" + event);
-                    break;
-            }
-        } catch (Exception e) {
-            LOGGER.error("Unhandled Exception", e);
-        }
-    }
-
-    private synchronized void handleJobStartEvent(ActiveEvent message) throws Exception {
-        ActiveJob jobInfo = jobs.get(message.getJobId().getId());
-        handleJobStartMessage((ChannelJobInfo) jobInfo);
-    }
-
-    private synchronized void handleJobFinishEvent(ActiveEvent message) throws Exception {
-        ActiveJob jobInfo = jobs.get(message.getJobId().getId());
-        if (LOGGER.isInfoEnabled()) {
-            LOGGER.info("Channel Job finished for  " + jobInfo);
-        }
-        handleJobFinishMessage((ChannelJobInfo) jobInfo);
-    }
-
-    private synchronized void handleJobFinishMessage(ChannelJobInfo cInfo) throws Exception {
-        EntityId channelJobId = cInfo.getEntityId();
-
-        IHyracksClientConnection hcc = AsterixAppContextInfo.INSTANCE.getHcc();
-        JobInfo info = hcc.getJobInfo(cInfo.getJobId());
-        JobStatus status = info.getStatus();
-        boolean failure = status != null && status.equals(JobStatus.FAILURE);
-
-        jobInfos.remove(channelJobId);
-        jobs.remove(cInfo.getJobId().getId());
-        // notify event listeners
-        ActiveLifecycleEvent event = failure ? ActiveLifecycleEvent.ACTIVE_JOB_FAILED
-                : ActiveLifecycleEvent.ACTIVE_JOB_ENDED;
-        notifyEventSubscribers(event);
-    }
-
-    private void notifyEventSubscribers(ActiveLifecycleEvent event) {
-        if (subscribers != null && !subscribers.isEmpty()) {
-            for (IActiveLifecycleEventSubscriber subscriber : subscribers) {
-                subscriber.handleEvent(event);
-            }
-        }
-    }
-
-    private static synchronized void handleJobStartMessage(ChannelJobInfo cInfo) throws Exception {
-        List<OperatorDescriptorId> channelOperatorIds = new ArrayList<>();
-        Map<OperatorDescriptorId, IOperatorDescriptor> operators = cInfo.getSpec().getOperatorMap();
-        for (Entry<OperatorDescriptorId, IOperatorDescriptor> entry : operators.entrySet()) {
-            IOperatorDescriptor opDesc = entry.getValue();
-            if (opDesc instanceof RepetitiveChannelOperatorDescriptor) {
-                channelOperatorIds.add(opDesc.getOperatorId());
-            }
-        }
-
-        IHyracksClientConnection hcc = AsterixAppContextInfo.INSTANCE.getHcc();
-        JobInfo info = hcc.getJobInfo(cInfo.getJobId());
-        List<String> locations = new ArrayList<>();
-        for (OperatorDescriptorId channelOperatorId : channelOperatorIds) {
-            Map<Integer, String> operatorLocations = info.getOperatorLocations().get(channelOperatorId);
-            int nOperatorInstances = operatorLocations.size();
-            for (int i = 0; i < nOperatorInstances; i++) {
-                locations.add(operatorLocations.get(i));
-            }
-        }
-        // intakeLocations is an ordered list; 
-        // element at position i corresponds to location of i'th instance of operator
-        cInfo.setLocations(locations);
-        cInfo.setState(ActivityState.ACTIVE);
-    }
-
-    @Override
-    public void notifyJobCreation(JobId jobId, JobSpecification spec) {
-        EntityId channelId = null;
-        try {
-            for (IOperatorDescriptor opDesc : spec.getOperatorMap().values()) {
-                if (opDesc instanceof RepetitiveChannelOperatorDescriptor) {
-                    channelId = ((RepetitiveChannelOperatorDescriptor) opDesc).getEntityId();
-                    registerJob(channelId, jobId, spec);
-                    return;
-                }
-            }
-        } catch (Exception e) {
-            LOGGER.error(e);
-        }
-    }
-
-    public synchronized void registerJob(EntityId entityId, JobId jobId, JobSpecification jobSpec) {
-        if (jobs.get(jobId.getId()) != null) {
-            throw new IllegalStateException("Channel job already registered");
-        }
-        if (jobInfos.containsKey(jobId.getId())) {
-            throw new IllegalStateException("Channel job already registered");
-        }
-
-        ChannelJobInfo cInfo = new ChannelJobInfo(entityId, jobId, ActivityState.CREATED, jobSpec);
-        jobs.put(jobId.getId(), cInfo);
-        jobInfos.put(entityId, cInfo);
-
-        if (LOGGER.isInfoEnabled()) {
-            LOGGER.info("Registered channel job [" + jobId + "]" + " for channel " + entityId);
-        }
-
-        notifyEventSubscribers(ActiveLifecycleEvent.ACTIVE_JOB_STARTED);
-
-    }
-
-    public JobSpecification getJobSpecification(EntityId activeJobId) {
-        return jobInfos.get(activeJobId).getSpec();
-    }
-
-    public ChannelJobInfo getJobInfo(EntityId activeJobId) {
-        return jobInfos.get(activeJobId);
-    }
-
-    public synchronized void registerEventSubscriber(IActiveLifecycleEventSubscriber subscriber) {
-        subscribers.add(subscriber);
-    }
-
-    public void deregisterEventSubscriber(IActiveLifecycleEventSubscriber subscriber) {
-        subscribers.remove(subscriber);
-    }
-
-    public synchronized boolean isChannelActive(EntityId activeJobId, IActiveLifecycleEventSubscriber eventSubscriber) {
-        boolean active = false;
-        ChannelJobInfo cInfo = jobInfos.get(activeJobId);
-        if (cInfo != null) {
-            active = cInfo.getState().equals(ActivityState.ACTIVE);
-        }
-        if (active) {
-            registerEventSubscriber(eventSubscriber);
-        }
-        return active;
-    }
-
-    public ChannelJobInfo getFeedConnectJobInfo(EntityId activeJobId) {
-        return jobInfos.get(activeJobId);
-    }
-
-    public FeedConnectionId[] getConnections() {
-        return jobInfos.keySet().toArray(new FeedConnectionId[jobInfos.size()]);
-    }
-
-    @Override
-    public boolean isEntityActive() {
-        return !jobs.isEmpty();
-    }
-
-    @Override
-    public EntityId getEntityId() {
-        return entityId;
-    }
-
-    @Override
-    public boolean isEntityUsingDataset(String dataverseName, String datasetName) {
-        if (entityId.getDataverse().equals(dataverseName)) {
-            String subscriptionsName = entityId.getEntityName() + BADConstants.subscriptionEnding;
-            String resultsName = entityId.getEntityName() + BADConstants.resultsEnding;
-            if (datasetName.equals(subscriptionsName) || datasetName.equals(resultsName)) {
-                return true;
-            }
-        }
-        return false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java b/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java
deleted file mode 100644
index 679548c..0000000
--- a/src/main/java/org/apache/asterix/bad/metadata/ChannelSearchKey.java
+++ /dev/null
@@ -1,45 +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.asterix.bad.metadata;
-
-import org.apache.asterix.metadata.MetadataNode;
-import org.apache.asterix.metadata.api.ExtensionMetadataDatasetId;
-import org.apache.asterix.metadata.api.IExtensionMetadataSearchKey;
-import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
-
-public class ChannelSearchKey implements IExtensionMetadataSearchKey {
-    private static final long serialVersionUID = 1L;
-    private final String dataverse;
-    private final String channel;
-
-    public ChannelSearchKey(String dataverse, String channel) {
-        this.dataverse = dataverse;
-        this.channel = channel;
-    }
-
-    @Override
-    public ExtensionMetadataDatasetId getDatasetId() {
-        return BADMetadataIndexes.BAD_CHANNEL_INDEX_ID;
-    }
-
-    @Override
-    public ITupleReference getSearchKey() {
-        return MetadataNode.createTuple(dataverse, channel);
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java b/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java
deleted file mode 100644
index 122905e..0000000
--- a/src/main/java/org/apache/asterix/bad/metadata/ChannelTupleTranslator.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright 2009-2013 by The Regents of the University of California
- * 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 from
- *
- * 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.asterix.bad.metadata;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.IOException;
-
-import org.apache.asterix.common.functions.FunctionSignature;
-import org.apache.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import org.apache.asterix.metadata.MetadataException;
-import org.apache.asterix.metadata.entitytupletranslators.AbstractTupleTranslator;
-import org.apache.asterix.om.base.ARecord;
-import org.apache.asterix.om.base.AString;
-import org.apache.hyracks.api.dataflow.value.ISerializerDeserializer;
-import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference;
-
-/**
- * Translates a Channel metadata entity to an ITupleReference and vice versa.
- */
-public class ChannelTupleTranslator extends AbstractTupleTranslator<Channel> {
-    // Field indexes of serialized Feed in a tuple.
-    // Key field.
-    public static final int CHANNEL_DATAVERSE_NAME_FIELD_INDEX = 0;
-
-    public static final int CHANNEL_NAME_FIELD_INDEX = 1;
-
-    // Payload field containing serialized feed.
-    public static final int CHANNEL_PAYLOAD_TUPLE_FIELD_INDEX = 2;
-
-    @SuppressWarnings("unchecked")
-    private ISerializerDeserializer<ARecord> recordSerDes = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BADMetadataRecordTypes.CHANNEL_RECORDTYPE);
-
-    @SuppressWarnings("unchecked")
-    public ChannelTupleTranslator(boolean getTuple) {
-        super(getTuple, BADMetadataIndexes.CHANNEL_DATASET.getFieldCount());
-    }
-
-    @Override
-    public Channel getMetadataEntityFromTuple(ITupleReference frameTuple) throws IOException {
-        byte[] serRecord = frameTuple.getFieldData(CHANNEL_PAYLOAD_TUPLE_FIELD_INDEX);
-        int recordStartOffset = frameTuple.getFieldStart(CHANNEL_PAYLOAD_TUPLE_FIELD_INDEX);
-        int recordLength = frameTuple.getFieldLength(CHANNEL_PAYLOAD_TUPLE_FIELD_INDEX);
-        ByteArrayInputStream stream = new ByteArrayInputStream(serRecord, recordStartOffset, recordLength);
-        DataInput in = new DataInputStream(stream);
-        ARecord channelRecord = recordSerDes.deserialize(in);
-        return createChannelFromARecord(channelRecord);
-    }
-
-    private Channel createChannelFromARecord(ARecord channelRecord) {
-        Channel channel = null;
-        String dataverseName = ((AString) channelRecord
-                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_DATAVERSE_NAME_FIELD_INDEX)).getStringValue();
-        String channelName = ((AString) channelRecord
-                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_CHANNEL_NAME_FIELD_INDEX)).getStringValue();
-        String subscriptionsName = ((AString) channelRecord
-                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_SUBSCRIPTIONS_NAME_FIELD_INDEX)).getStringValue();
-        String resultsName = ((AString) channelRecord
-                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_RESULTS_NAME_FIELD_INDEX)).getStringValue();
-        String fName = ((AString) channelRecord
-                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_FUNCTION_FIELD_INDEX)).getStringValue();
-        String duration = ((AString) channelRecord
-                .getValueByPos(BADMetadataRecordTypes.CHANNEL_ARECORD_DURATION_FIELD_INDEX)).getStringValue();
-
-        FunctionSignature signature = null;
-
-        String[] qnameComponents = fName.split("\\.");
-        String functionDataverse;
-        String functionName;
-        if (qnameComponents.length == 2) {
-            functionDataverse = qnameComponents[0];
-            functionName = qnameComponents[1];
-        } else {
-            functionDataverse = dataverseName;
-            functionName = qnameComponents[0];
-        }
-
-        String[] nameComponents = functionName.split("@");
-        signature = new FunctionSignature(functionDataverse, nameComponents[0], Integer.parseInt(nameComponents[1]));
-
-        channel = new Channel(dataverseName, channelName, subscriptionsName, resultsName, signature, duration);
-        return channel;
-    }
-
-    @Override
-    public ITupleReference getTupleFromMetadataEntity(Channel channel) throws IOException, MetadataException {
-        // write the key in the first fields of the tuple
-
-        tupleBuilder.reset();
-        aString.setValue(channel.getChannelId().getDataverse());
-        stringSerde.serialize(aString, tupleBuilder.getDataOutput());
-        tupleBuilder.addFieldEndOffset();
-
-        aString.setValue(channel.getChannelId().getEntityName());
-        stringSerde.serialize(aString, tupleBuilder.getDataOutput());
-        tupleBuilder.addFieldEndOffset();
-
-        recordBuilder.reset(BADMetadataRecordTypes.CHANNEL_RECORDTYPE);
-
-        // write field 0
-        fieldValue.reset();
-        aString.setValue(channel.getChannelId().getDataverse());
-        stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_DATAVERSE_NAME_FIELD_INDEX, fieldValue);
-
-        // write field 1
-        fieldValue.reset();
-        aString.setValue(channel.getChannelId().getEntityName());
-        stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_CHANNEL_NAME_FIELD_INDEX, fieldValue);
-
-        // write field 2
-        fieldValue.reset();
-        aString.setValue(channel.getSubscriptionsDataset());
-        stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_SUBSCRIPTIONS_NAME_FIELD_INDEX, fieldValue);
-
-        // write field 3
-        fieldValue.reset();
-        aString.setValue(channel.getResultsDatasetName());
-        stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_RESULTS_NAME_FIELD_INDEX, fieldValue);
-
-        // write field 4
-        fieldValue.reset();
-        aString.setValue(channel.getFunction().toString());
-        stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_FUNCTION_FIELD_INDEX, fieldValue);
-
-        // write field 5
-        fieldValue.reset();
-        aString.setValue(channel.getDuration());
-        stringSerde.serialize(aString, fieldValue.getDataOutput());
-        recordBuilder.addField(BADMetadataRecordTypes.CHANNEL_ARECORD_DURATION_FIELD_INDEX, fieldValue);
-
-        // write record
-        recordBuilder.write(tupleBuilder.getDataOutput(), true);
-
-        tupleBuilder.addFieldEndOffset();
-
-        tuple.reset(tupleBuilder.getFieldEndOffsets(), tupleBuilder.getByteArray());
-        return tuple;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java b/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
deleted file mode 100644
index 8e19fc0..0000000
--- a/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
+++ /dev/null
@@ -1,317 +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.asterix.bad.rules;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.asterix.active.EntityId;
-import org.apache.asterix.algebra.operators.CommitOperator;
-import org.apache.asterix.bad.BADConstants;
-import org.apache.asterix.bad.runtime.NotifyBrokerOperator;
-import org.apache.asterix.bad.runtime.NotifyBrokerPOperator;
-import org.apache.asterix.lang.common.util.FunctionUtil;
-import org.apache.asterix.metadata.declared.DatasetDataSource;
-import org.apache.asterix.om.base.AString;
-import org.apache.asterix.om.constants.AsterixConstantValue;
-import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
-import org.apache.commons.lang3.mutable.Mutable;
-import org.apache.commons.lang3.mutable.MutableObject;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalPlan;
-import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
-import org.apache.hyracks.algebricks.core.algebra.base.LogicalOperatorTag;
-import org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AggregateFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.ConstantExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.DataSourceScanOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.DistinctOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.DistributeResultOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.ExtensionOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.GroupByOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.InsertDeleteUpsertOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.NestedTupleSourceOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.ProjectOperator;
-import org.apache.hyracks.algebricks.core.algebra.plan.ALogicalPlanImpl;
-import org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
-
-public class InsertBrokerNotifierForChannelRule implements IAlgebraicRewriteRule {
-
-    @Override
-    public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
-            throws AlgebricksException {
-        return false;
-    }
-
-    @Override
-    public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
-            throws AlgebricksException {
-        AbstractLogicalOperator op1 = (AbstractLogicalOperator) opRef.getValue();
-        if (op1.getOperatorTag() != LogicalOperatorTag.DISTRIBUTE_RESULT) {
-            return false;
-        }
-        AbstractLogicalOperator op = (AbstractLogicalOperator) op1.getInputs().get(0).getValue();
-        if (op.getOperatorTag() != LogicalOperatorTag.EXTENSION_OPERATOR) {
-            return false;
-        }
-        ExtensionOperator eOp = (ExtensionOperator) op;
-        if (!(eOp.getDelegate() instanceof CommitOperator)) {
-            return false;
-        }
-        AbstractLogicalOperator descendantOp = (AbstractLogicalOperator) eOp.getInputs().get(0).getValue();
-        if (descendantOp.getOperatorTag() != LogicalOperatorTag.INSERT_DELETE_UPSERT) {
-            return false;
-        }
-        InsertDeleteUpsertOperator insertOp = (InsertDeleteUpsertOperator) descendantOp;
-        if (insertOp.getOperation() != InsertDeleteUpsertOperator.Kind.INSERT) {
-            return false;
-        }
-        DatasetDataSource dds = (DatasetDataSource) insertOp.getDataSource();
-        String datasetName = dds.getDataset().getDatasetName();
-        if (!dds.getDataset().getItemTypeDataverseName().equals("Metadata")
-                || !dds.getDataset().getItemTypeName().equals("ChannelResultsType")
-                || !datasetName.endsWith("Results")) {
-            return false;
-        }
-        String channelDataverse = dds.getDataset().getDataverseName();
-        //Now we know that we are inserting into results
-
-        String channelName = datasetName.substring(0, datasetName.length() - 7);
-        String subscriptionsName = channelName + "Subscriptions";
-        //TODO: Can we check here to see if there is a channel with such a name?
-
-        DataSourceScanOperator subscriptionsScan = (DataSourceScanOperator) findOp(op, subscriptionsName);
-        if (subscriptionsScan == null) {
-            return false;
-        }
-
-        //Now we want to make sure and set the commit to be a nonsink commit
-        ((CommitOperator) eOp.getDelegate()).setSink(false);
-
-        //Now we need to get the broker EndPoint 
-        LogicalVariable brokerEndpointVar = context.newVar();
-        AbstractLogicalOperator opAboveBrokersScan = findOp(op, "brokers");
-        AssignOperator assignOp = createbrokerEndPointAssignOperator(brokerEndpointVar, opAboveBrokersScan);
-        //now brokerNameVar holds the brokerName for use farther up in the plan
-
-        //Place assignOp between the scan and the op above it
-        assignOp.getInputs().addAll(opAboveBrokersScan.getInputs());
-        opAboveBrokersScan.getInputs().clear();
-        opAboveBrokersScan.getInputs().add(new MutableObject<ILogicalOperator>(assignOp));
-        context.computeAndSetTypeEnvironmentForOperator(assignOp);
-        context.computeAndSetTypeEnvironmentForOperator(opAboveBrokersScan);
-        context.computeAndSetTypeEnvironmentForOperator(eOp);
-
-        //get subscriptionIdVar
-        LogicalVariable subscriptionIdVar = subscriptionsScan.getVariables().get(0);
-
-        //The channelExecutionTime is created just before the scan
-        LogicalVariable channelExecutionVar = ((AssignOperator) subscriptionsScan.getInputs().get(0).getValue())
-                .getVariables().get(0);
-
-        ProjectOperator badProject = (ProjectOperator) findOp(op, "project");
-        badProject.getVariables().add(subscriptionIdVar);
-        badProject.getVariables().add(brokerEndpointVar);
-        badProject.getVariables().add(channelExecutionVar);
-        context.computeAndSetTypeEnvironmentForOperator(badProject);
-
-        //Create my brokerNotify plan above the extension Operator
-        ExtensionOperator dOp = createNotifyBrokerPlan(brokerEndpointVar, subscriptionIdVar, channelExecutionVar,
-                context, eOp, (DistributeResultOperator) op1, channelDataverse, channelName);
-
-        opRef.setValue(dOp);
-
-        return true;
-    }
-
-    private ExtensionOperator createNotifyBrokerPlan(LogicalVariable brokerEndpointVar,
-            LogicalVariable subscriptionIdVar, LogicalVariable channelExecutionVar, IOptimizationContext context,
-            ILogicalOperator eOp, DistributeResultOperator distributeOp, String channelDataverse, String channelName)
-                    throws AlgebricksException {
-        //create the Distinct Op
-        ArrayList<Mutable<ILogicalExpression>> expressions = new ArrayList<Mutable<ILogicalExpression>>();
-        VariableReferenceExpression vExpr = new VariableReferenceExpression(subscriptionIdVar);
-        expressions.add(new MutableObject<ILogicalExpression>(vExpr));
-        DistinctOperator distinctOp = new DistinctOperator(expressions);
-
-        //create the GroupBy Op
-        //And set the distinct as input
-        List<Pair<LogicalVariable, Mutable<ILogicalExpression>>> groupByList = new ArrayList<Pair<LogicalVariable, Mutable<ILogicalExpression>>>();
-        List<Pair<LogicalVariable, Mutable<ILogicalExpression>>> groupByDecorList = new ArrayList<Pair<LogicalVariable, Mutable<ILogicalExpression>>>();
-        List<ILogicalPlan> nestedPlans = new ArrayList<ILogicalPlan>();
-
-        //create group by operator
-        GroupByOperator groupbyOp = new GroupByOperator(groupByList, groupByDecorList, nestedPlans);
-        groupbyOp.addGbyExpression(null, new VariableReferenceExpression(brokerEndpointVar));
-        groupbyOp.addGbyExpression(null, new VariableReferenceExpression(channelExecutionVar));
-        groupbyOp.getInputs().add(new MutableObject<ILogicalOperator>(distinctOp));
-
-        //create nested plan for subscription ids in group by
-        NestedTupleSourceOperator nestedTupleSourceOp = new NestedTupleSourceOperator(
-                new MutableObject<ILogicalOperator>(groupbyOp));
-        //TODO: This is from translationcontext. It might be needed to make the variable exist outside of the subplan
-        //LogicalVariable subscriptionListVar = context.newSubplanOutputVar();
-        LogicalVariable subscriptionListVar = context.newVar();
-        List<LogicalVariable> aggVars = new ArrayList<LogicalVariable>();
-        aggVars.add(subscriptionListVar);
-        AggregateFunctionCallExpression funAgg = AsterixBuiltinFunctions.makeAggregateFunctionExpression(
-                AsterixBuiltinFunctions.LISTIFY, new ArrayList<Mutable<ILogicalExpression>>());
-        funAgg.getArguments()
-                .add(new MutableObject<ILogicalExpression>(new VariableReferenceExpression(subscriptionIdVar)));
-        List<Mutable<ILogicalExpression>> aggExpressions = new ArrayList<Mutable<ILogicalExpression>>();
-        aggExpressions.add(new MutableObject<ILogicalExpression>(funAgg));
-        AggregateOperator listifyOp = new AggregateOperator(aggVars, aggExpressions);
-        listifyOp.getInputs().add(new MutableObject<ILogicalOperator>(nestedTupleSourceOp));
-
-        //add nested plans
-        nestedPlans.add(new ALogicalPlanImpl(new MutableObject<ILogicalOperator>(listifyOp)));
-
-        //Create the NotifyBrokerOperator
-        NotifyBrokerOperator notifyBrokerOp = new NotifyBrokerOperator(brokerEndpointVar, subscriptionListVar,
-                channelExecutionVar);
-        EntityId activeId = new EntityId(BADConstants.CHANNEL_EXTENSION_NAME, channelDataverse, channelName);
-        NotifyBrokerPOperator notifyBrokerPOp = new NotifyBrokerPOperator(activeId);
-        notifyBrokerOp.setPhysicalOperator(notifyBrokerPOp);
-        ExtensionOperator extensionOp = new ExtensionOperator(notifyBrokerOp);
-        extensionOp.setPhysicalOperator(notifyBrokerPOp);
-        extensionOp.getInputs().add(new MutableObject<ILogicalOperator>(groupbyOp));
-
-        //Set the input for the brokerNotify as the replicate operator
-        distinctOp.getInputs().add(new MutableObject<ILogicalOperator>(eOp));
-
-        //compute environment bottom up
-
-        context.computeAndSetTypeEnvironmentForOperator(distinctOp);
-        context.computeAndSetTypeEnvironmentForOperator(groupbyOp);
-        context.computeAndSetTypeEnvironmentForOperator(nestedTupleSourceOp);
-        context.computeAndSetTypeEnvironmentForOperator(listifyOp);
-        context.computeAndSetTypeEnvironmentForOperator(extensionOp);
-
-        return extensionOp;
-
-    }
-
-    @SuppressWarnings("unchecked")
-    private AssignOperator createbrokerEndPointAssignOperator(LogicalVariable brokerEndpointVar,
-            AbstractLogicalOperator opAboveBrokersScan) {
-        Mutable<ILogicalExpression> fieldRef = new MutableObject<ILogicalExpression>(
-                new ConstantExpression(new AsterixConstantValue(new AString(BADConstants.BrokerEndPoint))));
-        DataSourceScanOperator brokerScan = null;
-        for (Mutable<ILogicalOperator> subOp : opAboveBrokersScan.getInputs()) {
-            if (isBrokerScan((AbstractLogicalOperator) subOp.getValue())) {
-                brokerScan = (DataSourceScanOperator) subOp.getValue();
-            }
-        }
-        Mutable<ILogicalExpression> varRef = new MutableObject<ILogicalExpression>(
-                new VariableReferenceExpression(brokerScan.getVariables().get(2)));
-
-        ScalarFunctionCallExpression fieldAccessByName = new ScalarFunctionCallExpression(
-                FunctionUtil.getFunctionInfo(AsterixBuiltinFunctions.FIELD_ACCESS_BY_NAME), varRef, fieldRef);
-        ArrayList<LogicalVariable> varArray = new ArrayList<LogicalVariable>(1);
-        varArray.add(brokerEndpointVar);
-        ArrayList<Mutable<ILogicalExpression>> exprArray = new ArrayList<Mutable<ILogicalExpression>>(1);
-        exprArray.add(new MutableObject<ILogicalExpression>(fieldAccessByName));
-        return new AssignOperator(varArray, exprArray);
-    }
-
-    /*This function searches for the needed op
-     * If lookingForBrokers, find the op above the brokers scan
-     * Else find the suscbriptionsScan
-     */
-    private AbstractLogicalOperator findOp(AbstractLogicalOperator op, String lookingForString) {
-        if (!op.hasInputs()) {
-            return null;
-        }
-        for (Mutable<ILogicalOperator> subOp : op.getInputs()) {
-            if (lookingForString.equals("brokers")) {
-                if (isBrokerScan((AbstractLogicalOperator) subOp.getValue())) {
-                    return op;
-                } else {
-                    AbstractLogicalOperator nestedOp = findOp((AbstractLogicalOperator) subOp.getValue(),
-                            lookingForString);
-                    if (nestedOp != null) {
-                        return nestedOp;
-                    }
-                }
-
-            } else if (lookingForString.equals("project")) {
-                if (subOp.getValue().getOperatorTag() == LogicalOperatorTag.PROJECT) {
-                    return (AbstractLogicalOperator) subOp.getValue();
-                } else {
-                    AbstractLogicalOperator nestedOp = findOp((AbstractLogicalOperator) subOp.getValue(),
-                            lookingForString);
-                    if (nestedOp != null) {
-                        return nestedOp;
-                    }
-                }
-            }
-
-            else {
-                if (isSubscriptionsScan((AbstractLogicalOperator) subOp.getValue(), lookingForString)) {
-                    return (AbstractLogicalOperator) subOp.getValue();
-                } else {
-                    AbstractLogicalOperator nestedOp = findOp((AbstractLogicalOperator) subOp.getValue(),
-                            lookingForString);
-                    if (nestedOp != null) {
-                        return nestedOp;
-                    }
-                }
-
-            }
-        }
-        return null;
-    }
-
-    private boolean isBrokerScan(AbstractLogicalOperator op) {
-        if (op instanceof DataSourceScanOperator) {
-            if (((DataSourceScanOperator) op).getDataSource() instanceof DatasetDataSource) {
-                DatasetDataSource dds = (DatasetDataSource) ((DataSourceScanOperator) op).getDataSource();
-                if (dds.getDataset().getDataverseName().equals("Metadata")
-                        && dds.getDataset().getDatasetName().equals("Broker")) {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    private boolean isSubscriptionsScan(AbstractLogicalOperator op, String subscriptionsName) {
-        if (op instanceof DataSourceScanOperator) {
-            if (((DataSourceScanOperator) op).getDataSource() instanceof DatasetDataSource) {
-                DatasetDataSource dds = (DatasetDataSource) ((DataSourceScanOperator) op).getDataSource();
-                if (dds.getDataset().getItemTypeDataverseName().equals("Metadata")
-                        && dds.getDataset().getItemTypeName().equals("ChannelSubscriptionsType")) {
-                    if (dds.getDataset().getDatasetName().equals(subscriptionsName)) {
-                        return true;
-                    }
-                }
-            }
-        }
-        return false;
-    }
-
-}


[07/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/generated-resources/javacc/grammar.jj
----------------------------------------------------------------------
diff --git a/target/generated-resources/javacc/grammar.jj b/target/generated-resources/javacc/grammar.jj
deleted file mode 100644
index ad77885..0000000
--- a/target/generated-resources/javacc/grammar.jj
+++ /dev/null
@@ -1,2949 +0,0 @@
-options{
-
-
-       STATIC = false;
-
-}
-PARSER_BEGIN(BADAQLParser)
-
-package org.apache.asterix.bad.lang;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.asterix.bad.lang.statement.BrokerDropStatement;
-import org.apache.asterix.bad.lang.statement.ChannelDropStatement;
-import org.apache.asterix.bad.lang.statement.ChannelSubscribeStatement;
-import org.apache.asterix.bad.lang.statement.ChannelUnsubscribeStatement;
-import org.apache.asterix.bad.lang.statement.CreateBrokerStatement;
-import org.apache.asterix.bad.lang.statement.CreateChannelStatement;
-import org.apache.asterix.common.annotations.AutoDataGen;
-import org.apache.asterix.common.annotations.DateBetweenYearsDataGen;
-import org.apache.asterix.common.annotations.DatetimeAddRandHoursDataGen;
-import org.apache.asterix.common.annotations.DatetimeBetweenYearsDataGen;
-import org.apache.asterix.common.annotations.FieldIntervalDataGen;
-import org.apache.asterix.common.annotations.FieldValFileDataGen;
-import org.apache.asterix.common.annotations.FieldValFileSameIndexDataGen;
-import org.apache.asterix.common.annotations.IRecordFieldDataGen;
-import org.apache.asterix.common.annotations.InsertRandIntDataGen;
-import org.apache.asterix.common.annotations.ListDataGen;
-import org.apache.asterix.common.annotations.ListValFileDataGen;
-import org.apache.asterix.common.annotations.SkipSecondaryIndexSearchExpressionAnnotation;
-import org.apache.asterix.common.annotations.TypeDataGen;
-import org.apache.asterix.common.annotations.UndeclaredFieldsDataGen;
-import org.apache.asterix.common.config.DatasetConfig.DatasetType;
-import org.apache.asterix.common.config.DatasetConfig.IndexType;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.common.functions.FunctionSignature;
-import org.apache.asterix.lang.aql.clause.DistinctClause;
-import org.apache.asterix.lang.aql.clause.ForClause;
-import org.apache.asterix.lang.aql.expression.FLWOGRExpression;
-import org.apache.asterix.lang.aql.expression.UnionExpr;
-import org.apache.asterix.lang.aql.util.RangeMapBuilder;
-import org.apache.asterix.lang.common.base.Clause;
-import org.apache.asterix.lang.common.base.Expression;
-import org.apache.asterix.lang.common.base.IParser;
-import org.apache.asterix.lang.common.base.Literal;
-import org.apache.asterix.lang.common.base.Statement;
-import org.apache.asterix.lang.common.clause.GroupbyClause;
-import org.apache.asterix.lang.common.clause.LetClause;
-import org.apache.asterix.lang.common.clause.LimitClause;
-import org.apache.asterix.lang.common.clause.OrderbyClause;
-import org.apache.asterix.lang.common.clause.UpdateClause;
-import org.apache.asterix.lang.common.clause.WhereClause;
-import org.apache.asterix.lang.common.context.RootScopeFactory;
-import org.apache.asterix.lang.common.context.Scope;
-import org.apache.asterix.lang.common.expression.AbstractAccessor;
-import org.apache.asterix.lang.common.expression.CallExpr;
-import org.apache.asterix.lang.common.expression.FieldAccessor;
-import org.apache.asterix.lang.common.expression.FieldBinding;
-import org.apache.asterix.lang.common.expression.GbyVariableExpressionPair;
-import org.apache.asterix.lang.common.expression.IfExpr;
-import org.apache.asterix.lang.common.expression.IndexAccessor;
-import org.apache.asterix.lang.common.expression.ListConstructor;
-import org.apache.asterix.lang.common.expression.LiteralExpr;
-import org.apache.asterix.lang.common.expression.OperatorExpr;
-import org.apache.asterix.lang.common.expression.OrderedListTypeDefinition;
-import org.apache.asterix.lang.common.expression.QuantifiedExpression;
-import org.apache.asterix.lang.common.expression.RecordConstructor;
-import org.apache.asterix.lang.common.expression.RecordTypeDefinition;
-import org.apache.asterix.lang.common.expression.TypeExpression;
-import org.apache.asterix.lang.common.expression.TypeReferenceExpression;
-import org.apache.asterix.lang.common.expression.UnaryExpr;
-import org.apache.asterix.lang.common.expression.UnorderedListTypeDefinition;
-import org.apache.asterix.lang.common.expression.VariableExpr;
-import org.apache.asterix.lang.common.literal.DoubleLiteral;
-import org.apache.asterix.lang.common.literal.FalseLiteral;
-import org.apache.asterix.lang.common.literal.FloatLiteral;
-import org.apache.asterix.lang.common.literal.LongIntegerLiteral;
-import org.apache.asterix.lang.common.literal.MissingLiteral;
-import org.apache.asterix.lang.common.literal.NullLiteral;
-import org.apache.asterix.lang.common.literal.StringLiteral;
-import org.apache.asterix.lang.common.literal.TrueLiteral;
-import org.apache.asterix.lang.common.parser.ScopeChecker;
-import org.apache.asterix.lang.common.statement.CompactStatement;
-import org.apache.asterix.lang.common.statement.ConnectFeedStatement;
-import org.apache.asterix.lang.common.statement.CreateDataverseStatement;
-import org.apache.asterix.lang.common.statement.CreateFeedPolicyStatement;
-import org.apache.asterix.lang.common.statement.CreateFeedStatement;
-import org.apache.asterix.lang.common.statement.CreateFunctionStatement;
-import org.apache.asterix.lang.common.statement.CreateIndexStatement;
-import org.apache.asterix.lang.common.statement.CreatePrimaryFeedStatement;
-import org.apache.asterix.lang.common.statement.CreateSecondaryFeedStatement;
-import org.apache.asterix.lang.common.statement.DatasetDecl;
-import org.apache.asterix.lang.common.statement.DataverseDecl;
-import org.apache.asterix.lang.common.statement.DataverseDropStatement;
-import org.apache.asterix.lang.common.statement.DeleteStatement;
-import org.apache.asterix.lang.common.statement.DisconnectFeedStatement;
-import org.apache.asterix.lang.common.statement.DropDatasetStatement;
-import org.apache.asterix.lang.common.statement.ExternalDetailsDecl;
-import org.apache.asterix.lang.common.statement.FeedDropStatement;
-import org.apache.asterix.lang.common.statement.FeedPolicyDropStatement;
-import org.apache.asterix.lang.common.statement.FunctionDecl;
-import org.apache.asterix.lang.common.statement.FunctionDropStatement;
-import org.apache.asterix.lang.common.statement.IndexDropStatement;
-import org.apache.asterix.lang.common.statement.InsertStatement;
-import org.apache.asterix.lang.common.statement.InternalDetailsDecl;
-import org.apache.asterix.lang.common.statement.LoadStatement;
-import org.apache.asterix.lang.common.statement.NodeGroupDropStatement;
-import org.apache.asterix.lang.common.statement.NodegroupDecl;
-import org.apache.asterix.lang.common.statement.Query;
-import org.apache.asterix.lang.common.statement.RefreshExternalDatasetStatement;
-import org.apache.asterix.lang.common.statement.RunStatement;
-import org.apache.asterix.lang.common.statement.SetStatement;
-import org.apache.asterix.lang.common.statement.TypeDecl;
-import org.apache.asterix.lang.common.statement.TypeDropStatement;
-import org.apache.asterix.lang.common.statement.UpdateStatement;
-import org.apache.asterix.lang.common.statement.UpsertStatement;
-import org.apache.asterix.lang.common.statement.WriteStatement;
-import org.apache.asterix.lang.common.struct.Identifier;
-import org.apache.asterix.lang.common.struct.QuantifiedPair;
-import org.apache.asterix.lang.common.struct.VarIdentifier;
-import org.apache.asterix.metadata.utils.MetadataConstants;
-import org.apache.hyracks.algebricks.common.utils.Pair;
-import org.apache.hyracks.algebricks.common.utils.Triple;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IExpressionAnnotation;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IndexedNLJoinExpressionAnnotation;
-import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
-import org.apache.xerces.util.IntStack;
-
-class BADAQLParser extends ScopeChecker implements IParser {
-
-    // optimizer hints
-    private static final String AUTO_HINT = "auto";
-    private static final String BROADCAST_JOIN_HINT = "bcast";
-    private static final String COMPOSE_VAL_FILES_HINT = "compose-val-files";
-    private static final String DATE_BETWEEN_YEARS_HINT = "date-between-years";
-    private static final String DATETIME_ADD_RAND_HOURS_HINT = "datetime-add-rand-hours";
-    private static final String DATETIME_BETWEEN_YEARS_HINT = "datetime-between-years";
-    private static final String HASH_GROUP_BY_HINT = "hash";
-    private static final String INDEXED_NESTED_LOOP_JOIN_HINT = "indexnl";
-    private static final String INMEMORY_HINT = "inmem";
-    private static final String INSERT_RAND_INT_HINT = "insert-rand-int";
-    private static final String INTERVAL_HINT = "interval";
-    private static final String LIST_HINT = "list";
-    private static final String LIST_VAL_FILE_HINT = "list-val-file";
-    private static final String RANGE_HINT = "range";
-    private static final String SKIP_SECONDARY_INDEX_SEARCH_HINT = "skip-index";
-    private static final String VAL_FILE_HINT = "val-files";
-    private static final String VAL_FILE_SAME_INDEX_HINT = "val-file-same-idx";
-    private static final String GEN_FIELDS_HINT = "gen-fields";
-    // data generator hints
-    private static final String DGEN_HINT = "dgen";
-
-    private static class IndexParams {
-      public IndexType type;
-      public int gramLength;
-
-      public IndexParams(IndexType type, int gramLength) {
-        this.type = type;
-        this.gramLength = gramLength;
-      }
-    };
-
-    private static class FunctionName {
-       public String dataverse = null;
-       public String library = null;
-       public String function = null;
-       public String hint = null;
-    }
-
-    private static String getHint(Token t) {
-        if (t.specialToken == null) {
-            return null;
-        }
-        String s = t.specialToken.image;
-        int n = s.length();
-        if (n < 2) {
-            return null;
-        }
-        return s.substring(1).trim();
-    }
-
-    private static IRecordFieldDataGen parseFieldDataGen(String hint) throws ParseException {
-      IRecordFieldDataGen rfdg = null;
-      String splits[] = hint.split(" +");
-      if (splits[0].equals(VAL_FILE_HINT)) {
-        File[] valFiles = new File[splits.length - 1];
-        for (int k=1; k<splits.length; k++) {
-          valFiles[k-1] = new File(splits[k]);
-        }
-        rfdg = new FieldValFileDataGen(valFiles);
-      } else if (splits[0].equals(VAL_FILE_SAME_INDEX_HINT)) {
-        rfdg = new FieldValFileSameIndexDataGen(new File(splits[1]), splits[2]);
-      } else if (splits[0].equals(LIST_VAL_FILE_HINT)) {
-        rfdg = new ListValFileDataGen(new File(splits[1]), Integer.parseInt(splits[2]), Integer.parseInt(splits[3]));
-      } else if (splits[0].equals(LIST_HINT)) {
-        rfdg = new ListDataGen(Integer.parseInt(splits[1]), Integer.parseInt(splits[2]));
-      } else if (splits[0].equals(INTERVAL_HINT)) {
-        FieldIntervalDataGen.ValueType vt;
-        if (splits[1].equals("int")) {
-          vt = FieldIntervalDataGen.ValueType.INT;
-        } else if (splits[1].equals("long")) {
-          vt = FieldIntervalDataGen.ValueType.LONG;
-        } else if (splits[1].equals("float")) {
-          vt = FieldIntervalDataGen.ValueType.FLOAT;
-        } else if (splits[1].equals("double")) {
-          vt = FieldIntervalDataGen.ValueType.DOUBLE;
-        } else {
-          throw new ParseException("Unknown type for interval data gen: " + splits[1]);
-        }
-        rfdg = new FieldIntervalDataGen(vt, splits[2], splits[3]);
-      } else if (splits[0].equals(INSERT_RAND_INT_HINT)) {
-        rfdg = new InsertRandIntDataGen(splits[1], splits[2]);
-      } else if (splits[0].equals(DATE_BETWEEN_YEARS_HINT)) {
-        rfdg = new DateBetweenYearsDataGen(Integer.parseInt(splits[1]), Integer.parseInt(splits[2]));
-      } else if (splits[0].equals(DATETIME_BETWEEN_YEARS_HINT)) {
-        rfdg = new DatetimeBetweenYearsDataGen(Integer.parseInt(splits[1]), Integer.parseInt(splits[2]));
-      } else if (splits[0].equals(DATETIME_ADD_RAND_HOURS_HINT)) {
-        rfdg = new DatetimeAddRandHoursDataGen(Integer.parseInt(splits[1]), Integer.parseInt(splits[2]), splits[3]);
-      } else if (splits[0].equals(AUTO_HINT)) {
-        rfdg = new AutoDataGen(splits[1]);
-      }
-      return rfdg;
-    }
-
-    public BADAQLParser(String s){
-        this(new StringReader(s));
-        super.setInput(s);
-    }
-
-    public static void main(String args[]) throws ParseException, TokenMgrError, IOException, FileNotFoundException, AsterixException {
-        File file = new File(args[0]);
-        Reader fis = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
-        BADAQLParser parser = new BADAQLParser(fis);
-        List<Statement> st = parser.parse();
-        //st.accept(new AQLPrintVisitor(), 0);
-    }
-
-    public List<Statement> parse() throws AsterixException {
-        try {
-            return Statement();
-        } catch (Error e) {
-            // this is here as the JavaCharStream that's below the lexer somtimes throws Errors that are not handled
-            // by the ANTLR-generated lexer or parser (e.g it does this for invalid backslash u + 4 hex digits escapes)
-            throw new AsterixException(new ParseException(e.getMessage()));
-        } catch (ParseException e){
-            throw new AsterixException(e.getMessage());
-        }
-    }
-}
-
-PARSER_END(BADAQLParser)
-
-
-LimitClause LimitClause() throws ParseException:
-{
-    LimitClause lc = new LimitClause();
-    Expression expr;
-    pushForbiddenScope(getCurrentScope());
-}
-{
-    <LIMIT> expr = Expression()    { lc.setLimitExpr(expr);    }
-    (<OFFSET> expr = Expression() { lc.setOffset(expr);    })?
-
-  {
-    popForbiddenScope();
-    return lc;
-  }
-}
-
-String StringLiteral() throws ParseException:
-{
-}
-{
-  <STRING_LITERAL>
-    {
-      return removeQuotesAndEscapes(token.image);
-    }
-}
-
-RefreshExternalDatasetStatement RefreshExternalDatasetStatement() throws ParseException:
-{
-  RefreshExternalDatasetStatement redss = new RefreshExternalDatasetStatement();
-  Pair<Identifier,Identifier> nameComponents = null;
-  String datasetName = null;
-}
-{
-  (
-    <REFRESH> <EXTERNAL> <DATASET> nameComponents = QualifiedName()
-    {
-    redss.setDataverseName(nameComponents.first);
-    redss.setDatasetName(nameComponents.second);
-    return redss;
-    }
-  )
-}
-
-Statement CompactStatement() throws ParseException:
-{
-  Pair<Identifier,Identifier> nameComponents = null;
-  Statement stmt = null;
-}
-{
-  <COMPACT> <DATASET> nameComponents = QualifiedName()
-    {
-      stmt = new CompactStatement(nameComponents.first, nameComponents.second);
-    }
-    {
-      return stmt;
-    }
-}
-
-Expression AndExpr() throws ParseException:
-{
-  OperatorExpr op = null;
-  Expression operand = null;
-}
-{
-    operand = RelExpr()
-    (
-
-      <AND>
-      {
-        if (op == null) {
-          op = new OperatorExpr();
-          op.addOperand(operand);
-        op.setCurrentop(true);
-        }
-        try{
-          op.addOperator(token.image);
-        } catch (AsterixException e){
-          throw new ParseException(e.getMessage());
-        }
-    }
-
-    operand = RelExpr()
-    {
-      op.addOperand(operand);
-    }
-
-    )*
-
-    {
-      return op==null? operand: op;
-    }
-}
-
-TypeDecl TypeSpecification(String hint, boolean dgen) throws ParseException:
-{
-  Pair<Identifier,Identifier> nameComponents = null;
-  boolean ifNotExists = false;
-  TypeExpression typeExpr = null;
-}
-{
-  <TYPE> nameComponents = TypeName() ifNotExists = IfNotExists()
-  <AS> typeExpr = TypeExpr()
-    {
-      long numValues = -1;
-      String filename = null;
-      if (dgen) {
-        String splits[] = hint.split(" +");
-        if (splits.length != 3) {
-          throw new ParseException("Expecting /*+ dgen <filename> <numberOfItems> */");
-        }
-        filename = splits[1];
-        numValues = Long.parseLong(splits[2]);
-      }
-      TypeDataGen tddg = new TypeDataGen(dgen, filename, numValues);
-      return new TypeDecl(nameComponents.first, nameComponents.second, typeExpr, tddg, ifNotExists);
-    }
-}
-
-TOKEN_MGR_DECLS:
-{
-    public int commentDepth = 0;
-    public IntStack lexerStateStack = new IntStack();
-
-    public void pushState() {
-      lexerStateStack.push( curLexState );
-    }
-
-    public void popState(String token) {
-      if (lexerStateStack.size() > 0) {
-         SwitchTo( lexerStateStack.pop() );
-      } else {
-         int errorLine = input_stream.getEndLine();
-         int errorColumn = input_stream.getEndColumn();
-         String msg = "Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered \"" + token
-             + "\" but state stack is empty.";
-         throw new TokenMgrError(msg, -1);
-      }
-    }
-}
-
-Statement WriteStatement() throws ParseException:
-{
-  String nodeName = null;
-  String fileName = null;
-  Query query;
-  String writerClass = null;
-  Pair<Identifier,Identifier> nameComponents = null;
-}
-{
-  <WRITE> <OUTPUT> <TO> nodeName = Identifier() <COLON> fileName = StringLiteral()
-    ( <USING> writerClass = StringLiteral() )?
-    {
-      return new WriteStatement(new Identifier(nodeName), fileName, writerClass);
-    }
-}
-
-Pair<Integer, Pair<List<String>, TypeExpression>>OpenField() throws ParseException:
-{
-  TypeExpression fieldType = null;
-  Pair<Integer, List<String>> fieldList = null;
-}
-{
-  fieldList = NestedField()
-  ( <COLON> fieldType =  IndexedTypeExpr() <QUES>)?
-  {
-    return new Pair<Integer, Pair<List<String>, TypeExpression>>
-           (fieldList.first, new Pair<List<String>, TypeExpression>(fieldList.second, fieldType));
-  }
-}
-
-boolean IfExists() throws ParseException:
-{
-}
-{
-  (
-    LOOKAHEAD(1)
-    <IF> <EXISTS>
-    {
-      return true;
-    }
-  )?
-    {
-      return false;
-    }
-}
-
-Expression Index() throws ParseException:
-{
-    Expression expr = null;
-}
-{
-  <LEFTBRACKET> ( expr = Expression()
-    {
-        if(expr.getKind() == Expression.Kind.LITERAL_EXPRESSION)
-        {
-            Literal lit = ((LiteralExpr)expr).getValue();
-            if(lit.getLiteralType() != Literal.Type.INTEGER &&
-               lit.getLiteralType() != Literal.Type.LONG) {
-                throw new ParseException("Index should be an INTEGER");
-            }
-        }
-    }
-
-      | <QUES> // ANY
-
-      )
-
-   <RIGHTBRACKET>
-    {
-      return expr;
-    }
-}
-
-IndexParams IndexType() throws ParseException:
-{
-  IndexType type = null;
-  int gramLength = 0;
-}
-{
-  (
-    <BTREE>
-    {
-      type = IndexType.BTREE;
-    }
-   |<RTREE>
-    {
-      type = IndexType.RTREE;
-    }
-   |<KEYWORD>
-    {
-      type = IndexType.LENGTH_PARTITIONED_WORD_INVIX;
-    }
-   |<NGRAM> <LEFTPAREN> <INTEGER_LITERAL>
-    {
-      type = IndexType.LENGTH_PARTITIONED_NGRAM_INVIX;
-      gramLength = Integer.valueOf(token.image);
-    }
-    <RIGHTPAREN>
-  )
-  {
-    return new IndexParams(type, gramLength);
-  }
-}
-
-CreateBrokerStatement BrokerSpecification() throws ParseException:
-{
-  CreateBrokerStatement cbs = null;
-  Pair<Identifier,Identifier> name = null;
-  String endPoint = null;
-}
-{
-  (
-    <BROKER>  name = QualifiedName()
-    <AT>  endPoint = StringLiteral()
-    {
-      cbs = new CreateBrokerStatement(name.first, name.second,endPoint);
-    }
-  )
-    {
-      return cbs;
-    }
-}
-
-FunctionDecl FunctionDeclaration() throws ParseException:
-{
-  FunctionDecl funcDecl;
-  FunctionSignature signature;
-  String functionName;
-  List<VarIdentifier> paramList = new ArrayList<VarIdentifier>();
-  Expression funcBody;
-  createNewScope();
-}
-{
-  <DECLARE> <FUNCTION> functionName = Identifier()
-  paramList = ParameterList()
-  <LEFTBRACE> funcBody = Expression() <RIGHTBRACE>
-    {
-      signature = new FunctionSignature(defaultDataverse, functionName, paramList.size());
-      getCurrentScope().addFunctionDescriptor(signature, false);
-      funcDecl = new FunctionDecl(signature, paramList, funcBody);
-      removeCurrentScope();
-      return funcDecl;
-    }
-}
-
-Triple<Identifier,Identifier,Identifier>DoubleQualifiedName() throws ParseException:
-{
-  String first = null;
-  String second = null;
-  String third = null;
-}
-{
-  first = Identifier() <DOT> second = Identifier() (<DOT> third = Identifier())?
-  {
-    Identifier id1 = null;
-    Identifier id2 = null;
-    Identifier id3 = null;
-    if (third == null) {
-      id2 = new Identifier(first);
-      id3 = new Identifier(second);
-    } else {
-      id1 = new Identifier(first);
-      id2 = new Identifier(second);
-      id3 = new Identifier(third);
-    }
-    return new Triple<Identifier,Identifier,Identifier>(id1, id2, id3);
-  }
-}
-
-Expression MultExpr() throws ParseException:
-{
-  OperatorExpr op = null;
-  Expression operand = null;
-}
-{
-    operand = ExponentExpr()
-
-    (( <MUL> | <DIV> | <MOD> | <IDIV>)
-      {
-        if (op == null) {
-          op = new OperatorExpr();
-          op.addOperand(operand);
-          op.setCurrentop(true);
-        }
-        try{
-          op.addOperator(token.image);
-        } catch (AsterixException e){
-          throw new ParseException(e.getMessage());
-        }
-    }
-    operand = ExponentExpr()
-    {
-       op.addOperand(operand);
-    }
-    )*
-
-     {
-       return op==null?operand:op;
-     }
-}
-
-InsertStatement InsertStatement() throws ParseException:
-{
-  Pair<Identifier,Identifier> nameComponents = null;
-  Pair<Integer, List<String>> returnField = new Pair<Integer, List<String>>(0, null);
-  boolean returnRecord = false;
-  Query query;
-  boolean upsert = false;
-}
-{
-  (<INSERT>|<UPSERT>{ upsert = true; }) <INTO> <DATASET> nameComponents = QualifiedName() 
-  query = Query() (<RETURN> "records"{returnRecord = true;} | "returning" returnField = NestedField())?
-    {
-      query.setTopLevel(true);
-      if(upsert){
-        return new UpsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter());
-      } else{
-        return new InsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(),
-        returnRecord, returnField.second);
-      }
-    }
-}
-
-Expression FunctionCallExpr() throws ParseException:
-{
-  CallExpr callExpr;
-  List<Expression> argList = new ArrayList<Expression>();
-  Expression tmp;
-  int arity = 0;
-  FunctionName funcName = null;
-  String hint = null;
-}
-{
-  funcName = FunctionName()
-    {
-      hint = funcName.hint;
-    }
-  <LEFTPAREN> (tmp = Expression()
-    {
-      argList.add(tmp);
-      arity ++;
-    }
-  (<COMMA> tmp = Expression()
-    {
-      argList.add(tmp);
-      arity++;
-    }
-  )*)? <RIGHTPAREN>
-    {
-      // TODO use funcName.library
-      String fqFunctionName = funcName.library == null ? funcName.function : funcName.library + "#" + funcName.function;
-      FunctionSignature signature
-        = lookupFunctionSignature(funcName.dataverse, fqFunctionName, arity);
-      if (signature == null) {
-        signature = new FunctionSignature(funcName.dataverse, fqFunctionName, arity);
-      }
-      callExpr = new CallExpr(signature,argList);
-      if (hint != null) {
-        if (hint.startsWith(INDEXED_NESTED_LOOP_JOIN_HINT)) {
-          callExpr.addHint(IndexedNLJoinExpressionAnnotation.INSTANCE);
-        } else if (hint.startsWith(SKIP_SECONDARY_INDEX_SEARCH_HINT)) {
-          callExpr.addHint(SkipSecondaryIndexSearchExpressionAnnotation.INSTANCE);
-        }
-      }
-      return callExpr;
-    }
-}
-
-Clause Clause() throws ParseException:
-{
-  Clause clause;
-}
-{
-    (
-         clause = ForClause()
-       | clause = LetClause()
-       | clause = WhereClause()
-       | clause = OrderbyClause()
-       | clause = GroupClause()
-       | clause = LimitClause()
-       | clause = DistinctClause()
-    )
-    {
-      return clause;
-    }
-}
-
-Pair<Integer, List<String>>NestedField() throws ParseException:
-{
-  List<String> exprList = new ArrayList<String>();
-  String lit = null;
-  int source = 0;
-}
-{
-  lit = Identifier()
-  {
-    boolean meetParens = false;
-  }
-  (
-    LOOKAHEAD(1)
-    <LEFTPAREN><RIGHTPAREN>
-    {
-        if(!lit.equals("meta")){
-            throw new ParseException("The string before () has to be \"meta\".");
-        }
-        meetParens = true;
-        source = 1;
-    }
-  )?
-  {
-    if(!meetParens){
-        exprList.add(lit);
-    }
-  }
-  (<DOT>
-    lit = Identifier()
-    {
-      exprList.add(lit);
-    }
-  )*
-  {
-    return new Pair<Integer, List<String>>(source, exprList);
-  }
-}
-
-Expression Literal() throws ParseException:
-{
-  LiteralExpr lit = new LiteralExpr();
-  String str = null;
-}
-{
-  ( str = StringLiteral()
-    {
-      lit.setValue(new StringLiteral(str));
-    }
-  | <INTEGER_LITERAL>
-    {
-      lit.setValue(new LongIntegerLiteral(new Long(token.image)));
-    }
-  | <FLOAT_LITERAL>
-    {
-      lit.setValue(new FloatLiteral(new Float(token.image)));
-    }
-  | <DOUBLE_LITERAL>
-    {
-      lit.setValue(new DoubleLiteral(new Double(token.image)));
-    }
-  | <MISSING>
-    {
-      lit.setValue(MissingLiteral.INSTANCE);
-    }
-  | <NULL>
-    {
-      lit.setValue(NullLiteral.INSTANCE);
-    }
-  | <TRUE>
-    {
-      lit.setValue(TrueLiteral.INSTANCE);
-    }
-  | <FALSE>
-    {
-      lit.setValue(FalseLiteral.INSTANCE);
-    }
-  )
-    {
-      return lit;
-    }
-}
-
-Expression OperatorExpr() throws ParseException:
-{
-  OperatorExpr op = null;
-  Expression operand = null;
-}
-{
-    operand = AndExpr()
-    (
-
-      <OR>
-      {
-        if (op == null) {
-          op = new OperatorExpr();
-          op.addOperand(operand);
-        op.setCurrentop(true);
-        }
-        try{
-          op.addOperator(token.image);
-        } catch (AsterixException e){
-          throw new ParseException(e.getMessage());
-        }
-    }
-
-    operand = AndExpr()
-    {
-      op.addOperand(operand);
-    }
-
-    )*
-
-    {
-      return op==null? operand: op;
-    }
-}
-
-Expression AddExpr() throws ParseException:
-{
-  OperatorExpr op = null;
-  Expression operand = null;
-}
-{
-    operand = MultExpr()
-
-    ( (<PLUS> | <MINUS>)
-      {
-        if (op == null) {
-          op = new OperatorExpr();
-        op.addOperand(operand);
-        op.setCurrentop(true);
-        }
-        try{
-          ((OperatorExpr)op).addOperator(token.image);
-        } catch (AsterixException e){
-          throw new ParseException(e.getMessage());
-        }
-    }
-
-    operand = MultExpr()
-    {
-      op.addOperand(operand);
-    }
-    )*
-
-    {
-       return op==null? operand: op;
-     }
-}
-
-Statement SetStatement() throws ParseException:
-{
-  String pn = null;
-  String pv = null;
-}
-{
-  <SET> pn = Identifier() pv = StringLiteral()
-    {
-      return new SetStatement(pn, pv);
-    }
-}
-
-RunStatement RunStatement() throws ParseException:
-{
-  String system = null;
-  String tmp;
-  ArrayList<String> parameters = new  ArrayList<String>();
-  Pair<Identifier,Identifier> nameComponentsFrom = null;
-  Pair<Identifier,Identifier> nameComponentsTo = null;
-}
-{
-  <RUN> system = Identifier()<LEFTPAREN> ( tmp = Identifier() [<COMMA>]
-    {
-      parameters.add(tmp);
-    }
-  )*<RIGHTPAREN>
-  <FROM> <DATASET> nameComponentsFrom  = QualifiedName()
-  <TO> <DATASET> nameComponentsTo  = QualifiedName()
-    {
-      return new RunStatement(system, parameters, nameComponentsFrom.first, nameComponentsFrom.second, nameComponentsTo.first, nameComponentsTo.second);
-    }
-}
-
-List<Statement>Statement() throws ParseException:
-{
-  scopeStack.push(RootScopeFactory.createRootScope(this));
-  List<Statement> decls = new ArrayList<Statement>();
-  Statement stmt = null;
-}
-{
-  ( stmt = SingleStatement() (";") ?
-    {
-      decls.add(stmt);
-    }
-  )*
-  <EOF>
-  {
-    return decls;
-  }
-}
-
-String GetPolicy() throws ParseException:
-{
-  String policy = null;
-}
-{
-   <USING> <POLICY> policy = Identifier()
-   {
-     return policy;
-   }
-
-}
-
-Expression FLWOGR() throws ParseException:
-{
-    FLWOGRExpression flworg = new FLWOGRExpression();
-    List<Clause> clauseList = new ArrayList<Clause>();
-    Expression returnExpr;
-    Clause tmp;
-    createNewScope();
-}
-{
-     (tmp = ForClause()  {clauseList.add(tmp);} | tmp = LetClause() {clauseList.add(tmp);})
-      (tmp = Clause() {clauseList.add(tmp);})* (<RETURN>|<SELECT>) returnExpr = Expression()
-
-     {
-       flworg.setClauseList(clauseList);
-       flworg.setReturnExpr(returnExpr);
-       removeCurrentScope();
-       return flworg;
-     }
-}
-
-DistinctClause DistinctClause() throws ParseException:
-{
-  List<Expression> exprs = new ArrayList<Expression>();
-  Expression expr;
-}
-{
-  <DISTINCT> <BY> expr = Expression()
-  {
-    exprs.add(expr);
-  }
-  (<COMMA> expr = Expression()
-      {
-          exprs.add(expr);
-      }
-  )*
-  {
-      return new DistinctClause(exprs);
-  }
-}
-
-Identifier Field() throws ParseException:
-{
-  String ident = null;
-}
-{
-  <DOT> ident = Identifier()
-    {
-      return new Identifier(ident);
-    }
-}
-
-String Identifier() throws ParseException:
-{
-  String lit = null;
-}
-{
-  ((<IDENTIFIER>)
-    {
-      return token.image;
-    }
-  | lit = StringLiteral()
-    {
-      return lit;
-    }
-  )
-}
-
-// Merged Non-terminal
-Statement SingleStatement() throws ParseException:
-{
-  Statement stmt = null;
-}
-{
-  (
-    stmt = DataverseDeclaration()
-    | stmt = FunctionDeclaration()
-    | stmt = CreateStatement()
-    | stmt = LoadStatement()
-    | stmt = DropStatement()
-    | stmt = WriteStatement()
-    | stmt = SetStatement()
-    | stmt = InsertStatement()
-    | stmt = DeleteStatement()
-    | stmt = UpdateStatement()
-    | stmt = FeedStatement()
-    | stmt = CompactStatement()
-    | stmt = Query()
-    | stmt = RefreshExternalDatasetStatement()
-    | stmt = RunStatement()
-    | stmt = ChannelSubscriptionStatement()
-  )
-  {
-  return stmt;
-  }
-}
-
-Clause LetClause() throws ParseException:
-{
-    LetClause lc = new LetClause();
-    VariableExpr varExp;
-    Expression beExp;
-    extendCurrentScope();
-}
-{
-    (<LET>|<WITH>) varExp = Variable() <ASSIGN> beExp = Expression()
-    {
-      getCurrentScope().addNewVarSymbolToScope(varExp.getVar());
-      lc.setVarExpr(varExp);
-      lc.setBindingExpr(beExp);
-      return lc;
-    }
-}
-
-ListConstructor UnorderedListConstructor() throws ParseException:
-{
-      ListConstructor expr = new ListConstructor();
-      List<Expression> exprList = null;
-      expr.setType(ListConstructor.Type.UNORDERED_LIST_CONSTRUCTOR);
-}
-{
-    <LEFTDBLBRACE> exprList = ExpressionList() <RIGHTDBLBRACE>
-    {
-      expr.setExprList(exprList);
-      return expr;
-    }
-}
-
-Expression PrimaryExpr() throws ParseException:
-{
-  Expression expr = null;
-}
-{
-  ( LOOKAHEAD(2)
-    expr = FunctionCallExpr()
-  | expr = Literal()
-  | expr = DatasetAccessExpression()
-  | expr = VariableRef()
-    {
-      if(((VariableExpr)expr).getIsNewVar() == true)
-        throw new ParseException("can't find variable " + ((VariableExpr)expr).getVar());
-    }
-  | expr = ListConstructor()
-  | expr = RecordConstructor()
-  | expr = ParenthesizedExpression()
-  )
-    {
-      return expr;
-    }
-}
-
-Expression DatasetAccessExpression() throws ParseException:
-{
-  String funcName;
-  String arg1 = null;
-  String arg2 = null;
-  Expression nameArg;
-}
-{
-  <DATASET>
-    {
-      funcName = token.image;
-    }
-  ( ( arg1 = Identifier() ( <DOT> arg2 = Identifier() )? )
-    {
-      String name = arg2 == null ? arg1 : arg1 + "." + arg2;
-      LiteralExpr ds = new LiteralExpr();
-      ds.setValue( new StringLiteral(name) );
-      nameArg = ds;
-      if(arg2 != null){
-          addDataverse(arg1.toString());
-          addDataset(name);
-      } else {
-          addDataset(defaultDataverse + "." + name);
-      }
-    }
-  | ( <LEFTPAREN> nameArg = Expression() <RIGHTPAREN> ) )
-    {
-      String dataverse = MetadataConstants.METADATA_DATAVERSE_NAME;
-      FunctionSignature signature = lookupFunctionSignature(dataverse, funcName, 1);
-      if (signature == null) {
-        signature = new FunctionSignature(dataverse, funcName, 1);
-      }
-      List<Expression> argList = new ArrayList<Expression>();
-      argList.add(nameArg);
-      return new CallExpr(signature, argList);
-    }
-}
-
-Pair<Identifier,Identifier>QualifiedName() throws ParseException:
-{
-  String first = null;
-  String second = null;
-}
-{
-  first = Identifier() (<DOT> second = Identifier())?
-  {
-    Identifier id1 = null;
-    Identifier id2 = null;
-    if (second == null) {
-      id2 = new Identifier(first);
-    } else
-    {
-      id1 = new Identifier(first);
-      id2 = new Identifier(second);
-    }
-    return new Pair<Identifier,Identifier>(id1, id2);
-  }
-}
-
-UpdateClause UpdateClause() throws ParseException:
-{
-  Expression target = null;
-  Expression value = null ;
-  InsertStatement is = null;
-  DeleteStatement ds = null;
-  UpdateStatement us = null;
-  Expression condition = null;
-  UpdateClause ifbranch = null;
-  UpdateClause elsebranch = null;
-}
-{
-   (<SET> target = Expression() <ASSIGN> value = Expression()
-   | is = InsertStatement()
-   | ds = DeleteStatement()
-   | us = UpdateStatement()
-   | <IF> <LEFTPAREN> condition = Expression() <RIGHTPAREN>
-     <THEN> ifbranch = UpdateClause()
-     [LOOKAHEAD(1) <ELSE> elsebranch = UpdateClause()]
-     {
-       return new UpdateClause(target, value, is, ds, us, condition, ifbranch, elsebranch);
-     }
-   )
-}
-
-Clause ForClause() throws ParseException:
-{
-    ForClause fc = new ForClause();
-    VariableExpr varExp;
-    VariableExpr varPos = null;
-    Expression inExp;
-    extendCurrentScope();
-}
-{
-    (<FOR>|<FROM>) varExp = Variable() (<AT> varPos = Variable())?  <IN> ( inExp = Expression() )
-    {
-      fc.setVarExpr(varExp);
-      getCurrentScope().addNewVarSymbolToScope(varExp.getVar());
-      fc.setInExpr(inExp);
-      if (varPos != null) {
-        fc.setPosExpr(varPos);
-        getCurrentScope().addNewVarSymbolToScope(varPos.getVar());
-      }
-      return fc;
-    }
-}
-
-Clause OrderbyClause() throws ParseException:
-{
-    OrderbyClause oc = new OrderbyClause();
-    Expression orderbyExpr;
-    List<Expression> orderbyList = new ArrayList<Expression>();
-    List<OrderbyClause.OrderModifier> modifierList = new ArrayList<OrderbyClause.OrderModifier >();
-    int numOfOrderby = 0;
-}
-{
-  (
-    <ORDER>
-      {
-        String hint = getHint(token);
-        if (hint != null) {
-          if (hint.startsWith(INMEMORY_HINT)) {
-            String splits[] = hint.split(" +");
-            int numFrames = Integer.parseInt(splits[1]);
-            int numTuples = Integer.parseInt(splits[2]);
-            oc.setNumFrames(numFrames);
-            oc.setNumTuples(numTuples);
-          }
-          if (hint.startsWith(RANGE_HINT)) {
-            try{
-              oc.setRangeMap(RangeMapBuilder.parseHint(hint.substring(RANGE_HINT.length())));
-            } catch (AsterixException e) {
-              throw new ParseException(e.getMessage());
-            }
-          }
-        }
-      }
-    <BY> orderbyExpr = Expression()
-    {
-      orderbyList.add(orderbyExpr);
-      OrderbyClause.OrderModifier modif = OrderbyClause.OrderModifier.ASC;
-    }
-    ( (<ASC> { modif = OrderbyClause.OrderModifier.ASC; })
-    | (<DESC> { modif = OrderbyClause.OrderModifier.DESC; }))?
-    {
-      modifierList.add(modif);
-    }
-
-    (<COMMA> orderbyExpr = Expression()
-    {
-      orderbyList.add(orderbyExpr);
-      modif = OrderbyClause.OrderModifier.ASC;
-    }
-    ( (<ASC> { modif = OrderbyClause.OrderModifier.ASC; })
-    | (<DESC> { modif = OrderbyClause.OrderModifier.DESC; }))?
-    {
-      modifierList.add(modif);
-    }
-    )*
-)
-    {
-      oc.setModifierList(modifierList);
-      oc.setOrderbyList(orderbyList);
-      return oc;
-    }
-}
-
-Expression IfThenElse() throws ParseException:
-{
-  Expression condExpr;
-  Expression thenExpr;
-  Expression elseExpr;
-  IfExpr ifExpr = new IfExpr();
-}
-{
-    <IF> <LEFTPAREN> condExpr = Expression() <RIGHTPAREN> <THEN> thenExpr = Expression() <ELSE> elseExpr = Expression()
-
-    {
-      ifExpr.setCondExpr(condExpr);
-      ifExpr.setThenExpr(thenExpr);
-      ifExpr.setElseExpr(elseExpr);
-      return ifExpr;
-    }
-}
-
-void RecordField(RecordTypeDefinition recType) throws ParseException:
-{
-  String fieldName;
-  TypeExpression type = null;
-  boolean nullable = false;
-}
-{
-  fieldName = Identifier()
-    {
-      String hint = getHint(token);
-      IRecordFieldDataGen rfdg = hint != null ? parseFieldDataGen(hint) : null;
-    }
-  <COLON> type =  TypeExpr() (<QUES> { nullable = true; } )?
-    {
-      recType.addField(fieldName, type, nullable, rfdg);
-    }
-}
-
-Expression UnionExpr() throws ParseException:
-{
-    UnionExpr union = null;
-    Expression operand1 = null;
-    Expression operand2 = null;
-}
-{
-   operand1 = UnaryExpr()
-   (<UNION>
-       (operand2 = UnaryExpr()) {
-          if (union == null) {
-             union = new UnionExpr();
-             union.addExpr(operand1);
-          }
-          union.addExpr(operand2);
-       } )*
-   {
-     return (union == null)? operand1: union;
-   }
-}
-
-Expression RelExpr() throws ParseException:
-{
-  OperatorExpr op = null;
-  Expression operand = null;
-  boolean broadcast = false;
-  IExpressionAnnotation annotation = null;
-}
-{
-    operand = AddExpr()
-    {
-      if (operand instanceof VariableExpr) {
-        String hint = getHint(token);
-        if (hint != null && hint.equals(BROADCAST_JOIN_HINT)) {
-          broadcast = true;
-        }
-      }
-    }
-
-    (
-      LOOKAHEAD(2)( <LT> | <GT> | <LE> | <GE> | <EQ> | <NE> |<SIMILAR>)
-        {
-          String mhint = getHint(token);
-          if (mhint != null) {
-            if (mhint.equals(INDEXED_NESTED_LOOP_JOIN_HINT)) {
-            annotation = IndexedNLJoinExpressionAnnotation.INSTANCE;
-          } else if (mhint.equals(SKIP_SECONDARY_INDEX_SEARCH_HINT)) {
-            annotation = SkipSecondaryIndexSearchExpressionAnnotation.INSTANCE;
-          }
-        }
-          if (op == null) {
-            op = new OperatorExpr();
-            op.addOperand(operand, broadcast);
-          op.setCurrentop(true);
-          broadcast = false;
-          }
-         try{
-           op.addOperator(token.image);
-         } catch (AsterixException e){
-           throw new ParseException(e.getMessage());
-         }
-      }
-
-       operand = AddExpr()
-      {
-         broadcast = false;
-         if (operand instanceof VariableExpr) {
-           String hint = getHint(token);
-           if (hint != null && hint.equals(BROADCAST_JOIN_HINT)) {
-             broadcast = true;
-           }
-         }
-         op.addOperand(operand, broadcast);
-      }
-    )?
-
-     {
-       if (annotation != null) {
-         op.addHint(annotation);
-       }
-       return op==null? operand: op;
-     }
-}
-
-String FilterField() throws ParseException:
-{
-  String filterField = null;
-}
-{
-  filterField = Identifier()
-    {
-      return filterField;
-    }
-}
-
-FunctionSignature ApplyFunction() throws ParseException:
-{
-  FunctionName functioName = null;
-  FunctionSignature funcSig = null;
-}
-{
-  <APPLY> <FUNCTION> functioName = FunctionName()
-    {
-       String fqFunctionName = functioName.library == null ? functioName.function : functioName.library + "#" + functioName.function;
-       return new FunctionSignature(functioName.dataverse, fqFunctionName, 1);
-    }
-}
-
-String CompactionPolicy() throws ParseException:
-{
-  String compactionPolicy = null;
-}
-{
-  compactionPolicy = Identifier()
-    {
-      return compactionPolicy;
-    }
-}
-
-FunctionName FunctionName() throws ParseException:
-{
-  String first = null;
-  String second = null;
-  String third = null;
-  boolean secondAfterDot = false;
-}
-{
-  first = Identifier()
-  {
-    FunctionName result = new FunctionName();
-    result.hint = getHint(token);
-  }
-  ( <DOT> second = Identifier()
-    {
-      secondAfterDot = true;
-    }
-  ( <SYMBOLHASH> third = Identifier())? | <SYMBOLHASH> second = Identifier() )?
-    {
-      if (second == null) {
-        result.dataverse = defaultDataverse;
-        result.library = null;
-        result.function = first;
-      } else if (third == null) {
-        if (secondAfterDot) {
-          result.dataverse = first;
-          result.library   = null;
-          result.function = second;
-        } else {
-          result.dataverse = defaultDataverse;
-          result.library   = first;
-          result.function = second;
-        }
-      } else {
-        result.dataverse = first;
-        result.library   = second;
-        result.function  = third;
-      }
-
-      if (result.function.equalsIgnoreCase("int")) {
-            result.function = "int64";
-      }
-      return result;
-    }
-}
-
-List<Expression>ExpressionList() throws ParseException:
-{
-      Expression expr = null;
-      List<Expression> list = null;
-      List<Expression> exprList = new ArrayList<Expression>();
-}
-{
-    (
-      expr = Expression() { exprList.add(expr); }
-      (LOOKAHEAD(1) <COMMA> list = ExpressionList() { exprList.addAll(list); })?
-    )?
-    (LOOKAHEAD(1) Comma())?
-    {
-        return exprList;
-    }
-}
-
-DeleteStatement DeleteStatement() throws ParseException:
-{
-  VariableExpr var = null;
-  Expression condition = null;
-  Pair<Identifier, Identifier> nameComponents;
-  // This is related to the new metadata lock management
-  setDataverses(new ArrayList<String>());
-  setDatasets(new ArrayList<String>());
-
-}
-{
-  <DELETE> var = Variable()
-    {
-      getCurrentScope().addNewVarSymbolToScope(var.getVar());
-    }
-  <FROM> <DATASET> nameComponents  = QualifiedName()
-  (<WHERE> condition = Expression())?
-    {
-      // First we get the dataverses and datasets that we want to lock
-      List<String> dataverses = getDataverses();
-      List<String> datasets = getDatasets();
-      // we remove the pointer to the dataverses and datasets
-      setDataverses(null);
-      setDatasets(null);
-      return new DeleteStatement(var, nameComponents.first, nameComponents.second,
-          condition, getVarCounter(), dataverses, datasets);
-    }
-}
-
-Map<String,String>Properties() throws ParseException:
-{
-  Map<String,String> properties = new HashMap<String,String>();
-  Pair<String, String> property;
-}
-{
-  ( <LEFTPAREN> property = Property()
-    {
-      properties.put(property.first, property.second);
-    }
-  ( <COMMA> property = Property()
-    {
-      properties.put(property.first, property.second);
-    }
-  )* <RIGHTPAREN> )?
-    {
-      return properties;
-    }
-}
-
-Clause GroupClause() throws ParseException:
-{
-    GroupbyClause gbc = new GroupbyClause();
-    // GbyVariableExpressionPair pair = new GbyVariableExpressionPair();
-    List<GbyVariableExpressionPair> vePairList = new ArrayList<GbyVariableExpressionPair>();
-    List<GbyVariableExpressionPair> decorPairList = new ArrayList<GbyVariableExpressionPair>();
-    Map<Expression, VariableExpr> withVarMap = new HashMap<Expression, VariableExpr>();
-    VariableExpr var = null;
-    VariableExpr withVar = null;
-    Expression expr = null;
-    VariableExpr decorVar = null;
-    Expression decorExpr = null;
-}
-{
-      {
-        Scope newScope = extendCurrentScopeNoPush(true);
-        // extendCurrentScope(true);
-      }
-    <GROUP>
-      {
-         String hint = getHint(token);
-         if (hint != null && hint.equals(HASH_GROUP_BY_HINT)) {
-           gbc.setHashGroupByHint(true);
-         }
-      }
-    <BY> (LOOKAHEAD(2)  var = Variable()
-    {
-      newScope.addNewVarSymbolToScope(var.getVar());
-    } <ASSIGN>)?
-    expr = Expression()
-       {
-         GbyVariableExpressionPair pair1 = new GbyVariableExpressionPair(var, expr);
-         vePairList.add(pair1);
-       }
-    (<COMMA> ( LOOKAHEAD(2) var = Variable()
-    {
-      newScope.addNewVarSymbolToScope(var.getVar());
-    } <ASSIGN>)?
-        expr = Expression()
-         {
-           GbyVariableExpressionPair pair2 = new GbyVariableExpressionPair(var, expr);
-           vePairList.add(pair2);
-         }
-        )*
-    (<DECOR> decorVar = Variable() <ASSIGN> decorExpr = Expression()
-       {
-         newScope.addNewVarSymbolToScope(decorVar.getVar());
-         GbyVariableExpressionPair pair3 = new GbyVariableExpressionPair(decorVar, decorExpr);
-         decorPairList.add(pair3);
-       }
-      (<COMMA> <DECOR> decorVar = Variable() <ASSIGN> decorExpr = Expression()
-           {
-             newScope.addNewVarSymbolToScope(decorVar.getVar());
-             GbyVariableExpressionPair pair4 = new GbyVariableExpressionPair(decorVar, decorExpr);
-             decorPairList.add(pair4);
-           }
-       )*
-    )?
-    (<WITH>|<KEEPING>) withVar = VariableRef()
-    {
-      if(withVar.getIsNewVar()==true)
-          throw new ParseException("can't find variable " + withVar.getVar());
-      withVarMap.put(withVar, withVar);
-      newScope.addNewVarSymbolToScope(withVar.getVar());
-    }
-    (<COMMA> withVar = VariableRef()
-    {
-      if(withVar.getIsNewVar()==true)
-          throw new ParseException("can't find variable " + withVar.getVar());
-      withVarMap.put(withVar, withVar);
-      newScope.addNewVarSymbolToScope(withVar.getVar());
-    })*
-    {
-      gbc.setGbyPairList(vePairList);
-      gbc.setDecorPairList(decorPairList);
-      gbc.setWithVarMap(withVarMap);
-      replaceCurrentScope(newScope);
-      return gbc;
-    }
-}
-
-OrderedListTypeDefinition OrderedListTypeDef() throws ParseException:
-{
-  TypeExpression type = null;
-}
-{
-  <LEFTBRACKET>
-    ( type =  TypeExpr() )
-  <RIGHTBRACKET>
-  {
-    return new OrderedListTypeDefinition(type);
-  }
-}
-
-boolean IfNotExists() throws ParseException:
-{
-}
-{
-  (
-    LOOKAHEAD(1)
-    <IF>
-    <IDENTIFIER>
-    (
-      {
-        if(!token.image.equals("not")){
-           throw new ParseException("Expect word \"not\" at line " + token.beginLine + ", column "
-                         + token.beginColumn +"!");
-        }
-      }
-    )
-    <EXISTS>
-    {
-      return true;
-    }
-  )?
-    {
-      return false;
-    }
-}
-
-Expression ListConstructor() throws ParseException:
-{
-    Expression expr = null;
-}
-{
-    (
-        expr = OrderedListConstructor() | expr = UnorderedListConstructor()
-    )
-
-    {
-      return expr;
-    }
-}
-
-LoadStatement LoadStatement() throws ParseException:
-{
-  Identifier dataverseName = null;
-  Identifier datasetName = null;
-  boolean alreadySorted = false;
-  String adapterName;
-  Map<String,String> properties;
-  Pair<Identifier,Identifier> nameComponents = null;
-}
-{
-  <LOAD> <DATASET> nameComponents = QualifiedName()
-    {
-      dataverseName = nameComponents.first;
-      datasetName = nameComponents.second;
-    }
-  <USING> adapterName = AdapterName() properties = Configuration()
-  (<PRESORTED>
-    {
-      alreadySorted = true;
-    }
-  )?
-    {
-      return new LoadStatement(dataverseName, datasetName, adapterName, properties, alreadySorted);
-    }
-}
-
-Statement ChannelSubscriptionStatement() throws ParseException:
-{
-  Statement stmt = null;
-  Pair<Identifier,Identifier> nameComponents = null;
-  List<Expression> argList = new ArrayList<Expression>();
-  Expression tmp = null;
-  String id = null;
-  String subscriptionId = null;
-  Pair<Identifier,Identifier> brokerName = null;
-}
-{
-  (
-  "subscribe" <TO> nameComponents = QualifiedName()
-   <LEFTPAREN> (tmp = Expression()
-   {
-      argList.add(tmp);
-   }
-   (<COMMA> tmp = Expression()
-   {
-      argList.add(tmp);
-   }
-   )*)? <RIGHTPAREN> <ON> brokerName = QualifiedName()
-   {
-      stmt = new ChannelSubscribeStatement(nameComponents.first, nameComponents.second, argList, getVarCounter(), brokerName.first, brokerName.second, subscriptionId);
-   }
-   | "unsubscribe" id = StringLiteral() <FROM> nameComponents = QualifiedName()
-      {
-        setDataverses(new ArrayList<String>());
-        setDatasets(new ArrayList<String>());
-        VariableExpr varExp = new VariableExpr();
-        VarIdentifier var = new VarIdentifier();
-        varExp.setVar(var);
-        var.setValue("$subscriptionPlaceholder");
-        getCurrentScope().addNewVarSymbolToScope(varExp.getVar());
-        List<String> dataverses = getDataverses();
-        List<String> datasets = getDatasets();
-        // we remove the pointer to the dataverses and datasets
-        setDataverses(null);
-        setDatasets(null);
-        stmt = new ChannelUnsubscribeStatement(varExp, nameComponents.first, nameComponents.second, id, getVarCounter(), dataverses, datasets);
-      }
-     | "change" "subscription" subscriptionId = StringLiteral()  <ON> nameComponents = QualifiedName()
-       <LEFTPAREN> (tmp = Expression()
-       {
-         argList.add(tmp);
-       }
-       (<COMMA> tmp = Expression()
-       {
-         argList.add(tmp);
-       }
-       )*)? <RIGHTPAREN>
-        <TO> brokerName = QualifiedName()
-      {
-        stmt = new ChannelSubscribeStatement(nameComponents.first, nameComponents.second, argList, getVarCounter(), brokerName.first, brokerName.second, subscriptionId);
-      }
-    )
-    {
-      return stmt;
-    }
-}
-
-Expression UnaryExpr() throws ParseException:
-{
-    UnaryExpr uexpr = null;
-    Expression expr = null;
-}
-{
-    ( (<PLUS> | <MINUS>)
-    {
-          uexpr = new UnaryExpr();
-          try{
-            uexpr.setExprType(token.image);
-          } catch (AsterixException e){
-            throw new ParseException(e.getMessage());
-          }
-    }
-    )?
-
-    expr = ValueExpr()
-    {
-        if(uexpr!=null){
-            ((UnaryExpr)uexpr).setExpr(expr);
-            return uexpr;
-        }
-        else{
-            return expr;
-        }
-    }
-}
-
-Query Query() throws ParseException:
-{
-  Query query = new Query(false);
-  // we set the pointers to the dataverses and datasets lists to fill them with entities to be locked
-  setDataverses(query.getDataverses());
-  setDatasets(query.getDatasets());
-  Expression expr;
-}
-{
-  expr = Expression()
-    {
-      query.setBody(expr);
-      query.setVarCounter(getVarCounter());
-      // we remove the pointers to the locked entities before we return the query object
-      setDataverses(null);
-      setDatasets(null);
-      return query;
-    }
-}
-
-Expression ValueExpr() throws ParseException:
-{
-  Expression expr = null;
-  Identifier ident = null;
-  AbstractAccessor fa = null;
-  Expression indexExpr = null;
-}
-{
-  expr = PrimaryExpr() ( ident = Field()
-    {
-      fa = (fa == null ? new FieldAccessor(expr, ident)
-                       : new FieldAccessor(fa, ident));
-    }
-  | indexExpr = Index()
-    {
-      fa = (fa == null ? new IndexAccessor(expr, indexExpr)
-                       : new IndexAccessor(fa, indexExpr));
-     }
-  )*
-    {
-      return fa == null ? expr : fa;
-    }
-}
-
-TypeReferenceExpression TypeReference() throws ParseException:
-{
-  String id = null;
-}
-{
- id = Identifier()
-   {
-     if (id.equalsIgnoreCase("int")) {
-        id = "int64";
-     }
-
-     return new TypeReferenceExpression(new Identifier(id));
-   }
-}
-
-// Merged Non-terminal
-Statement DropStatement() throws ParseException:
-{
-  String id = null;
-  Pair<Identifier,Identifier> pairId = null;
-  Triple<Identifier,Identifier,Identifier> tripleId = null;
-  FunctionSignature funcSig = null;
-  boolean ifExists = false;
-  Statement stmt = null;
-}
-{
-  <DROP>
-  (
-    <DATASET> pairId = QualifiedName() ifExists = IfExists()
-      {
-        stmt = new DropDatasetStatement(pairId.first, pairId.second, ifExists);
-      }
-    | <INDEX> tripleId = DoubleQualifiedName() ifExists = IfExists()
-      {
-        stmt = new IndexDropStatement(tripleId.first, tripleId.second, tripleId.third, ifExists);
-      }
-    | <NODEGROUP> id = Identifier() ifExists = IfExists()
-      {
-        stmt = new NodeGroupDropStatement(new Identifier(id), ifExists);
-      }
-    | <TYPE> pairId = TypeName() ifExists = IfExists()
-      {
-        stmt = new TypeDropStatement(pairId.first, pairId.second, ifExists);
-      }
-    | <DATAVERSE> id = Identifier() ifExists = IfExists()
-      {
-        stmt = new DataverseDropStatement(new Identifier(id), ifExists);
-      }
-    | <FUNCTION> funcSig = FunctionSignature() ifExists = IfExists()
-      {
-        stmt = new FunctionDropStatement(funcSig, ifExists);
-      }
-    | <FEED> pairId = QualifiedName() ifExists = IfExists()
-      {
-        stmt = new FeedDropStatement(pairId.first, pairId.second, ifExists);
-      }
-    | <INGESTION> <POLICY> pairId = QualifiedName() ifExists = IfExists()
-      {
-        stmt = new FeedPolicyDropStatement(pairId.first, pairId.second, ifExists);
-      }
-    | <CHANNEL> pairId = QualifiedName() ifExists = IfExists()
-      {
-        stmt = new ChannelDropStatement(pairId.first, pairId.second, ifExists);
-      }
-      	      | <BROKER> pairId = QualifiedName() ifExists = IfExists()	
-      {	
-        stmt = new BrokerDropStatement(pairId.first, pairId.second, ifExists);	
-      }
-      
-  )
-  {
-  return stmt;
-  }
-}
-
-Expression ParenthesizedExpression() throws ParseException:
-{
-  Expression expr;
-}
-{
-    <LEFTPAREN> expr = Expression() <RIGHTPAREN>
-    {
-      return expr;
-    }
-}
-
-// Merged Non-terminal
-Statement CreateStatement() throws ParseException:
-{
-  String hint = null;
-  boolean dgen = false;
-  Statement stmt = null;
-}
-{
-  <CREATE>
-  (
-    {
-      hint = getHint(token);
-      if (hint != null && hint.startsWith(DGEN_HINT)) {
-        dgen = true;
-      }
-    }
-    stmt = TypeSpecification(hint, dgen)
-    | stmt = NodegroupSpecification()
-    | stmt = DatasetSpecification()
-    | stmt = IndexSpecification()
-    | stmt = DataverseSpecification()
-    | stmt = FunctionSpecification()
-    | stmt = FeedSpecification()
-    | stmt = FeedPolicySpecification()
-    | stmt = ChannelSpecification() | stmt = BrokerSpecification()
-  )
-  {
-  return stmt;
-  }
-}
-
-QuantifiedExpression QuantifiedExpression() throws ParseException:
-{
-  QuantifiedExpression qc = new QuantifiedExpression();
-  List<QuantifiedPair> quantifiedList = new ArrayList<QuantifiedPair>();
-  Expression satisfiesExpr;
-  VariableExpr var;
-  Expression inExpr;
-  QuantifiedPair pair;
-}
-{
-  {
-    createNewScope();
-  }
-
-   (      (<SOME>  {  qc.setQuantifier(QuantifiedExpression.Quantifier.SOME);    })
-        | (<EVERY> {  qc.setQuantifier(QuantifiedExpression.Quantifier.EVERY);    }))
-    var = Variable() <IN> inExpr = Expression()
-    {
-      pair = new QuantifiedPair(var, inExpr);
-      getCurrentScope().addNewVarSymbolToScope(var.getVar());
-      quantifiedList.add(pair);
-    }
-    (
-    <COMMA> var = Variable() <IN> inExpr = Expression()
-    {
-      pair = new QuantifiedPair(var, inExpr);
-      getCurrentScope().addNewVarSymbolToScope(var.getVar());
-      quantifiedList.add(pair);
-    }
-    )*
-     <SATISFIES> satisfiesExpr = Expression()
-     {
-       qc.setSatisfiesExpr(satisfiesExpr);
-       qc.setQuantifiedList(quantifiedList);
-       removeCurrentScope();
-       return qc;
-     }
-}
-
-String AdapterName() throws ParseException:
-{
-  String adapterName = null;
-}
-{
-  adapterName = Identifier()
-    {
-      return adapterName;
-    }
-}
-
-DataverseDecl DataverseDeclaration() throws ParseException:
-{
-  String dvName = null;
-}
-{
-  <USE> <DATAVERSE> dvName = Identifier()
-    {
-      defaultDataverse = dvName;
-      return new DataverseDecl(new Identifier(dvName));
-    }
-}
-
-CreateFeedStatement FeedSpecification() throws ParseException:
-{
-  Pair<Identifier,Identifier> nameComponents = null;
-  boolean ifNotExists = false;
-  String adapterName = null;
-  Map<String,String> properties = null;
-  FunctionSignature appliedFunction = null;
-  CreateFeedStatement cfs = null;
-  Pair<Identifier,Identifier> sourceNameComponents = null;
-
-}
-{
-  (
-    <SECONDARY> <FEED>  nameComponents = QualifiedName() ifNotExists = IfNotExists()
-    <FROM> <FEED> sourceNameComponents = QualifiedName() (appliedFunction = ApplyFunction())?
-    {
-      cfs = new CreateSecondaryFeedStatement(nameComponents, sourceNameComponents, appliedFunction, ifNotExists);
-    }
-   |
-    (<PRIMARY>)? <FEED> nameComponents = QualifiedName() ifNotExists = IfNotExists()
-    <USING> adapterName = AdapterName() properties = Configuration() (appliedFunction = ApplyFunction())?
-     {
-      cfs = new CreatePrimaryFeedStatement(nameComponents, adapterName, properties, appliedFunction, ifNotExists);
-     }
-  )
-  {
-    return cfs;
-  }
-}
-
-FunctionSignature FunctionSignature() throws ParseException:
-{
-  FunctionName fctName = null;
-  int arity = 0;
-}
-{
-  fctName = FunctionName() <SYMBOLAT> <INTEGER_LITERAL>
-    {
-      arity = new Integer(token.image);
-      if (arity < 0 && arity != FunctionIdentifier.VARARGS) {
-        throw new ParseException(" invalid arity:" + arity);
-      }
-
-      // TODO use fctName.library
-      String fqFunctionName = fctName.library == null ? fctName.function : fctName.library + "#" + fctName.function;
-      return new FunctionSignature(fctName.dataverse, fqFunctionName, arity);
-    }
-}
-
-FieldBinding FieldBinding() throws ParseException:
-{
-    FieldBinding fb = new FieldBinding();
-    Expression left, right;
-}
-{
-    left = Expression() <COLON> right = Expression()
-    {
-      fb.setLeftExpr(left);
-      fb.setRightExpr(right);
-      return fb;
-    }
-}
-
-DatasetDecl DatasetSpecification() throws ParseException:
-{
-  Pair<Identifier,Identifier> nameComponents = null;
-  boolean ifNotExists = false;
-  Pair<Identifier,Identifier> typeComponents = null;
-  String adapterName = null;
-  Map<String,String> properties = null;
-  Map<String,String> compactionPolicyProperties = null;
-  FunctionSignature appliedFunction = null;
-  Pair<List<Integer>, List<List<String>>> primaryKeyFields = null;
-  String nodeGroupName = null;
-  Map<String,String> hints = new HashMap<String,String>();
-  DatasetDecl dsetDecl = null;
-  boolean autogenerated = false;
-  String compactionPolicy = null;
-  boolean temp = false;
-  Pair<Integer, List<String>> filterField = null;
-  Pair<Identifier,Identifier> metaTypeComponents = new Pair<Identifier, Identifier>(null, null);
-}
-{
-  (
-    <EXTERNAL> <DATASET> nameComponents = QualifiedName()
-    <LEFTPAREN> typeComponents = TypeName() <RIGHTPAREN>
-    ifNotExists = IfNotExists()
-    <USING> adapterName = AdapterName() properties = Configuration()
-    ( <ON> nodeGroupName = Identifier() )?
-    ( <HINTS> hints = Properties() )?
-    ( <USING> <COMPACTION> <POLICY> compactionPolicy = CompactionPolicy() (compactionPolicyProperties = Configuration())? )?
-      {
-        ExternalDetailsDecl edd = new ExternalDetailsDecl();
-        edd.setAdapter(adapterName);
-        edd.setProperties(properties);
-        dsetDecl = new DatasetDecl(nameComponents.first,
-                                   nameComponents.second,
-                                   typeComponents.first,
-                                   typeComponents.second,
-                                   metaTypeComponents.first,
-                                   metaTypeComponents.second,
-                                   nodeGroupName != null? new Identifier(nodeGroupName): null,
-                                   compactionPolicy,
-                                   compactionPolicyProperties,
-                                   hints,
-                                   DatasetType.EXTERNAL,
-                                   edd,
-                                   ifNotExists);
-      }
-
-    | (<INTERNAL> | <TEMPORARY> {
-            temp = token.image.toLowerCase().equals("temporary");
-        }
-      )?
-    <DATASET> nameComponents = QualifiedName()
-    <LEFTPAREN> typeComponents = TypeName() <RIGHTPAREN>
-    (
-        { String name; }
-        <WITH>
-        name = Identifier()
-        {
-            if(!name.equals("meta")){
-                throw new ParseException("We can only support one additional associated field called \"meta\".");
-            }
-        }
-        <LEFTPAREN> metaTypeComponents = TypeName() <RIGHTPAREN>
-    )?
-    ifNotExists = IfNotExists()
-    primaryKeyFields = PrimaryKey()
-    ( <AUTOGENERATED> { autogenerated = true; } )?
-    ( <ON> nodeGroupName = Identifier() )?
-    ( <HINTS> hints = Properties() )?
-    ( <USING> <COMPACTION> <POLICY> compactionPolicy = CompactionPolicy() (compactionPolicyProperties = Configuration())? )?
-    ( <WITH> <FILTER> <ON> filterField = NestedField() )?
-      {
-        if(filterField!=null && filterField.first!=0){
-          throw new ParseException("A filter field can only be a field in the main record of the dataset.");
-        }
-        InternalDetailsDecl idd = new InternalDetailsDecl(primaryKeyFields.second,
-                                                          primaryKeyFields.first,
-                                                          autogenerated,
-                                                          filterField == null? null : filterField.second,
-                                                          temp);
-        dsetDecl = new DatasetDecl(nameComponents.first,
-                                   nameComponents.second,
-                                   typeComponents.first,
-                                   typeComponents.second,
-                                   metaTypeComponents.first,
-                                   metaTypeComponents.second,
-                                   nodeGroupName != null ? new Identifier(nodeGroupName) : null,
-                                   compactionPolicy,
-                                   compactionPolicyProperties,
-                                   hints,
-                                   DatasetType.INTERNAL,
-                                   idd,
-                                   ifNotExists);
-      }
-  )
-    {
-      return dsetDecl;
-    }
-}
-
-Clause WhereClause() throws ParseException:
-{
-  WhereClause wc = new WhereClause();
-  Expression whereExpr;
-}
-{
-    <WHERE> whereExpr = Expression()
-    {
-      wc.setWhereExpr(whereExpr);
-      return wc;
-    }
-}
-
-Pair<String, String>KeyValuePair() throws ParseException:
-{
-  String key;
-  String value;
-}
-{
-  <LEFTPAREN> key = StringLiteral() <EQ> value = StringLiteral() <RIGHTPAREN>
-    {
-      return new Pair<String, String>(key, value);
-    }
-}
-
-Statement FeedStatement() throws ParseException:
-{
-  Pair<Identifier,Identifier> feedNameComponents = null;
-  Pair<Identifier,Identifier> datasetNameComponents = null;
-
-  Map<String,String> configuration = null;
-  Statement stmt = null;
-  String policy = null;
-}
-{
-  (
-    <CONNECT> <FEED> feedNameComponents = QualifiedName() <TO> <DATASET> datasetNameComponents = QualifiedName() (policy = GetPolicy())?
-      {
-        stmt = new ConnectFeedStatement(feedNameComponents, datasetNameComponents, policy, getVarCounter());
-      }
-    | <DISCONNECT> <FEED> feedNameComponents = QualifiedName() <FROM> <DATASET> datasetNameComponents = QualifiedName()
-      {
-        stmt = new DisconnectFeedStatement(feedNameComponents, datasetNameComponents);
-      }
-  )
-    {
-      return stmt;
-    }
-}
-
-CreateFeedPolicyStatement FeedPolicySpecification() throws ParseException:
-{
-  String policyName = null;
-  String basePolicyName = null;
-  String sourcePolicyFile = null;
-  String definition = null;
-  boolean ifNotExists = false;
-  Map<String,String> properties = null;
-  CreateFeedPolicyStatement cfps = null;
-}
-{
-  (
-    <INGESTION> <POLICY>  policyName = Identifier() ifNotExists = IfNotExists()
-    <FROM>
-    (
-      <POLICY> basePolicyName = Identifier() properties = Configuration() ( <DEFINITION> definition = StringLiteral())?
-      {
-        cfps = new CreateFeedPolicyStatement(policyName, basePolicyName, properties, definition, ifNotExists);
-      }
-     |<PATH> sourcePolicyFile = StringLiteral() (<DEFINITION> definition = StringLiteral())?
-      {
-        cfps = new CreateFeedPolicyStatement(policyName, sourcePolicyFile, definition, ifNotExists);
-      }
-    )
-  )
-  {
-    return cfps;
-  }
-}
-
-VariableExpr VariableRef() throws ParseException:
-{
-    VariableExpr varExp = new VariableExpr();
-    VarIdentifier var = new VarIdentifier();
-}
-{
-  <VARIABLE>
-    {
-     String varName = token.image;
-     Identifier ident = lookupSymbol(varName);
-     if (isInForbiddenScopes(varName)) {
-       throw new ParseException("Inside limit clauses, it is disallowed to reference a variable having the same name as any variable bound in the same scope as the limit clause.");
-     }
-     if(ident != null) { // exist such ident
-       varExp.setIsNewVar(false);
-       varExp.setVar((VarIdentifier)ident);
-     } else {
-       varExp.setVar(var);
-     }
-     var.setValue(varName);
-     return varExp;
-    }
-}
-
-ListConstructor OrderedListConstructor() throws ParseException:
-{
-      ListConstructor expr = new ListConstructor();
-      List<Expression> exprList = null;
-      expr.setType(ListConstructor.Type.ORDERED_LIST_CONSTRUCTOR);
-}
-{
-    <LEFTBRACKET> exprList = ExpressionList() <RIGHTBRACKET>
-    {
-      expr.setExprList(exprList);
-      return expr;
-    }
-}
-
-VariableExpr Variable() throws ParseException:
-{
-    VariableExpr varExp = new VariableExpr();
-    VarIdentifier var = new VarIdentifier();
-}
-{
-  <VARIABLE>
-    {
-     Identifier ident = lookupSymbol(token.image);
-     if(ident != null) { // exist such ident
-       varExp.setIsNewVar(false);
-     }
-     varExp.setVar(var);
-     var.setValue(token.image);
-     return varExp;
-    }
-}
-
-CreateChannelStatement ChannelSpecification() throws ParseException:
-{
-  Pair<Identifier,Identifier> nameComponents = null;
-  FunctionSignature appliedFunction = null;
-  CreateChannelStatement ccs = null;
-  String fqFunctionName = null;
-  Expression period = null;
-}
-{
-  (
-    "repetitive" <CHANNEL>  nameComponents = QualifiedName()
-    <USING> appliedFunction = FunctionSignature()
-    "period" period = FunctionCallExpr()
-    {
-      ccs = new CreateChannelStatement(nameComponents.first,
-                                   nameComponents.second, appliedFunction, period);
-    }
-  )
-    {
-      return ccs;
-    }
-}
-
-UpdateStatement UpdateStatement() throws ParseException:
-{
-  VariableExpr vars;
-  Expression target;
-  Expression condition;
-  UpdateClause uc;
-  List<UpdateClause> ucs = new ArrayList<UpdateClause>();
-}
-{
-  <UPDATE> vars = Variable() <IN> target = Expression()
-  <WHERE> condition = Expression()
-  <LEFTPAREN> (uc = UpdateClause()
-    {
-      ucs.add(uc);
-    }
-  (<COMMA> uc = UpdateClause()
-    {
-      ucs.add(uc);
-    }
-  )*) <RIGHTPAREN>
-    {
-      return new UpdateStatement(vars, target, condition, ucs);
-    }
-}
-
-RecordConstructor RecordConstructor() throws ParseException:
-{
-      RecordConstructor expr = new RecordConstructor();
-      FieldBinding tmp = null;
-      List<FieldBinding> fbList = new ArrayList<FieldBinding>();
-}
-{
-    <LEFTBRACE> (tmp = FieldBinding()
-    {
-      fbList.add(tmp);
-    }
-    (<COMMA> tmp = FieldBinding() { fbList.add(tmp);  })*)? <RIGHTBRACE>
-    {
-      expr.setFbList(fbList);
-      return expr;
-    }
-}
-
-Expression ExponentExpr() throws ParseException:
-{
-  OperatorExpr op = null;
-  Expression operand = null;
-}
-{
-    operand = UnionExpr()
-
-    ( <CARET>
-      {
-        if (op == null) {
-          op = new OperatorExpr();
-          op.addOperand(operand);
-          op.setCurrentop(true);
-        }
-        try{
-          op.addOperator(token.image);
-        } catch (AsterixException e){
-          throw new ParseException(e.getMessage());
-        }
-    }
-    operand = UnionExpr()
-    {
-       op.addOperand(operand);
-    }
-    )?
-
-    {
-       return op==null?operand:op;
-    }
-}
-
-CreateFunctionStatement FunctionSpecification() throws ParseException:
-{
-  FunctionSignature signature;
-  boolean ifNotExists = false;
-  List<VarIdentifier> paramList = new ArrayList<VarIdentifier>();
-  String functionBody;
-  VarIdentifier var = null;
-  Expression functionBodyExpr;
-  Token beginPos;
-  Token endPos;
-  FunctionName fctName = null;
-
-  createNewScope();
-}
-{
-  <FUNCTION> fctName = FunctionName()
-  ifNotExists = IfNotExists()
-  paramList = ParameterList()
-  <LEFTBRACE>
-  {
-     beginPos = token;
-  }
-  functionBodyExpr = Expression() <RIGHTBRACE>
-    {
-      endPos = token;
-      functionBody = extractFragment(beginPos.beginLine, beginPos.beginColumn, endPos.beginLine, endPos.beginColumn);
-      // TODO use fctName.library
-      signature = new FunctionSignature(fctName.dataverse, fctName.function, paramList.size());
-      getCurrentScope().addFunctionDescriptor(signature, false);
-      removeCurrentScope();
-      return new CreateFunctionStatement(signature, paramList, functionBody, ifNotExists);
-    }
-}
-
-List<VarIdentifier>ParameterList() throws ParseException:
-{
-  List<VarIdentifier> paramList = new ArrayList<VarIdentifier>();
-  VarIdentifier var = null;
-}
-{
-  <LEFTPAREN> (<VARIABLE>
-    {
-      var = new VarIdentifier();
-      var.setValue(token.image);
-      paramList.add(var);
-      getCurrentScope().addNewVarSymbolToScope(var);
-    }
-  ( <COMMA> <VARIABLE>
-    {
-      var = new VarIdentifier();
-      var.setValue(token.image);
-      paramList.add(var);
-      getCurrentScope().addNewVarSymbolToScope(var);
-    }
-  )*)? <RIGHTPAREN>
-    {
-      return paramList;
-    }
-}
-
-CreateDataverseStatement DataverseSpecification() throws ParseException:
-{
-  String dvName = null;
-  boolean ifNotExists = false;
-  String format = null;
-}
-{
-  <DATAVERSE> dvName = Identifier()
-  ifNotExists = IfNotExists()
-  ( <WITH> <FORMAT> format = StringLiteral() )?
-    {
-      return new CreateDataverseStatement(new Identifier(dvName), format, ifNotExists);
-    }
-}
-
-void Comma() :
-{}
-{
-   <COMMA>
-}
-
-Pair<String, String>Property() throws ParseException:
-{
-  String key;
-  String value;
-}
-{
-  key = Identifier() <EQ> ( value = StringLiteral() | <INTEGER_LITERAL>
-    {
-      try {
-        value = "" + Long.valueOf(token.image);
-      } catch (NumberFormatException nfe) {
-        throw new ParseException("inapproriate value: " + token.image);
-      }
-    }
-  )
-    {
-      return new Pair<String, String>(key.toUpperCase(), value);
-    }
-}
-
-Expression Expression() :
-{
-  Expression expr = null;
-  Expression exprP = null;
-}
-{
-(
-
-//OperatorExpr | IfThenElse | FLWOGRExpression | QuantifiedExpression
-    expr = OperatorExpr()
-    | expr = IfThenElse()
-    | expr = FLWOGR()
-    | expr = QuantifiedExpression()
-
-
-)
-    {
-      return (exprP==null) ? expr : exprP;
-    }
-}
-
-CreateIndexStatement IndexSpecification() throws ParseException:
-{
-  CreateIndexStatement cis = new CreateIndexStatement();
-  String indexName = null;
-  boolean ifNotExists = false;
-  Pair<Identifier,Identifier> nameComponents = null;
-  Pair<Integer, Pair<List<String>, TypeExpression>> fieldPair = null;
-  IndexParams indexType = null;
-  boolean enforced = false;
-}
-{
-  <INDEX> indexName = Identifier()
-  ifNotExists = IfNotExists()
-  <ON> nameComponents = QualifiedName()
-  <LEFTPAREN> ( fieldPair = OpenField()
-    {
-       cis.addFieldExprPair(fieldPair.second);
-       cis.addFieldIndexIndicator(fieldPair.first);
-    }
-  ) (<COMMA> fieldPair = OpenField()
-    {
-       cis.addFieldExprPair(fieldPair.second);
-       cis.addFieldIndexIndicator(fieldPair.first);
-    }
-  )* <RIGHTPAREN> ( <TYPE> indexType = IndexType() )? ( <ENFORCED> { enforced = true; } )?
-    {
-      cis.setIndexName(new Identifier(indexName));
-      cis.setIfNotExists(ifNotExists);
-      cis.setDataverseName(nameComponents.first);
-      cis.setDatasetName(nameComponents.second);
-      if (indexType != null) {
-        cis.setIndexType(indexType.type);
-        cis.setGramLength(indexType.gramLength);
-      }
-      cis.setEnforced(enforced);
-      return cis;
-    }
-}
-
-RecordTypeDefinition RecordTypeDef() throws ParseException:
-{
-  RecordTypeDefinition recType = new RecordTypeDefinition();
-  RecordTypeDefinition.RecordKind recordKind = null;
-}
-{
-  ( <CLOSED>{ recordKind = RecordTypeDefinition.RecordKind.CLOSED; }
-    | <OPEN>{ recordKind = RecordTypeDefinition.RecordKind.OPEN; } )?
-   <LEFTBRACE>
-    {
-      String hint = getHint(token);
-      if (hint != null) {
-        String splits[] = hint.split(" +");
-        if (splits[0].equals(GEN_FIELDS_HINT)) {
-          if (splits.length != 5) {
-            throw new ParseException("Expecting: /*+ gen-fields <type> <min> <max> <prefix>*/");
-          }
-          if (!splits[1].equals("int")) {
-            throw new ParseException("The only supported type for gen-fields is int.");
-          }
-          UndeclaredFieldsDataGen ufdg = new UndeclaredFieldsDataGen(UndeclaredFieldsDataGen.Type.INT,
-             Integer.parseInt(splits[2]), Integer.parseInt(splits[3]), splits[4]);
-          recType.setUndeclaredFieldsDataGen(ufdg);
-        }
-      }
-
-    }
-        (
-          RecordField(recType)
-          ( <COMMA>  RecordField(recType) )*
-        )?
-   <RIGHTBRACE>
-   {
-      if (recordKind == null) {
-        recordKind = RecordTypeDefinition.RecordKind.OPEN;
-      }
-      recType.setRecordKind(recordKind);
-      return recType;
-   }
-}
-
-UnorderedListTypeDefinition UnorderedListTypeDef() throws ParseException:
-{
-  TypeExpression type = null;
-}
-{
-  <LEFTDBLBRACE>
-    ( type =  TypeExpr() )
-  <RIGHTDBLBRACE>
-  {
-    return new UnorderedListTypeDefinition(type);
-  }
-}
-
-TypeExpression IndexedTypeExpr() throws ParseException:
-{
-  TypeExpression typeExpr = null;
-}
-{
-  (
-      typeExpr = TypeReference()
-    | typeExpr = OrderedListTypeDef()
-    | typeExpr = UnorderedListTypeDef()
-  )
-  {
-    return typeExpr;
-  }
-}
-
-NodegroupDecl NodegroupSpecification() throws ParseException:
-{
-  String name = null;
-  String tmp = null;
-  boolean ifNotExists = false;
-  List<Identifier>ncNames = null;
-}
-{
-  <NODEGROUP> name = Identifier()
-  ifNotExists = IfNotExists() <ON> tmp = Identifier()
-    {
-      ncNames = new ArrayList<Identifier>();
-      ncNames.add(new Identifier(tmp));
-    }
-  ( <COMMA> tmp = Identifier()
-    {
-      ncNames.add(new Identifier(tmp));
-    }
-  )*
-    {
-      return new NodegroupDecl(new Identifier(name), ncNames, ifNotExists);
-    }
-}
-
-Pair<Identifier,Identifier>TypeName() throws ParseException:
-{
-  Pair<Identifier,Identifier> name = null;
-}
-{
-  name = QualifiedName()
-    {
-      if (name.first == null) {
-        name.first = new Identifier(defaultDataverse);
-      }
-      return name;
-    }
-}
-
-Pair<List<Integer>, List<List<String>>>PrimaryKey() throws ParseException:
-{
-   Pair<Integer, List<String>> tmp = null;
-   List<Integer> keyFieldSourceIndicators = new ArrayList<Integer>();
-   List<List<String>> primaryKeyFields = new ArrayList<List<String>>();
-}
-{
-  <PRIMARY> <KEY> tmp = NestedField()
-    {
-      keyFieldSourceIndicators.add(tmp.first);
-      primaryKeyFields.add(tmp.second);
-    }
-  ( <COMMA> tmp = NestedField()
-    {
-      keyFieldSourceIndicators.add(tmp.first);
-      primaryKeyFields.add(tmp.second);
-    }
-  )*
-    {
-      return new Pair<List<Integer>, List<List<String>>> (keyFieldSourceIndicators, primaryKeyFields);
-    }
-}
-
-TypeExpression TypeExpr() throws ParseException:
-{
-  TypeExpression typeExpr = null;
-}
-{
-  (
-      typeExpr = RecordTypeDef()
-    | typeExpr = TypeReference()
-    | typeExpr = OrderedListTypeDef()
-    | typeExpr = UnorderedListTypeDef()
-  )
-  {
-    return typeExpr;
-  }
-}
-
-Map<String,String>Configuration() throws ParseException:
-{
-    Map<String,String> configuration = new LinkedHashMap<String,String>();
-    Pair<String, String> keyValuePair = null;
-}
-{
-  <LEFTPAREN> ( keyValuePair = KeyValuePair()
-    {
-      configuration.put(keyValuePair.first, keyValuePair.second);
-    }
-  ( <COMMA> keyValuePair = KeyValuePair()
-    {
-      configuration.put(keyValuePair.first, keyValuePair.second);
-    }
-  )* )? <RIGHTPAREN>
-    {
-      return configuration;
-    }
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN [IGNORE_CASE] :
-{
-    <BROKER : "broker">
-  | <CHANNEL : "channel">
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    <APPLY : "apply">
-  | <AS : "as">
-  | <ASC : "asc">
-  | <AT : "at">
-  | <AUTOGENERATED : "autogenerated">
-  | <BTREE : "btree">
-  | <BY : "by">
-  | <CLOSED : "closed">
-  | <COMPACT : "compact">
-  | <COMPACTION : "compaction">
-  | <CONNECT : "connect">
-  | <CREATE : "create">
-  | <DATASET : "dataset">
-  | <DATAVERSE : "dataverse">
-  | <DECLARE : "declare">
-  | <DECOR : "decor">
-  | <DEFINITION : "definition">
-  | <DELETE : "delete">
-  | <DESC : "desc">
-  | <DISCONNECT : "disconnect">
-  | <DISTINCT : "distinct">
-  | <DROP : "drop">
-  | <ELSE : "else">
-  | <ENFORCED : "enforced">
-  | <EVERY : "every">
-  | <EXISTS : "exists">
-  | <EXTERNAL : "external">
-  | <FEED : "feed">
-  | <FILTER : "filter">
-  | <FOR : "for">
-  | <FORMAT : "format">
-  | <FROM : "from">
-  | <FUNCTION : "function">
-  | <GROUP : "group">
-  | <HINTS : "hints">
-  | <IF : "if">
-  | <IN : "in">
-  | <INDEX : "index">
-  | <INGESTION : "ingestion">
-  | <INSERT : "insert">
-  | <INTERNAL : "internal">
-  | <INTO : "into">
-  | <KEY : "key">
-  | <KEYWORD : "keyword">
-  | <KEEPING : "keeping">
-  | <LET : "let">
-  | <LIMIT : "limit">
-  | <LOAD : "load">
-  | <NGRAM : "ngram">
-  | <NODEGROUP : "nodegroup">
-  | <OFFSET : "offset">
-  | <ON : "on">
-  | <OPEN : "open">
-  | <ORDER : "order">
-  | <OUTPUT : "output">
-  | <PATH : "path">
-  | <POLICY : "policy">
-  | <PRESORTED : "pre-sorted">
-  | <PRIMARY : "primary">
-  | <REFRESH : "refresh">
-  | <RETURN : "return">
-  | <RTREE : "rtree">
-  | <RUN : "run">
-  | <SATISFIES : "satisfies">
-  | <SECONDARY : "secondary">
-  | <SELECT : "select">
-  | <SET : "set">
-  | <SOME : "some">
-  | <TEMPORARY : "temporary">
-  | <THEN : "then">
-  | <TO : "to">
-  | <TYPE : "type">
-  | <UNION : "union">
-  | <UPDATE : "update">
-  | <UPSERT : "upsert">
-  | <USE : "use">
-  | <USING : "using">
-  | <WHERE : "where">
-  | <WITH : "with">
-  | <WRITE : "write">
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    <CARET : "^">
-  | <DIV : "/">
-  | <IDIV : "idiv">
-  | <MINUS : "-">
-  | <MOD : "%">
-  | <MUL : "*">
-  | <PLUS : "+">
-
-  | <LEFTPAREN : "(">
-  | <RIGHTPAREN : ")">
-  | <LEFTBRACKET : "[">
-  | <RIGHTBRACKET : "]">
-
-  | <COLON : ":">
-  | <COMMA : ",">
-  | <DOT : ".">
-  | <QUES : "?">
-
-  | <LT : "<">
-  | <GT : ">">
-  | <LE : "<=">
-  | <GE : ">=">
-  | <EQ : "=">
-  | <NE : "!=">
-  | <SIMILAR : "~=">
-  | <ASSIGN : ":=">
-
-  | <AND : "and">
-  | <OR : "or">
-
-  | <SYMBOLAT : "@">
-  | <SYMBOLHASH : "#">
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    <LEFTBRACE : "{"> { pushState(); } : DEFAULT
-}
-< DEFAULT >
- TOKEN :
-{
-    <RIGHTBRACE : "}"> { popState("}"); }
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    <LEFTDBLBRACE : "{{"> { pushState(); } : IN_DBL_BRACE
-}
-< IN_DBL_BRACE >
- TOKEN :
-{
-    <RIGHTDBLBRACE : "}}"> { popState("}}"); }
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    <INTEGER_LITERAL : (<DIGIT>)+ >
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-  < MISSING : "missing">
-  | <NULL : "null">
-  | <TRUE : "true">
-  | <FALSE : "false">
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    <#DIGIT : ["0" - "9"]>
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    < DOUBLE_LITERAL: <DIGITS>
-        | <DIGITS> ( "." <DIGITS> )?
-        | "." <DIGITS>
-    >
-  | < FLOAT_LITERAL: <DIGITS> ( "f" | "F" )
-        | <DIGITS> ( "." <DIGITS> ( "f" | "F" ) )?
-        | "." <DIGITS> ( "f" | "F" )
-    >
-  | <DIGITS : (<DIGIT>)+ >
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    <#LETTER : ["A" - "Z", "a" - "z"]>
-  | <SPECIALCHARS : ["$", "_", "-"]>
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    // backslash u + 4 hex digits escapes are handled in the underlying JavaCharStream
-    <STRING_LITERAL : ("\"" (
-          <EscapeQuot>
-        | <EscapeBslash>
-        | <EscapeSlash>
-        | <EscapeBspace>
-        | <EscapeFormf>
-        | <EscapeNl>
-        | <EscapeCr>
-        | <EscapeTab>
-        | ~["\"","\\"])* "\"")
-      | ("\'"(
-          <EscapeApos>
-        | <EscapeBslash>
-        | <EscapeSlash>
-        | <EscapeBspace>
-        | <EscapeFormf>
-        | <EscapeNl>
-        | <EscapeCr>
-        | <EscapeTab>
-        | ~["\'","\\"])* "\'")>
-  | < #EscapeQuot: "\\\"" >
-  | < #EscapeApos: "\\\'" >
-  | < #EscapeBslash: "\\\\" >
-  | < #EscapeSlash: "\\/" >
-  | < #EscapeBspace: "\\b" >
-  | < #EscapeFormf: "\\f" >
-  | < #EscapeNl: "\\n" >
-  | < #EscapeCr: "\\r" >
-  | < #EscapeTab: "\\t" >
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    <IDENTIFIER : <LETTER> (<LETTER> | <DIGIT> | <SPECIALCHARS>)*>
-}
-< DEFAULT,IN_DBL_BRACE >
- TOKEN :
-{
-    <VARIABLE : "$" <LETTER> (<LETTER> | <DIGIT> | "_")*>
-}
-< DEFAULT,IN_DBL_BRACE >
- SKIP :
-{
-    " "
-  | "\t"
-  | "\r"
-  | "\n"
-}
-< DEFAULT,IN_DBL_BRACE >
- SKIP :
-{
-    <"//" (~["\n"])* "\n">
-}
-< DEFAULT,IN_DBL_BRACE >
- SKIP :
-{
-    <"//" (~["\n","\r"])* ("\n"|"\r"|"\r\n")?>
-}
-< DEFAULT,IN_DBL_BRACE >
- SKIP :
-{
-    <"/*"> { pushState(); } : INSIDE_COMMENT
-}
-< INSIDE_COMMENT >
- SPECIAL_TOKEN :
-{
-    <"+"(" ")*(~["*"])*>
-}
-< INSIDE_COMMENT >
- SKIP :
-{
-    <"/*"> { pushState(); }
-}
-< INSIDE_COMMENT >
- SKIP :
-{
-    <"*/"> { popState("*/"); }
-  | <~[]>
-}


[03/15] asterixdb-bad git commit: Fixed structure

Posted by sj...@apache.org.
http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/generated-sources/javacc/org/apache/asterix/bad/lang/JavaCharStream.java
----------------------------------------------------------------------
diff --git a/target/generated-sources/javacc/org/apache/asterix/bad/lang/JavaCharStream.java b/target/generated-sources/javacc/org/apache/asterix/bad/lang/JavaCharStream.java
deleted file mode 100644
index c6abe05..0000000
--- a/target/generated-sources/javacc/org/apache/asterix/bad/lang/JavaCharStream.java
+++ /dev/null
@@ -1,617 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 5.0 */
-/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-package org.apache.asterix.bad.lang;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (with java-like unicode escape processing).
- */
-
-public
-class JavaCharStream
-{
-  /** Whether parser is static. */
-  public static final boolean staticFlag = false;
-
-  static final int hexval(char c) throws java.io.IOException {
-    switch(c)
-    {
-       case '0' :
-          return 0;
-       case '1' :
-          return 1;
-       case '2' :
-          return 2;
-       case '3' :
-          return 3;
-       case '4' :
-          return 4;
-       case '5' :
-          return 5;
-       case '6' :
-          return 6;
-       case '7' :
-          return 7;
-       case '8' :
-          return 8;
-       case '9' :
-          return 9;
-
-       case 'a' :
-       case 'A' :
-          return 10;
-       case 'b' :
-       case 'B' :
-          return 11;
-       case 'c' :
-       case 'C' :
-          return 12;
-       case 'd' :
-       case 'D' :
-          return 13;
-       case 'e' :
-       case 'E' :
-          return 14;
-       case 'f' :
-       case 'F' :
-          return 15;
-    }
-
-    throw new java.io.IOException(); // Should never come here
-  }
-
-/** Position in buffer. */
-  public int bufpos = -1;
-  int bufsize;
-  int available;
-  int tokenBegin;
-  protected int bufline[];
-  protected int bufcolumn[];
-
-  protected int column = 0;
-  protected int line = 1;
-
-  protected boolean prevCharIsCR = false;
-  protected boolean prevCharIsLF = false;
-
-  protected java.io.Reader inputStream;
-
-  protected char[] nextCharBuf;
-  protected char[] buffer;
-  protected int maxNextCharInd = 0;
-  protected int nextCharInd = -1;
-  protected int inBuf = 0;
-  protected int tabSize = 8;
-
-  protected void setTabSize(int i) { tabSize = i; }
-  protected int getTabSize(int i) { return tabSize; }
-
-  protected void ExpandBuff(boolean wrapAround)
-  {
-    char[] newbuffer = new char[bufsize + 2048];
-    int newbufline[] = new int[bufsize + 2048];
-    int newbufcolumn[] = new int[bufsize + 2048];
-
-    try
-    {
-      if (wrapAround)
-      {
-        System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-        System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);
-        buffer = newbuffer;
-
-        System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-        System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
-        bufline = newbufline;
-
-        System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-        System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
-        bufcolumn = newbufcolumn;
-
-        bufpos += (bufsize - tokenBegin);
-    }
-    else
-    {
-        System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-        buffer = newbuffer;
-
-        System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
-        bufline = newbufline;
-
-        System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
-        bufcolumn = newbufcolumn;
-
-        bufpos -= tokenBegin;
-      }
-    }
-    catch (Throwable t)
-    {
-      throw new Error(t.getMessage());
-    }
-
-    available = (bufsize += 2048);
-    tokenBegin = 0;
-  }
-
-  protected void FillBuff() throws java.io.IOException
-  {
-    int i;
-    if (maxNextCharInd == 4096)
-      maxNextCharInd = nextCharInd = 0;
-
-    try {
-      if ((i = inputStream.read(nextCharBuf, maxNextCharInd,
-                                          4096 - maxNextCharInd)) == -1)
-      {
-        inputStream.close();
-        throw new java.io.IOException();
-      }
-      else
-         maxNextCharInd += i;
-      return;
-    }
-    catch(java.io.IOException e) {
-      if (bufpos != 0)
-      {
-        --bufpos;
-        backup(0);
-      }
-      else
-      {
-        bufline[bufpos] = line;
-        bufcolumn[bufpos] = column;
-      }
-      throw e;
-    }
-  }
-
-  protected char ReadByte() throws java.io.IOException
-  {
-    if (++nextCharInd >= maxNextCharInd)
-      FillBuff();
-
-    return nextCharBuf[nextCharInd];
-  }
-
-/** @return starting character for token. */
-  public char BeginToken() throws java.io.IOException
-  {
-    if (inBuf > 0)
-    {
-      --inBuf;
-
-      if (++bufpos == bufsize)
-        bufpos = 0;
-
-      tokenBegin = bufpos;
-      return buffer[bufpos];
-    }
-
-    tokenBegin = 0;
-    bufpos = -1;
-
-    return readChar();
-  }
-
-  protected void AdjustBuffSize()
-  {
-    if (available == bufsize)
-    {
-      if (tokenBegin > 2048)
-      {
-        bufpos = 0;
-        available = tokenBegin;
-      }
-      else
-        ExpandBuff(false);
-    }
-    else if (available > tokenBegin)
-      available = bufsize;
-    else if ((tokenBegin - available) < 2048)
-      ExpandBuff(true);
-    else
-      available = tokenBegin;
-  }
-
-  protected void UpdateLineColumn(char c)
-  {
-    column++;
-
-    if (prevCharIsLF)
-    {
-      prevCharIsLF = false;
-      line += (column = 1);
-    }
-    else if (prevCharIsCR)
-    {
-      prevCharIsCR = false;
-      if (c == '\n')
-      {
-        prevCharIsLF = true;
-      }
-      else
-        line += (column = 1);
-    }
-
-    switch (c)
-    {
-      case '\r' :
-        prevCharIsCR = true;
-        break;
-      case '\n' :
-        prevCharIsLF = true;
-        break;
-      case '\t' :
-        column--;
-        column += (tabSize - (column % tabSize));
-        break;
-      default :
-        break;
-    }
-
-    bufline[bufpos] = line;
-    bufcolumn[bufpos] = column;
-  }
-
-/** Read a character. */
-  public char readChar() throws java.io.IOException
-  {
-    if (inBuf > 0)
-    {
-      --inBuf;
-
-      if (++bufpos == bufsize)
-        bufpos = 0;
-
-      return buffer[bufpos];
-    }
-
-    char c;
-
-    if (++bufpos == available)
-      AdjustBuffSize();
-
-    if ((buffer[bufpos] = c = ReadByte()) == '\\')
-    {
-      UpdateLineColumn(c);
-
-      int backSlashCnt = 1;
-
-      for (;;) // Read all the backslashes
-      {
-        if (++bufpos == available)
-          AdjustBuffSize();
-
-        try
-        {
-          if ((buffer[bufpos] = c = ReadByte()) != '\\')
-          {
-            UpdateLineColumn(c);
-            // found a non-backslash char.
-            if ((c == 'u') && ((backSlashCnt & 1) == 1))
-            {
-              if (--bufpos < 0)
-                bufpos = bufsize - 1;
-
-              break;
-            }
-
-            backup(backSlashCnt);
-            return '\\';
-          }
-        }
-        catch(java.io.IOException e)
-        {
-	  // We are returning one backslash so we should only backup (count-1)
-          if (backSlashCnt > 1)
-            backup(backSlashCnt-1);
-
-          return '\\';
-        }
-
-        UpdateLineColumn(c);
-        backSlashCnt++;
-      }
-
-      // Here, we have seen an odd number of backslash's followed by a 'u'
-      try
-      {
-        while ((c = ReadByte()) == 'u')
-          ++column;
-
-        buffer[bufpos] = c = (char)(hexval(c) << 12 |
-                                    hexval(ReadByte()) << 8 |
-                                    hexval(ReadByte()) << 4 |
-                                    hexval(ReadByte()));
-
-        column += 4;
-      }
-      catch(java.io.IOException e)
-      {
-        throw new Error("Invalid escape character at line " + line +
-                                         " column " + column + ".");
-      }
-
-      if (backSlashCnt == 1)
-        return c;
-      else
-      {
-        backup(backSlashCnt - 1);
-        return '\\';
-      }
-    }
-    else
-    {
-      UpdateLineColumn(c);
-      return c;
-    }
-  }
-
-  @Deprecated
-  /**
-   * @deprecated
-   * @see #getEndColumn
-   */
-  public int getColumn() {
-    return bufcolumn[bufpos];
-  }
-
-  @Deprecated
-  /**
-   * @deprecated
-   * @see #getEndLine
-   */
-  public int getLine() {
-    return bufline[bufpos];
-  }
-
-/** Get end column. */
-  public int getEndColumn() {
-    return bufcolumn[bufpos];
-  }
-
-/** Get end line. */
-  public int getEndLine() {
-    return bufline[bufpos];
-  }
-
-/** @return column of token start */
-  public int getBeginColumn() {
-    return bufcolumn[tokenBegin];
-  }
-
-/** @return line number of token start */
-  public int getBeginLine() {
-    return bufline[tokenBegin];
-  }
-
-/** Retreat. */
-  public void backup(int amount) {
-
-    inBuf += amount;
-    if ((bufpos -= amount) < 0)
-      bufpos += bufsize;
-  }
-
-/** Constructor. */
-  public JavaCharStream(java.io.Reader dstream,
-                 int startline, int startcolumn, int buffersize)
-  {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    available = bufsize = buffersize;
-    buffer = new char[buffersize];
-    bufline = new int[buffersize];
-    bufcolumn = new int[buffersize];
-    nextCharBuf = new char[4096];
-  }
-
-/** Constructor. */
-  public JavaCharStream(java.io.Reader dstream,
-                                        int startline, int startcolumn)
-  {
-    this(dstream, startline, startcolumn, 4096);
-  }
-
-/** Constructor. */
-  public JavaCharStream(java.io.Reader dstream)
-  {
-    this(dstream, 1, 1, 4096);
-  }
-/** Reinitialise. */
-  public void ReInit(java.io.Reader dstream,
-                 int startline, int startcolumn, int buffersize)
-  {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    if (buffer == null || buffersize != buffer.length)
-    {
-      available = bufsize = buffersize;
-      buffer = new char[buffersize];
-      bufline = new int[buffersize];
-      bufcolumn = new int[buffersize];
-      nextCharBuf = new char[4096];
-    }
-    prevCharIsLF = prevCharIsCR = false;
-    tokenBegin = inBuf = maxNextCharInd = 0;
-    nextCharInd = bufpos = -1;
-  }
-
-/** Reinitialise. */
-  public void ReInit(java.io.Reader dstream,
-                                        int startline, int startcolumn)
-  {
-    ReInit(dstream, startline, startcolumn, 4096);
-  }
-
-/** Reinitialise. */
-  public void ReInit(java.io.Reader dstream)
-  {
-    ReInit(dstream, 1, 1, 4096);
-  }
-/** Constructor. */
-  public JavaCharStream(java.io.InputStream dstream, String encoding, int startline,
-  int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
-  {
-    this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
-  }
-
-/** Constructor. */
-  public JavaCharStream(java.io.InputStream dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-    this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
-  }
-
-/** Constructor. */
-  public JavaCharStream(java.io.InputStream dstream, String encoding, int startline,
-                        int startcolumn) throws java.io.UnsupportedEncodingException
-  {
-    this(dstream, encoding, startline, startcolumn, 4096);
-  }
-
-/** Constructor. */
-  public JavaCharStream(java.io.InputStream dstream, int startline,
-                        int startcolumn)
-  {
-    this(dstream, startline, startcolumn, 4096);
-  }
-
-/** Constructor. */
-  public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
-  {
-    this(dstream, encoding, 1, 1, 4096);
-  }
-
-/** Constructor. */
-  public JavaCharStream(java.io.InputStream dstream)
-  {
-    this(dstream, 1, 1, 4096);
-  }
-
-/** Reinitialise. */
-  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
-  int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
-  {
-    ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
-  }
-
-/** Reinitialise. */
-  public void ReInit(java.io.InputStream dstream, int startline,
-  int startcolumn, int buffersize)
-  {
-    ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
-  }
-/** Reinitialise. */
-  public void ReInit(java.io.InputStream dstream, String encoding, int startline,
-                     int startcolumn) throws java.io.UnsupportedEncodingException
-  {
-    ReInit(dstream, encoding, startline, startcolumn, 4096);
-  }
-/** Reinitialise. */
-  public void ReInit(java.io.InputStream dstream, int startline,
-                     int startcolumn)
-  {
-    ReInit(dstream, startline, startcolumn, 4096);
-  }
-/** Reinitialise. */
-  public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
-  {
-    ReInit(dstream, encoding, 1, 1, 4096);
-  }
-
-/** Reinitialise. */
-  public void ReInit(java.io.InputStream dstream)
-  {
-    ReInit(dstream, 1, 1, 4096);
-  }
-
-  /** @return token image as String */
-  public String GetImage()
-  {
-    if (bufpos >= tokenBegin)
-      return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
-    else
-      return new String(buffer, tokenBegin, bufsize - tokenBegin) +
-                              new String(buffer, 0, bufpos + 1);
-  }
-
-  /** @return suffix */
-  public char[] GetSuffix(int len)
-  {
-    char[] ret = new char[len];
-
-    if ((bufpos + 1) >= len)
-      System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
-    else
-    {
-      System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
-                                                        len - bufpos - 1);
-      System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
-    }
-
-    return ret;
-  }
-
-  /** Set buffers back to null when finished. */
-  public void Done()
-  {
-    nextCharBuf = null;
-    buffer = null;
-    bufline = null;
-    bufcolumn = null;
-  }
-
-  /**
-   * Method to adjust line and column numbers for the start of a token.
-   */
-  public void adjustBeginLineColumn(int newLine, int newCol)
-  {
-    int start = tokenBegin;
-    int len;
-
-    if (bufpos >= tokenBegin)
-    {
-      len = bufpos - tokenBegin + inBuf + 1;
-    }
-    else
-    {
-      len = bufsize - tokenBegin + bufpos + 1 + inBuf;
-    }
-
-    int i = 0, j = 0, k = 0;
-    int nextColDiff = 0, columnDiff = 0;
-
-    while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
-    {
-      bufline[j] = newLine;
-      nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
-      bufcolumn[j] = newCol + columnDiff;
-      columnDiff = nextColDiff;
-      i++;
-    }
-
-    if (i < len)
-    {
-      bufline[j] = newLine++;
-      bufcolumn[j] = newCol + columnDiff;
-
-      while (i++ < len)
-      {
-        if (bufline[j = start % bufsize] != bufline[++start % bufsize])
-          bufline[j] = newLine++;
-        else
-          bufline[j] = newLine;
-      }
-    }
-
-    line = bufline[j];
-    column = bufcolumn[j];
-  }
-
-}
-/* JavaCC - OriginalChecksum=4aff93f349bb1ee3d2db7895ac6acd01 (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/generated-sources/javacc/org/apache/asterix/bad/lang/ParseException.java
----------------------------------------------------------------------
diff --git a/target/generated-sources/javacc/org/apache/asterix/bad/lang/ParseException.java b/target/generated-sources/javacc/org/apache/asterix/bad/lang/ParseException.java
deleted file mode 100644
index 577eba9..0000000
--- a/target/generated-sources/javacc/org/apache/asterix/bad/lang/ParseException.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */
-/* JavaCCOptions:KEEP_LINE_COL=null */
-package org.apache.asterix.bad.lang;
-
-/**
- * This exception is thrown when parse errors are encountered.
- * You can explicitly create objects of this exception type by
- * calling the method generateParseException in the generated
- * parser.
- *
- * You can modify this class to customize your error reporting
- * mechanisms so long as you retain the public fields.
- */
-public class ParseException extends Exception {
-
-  /**
-   * The version identifier for this Serializable class.
-   * Increment only if the <i>serialized</i> form of the
-   * class changes.
-   */
-  private static final long serialVersionUID = 1L;
-
-  /**
-   * This constructor is used by the method "generateParseException"
-   * in the generated parser.  Calling this constructor generates
-   * a new object of this type with the fields "currentToken",
-   * "expectedTokenSequences", and "tokenImage" set.
-   */
-  public ParseException(Token currentTokenVal,
-                        int[][] expectedTokenSequencesVal,
-                        String[] tokenImageVal
-                       )
-  {
-    super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal));
-    currentToken = currentTokenVal;
-    expectedTokenSequences = expectedTokenSequencesVal;
-    tokenImage = tokenImageVal;
-  }
-
-  /**
-   * The following constructors are for use by you for whatever
-   * purpose you can think of.  Constructing the exception in this
-   * manner makes the exception behave in the normal way - i.e., as
-   * documented in the class "Throwable".  The fields "errorToken",
-   * "expectedTokenSequences", and "tokenImage" do not contain
-   * relevant information.  The JavaCC generated code does not use
-   * these constructors.
-   */
-
-  public ParseException() {
-    super();
-  }
-
-  /** Constructor with message. */
-  public ParseException(String message) {
-    super(message);
-  }
-
-
-  /**
-   * This is the last token that has been consumed successfully.  If
-   * this object has been created due to a parse error, the token
-   * followng this token will (therefore) be the first error token.
-   */
-  public Token currentToken;
-
-  /**
-   * Each entry in this array is an array of integers.  Each array
-   * of integers represents a sequence of tokens (by their ordinal
-   * values) that is expected at this point of the parse.
-   */
-  public int[][] expectedTokenSequences;
-
-  /**
-   * This is a reference to the "tokenImage" array of the generated
-   * parser within which the parse error occurred.  This array is
-   * defined in the generated ...Constants interface.
-   */
-  public String[] tokenImage;
-
-  /**
-   * It uses "currentToken" and "expectedTokenSequences" to generate a parse
-   * error message and returns it.  If this object has been created
-   * due to a parse error, and you do not catch it (it gets thrown
-   * from the parser) the correct error message
-   * gets displayed.
-   */
-  private static String initialise(Token currentToken,
-                           int[][] expectedTokenSequences,
-                           String[] tokenImage) {
-    String eol = System.getProperty("line.separator", "\n");
-    StringBuffer expected = new StringBuffer();
-    int maxSize = 0;
-    for (int i = 0; i < expectedTokenSequences.length; i++) {
-      if (maxSize < expectedTokenSequences[i].length) {
-        maxSize = expectedTokenSequences[i].length;
-      }
-      for (int j = 0; j < expectedTokenSequences[i].length; j++) {
-        expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');
-      }
-      if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
-        expected.append("...");
-      }
-      expected.append(eol).append("    ");
-    }
-    String retval = "Encountered \"";
-    Token tok = currentToken.next;
-    for (int i = 0; i < maxSize; i++) {
-      if (i != 0) retval += " ";
-      if (tok.kind == 0) {
-        retval += tokenImage[0];
-        break;
-      }
-      retval += " " + tokenImage[tok.kind];
-      retval += " \"";
-      retval += add_escapes(tok.image);
-      retval += " \"";
-      tok = tok.next;
-    }
-    retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
-    retval += "." + eol;
-    if (expectedTokenSequences.length == 1) {
-      retval += "Was expecting:" + eol + "    ";
-    } else {
-      retval += "Was expecting one of:" + eol + "    ";
-    }
-    retval += expected.toString();
-    return retval;
-  }
-
-  /**
-   * The end of line string for this machine.
-   */
-  protected String eol = System.getProperty("line.separator", "\n");
-
-  /**
-   * Used to convert raw characters to their escaped version
-   * when these raw version cannot be used as part of an ASCII
-   * string literal.
-   */
-  static String add_escapes(String str) {
-      StringBuffer retval = new StringBuffer();
-      char ch;
-      for (int i = 0; i < str.length(); i++) {
-        switch (str.charAt(i))
-        {
-           case 0 :
-              continue;
-           case '\b':
-              retval.append("\\b");
-              continue;
-           case '\t':
-              retval.append("\\t");
-              continue;
-           case '\n':
-              retval.append("\\n");
-              continue;
-           case '\f':
-              retval.append("\\f");
-              continue;
-           case '\r':
-              retval.append("\\r");
-              continue;
-           case '\"':
-              retval.append("\\\"");
-              continue;
-           case '\'':
-              retval.append("\\\'");
-              continue;
-           case '\\':
-              retval.append("\\\\");
-              continue;
-           default:
-              if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-                 String s = "0000" + Integer.toString(ch, 16);
-                 retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-              } else {
-                 retval.append(ch);
-              }
-              continue;
-        }
-      }
-      return retval.toString();
-   }
-
-}
-/* JavaCC - OriginalChecksum=2af238cb10e9068719c936c080d35014 (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/generated-sources/javacc/org/apache/asterix/bad/lang/Token.java
----------------------------------------------------------------------
diff --git a/target/generated-sources/javacc/org/apache/asterix/bad/lang/Token.java b/target/generated-sources/javacc/org/apache/asterix/bad/lang/Token.java
deleted file mode 100644
index 6b566e6..0000000
--- a/target/generated-sources/javacc/org/apache/asterix/bad/lang/Token.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */
-/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-package org.apache.asterix.bad.lang;
-
-/**
- * Describes the input token stream.
- */
-
-public class Token implements java.io.Serializable {
-
-  /**
-   * The version identifier for this Serializable class.
-   * Increment only if the <i>serialized</i> form of the
-   * class changes.
-   */
-  private static final long serialVersionUID = 1L;
-
-  /**
-   * An integer that describes the kind of this token.  This numbering
-   * system is determined by JavaCCParser, and a table of these numbers is
-   * stored in the file ...Constants.java.
-   */
-  public int kind;
-
-  /** The line number of the first character of this Token. */
-  public int beginLine;
-  /** The column number of the first character of this Token. */
-  public int beginColumn;
-  /** The line number of the last character of this Token. */
-  public int endLine;
-  /** The column number of the last character of this Token. */
-  public int endColumn;
-
-  /**
-   * The string image of the token.
-   */
-  public String image;
-
-  /**
-   * A reference to the next regular (non-special) token from the input
-   * stream.  If this is the last token from the input stream, or if the
-   * token manager has not read tokens beyond this one, this field is
-   * set to null.  This is true only if this token is also a regular
-   * token.  Otherwise, see below for a description of the contents of
-   * this field.
-   */
-  public Token next;
-
-  /**
-   * This field is used to access special tokens that occur prior to this
-   * token, but after the immediately preceding regular (non-special) token.
-   * If there are no such special tokens, this field is set to null.
-   * When there are more than one such special token, this field refers
-   * to the last of these special tokens, which in turn refers to the next
-   * previous special token through its specialToken field, and so on
-   * until the first special token (whose specialToken field is null).
-   * The next fields of special tokens refer to other special tokens that
-   * immediately follow it (without an intervening regular token).  If there
-   * is no such token, this field is null.
-   */
-  public Token specialToken;
-
-  /**
-   * An optional attribute value of the Token.
-   * Tokens which are not used as syntactic sugar will often contain
-   * meaningful values that will be used later on by the compiler or
-   * interpreter. This attribute value is often different from the image.
-   * Any subclass of Token that actually wants to return a non-null value can
-   * override this method as appropriate.
-   */
-  public Object getValue() {
-    return null;
-  }
-
-  /**
-   * No-argument constructor
-   */
-  public Token() {}
-
-  /**
-   * Constructs a new token for the specified Image.
-   */
-  public Token(int kind)
-  {
-    this(kind, null);
-  }
-
-  /**
-   * Constructs a new token for the specified Image and Kind.
-   */
-  public Token(int kind, String image)
-  {
-    this.kind = kind;
-    this.image = image;
-  }
-
-  /**
-   * Returns the image.
-   */
-  public String toString()
-  {
-    return image;
-  }
-
-  /**
-   * Returns a new Token object, by default. However, if you want, you
-   * can create and return subclass objects based on the value of ofKind.
-   * Simply add the cases to the switch for all those special cases.
-   * For example, if you have a subclass of Token called IDToken that
-   * you want to create if ofKind is ID, simply add something like :
-   *
-   *    case MyParserConstants.ID : return new IDToken(ofKind, image);
-   *
-   * to the following switch statement. Then you can cast matchedToken
-   * variable to the appropriate type and use sit in your lexical actions.
-   */
-  public static Token newToken(int ofKind, String image)
-  {
-    switch(ofKind)
-    {
-      default : return new Token(ofKind, image);
-    }
-  }
-
-  public static Token newToken(int ofKind)
-  {
-    return newToken(ofKind, null);
-  }
-
-}
-/* JavaCC - OriginalChecksum=5bb4b7430e73fcb63960a4875997021d (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/generated-sources/javacc/org/apache/asterix/bad/lang/TokenMgrError.java
----------------------------------------------------------------------
diff --git a/target/generated-sources/javacc/org/apache/asterix/bad/lang/TokenMgrError.java b/target/generated-sources/javacc/org/apache/asterix/bad/lang/TokenMgrError.java
deleted file mode 100644
index cdd6801..0000000
--- a/target/generated-sources/javacc/org/apache/asterix/bad/lang/TokenMgrError.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */
-/* JavaCCOptions: */
-package org.apache.asterix.bad.lang;
-
-/** Token Manager Error. */
-public class TokenMgrError extends Error
-{
-
-  /**
-   * The version identifier for this Serializable class.
-   * Increment only if the <i>serialized</i> form of the
-   * class changes.
-   */
-  private static final long serialVersionUID = 1L;
-
-  /*
-   * Ordinals for various reasons why an Error of this type can be thrown.
-   */
-
-  /**
-   * Lexical error occurred.
-   */
-  static final int LEXICAL_ERROR = 0;
-
-  /**
-   * An attempt was made to create a second instance of a static token manager.
-   */
-  static final int STATIC_LEXER_ERROR = 1;
-
-  /**
-   * Tried to change to an invalid lexical state.
-   */
-  static final int INVALID_LEXICAL_STATE = 2;
-
-  /**
-   * Detected (and bailed out of) an infinite loop in the token manager.
-   */
-  static final int LOOP_DETECTED = 3;
-
-  /**
-   * Indicates the reason why the exception is thrown. It will have
-   * one of the above 4 values.
-   */
-  int errorCode;
-
-  /**
-   * Replaces unprintable characters by their escaped (or unicode escaped)
-   * equivalents in the given string
-   */
-  protected static final String addEscapes(String str) {
-    StringBuffer retval = new StringBuffer();
-    char ch;
-    for (int i = 0; i < str.length(); i++) {
-      switch (str.charAt(i))
-      {
-        case 0 :
-          continue;
-        case '\b':
-          retval.append("\\b");
-          continue;
-        case '\t':
-          retval.append("\\t");
-          continue;
-        case '\n':
-          retval.append("\\n");
-          continue;
-        case '\f':
-          retval.append("\\f");
-          continue;
-        case '\r':
-          retval.append("\\r");
-          continue;
-        case '\"':
-          retval.append("\\\"");
-          continue;
-        case '\'':
-          retval.append("\\\'");
-          continue;
-        case '\\':
-          retval.append("\\\\");
-          continue;
-        default:
-          if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-            String s = "0000" + Integer.toString(ch, 16);
-            retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-          } else {
-            retval.append(ch);
-          }
-          continue;
-      }
-    }
-    return retval.toString();
-  }
-
-  /**
-   * Returns a detailed message for the Error when it is thrown by the
-   * token manager to indicate a lexical error.
-   * Parameters :
-   *    EOFSeen     : indicates if EOF caused the lexical error
-   *    curLexState : lexical state in which this error occurred
-   *    errorLine   : line number when the error occurred
-   *    errorColumn : column number when the error occurred
-   *    errorAfter  : prefix that was seen before this error occurred
-   *    curchar     : the offending character
-   * Note: You can customize the lexical error message by modifying this method.
-   */
-  protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
-    return("Lexical error at line " +
-          errorLine + ", column " +
-          errorColumn + ".  Encountered: " +
-          (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
-          "after : \"" + addEscapes(errorAfter) + "\"");
-  }
-
-  /**
-   * You can also modify the body of this method to customize your error messages.
-   * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
-   * of end-users concern, so you can return something like :
-   *
-   *     "Internal Error : Please file a bug report .... "
-   *
-   * from this method for such cases in the release version of your parser.
-   */
-  public String getMessage() {
-    return super.getMessage();
-  }
-
-  /*
-   * Constructors of various flavors follow.
-   */
-
-  /** No arg constructor. */
-  public TokenMgrError() {
-  }
-
-  /** Constructor with message and reason. */
-  public TokenMgrError(String message, int reason) {
-    super(message);
-    errorCode = reason;
-  }
-
-  /** Full Constructor. */
-  public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
-    this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
-  }
-}
-/* JavaCC - OriginalChecksum=fe43e76fe21cb3a94653e6c956d0fad6 (do not edit this line) */

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/maven-archiver/pom.properties
----------------------------------------------------------------------
diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties
deleted file mode 100644
index f648f05..0000000
--- a/target/maven-archiver/pom.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-#Generated by Maven
-#Fri Sep 09 11:53:38 PDT 2016
-version=0.8.9-SNAPSHOT
-groupId=org.apache.asterix
-artifactId=asterix-opt

http://git-wip-us.apache.org/repos/asf/asterixdb-bad/blob/0921e3c9/target/maven-shared-archive-resources/META-INF/DEPENDENCIES
----------------------------------------------------------------------
diff --git a/target/maven-shared-archive-resources/META-INF/DEPENDENCIES b/target/maven-shared-archive-resources/META-INF/DEPENDENCIES
deleted file mode 100644
index 3c60591..0000000
--- a/target/maven-shared-archive-resources/META-INF/DEPENDENCIES
+++ /dev/null
@@ -1,489 +0,0 @@
-// ------------------------------------------------------------------
-// Transitive dependencies of this project determined from the
-// maven pom organized by organization.
-// ------------------------------------------------------------------
-
-asterix-opt
-
-
-From: 'an unknown organization'
-  - AntLR Parser Generator (http://www.antlr.org/) antlr:antlr:jar:2.7.7
-    License: BSD License  (http://www.antlr.org/license.html)
-  - AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
-    License: Public Domain 
-  - Guava: Google Core Libraries for Java (http://code.google.com/p/guava-libraries/guava) com.google.guava:guava:bundle:18.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JSON.simple (http://code.google.com/p/json-simple/) com.googlecode.json-simple:json-simple:jar:1.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Microsoft Windows Azure Client API (https://github.com/WindowsAzure/azure-sdk-for-java) com.microsoft.windowsazure:microsoft-windowsazure-api:jar:0.4.4
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - rome (http://rometools.github.io/rome/) com.rometools:rome:jar:1.5.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - rome-utils (http://rometools.github.io/rome-utils/) com.rometools:rome-utils:jar:1.5.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - ParaNamer Core (http://paranamer.codehaus.org/paranamer) com.thoughtworks.paranamer:paranamer:jar:2.3
-    License: BSD  (LICENSE.txt)
-  - commons-beanutils  commons-beanutils:commons-beanutils:jar:1.7.0
-
-  - commons-logging-api  commons-logging:commons-logging-api:jar:1.0.4
-
-  - rxjava (https://github.com/ReactiveX/RxJava) io.reactivex:rxjava:jar:1.1.8
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JavaBeans Activation Framework (JAF) (http://java.sun.com/products/javabeans/jaf/index.jsp) javax.activation:activation:jar:1.1
-    License: Common Development and Distribution License (CDDL) v1.0  (https://glassfish.dev.java.net/public/CDDLv1.0.html)
-  - javax.inject (http://code.google.com/p/atinject/) javax.inject:javax.inject:jar:1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JDO2 API  javax.jdo:jdo2-api:jar:2.3-20090302111651
-
-  - servlet-api  javax.servlet:servlet-api:jar:2.5
-
-  - jsp-api  javax.servlet.jsp:jsp-api:jar:2.1
-
-  - Java Transaction API (http://java.sun.com/products/jta) javax.transaction:jta:jar:1.1
-
-  - Streaming API for XML  javax.xml.stream:stax-api:jar:1.0-2
-    License: GNU General Public Library  (http://www.gnu.org/licenses/gpl.txt)    License: COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0  (http://www.sun.com/cddl/cddl.html)
-  - jdom  jdom:jdom:jar:1.0
-
-  - An open source Java toolkit for Amazon S3 (http://jets3t.s3.amazonaws.com/index.html) net.java.dev.jets3t:jets3t:jar:0.6.1
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-  - ANTLR ST4 4.0.4 (http://www.stringtemplate.org) org.antlr:ST4:jar:4.0.4
-    License: BSD licence  (http://antlr.org/license.html)
-  - Antlr 3.4 Runtime (http://www.antlr.org) org.antlr:antlr-runtime:jar:3.4
-
-  - ANTLR StringTemplate (http://www.stringtemplate.org) org.antlr:stringtemplate:jar:3.2.1
-    License: BSD licence  (http://antlr.org/license.html)
-  - Apache Thrift (http://thrift.apache.org) org.apache.thrift:libfb303:pom:0.9.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Thrift (http://thrift.apache.org) org.apache.thrift:libthrift:pom:0.9.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - zookeeper  org.apache.zookeeper:zookeeper:pom:3.4.5
-
-  - Jettison  org.codehaus.jettison:jettison:bundle:1.1
-
-  - DataNucleus JDO API plugin (http://www.datanucleus.org) org.datanucleus:datanucleus-api-jdo:jar:3.2.6
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - DataNucleus Core (http://www.datanucleus.org) org.datanucleus:datanucleus-core:jar:3.2.10
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - DataNucleus RDBMS (http://www.datanucleus.org) org.datanucleus:datanucleus-rdbms:jar:3.2.9
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hamcrest Core (https://github.com/hamcrest/JavaHamcrest/hamcrest-core) org.hamcrest:hamcrest-core:jar:1.3
-    License: New BSD License  (http://www.opensource.org/licenses/bsd-license.php)
-  - ini4j (http://www.ini4j.org) org.ini4j:ini4j:jar:0.5.4
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JAXB2 Commons - Value Constructor Plugin (http://java.net/projects/jaxb2-commons/pages/value-constructor) org.jvnet.jaxb2_commons:jaxb2-value-constructor:jar:3.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - XZ for Java (http://tukaani.org/xz/java.html) org.tukaani:xz:jar:1.0
-    License: Public Domain 
-  - twitter4j-core (http://twitter4j.org/) org.twitter4j:twitter4j-core:jar:4.0.3
-    License: Apache License 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-  - twitter4j-stream (http://twitter4j.org/) org.twitter4j:twitter4j-stream:jar:4.0.3
-    License: Apache License 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-  - oro  oro:oro:jar:2.0.8
-
-  - rome  rome:rome:jar:1.0.1-modified-01
-
-  - StAX API (http://stax.codehaus.org/) stax:stax-api:jar:1.0.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Xerces2-j (https://xerces.apache.org/xerces2-j/) xerces:xercesImpl:jar:2.11.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - XML Commons External Components XML APIs (http://xml.apache.org/commons/components/external/) xml-apis:xml-apis:jar:1.4.01
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)    License: The SAX License  (http://www.saxproject.org/copying.html)    License: The W3C License  (http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.zip)
-  - xmlenc Library (http://xmlenc.sourceforge.net) xmlenc:xmlenc:jar:0.52
-    License: The BSD License  (http://www.opensource.org/licenses/bsd-license.php)
-
-From: 'Apache Software Foundation' (http://apache.org)
-  - Wicket Core (http://wicket.apache.org/wicket-core/wicket-core) org.apache.wicket:wicket-core:jar:1.5.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Wicket Request (http://maven.apache.org) org.apache.wicket:wicket-request:jar:1.5.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Wicket Util (http://maven.apache.org) org.apache.wicket:wicket-util:jar:1.5.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Apache Software Foundation' (http://db.apache.org/)
-  - Apache Derby Database Engine and Embedded JDBC Driver (http://db.apache.org/derby/derby/) org.apache.derby:derby:jar:10.10.1.1
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Apache Software Foundation' (http://jakarta.apache.org/)
-  - HttpClient (http://jakarta.apache.org/httpcomponents/httpclient-3.x/) commons-httpclient:commons-httpclient:jar:3.1
-    License: Apache License  (http://www.apache.org/licenses/LICENSE-2.0)
-
-From: 'Apache Software Foundation' (http://www.apache.org)
-  - JDO API (http://db.apache.org/jdo) javax.jdo:jdo-api:jar:3.0.1
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Log4j (http://logging.apache.org/log4j/1.2/) log4j:log4j:bundle:1.2.17
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Annotations  org.apache.hadoop:hadoop-annotations:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Auth  org.apache.hadoop:hadoop-auth:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Client  org.apache.hadoop:hadoop-client:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Common  org.apache.hadoop:hadoop-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Common  org.apache.hadoop:hadoop-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop HDFS  org.apache.hadoop:hadoop-hdfs:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop HDFS  org.apache.hadoop:hadoop-hdfs:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-app  org.apache.hadoop:hadoop-mapreduce-client-app:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-common  org.apache.hadoop:hadoop-mapreduce-client-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-core  org.apache.hadoop:hadoop-mapreduce-client-core:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-hs  org.apache.hadoop:hadoop-mapreduce-client-hs:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-jobclient  org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-jobclient  org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-mapreduce-client-shuffle  org.apache.hadoop:hadoop-mapreduce-client-shuffle:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Hadoop Mini-Cluster  org.apache.hadoop:hadoop-minicluster:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-api  org.apache.hadoop:hadoop-yarn-api:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-client  org.apache.hadoop:hadoop-yarn-client:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-common  org.apache.hadoop:hadoop-yarn-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-common  org.apache.hadoop:hadoop-yarn-server-common:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-nodemanager  org.apache.hadoop:hadoop-yarn-server-nodemanager:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-resourcemanager  org.apache.hadoop:hadoop-yarn-server-resourcemanager:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-tests  org.apache.hadoop:hadoop-yarn-server-tests:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hadoop-yarn-server-web-proxy  org.apache.hadoop:hadoop-yarn-server-web-proxy:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Couchbase, Inc.' (http://couchbase.com)
-  - Couchbase JVM Core IO (http://couchbase.com) com.couchbase.client:core-io:jar:1.3.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'e-movimento' (http://www.e-movimento.com)
-  - privileged accessor (http://code.google.com/p/privilegedaccessor/) com.e-movimento.tinytools:privilegedaccessor:jar:1.2.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'FasterXML' (http://fasterxml.com)
-  - Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-core-asl:jar:1.9.12
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - JAX-RS provider for JSON content type (http://jackson.codehaus.org) org.codehaus.jackson:jackson-jaxrs:jar:1.9.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)    License: GNU Lesser General Public License (LGPL), Version 2.1  (http://www.fsf.org/licensing/licenses/lgpl.txt)
-  - Data Mapper for Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-mapper-asl:jar:1.9.12
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Xml Compatibility extensions for Jackson (http://jackson.codehaus.org) org.codehaus.jackson:jackson-xc:jar:1.9.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)    License: GNU Lesser General Public License (LGPL), Version 2.1  (http://www.fsf.org/licensing/licenses/lgpl.txt)
-
-From: 'FasterXML' (http://fasterxml.com/)
-  - Jackson-core (http://wiki.fasterxml.com/JacksonHome) com.fasterxml.jackson.core:jackson-core:jar:2.2.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'GlassFish Community' (https://glassfish.dev.java.net)
-  - Java Servlet API (http://servlet-spec.java.net) javax.servlet:javax.servlet-api:jar:3.1.0
-    License: CDDL + GPLv2 with classpath exception  (https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html)
-  - javax.servlet API v.3.0 (http://jcp.org/en/jsr/detail?id=315) org.glassfish:javax.servlet:jar:3.1
-    License: CDDL + GPLv2 with classpath exception  (https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html)
-
-From: 'Google' (http://www.google.com/)
-  - Protocol Buffer Java API (http://code.google.com/p/protobuf) com.google.protobuf:protobuf-java:bundle:2.5.0
-    License: New BSD license  (http://www.opensource.org/licenses/bsd-license.php)
-
-From: 'Google, Inc.' (http://www.google.com)
-  - Google Guice - Core Library (http://code.google.com/p/google-guice/guice/) com.google.inject:guice:jar:3.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Google Guice - Extensions - Servlet (http://code.google.com/p/google-guice/extensions-parent/guice-servlet/) com.google.inject.extensions:guice-servlet:jar:3.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'jcraft' (http://www.jcraft.com/jsch)
-  - JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.42
-    License: BSD  (http://www.jcraft.com/jsch/LICENSE.txt)
-
-From: 'JDOM' (http://www.jdom.org)
-  - JDOM (http://www.jdom.org) org.jdom:jdom:jar:2.0.2
-    License: Similar to Apache License but with the acknowledgment clause removed  (https://raw.github.com/hunterhacker/jdom/master/LICENSE.txt)
-
-From: 'JolBox' (http://jolbox.com)
-  - BoneCP :: Core Library (http://jolbox.com/bonecp) com.jolbox:bonecp:bundle:0.8.0.RELEASE
-    License: Apache v2  (http://www.apache.org/licenses/LICENSE-2.0.html)
-
-From: 'JSON' (http://json.org/)
-  - JSON (JavaScript Object Notation) (http://www.json.org/java/index.html) org.json:json:jar:20090211
-    License: provided without support or warranty  (http://www.json.org/license.html)
-
-From: 'JUnit' (http://www.junit.org)
-  - JUnit (http://junit.org) junit:junit:jar:4.11
-    License: Common Public License Version 1.0  (http://www.opensource.org/licenses/cpl1.0.txt)
-
-From: 'Kohsuke Kawaguchi' (http://www.kohsuke.org/)
-  - args4j (http://args4j.kohsuke.org/args4j/) args4j:args4j:bundle:2.33
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-
-From: 'Mort Bay Consulting' (http://www.mortbay.com)
-  - Jetty Server (http://www.eclipse.org/jetty/jetty-parent/project/modules/jetty) org.mortbay.jetty:jetty:jar:6.1.26
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty Utilities (http://www.eclipse.org/jetty/jetty-parent/project/jetty-util) org.mortbay.jetty:jetty-util:jar:6.1.26
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-
-From: 'ObjectWeb' (http://www.objectweb.org/)
-  - ASM Core (http://asm.objectweb.org/asm/) asm:asm:jar:3.1
-
-  - ASM All (http://asm.objectweb.org/asm-all/) org.ow2.asm:asm-all:jar:5.1
-    License: BSD  (http://asm.objectweb.org/license.html)
-
-From: 'Oracle' (http://www.oracle.com)
-  - JavaMail API (compat) (http://kenai.com/projects/javamail/mail) javax.mail:mail:jar:1.4.5
-    License: CDDL  (http://www.sun.com/cddl)    License: GPLv2+CE  (https://glassfish.dev.java.net/public/CDDL+GPL.html)
-
-From: 'Oracle Corporation' (http://www.oracle.com/)
-  - jersey-client (https://jersey.java.net/jersey-client/) com.sun.jersey:jersey-client:jar:1.13
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-core (https://jersey.java.net/jersey-core/) com.sun.jersey:jersey-core:bundle:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-grizzly2 (https://jersey.java.net/jersey-grizzly2/) com.sun.jersey:jersey-grizzly2:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-json (https://jersey.java.net/jersey-json/) com.sun.jersey:jersey-json:jar:1.13
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-server (https://jersey.java.net/jersey-server/) com.sun.jersey:jersey-server:bundle:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - jersey-guice (https://jersey.java.net/jersey-contribs/jersey-guice/) com.sun.jersey.contribs:jersey-guice:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - Jersey Test Framework - Core (https://jersey.java.net/jersey-test-framework/jersey-test-framework-core/) com.sun.jersey.jersey-test-framework:jersey-test-framework-core:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - Jersey Test Framework - Grizzly 2 Module (https://jersey.java.net/jersey-test-framework/jersey-test-framework-grizzly2/) com.sun.jersey.jersey-test-framework:jersey-test-framework-grizzly2:jar:1.9
-    License: CDDL 1.1  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (http://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - JAXB RI (http://jaxb.java.net/) com.sun.xml.bind:jaxb-impl:jar:2.2.3-1
-    License: CDDL 1.1  (https://glassfish.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (https://glassfish.java.net/public/CDDL+GPL_1_1.html)
-  - JAXB API bundle for GlassFish V3 (https://jaxb.dev.java.net/) javax.xml.bind:jaxb-api:jar:2.2.2
-    License: CDDL 1.1  (https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html)    License: GPL2 w/ CPE  (https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html)
-
-From: 'Oracle Corpration' (http://www.oracle.com)
-  - grizzly-framework (http://grizzly.java.net/grizzly-framework) org.glassfish.grizzly:grizzly-framework:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-http (http://grizzly.java.net/grizzly-http) org.glassfish.grizzly:grizzly-http:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-http-server (http://grizzly.java.net/grizzly-http-server) org.glassfish.grizzly:grizzly-http-server:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-http-servlet (http://grizzly.java.net/grizzly-http-servlet) org.glassfish.grizzly:grizzly-http-servlet:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-  - grizzly-rcm (http://grizzly.java.net/grizzly-rcm) org.glassfish.grizzly:grizzly-rcm:bundle:2.1.2
-    License: CDDL+GPL  (http://glassfish.java.net/public/CDDL+GPL.html)
-
-From: 'QOS.ch' (http://www.qos.ch)
-  - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.7.7
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-  - SLF4J JCL Binding (http://www.slf4j.org) org.slf4j:slf4j-jcl:jar:1.6.3
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-  - SLF4J LOG4J-12 Binding (http://www.slf4j.org) org.slf4j:slf4j-log4j12:jar:1.7.5
-    License: MIT License  (http://www.opensource.org/licenses/mit-license.php)
-
-From: 'ROME Project' (http://rome.dev.java.net)
-  - Rome HTTP Fetcher  net.java.dev.rome:rome-fetcher:jar:1.0.0
-    License: Apache 2  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'Sun Microsystems' (http://www.sun.com)
-  - management-api (http://kenai.com/hg/gmbal~gf_common) org.glassfish.external:management-api:jar:3.0.0-b012
-    License: CDDL+GPL  (https://glassfish.dev.java.net/public/CDDL+GPL.html)
-  - gmbal-api-only (http://kenai.com/hg/gmbal~master) org.glassfish.gmbal:gmbal-api-only:jar:3.0.0-b023
-    License: CDDL+GPL  (https://glassfish.dev.java.net/public/CDDL+GPL.html)
-
-From: 'The Apache Software Foundation' (http://commons.apache.org/)
-  - Commons Configuration (http://commons.apache.org/${pom.artifactId.substring(8)}/) commons-configuration:commons-configuration:jar:1.6
-    License: The Apache Software License, Version 2.0  (/LICENSE.txt)
-
-From: 'The Apache Software Foundation' (http://jakarta.apache.org)
-  - Digester (http://jakarta.apache.org/commons/digester/) commons-digester:commons-digester:jar:1.8
-    License: The Apache Software License, Version 2.0  (/LICENSE.txt)
-  - EL (http://jakarta.apache.org/commons/el/) commons-el:commons-el:jar:1.0
-    License: The Apache Software License, Version 2.0  (/LICENSE.txt)
-
-From: 'The Apache Software Foundation' (http://www.apache.org/)
-  - Commons BeanUtils Core (http://commons.apache.org/beanutils/) commons-beanutils:commons-beanutils-core:jar:1.8.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons CLI (http://commons.apache.org/cli/) commons-cli:commons-cli:jar:1.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Commons Codec (http://commons.apache.org/proper/commons-codec/) commons-codec:commons-codec:jar:1.9
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Collections (http://commons.apache.org/collections/) commons-collections:commons-collections:jar:3.2.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Daemon (http://commons.apache.org/daemon/) commons-daemon:commons-daemon:jar:1.0.13
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:2.4
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.5
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Commons Logging (http://commons.apache.org/proper/commons-logging/) commons-logging:commons-logging:jar:1.2
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Net (http://commons.apache.org/net/) commons-net:commons-net:jar:3.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Ant Core (http://ant.apache.org/) org.apache.ant:ant:jar:1.9.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Ant Launcher (http://ant.apache.org/) org.apache.ant:ant-launcher:jar:1.9.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-active (http://www.apache.org/apache-asterixdb/asterix-active/) org.apache.asterix:asterix-active:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-algebra (http://www.apache.org/apache-asterixdb/asterix-algebra/) org.apache.asterix:asterix-algebra:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-app (http://www.apache.org/apache-asterixdb/asterix-app/) org.apache.asterix:asterix-app:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-common (http://www.apache.org/apache-asterixdb/asterix-common/) org.apache.asterix:asterix-common:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-events (http://www.apache.org/apache-asterixdb/asterix-events/) org.apache.asterix:asterix-events:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-external-data (http://www.apache.org/apache-asterixdb/asterix-external-data/) org.apache.asterix:asterix-external-data:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-fuzzyjoin (http://www.apache.org/apache-asterixdb/asterix-fuzzyjoin/) org.apache.asterix:asterix-fuzzyjoin:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-lang-aql (http://www.apache.org/apache-asterixdb/asterix-lang-aql/) org.apache.asterix:asterix-lang-aql:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-lang-common (http://www.apache.org/apache-asterixdb/asterix-lang-common/) org.apache.asterix:asterix-lang-common:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-lang-sqlpp (http://www.apache.org/apache-asterixdb/asterix-lang-sqlpp/) org.apache.asterix:asterix-lang-sqlpp:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-metadata (http://www.apache.org/apache-asterixdb/asterix-metadata/) org.apache.asterix:asterix-metadata:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-om (http://www.apache.org/apache-asterixdb/asterix-om/) org.apache.asterix:asterix-om:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-replication (http://www.apache.org/apache-asterixdb/asterix-replication/) org.apache.asterix:asterix-replication:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-runtime (http://www.apache.org/apache-asterixdb/asterix-runtime/) org.apache.asterix:asterix-runtime:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-test-framework (http://www.apache.org/apache-asterixdb/asterix-test-framework/) org.apache.asterix:asterix-test-framework:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - asterix-transactions (http://www.apache.org/apache-asterixdb/asterix-transactions/) org.apache.asterix:asterix-transactions:jar:0.8.9-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Avro (http://avro.apache.org) org.apache.avro:avro:jar:1.7.4
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Compress (http://commons.apache.org/compress/) org.apache.commons:commons-compress:jar:1.4.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Lang (http://commons.apache.org/lang/) org.apache.commons:commons-lang3:jar:3.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Commons Math (http://commons.apache.org/math/) org.apache.commons:commons-math:jar:2.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Ant Utilities (http://hive.apache.org/hive-ant) org.apache.hive:hive-ant:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Common (http://hive.apache.org/hive-common) org.apache.hive:hive-common:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Query Language (http://hive.apache.org/hive-exec) org.apache.hive:hive-exec:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Metastore (http://hive.apache.org/hive-metastore) org.apache.hive:hive-metastore:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Serde (http://hive.apache.org/hive-serde) org.apache.hive:hive-serde:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims (http://hive.apache.org/hive-shims) org.apache.hive:hive-shims:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims 0.20 (http://hive.apache.org/hive-shims-0.20) org.apache.hive.shims:hive-shims-0.20:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims 0.20S (http://hive.apache.org/hive-shims-0.20S) org.apache.hive.shims:hive-shims-0.20S:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims 0.23 (http://hive.apache.org/hive-shims-0.23) org.apache.hive.shims:hive-shims-0.23:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims Common (http://hive.apache.org/hive-shims-common) org.apache.hive.shims:hive-shims-common:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Hive Shims Secure Common (http://hive.apache.org/hive-shims-common-secure) org.apache.hive.shims:hive-shims-common-secure:jar:0.13.0
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache HttpClient (http://hc.apache.org/httpcomponents-client) org.apache.httpcomponents:httpclient:jar:4.5.2
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache HttpCore (http://hc.apache.org/httpcomponents-core-ga) org.apache.httpcomponents:httpcore:jar:4.4.4
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-common (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-common/) org.apache.hyracks:algebricks-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-compiler (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-compiler/) org.apache.hyracks:algebricks-compiler:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-core (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-core/) org.apache.hyracks:algebricks-core:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-data (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-data/) org.apache.hyracks:algebricks-data:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-rewriter (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-rewriter/) org.apache.hyracks:algebricks-rewriter:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - algebricks-runtime (http://www.apache.org/apache-asterixdb-hyracks/algebricks/algebricks-runtime/) org.apache.hyracks:algebricks-runtime:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-api (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-api/) org.apache.hyracks:hyracks-api:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-client (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-client/) org.apache.hyracks:hyracks-client:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-comm (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-comm/) org.apache.hyracks:hyracks-comm:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-control-cc (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-control/hyracks-control-cc/) org.apache.hyracks:hyracks-control-cc:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-control-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-control/hyracks-control-common/) org.apache.hyracks:hyracks-control-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-control-nc (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-control/hyracks-control-nc/) org.apache.hyracks:hyracks-control-nc:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-data-std (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-data/hyracks-data-std/) org.apache.hyracks:hyracks-data-std:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-dataflow-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-dataflow-common/) org.apache.hyracks:hyracks-dataflow-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-dataflow-std (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-dataflow-std/) org.apache.hyracks:hyracks-dataflow-std:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-hdfs-2.x (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-hdfs/hyracks-hdfs-2.x/) org.apache.hyracks:hyracks-hdfs-2.x:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-hdfs-core (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-hdfs/hyracks-hdfs-core/) org.apache.hyracks:hyracks-hdfs-core:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-ipc (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-ipc/) org.apache.hyracks:hyracks-ipc:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-net (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-net/) org.apache.hyracks:hyracks-net:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-bloomfilter (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-bloomfilter/) org.apache.hyracks:hyracks-storage-am-bloomfilter:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-btree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-btree/) org.apache.hyracks:hyracks-storage-am-btree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-common/) org.apache.hyracks:hyracks-storage-am-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-btree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-btree/) org.apache.hyracks:hyracks-storage-am-lsm-btree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-common/) org.apache.hyracks:hyracks-storage-am-lsm-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-invertedindex (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-invertedindex/) org.apache.hyracks:hyracks-storage-am-lsm-invertedindex:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-lsm-rtree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-lsm-rtree/) org.apache.hyracks:hyracks-storage-am-lsm-rtree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-am-rtree (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-am-rtree/) org.apache.hyracks:hyracks-storage-am-rtree:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-storage-common (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-storage-common/) org.apache.hyracks:hyracks-storage-common:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - hyracks-util (http://www.apache.org/apache-asterixdb-hyracks/hyracks/hyracks-util/) org.apache.hyracks:hyracks-util:jar:0.2.18-SNAPSHOT
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - Apache Velocity (http://velocity.apache.org/engine/releases/velocity-1.5/) org.apache.velocity:velocity:pom:1.5
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - jasper-compiler (http://tomcat.apache.org/jasper-compiler) tomcat:jasper-compiler:jar:5.5.23
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-  - jasper-runtime (http://tomcat.apache.org/jasper-runtime) tomcat:jasper-runtime:jar:5.5.23
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'The Codehaus' (http://codehaus.org)
-  - Groovy (http://groovy.codehaus.org/) org.codehaus.groovy:groovy-all:jar:2.1.6
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-From: 'The Netty Project' (http://netty.io/)
-  - The Netty Project (http://netty.io/) io.netty:netty:bundle:3.6.2.Final
-    License: Apache License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
-
-From: 'Webtide' (http://webtide.com)
-  - Jetty :: Http Utility (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-http:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: IO Utility (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Security (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-security:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Server Core (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-server:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Servlet Handling (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-servlet:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Utilities (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: Webapp Application Support (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-webapp:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-  - Jetty :: XML utilities (http://www.eclipse.org/jetty) org.eclipse.jetty:jetty-xml:jar:9.3.11.v20160721
-    License: Apache Software License - Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0)    License: Eclipse Public License - Version 1.0  (http://www.eclipse.org/org/documents/epl-v10.php)
-
-From: 'xerial.org' (http://www.xerial.org/)
-  - Snappy for Java (http://code.google.com/p/snappy-java/) org.xerial.snappy:snappy-java:bundle:1.0.4.1
-    License: The Apache Software License, Version 2.0  (http://www.apache.org/licenses/LICENSE-2.0.txt)
-
-
-
-