asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Jacobs (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb-bad[master]: Match plan printing changes from Asterix
Date Tue, 09 May 2017 22:06:47 GMT
Steven Jacobs has submitted this change and it was merged.

Change subject: Match plan printing changes from Asterix
......................................................................


Match plan printing changes from Asterix

Change-Id: I540f4db9c7d645629ffb57e65ba29c5fe8846760
---
M asterix-bad/src/main/java/org/apache/asterix/bad/ChannelJobService.java
M asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
M asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan
M asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
M asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
5 files changed, 15 insertions(+), 13 deletions(-)

Approvals:
  Ildar Absalyamov: Looks good to me, approved
  Jenkins: Verified



diff --git a/asterix-bad/src/main/java/org/apache/asterix/bad/ChannelJobService.java b/asterix-bad/src/main/java/org/apache/asterix/bad/ChannelJobService.java
index eba8ca1..ae24e0e 100644
--- a/asterix-bad/src/main/java/org/apache/asterix/bad/ChannelJobService.java
+++ b/asterix-bad/src/main/java/org/apache/asterix/bad/ChannelJobService.java
@@ -92,8 +92,10 @@
                 + channelExecutionTime + "\", \"subscriptionIds\":[";
         for (int i = 0; i < subscriptionIds.size(); i++) {
             AUUID subId = (AUUID) subscriptionIds.getItem(i);
-            String subString = subId.toSimpleString();
-            JSON += "\"" + subString + "\"";
+            String subscriptionString = subId.toString();
+            //Broker code currently cannot handle the "uuid {}" part of the string, so we
parse just the value
+            subscriptionString = subscriptionString.substring(8, subscriptionString.length()
- 2);
+            JSON += "\"" + subscriptionString + "\"";
             if (i < subscriptionIds.size() - 1) {
                 JSON += ",";
             }
diff --git a/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
b/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
index 571a2d7..ff115e9 100644
--- a/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
+++ b/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
@@ -171,7 +171,7 @@
 
     private void createDatasets(IStatementExecutor statementExecutor, Identifier subscriptionsName,
             Identifier resultsName, MetadataProvider metadataProvider, IHyracksClientConnection
hcc,
-            IHyracksDataset hdc, Stats stats, String dataverse) throws AsterixException,
Exception {
+            IHyracksDataset hdc, String dataverse) throws AsterixException, Exception {
 
         Identifier subscriptionsTypeName = new Identifier(BADConstants.ChannelSubscriptionsType);
         Identifier resultsTypeName = new Identifier(BADConstants.ChannelResultsType);
@@ -310,7 +310,7 @@
                     metadataProvider.getDefaultDataverse(), metadataProvider.getStorageComponentProvider());
             tempMdProvider.setConfig(metadataProvider.getConfig());
             //Create Channel Datasets
-            createDatasets(statementExecutor, subscriptionsName, resultsName, tempMdProvider,
hcc, hdc, stats,
+            createDatasets(statementExecutor, subscriptionsName, resultsName, tempMdProvider,
hcc, hdc,
                     dataverse);
             tempMdProvider.getLocks().reset();
             //Create Channel Internal Job
diff --git a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan
b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan
index 4c0ff87..65e7dbc 100644
--- a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan
+++ b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-create.plan
@@ -1,13 +1,13 @@
 -- NOTIFY_BROKERS  |PARTITIONED|
   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-    -- PRE_CLUSTERED_GROUP_BY[$$52, $$0]  |PARTITIONED|
+    -- PRE_CLUSTERED_GROUP_BY[$$52, $$channelExecutionTime]  |PARTITIONED|
             {
               -- AGGREGATE  |LOCAL|
                 -- NESTED_TUPLE_SOURCE  |LOCAL|
             }
       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-        -- STABLE_SORT [$$52(ASC), $$0(ASC)]  |PARTITIONED|
-          -- HASH_PARTITION_EXCHANGE [$$52, $$0]  |PARTITIONED|
+        -- STABLE_SORT [$$52(ASC), $$channelExecutionTime(ASC)]  |PARTITIONED|
+          -- HASH_PARTITION_EXCHANGE [$$52, $$channelExecutionTime]  |PARTITIONED|
             -- PRE_SORTED_DISTINCT_BY  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- STABLE_SORT [$$37(ASC)]  |PARTITIONED|
diff --git a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
index 42544d9..06630e6 100644
--- a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
+++ b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-subscribe.plan
@@ -1,13 +1,13 @@
 -- NOTIFY_BROKERS  |PARTITIONED|
   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-    -- PRE_CLUSTERED_GROUP_BY[$$52, $$0]  |PARTITIONED|
+    -- PRE_CLUSTERED_GROUP_BY[$$52, $$channelExecutionTime]  |PARTITIONED|
             {
               -- AGGREGATE  |LOCAL|
                 -- NESTED_TUPLE_SOURCE  |LOCAL|
             }
       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-        -- STABLE_SORT [$$52(ASC), $$0(ASC)]  |PARTITIONED|
-          -- HASH_PARTITION_EXCHANGE [$$52, $$0]  |PARTITIONED|
+        -- STABLE_SORT [$$52(ASC), $$channelExecutionTime(ASC)]  |PARTITIONED|
+          -- HASH_PARTITION_EXCHANGE [$$52, $$channelExecutionTime]  |PARTITIONED|
             -- PRE_SORTED_DISTINCT_BY  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- STABLE_SORT [$$37(ASC)]  |PARTITIONED|
diff --git a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
index 843205a..b3f4c51 100644
--- a/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
+++ b/asterix-bad/src/test/resources/optimizerts/results/channel/channel-unsubscribe.plan
@@ -1,13 +1,13 @@
 -- NOTIFY_BROKERS  |PARTITIONED|
   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-    -- PRE_CLUSTERED_GROUP_BY[$$52, $$0]  |PARTITIONED|
+    -- PRE_CLUSTERED_GROUP_BY[$$52, $$channelExecutionTime]  |PARTITIONED|
             {
               -- AGGREGATE  |LOCAL|
                 -- NESTED_TUPLE_SOURCE  |LOCAL|
             }
       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-        -- STABLE_SORT [$$52(ASC), $$0(ASC)]  |PARTITIONED|
-          -- HASH_PARTITION_EXCHANGE [$$52, $$0]  |PARTITIONED|
+        -- STABLE_SORT [$$52(ASC), $$channelExecutionTime(ASC)]  |PARTITIONED|
+          -- HASH_PARTITION_EXCHANGE [$$52, $$channelExecutionTime]  |PARTITIONED|
             -- PRE_SORTED_DISTINCT_BY  |PARTITIONED|
               -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                 -- STABLE_SORT [$$37(ASC)]  |PARTITIONED|

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1732
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I540f4db9c7d645629ffb57e65ba29c5fe8846760
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs <sjaco002@ucr.edu>
Gerrit-Reviewer: Ildar Absalyamov <ildar.absalyamov@gmail.com>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Steven Jacobs <sjaco002@ucr.edu>
Gerrit-Reviewer: Yingyi Bu <buyingyi@gmail.com>

Mime
View raw message