dns - Avro tool fails to convert from json due to IPv6 -


i trying convert simple json file avro using avro tools (1.7.7).

the command i've been running

java -jar ~/downloads/avro-tools-1.7.7.jar fromjson  --schema-file src/main/avro/twitter.avsc tweet.json > tweet.avro 

on schema

{ "type": "record", "name": "tweet", "namespace": "co.feeb.avro", "fields": [     {         "name": "username",         "type": "string",         "doc": "screen name of user on twitter.com"     },     {         "name": "text",         "type": "string",         "doc": "the content of user's message"     },     {         "name": "timestamp",         "type": "long",         "doc": "unix epoch time in seconds"     } ], "doc": "schema twitter messages" } 

i see exception after running command:

exception in thread "main" java.lang.exceptionininitializererror @ org.apache.hadoop.security.usergroupinformation.initialize(usergroupinformation.java:189) @ org.apache.hadoop.security.usergroupinformation.ensureinitialized(usergroupinformation.java:159) @ org.apache.hadoop.security.usergroupinformation.issecurityenabled(usergroupinformation.java:216) @ org.apache.hadoop.security.usergroupinformation.getloginuser(usergroupinformation.java:409) @ org.apache.hadoop.security.usergroupinformation.getcurrentuser(usergroupinformation.java:395) @ org.apache.hadoop.fs.filesystem$cache$key.<init>(filesystem.java:1436) @ org.apache.hadoop.fs.filesystem$cache.get(filesystem.java:1337) @ org.apache.hadoop.fs.filesystem.get(filesystem.java:244) @ org.apache.hadoop.fs.filesystem.get(filesystem.java:122) @ org.apache.hadoop.fs.filesystem.get(filesystem.java:228) @ org.apache.hadoop.fs.path.getfilesystem(path.java:187) @ org.apache.avro.tool.util.openfromfs(util.java:88) @ org.apache.avro.tool.datafilewritetool.run(datafilewritetool.java:82) @ org.apache.avro.tool.main.run(main.java:84) @ org.apache.avro.tool.main.main(main.java:73)  caused by: java.lang.numberformatexception: input string: "810d:340:1770::1" @ java.lang.numberformatexception.forinputstring(numberformatexception.java:65) @ java.lang.integer.parseint(integer.java:580) @ java.lang.integer.parseint(integer.java:615) @ com.sun.jndi.dns.dnsclient.<init>(dnsclient.java:127) @ com.sun.jndi.dns.resolver.<init>(resolver.java:61) @ com.sun.jndi.dns.dnscontext.getresolver(dnscontext.java:573) @ com.sun.jndi.dns.dnscontext.c_getattributes(dnscontext.java:434) @ com.sun.jndi.toolkit.ctx.componentdircontext.p_getattributes(componentdircontext.java:235) @ com.sun.jndi.toolkit.ctx.partialcompositedircontext.getattributes(partialcompositedircontext.java:141) @ com.sun.jndi.toolkit.url.genericurldircontext.getattributes(genericurldircontext.java:103) @ sun.security.krb5.krbservicelocator.getkerberosservice(krbservicelocator.java:85) @ sun.security.krb5.config.checkrealm(config.java:1120) @ sun.security.krb5.config.getrealmfromdns(config.java:1093) @ sun.security.krb5.config.getdefaultrealm(config.java:987) @ org.apache.hadoop.security.kerberosname.<clinit>(kerberosname.java:81) 

trying prefer ipv4 on ipv6 using -djava.net.preferipv4stack=true didn't help. (i running mac osx 10.10.3 , java 1.8.0_25-b17).

oh snap ... i've solved myself right after posting this. local router added ipv6 nameserver local machine.

changing assigned nameserver manually google's 8.8.8.8 fixed issue.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -