Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-04-14 Thread Steven Jacobs (Code Review)
Steven Jacobs has submitted this change and it was merged.

Change subject: Add push-based channels and improve broker notifications
..


Add push-based channels and improve broker notifications

Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
---
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/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
M asterix-bad/src/main/resources/lang-extension/lang.txt
A asterix-bad/src/test/resources/optimizerts/queries/channel/channel-push.sqlpp
A asterix-bad/src/test/resources/optimizerts/results/channel/channel-push.plan
10 files changed, 519 insertions(+), 241 deletions(-)

Approvals:
  Jenkins: Verified
  Xikui Wang: Looks good to me, approved



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 41853b9..3df9a76 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
@@ -18,51 +18,16 @@
  */
 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.om.base.AOrderedList;
-import org.apache.asterix.om.base.AUUID;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 /**
- * Provides functionality for channel jobs and communicating with Brokers
+ * Provides functionality for channel jobs
  */
 public class ChannelJobService {
 
 private static final Logger LOGGER = 
Logger.getLogger(ChannelJobService.class.getName());
 
-public static void sendBrokerNotificationsForChannel(EntityId activeJobId, 
String brokerEndpoint,
-AOrderedList subscriptionIds, String channelExecutionTime) throws 
HyracksDataException {
-String formattedString;
-formattedString = formatJSON(activeJobId, subscriptionIds, 
channelExecutionTime);
-sendMessage(brokerEndpoint, formattedString);
-}
-
-public static String formatJSON(EntityId activeJobId, AOrderedList 
subscriptionIds, String channelExecutionTime) {
-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 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 += ",";
-}
-}
-JSON += "]}";
-return JSON;
-
-}
 
 public static long findPeriod(String duration) {
 //TODO: Allow Repetitive Channels to use YMD durations
@@ -92,61 +57,6 @@
 return (long) (seconds * 1000);
 }
 
