[jira] [Commented] (TWILL-107) Support payloads for Discoverables
[ https://issues.apache.org/jira/browse/TWILL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15497042#comment-15497042 ] ASF GitHub Bot commented on TWILL-107: -- Github user hsaputra commented on the issue: https://github.com/apache/twill/pull/10 Thanks for the PR, @gokulavasan. Next time would love to have more information how you solve it in the PR description rather than just link to JIRA. > Support payloads for Discoverables > -- > > Key: TWILL-107 > URL: https://issues.apache.org/jira/browse/TWILL-107 > Project: Apache Twill > Issue Type: Improvement > Components: discovery >Reporter: Parth Gandhi >Assignee: Gokul Gunasekaran > Fix For: 0.8.0 > > > Discoverables store only a name and an InetSocketAddress. It would help > extensibility to allow an arbitrary payload of bytes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TWILL-107) Support payloads for Discoverables
[ https://issues.apache.org/jira/browse/TWILL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15484535#comment-15484535 ] ASF GitHub Bot commented on TWILL-107: -- Github user gokulavasan commented on the issue: https://github.com/apache/twill/pull/10 @chtyim Squashed commits. Thanks! > Support payloads for Discoverables > -- > > Key: TWILL-107 > URL: https://issues.apache.org/jira/browse/TWILL-107 > Project: Apache Twill > Issue Type: Improvement > Components: discovery >Reporter: Parth Gandhi > > Discoverables store only a name and an InetSocketAddress. It would help > extensibility to allow an arbitrary payload of bytes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TWILL-107) Support payloads for Discoverables
[ https://issues.apache.org/jira/browse/TWILL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15482290#comment-15482290 ] ASF GitHub Bot commented on TWILL-107: -- Github user chtyim commented on the issue: https://github.com/apache/twill/pull/10 LGTM. Please squash the commits. > Support payloads for Discoverables > -- > > Key: TWILL-107 > URL: https://issues.apache.org/jira/browse/TWILL-107 > Project: Apache Twill > Issue Type: Improvement > Components: discovery >Reporter: Parth Gandhi > > Discoverables store only a name and an InetSocketAddress. It would help > extensibility to allow an arbitrary payload of bytes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TWILL-107) Support payloads for Discoverables
[ https://issues.apache.org/jira/browse/TWILL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15478286#comment-15478286 ] ASF GitHub Bot commented on TWILL-107: -- Github user chtyim commented on the issue: https://github.com/apache/twill/pull/10 Just couple comments. > Support payloads for Discoverables > -- > > Key: TWILL-107 > URL: https://issues.apache.org/jira/browse/TWILL-107 > Project: Apache Twill > Issue Type: Improvement > Components: discovery >Reporter: Parth Gandhi > > Discoverables store only a name and an InetSocketAddress. It would help > extensibility to allow an arbitrary payload of bytes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TWILL-107) Support payloads for Discoverables
[ https://issues.apache.org/jira/browse/TWILL-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15478275#comment-15478275 ] ASF GitHub Bot commented on TWILL-107: -- Github user chtyim commented on a diff in the pull request: https://github.com/apache/twill/pull/10#discussion_r78250557 --- Diff: twill-discovery-api/src/main/java/org/apache/twill/discovery/Discoverable.java --- @@ -19,19 +19,67 @@ package org.apache.twill.discovery; import java.net.InetSocketAddress; +import java.util.Arrays; /** * Discoverable defines the attributes of service to be discovered. */ -public interface Discoverable { +public class Discoverable { + private final String name; + private final InetSocketAddress address; + private final byte[] payload; + public Discoverable(String name, InetSocketAddress address, byte[] payload) { +this.name = name; +this.address = address; +this.payload = payload; + } /** * @return Name of the service */ - String getName(); + public String getName() { +return name; + } /** * @return An {@link InetSocketAddress} representing the host+port of the service. */ - InetSocketAddress getSocketAddress(); + public InetSocketAddress getSocketAddress() { +return address; + } + + /** + * @return A payload represented as a byte array + */ + byte[] getPayload() { --- End diff -- Should this be a `public` method? > Support payloads for Discoverables > -- > > Key: TWILL-107 > URL: https://issues.apache.org/jira/browse/TWILL-107 > Project: Apache Twill > Issue Type: Improvement > Components: discovery >Reporter: Parth Gandhi > > Discoverables store only a name and an InetSocketAddress. It would help > extensibility to allow an arbitrary payload of bytes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)