[
https://issues.apache.org/jira/browse/APEXCORE-276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15075263#comment-15075263
]
ASF GitHub Bot commented on APEXCORE-276:
-----------------------------------------
Github user chandnisingh commented on a diff in the pull request:
https://github.com/apache/incubator-apex-core/pull/193#discussion_r48619961
--- Diff: api/src/main/java/com/datatorrent/api/Context.java ---
@@ -335,10 +335,16 @@
Attribute<String> APPLICATION_DATA_LINK = new Attribute<String>(new
String2String());
/**
* Transport to push the stats and the metrics, "builtin:{topic}" if
STRAM should push the data directly
- * using websocket with the given topic
+ * using websocket with the given topic.
+ * If using a custom transport, please use Object2String codec to
specify the transport object. The object must
+ * be from a class that implements the AutoMetric.Transport interface
*/
Attribute<String> METRICS_TRANSPORT = new Attribute<String>(new
String2String());
--- End diff --
So what it means here is that we are asking the user to convert the object
to string using Object2String codec before setting this attribute?
Why don't we deprecate this and add another attribute which is of type
Attribute<AutoMetric.Transport> which is consistent with rest of the complex
attributes?
> Make App Data Push transport pluggable and configurable
> -------------------------------------------------------
>
> Key: APEXCORE-276
> URL: https://issues.apache.org/jira/browse/APEXCORE-276
> Project: Apache Apex Core
> Issue Type: New Feature
> Reporter: David Yan
> Assignee: David Yan
>
> Currently it's not possible without changing the code to have your own
> transport.
> Code from AppDataPushAgent.java:
> {code}
> public void init()
> {
> String appDataPushTransport =
> dnmgr.getLogicalPlan().getValue(DAGContext.METRICS_TRANSPORT);
> if (appDataPushTransport.startsWith(APP_DATA_PUSH_TRANSPORT_BUILTIN_VALUE
> + ":")) {
> String topic =
> appDataPushTransport.substring(APP_DATA_PUSH_TRANSPORT_BUILTIN_VALUE.length()
> + 1);
> appDataPusher = new WebsocketAppDataPusher(dnmgr.getWsClient(), topic);
> LOG.info("App Data Push Transport set up for {}", appDataPushTransport);
> } else {
> // TBD add kakfa
> LOG.error("App Data Push Transport not recognized: {}",
> appDataPushTransport);
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)