-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);
-connection.setConnectTimeout(500);
-
-if (connection.getOutputStream() != null) {
-//Send message
-DataOutputStream wr = new 
DataOutputStream(connection.getOutputStream());
-wr.writeBytes(urlParameters);
-wr.close();

Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-04-14 Thread Xikui Wang (Code Review)
Xikui Wang has posted comments on this change.

Change subject: Add push-based channels and improve broker notifications
..


Patch Set 4: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Steven Jacobs 
Gerrit-Reviewer: Xikui Wang 
Gerrit-HasComments: No


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-04-13 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add push-based channels and improve broker notifications
..


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterixbad-gerrit/266/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Steven Jacobs 
Gerrit-Reviewer: Xikui Wang 
Gerrit-HasComments: No


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-04-12 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add push-based channels and improve broker notifications
..


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterixbad-gerrit/265/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Steven Jacobs 
Gerrit-Reviewer: Xikui Wang 
Gerrit-HasComments: No


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-04-12 Thread Steven Jacobs (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2551

to look at the new patch set (#4).

Change subject: Add push-based channels and improve broker notifications
..

Add push-based channels and improve broker notifications

Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
---
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/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
M asterix-bad/src/main/resources/lang-extension/lang.txt
A asterix-bad/src/test/resources/optimizerts/queries/channel/channel-push.sqlpp
A asterix-bad/src/test/resources/optimizerts/results/channel/channel-push.plan
10 files changed, 519 insertions(+), 241 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb-bad 
refs/changes/51/2551/4
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2551
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Steven Jacobs 
Gerrit-Reviewer: Xikui Wang 


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-04-12 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add push-based channels and improve broker notifications
..


Patch Set 4:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterixbad-gerrit/264/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Steven Jacobs 
Gerrit-Reviewer: Xikui Wang 
Gerrit-HasComments: No


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-04-12 Thread Steven Jacobs (Code Review)
Steven Jacobs has posted comments on this change.

Change subject: Add push-based channels and improve broker notifications
..


Patch Set 3:

(4 comments)

https://asterix-gerrit.ics.uci.edu/#/c/2551/3/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
File 
asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java:

Line 250: if (!push) {
> it would be better to refactor this into stmt/query/exprs... it's ok to me 
Agreed. It's a separate issue though.


https://asterix-gerrit.ics.uci.edu/#/c/2551/3/asterix-bad/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
File 
asterix-bad/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java:

Line 150: if 
(!channelExecutionVar.toString().equals("$$channelExecutionTime")) {
> is this name a constant used somewhere else too? it would be better to unif
Done


Line 182: private DelegateOperator createNotifyBrokerPlan(LogicalVariable 
brokerEndpointVar,
> I think if you want to make this method cleaner, you would need to extract 
Done


https://asterix-gerrit.ics.uci.edu/#/c/2551/3/asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
File 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java:

Line 179: if (push) {
> does the order matter here (which i guess is yes). if not, can we group the
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Steven Jacobs 
Gerrit-Reviewer: Xikui Wang 
Gerrit-HasComments: Yes


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-04-10 Thread Xikui Wang (Code Review)
Xikui Wang has posted comments on this change.

Change subject: Add push-based channels and improve broker notifications
..


Patch Set 3:

(4 comments)

some minor comments...

https://asterix-gerrit.ics.uci.edu/#/c/2551/3/asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java
File 
asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateChannelStatement.java:

Line 250: if (!push) {
it would be better to refactor this into stmt/query/exprs... it's ok to me to 
leave it like this for now...


https://asterix-gerrit.ics.uci.edu/#/c/2551/3/asterix-bad/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
File 
asterix-bad/src/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java:

Line 150: if 
(!channelExecutionVar.toString().equals("$$channelExecutionTime")) {
is this name a constant used somewhere else too? it would be better to unify 
the usages of this constant so it can be easily changed later...


Line 182: private DelegateOperator createNotifyBrokerPlan(LogicalVariable 
brokerEndpointVar,
I think if you want to make this method cleaner, you would need to extract the 
different part into a separate method, and depending on the `push` to decide 
whether you want to call that additional method...


https://asterix-gerrit.ics.uci.edu/#/c/2551/3/asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
File 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java:

Line 179: if (push) {
does the order matter here (which i guess is yes). if not, can we group these 
two pushes?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Xikui Wang 
Gerrit-HasComments: Yes


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-03-30 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add push-based channels and improve broker notifications
..


Patch Set 3:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterixbad-gerrit/261/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Xikui Wang 
Gerrit-HasComments: No


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-03-30 Thread Steven Jacobs (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2551

to look at the new patch set (#3).

Change subject: Add push-based channels and improve broker notifications
..

Add push-based channels and improve broker notifications

Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
---
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/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
M asterix-bad/src/main/resources/lang-extension/lang.txt
A asterix-bad/src/test/resources/optimizerts/queries/channel/channel-push.sqlpp
A asterix-bad/src/test/resources/optimizerts/results/channel/channel-push.plan
10 files changed, 507 insertions(+), 233 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb-bad 
refs/changes/51/2551/3
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2551
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 3
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Xikui Wang 


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-03-30 Thread Steven Jacobs (Code Review)
Hello Jenkins,

I'd like you to reexamine a change.  Please visit

https://asterix-gerrit.ics.uci.edu/2551

to look at the new patch set (#2).

Change subject: Add push-based channels and improve broker notifications
..

Add push-based channels and improve broker notifications

Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
---
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/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
M asterix-bad/src/main/resources/lang-extension/lang.txt
A asterix-bad/src/test/resources/optimizerts/queries/channel/channel-push.sqlpp
A asterix-bad/src/test/resources/optimizerts/results/channel/channel-push.plan
10 files changed, 506 insertions(+), 233 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb-bad 
refs/changes/51/2551/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2551
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Xikui Wang 


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-03-30 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add push-based channels and improve broker notifications
..


Patch Set 2:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterixbad-gerrit/260/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-Reviewer: Xikui Wang 
Gerrit-HasComments: No


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-03-30 Thread Jenkins (Code Review)
Jenkins has posted comments on this change.

Change subject: Add push-based channels and improve broker notifications
..


Patch Set 1:

Build Started https://asterix-jenkins.ics.uci.edu/job/asterixbad-gerrit/259/

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb-bad
Gerrit-Branch: master
Gerrit-Owner: Steven Jacobs 
Gerrit-Reviewer: Jenkins 
Gerrit-HasComments: No


Change in asterixdb-bad[master]: Add push-based channels and improve broker notifications

2018-03-30 Thread Steven Jacobs (Code Review)
Steven Jacobs has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2551

Change subject: Add push-based channels and improve broker notifications
..

Add push-based channels and improve broker notifications

Change-Id: Ie3c7cae0f015d6bc01dd912499565bb12c15abc3
---
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/main/java/org/apache/asterix/bad/rules/InsertBrokerNotifierForChannelRule.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerOperator.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerPOperator.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntime.java
M 
asterix-bad/src/main/java/org/apache/asterix/bad/runtime/NotifyBrokerRuntimeFactory.java
M asterix-bad/src/main/resources/lang-extension/lang.txt
A asterix-bad/src/test/resources/optimizerts/queries/channel/channel-push.sqlpp
A asterix-bad/src/test/resources/optimizerts/results/channel/channel-push.plan
10 files changed, 505 insertions(+), 232 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb-bad 
refs/changes/51/2551/1

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 41853b9..3df9a76 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
@@ -18,51 +18,16 @@
  */
 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.om.base.AOrderedList;
-import org.apache.asterix.om.base.AUUID;
-import org.apache.hyracks.api.exceptions.HyracksDataException;
 
 /**
- * Provides functionality for channel jobs and communicating with Brokers
+ * Provides functionality for channel jobs
  */
 public class ChannelJobService {
 
 private static final Logger LOGGER = 
Logger.getLogger(ChannelJobService.class.getName());
 
-public static void sendBrokerNotificationsForChannel(EntityId activeJobId, 
String brokerEndpoint,
-AOrderedList subscriptionIds, String channelExecutionTime) throws 
HyracksDataException {
-String formattedString;
-formattedString = formatJSON(activeJobId, subscriptionIds, 
channelExecutionTime);
-sendMessage(brokerEndpoint, formattedString);
-}
-
-public static String formatJSON(EntityId activeJobId, AOrderedList 
subscriptionIds, String channelExecutionTime) {
-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 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 += ",";
-}
-}
-JSON += "]}";
-return JSON;
-
-}
 
 public static long findPeriod(String duration) {
 //TODO: Allow Repetitive Channels to use YMD durations
@@ -92,61 +57,6 @@
 return (long) (seconds * 1000);
 }
 
-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);
-connection.setConnectTimeout(500);
-
-if (connection.getOutputStream() != null) {
-//Send message
-DataOutputStream wr = new 
DataOutputStream(connection.getOutputStream());
-