Attila Bukor has posted comments on this change.

Change subject: kudu-spark: change default master address to local fqdn
......................................................................


Patch Set 2: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8072/2/java/kudu-spark-tools/src/main/scala/org/apache/kudu/spark/tools/ImportExportFiles.scala
File 
java/kudu-spark-tools/src/main/scala/org/apache/kudu/spark/tools/ImportExportFiles.scala:

PS2, Line 38: InetAddress.getLocalHost.getCanonicalHostName
> I believe that would happen if the local hostname is not added to the /etc/
I couldn't trigger an UnknownHostException environment despite I changed 
nsswitch.conf to "hosts: files" only, removing each line from /etc/hosts and 
setting hostname to "qwer". Running a simple Java application printing the 
result of InetAddress.getLocalHost().getHostName() printed out "qwer".

I don't know what I missed, but if someone can mess up their host worse than 
this, I believe it's better to fail with an exception than silently switch over 
to localhost (which would likely also fail):

It looks something like this (hardcoded asdfadfasdfas instead of getLocalHost):

17/09/19 10:47:21 INFO state.StateStoreCoordinatorRef: Registered 
StateStoreCoordinator endpoint
Exception in thread "main" java.net.UnknownHostException: asdfadfasdfas: Name 
or service not known
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
        at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
        at 
java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
        at java.net.InetAddress.getAllByName(InetAddress.java:1192)
        at java.net.InetAddress.getAllByName(InetAddress.java:1126)
        at java.net.InetAddress.getByName(InetAddress.java:1076)
        at 
org.apache.kudu.spark.tools.IntegrationTestBigLinkedList$.defaultMasterAddrs(IntegrationTestBigLinkedList.scala:86)
        at 
org.apache.kudu.spark.tools.Generator$Args$.apply$default$7(IntegrationTestBigLinkedList.scala:125)
        at 
org.apache.kudu.spark.tools.Generator$Args$.parse(IntegrationTestBigLinkedList.scala:153)
        at 
org.apache.kudu.spark.tools.Generator$.main(IntegrationTestBigLinkedList.scala:177)
        at 
org.apache.kudu.spark.tools.IntegrationTestBigLinkedList$.main(IntegrationTestBigLinkedList.scala:92)
        at 
org.apache.kudu.spark.tools.IntegrationTestBigLinkedList.main(IntegrationTestBigLinkedList.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:755)
        at 
org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
        at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:119)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
17/09/19 10:47:21 INFO spark.SparkContext: Invoking stop() from shutdown hook


-- 
To view, visit http://gerrit.cloudera.org:8080/8072
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I10ec7414c451f54b95d86663d743162688e304ba
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Attila Bukor <abu...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-HasComments: Yes

Reply via email to