Re: InetSocketAddress is not serializable
Thank for your explanation. Yes the InetSocketAddress you used is imported from java.net instead of elaticsearh2. Very cool! -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/InetSocketAddress-is-not-serializable-when-building-ElasticSearch2-connector-tp5296p5303.html Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.
Re: InetSocketAddress is not serializable
java.net.InetSocketAddress is Serializable [1] and implementations of java.util.List (e.g. java.util.ArrayList [2]) are also usually Serializable. Unfortunately, for some reason InetSocketTransportAddress [3] is no longer Serializable in Elasticsearch 2.x. :( -Zach [1] http://docs.oracle.com/javase/8/docs/api/java/net/InetSocketAddress.html [2] http://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html [3] http://javadoc.kyubu.de/elasticsearch/HEAD/org/elasticsearch/common/transport/InetSocketTransportAddress.html On Fri, Mar 4, 2016 at 8:39 AM HungChang wrote: > Can I ask why List can become serilizable? > > Best, > > Sendoh > > > > -- > View this message in context: > http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/InetSocketAddress-is-not-serializable-when-building-ElasticSearch2-connector-tp5296p5299.html > Sent from the Apache Flink User Mailing List archive. mailing list archive > at Nabble.com. >
Re: InetSocketAddress is not serializable
Can I ask why List can become serilizable? Best, Sendoh -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/InetSocketAddress-is-not-serializable-when-building-ElasticSearch2-connector-tp5296p5299.html Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.
Re: InetSocketAddress is not serializable
Thank you. Very nice usage and It works! -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/InetSocketAddress-is-not-serializable-when-building-ElasticSearch2-connector-tp5296p5298.html Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.
Re: InetSocketAddress is not serializable
I ran into the same issue upgrading to Elasticsearch 2, here's how I solved it: https://gist.github.com/zcox/59e486be7aeeca381be0#file-elasticsearch2sink-java-L110 -Zach On Fri, Mar 4, 2016 at 7:30 AM HungChang wrote: > Hi, > > I'm building the connector for ElasticSearch2. One main issue for me now is > that > > List transports = new ArrayList(); > transports.add(new InetSocketTransportAddress(new > InetSocketAddress(TransportAddress, 9300))); > > throws > java.io.NotSerializableException: > org.elasticsearch.common.transport.InetSocketTransportAddress > > ES2 changed to this way and InetSocketAddress implements > java.io.Serializable rather than Writable (is it the problem?). > What would be the suggested way to handle this? should I implement a > serializable InetSocketAddress? > > Best, > > Sendoh > > > > -- > View this message in context: > http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/InetSocketAddress-is-not-serializable-tp5296.html > Sent from the Apache Flink User Mailing List archive. mailing list archive > at Nabble.com. >
InetSocketAddress is not serializable
Hi, I'm building the connector for ElasticSearch2. One main issue for me now is that List transports = new ArrayList(); transports.add(new InetSocketTransportAddress(new InetSocketAddress(TransportAddress, 9300))); throws java.io.NotSerializableException: org.elasticsearch.common.transport.InetSocketTransportAddress ES2 changed to this way and InetSocketAddress implements java.io.Serializable rather than Writable (is it the problem?). What would be the suggested way to handle this? should I implement a serializable InetSocketAddress? Best, Sendoh -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/InetSocketAddress-is-not-serializable-tp5296.html Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.