<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Error on Rowanto Luo</title><link>https://log.rowanto.com/categories/error/</link><description>Recent content in Error on Rowanto Luo</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 17 Nov 2016 01:50:48 +0000</lastBuildDate><atom:link href="https://log.rowanto.com/categories/error/index.xml" rel="self" type="application/rss+xml"/><item><title>Adding New Currency in Java 8</title><link>https://log.rowanto.com/posts/adding-new-currency-in-java-8/</link><pubDate>Thu, 17 Nov 2016 01:50:48 +0000</pubDate><guid>https://log.rowanto.com/posts/adding-new-currency-in-java-8/</guid><description>
&lt;p&gt;If you are using the &lt;code&gt;java.lang.Currency&lt;/code&gt; as part of your entity, most likely you are already regretting it now. Most of the time, a currency is a three letter word, and we don&amp;rsquo;t need the logic to be bundled in there. Keeping things simple and mapping these currencies as a String or own custom class is the way to go.&lt;/p&gt;
&lt;p&gt;For people who did use &lt;code&gt;java.lang.Currency&lt;/code&gt;, the pain will arrive when a country changed its currency or added a new one. As example, Belarus changed its currency from BYR to BYN at July 1st, 2016. If you are using &lt;code&gt;java.lang.Currency&lt;/code&gt;, you prolly already know by now that &lt;code&gt;Currency.getInstance(&amp;quot;BYN&amp;quot;)&lt;/code&gt; will throw you an exception. Most likely you have also google around, and most likely again, you will stumble upon &lt;a href="http://stackoverflow.com/questions/9982537/how-do-i-add-the-new-currency-code-to-java"&gt;this&lt;/a&gt; or &lt;a href="http://docs.oracle.com/javase/7/docs/technotes/guides/intl/enhancements.7.html#currency"&gt;this&lt;/a&gt;. It&amp;rsquo;s basically telling you that there is this new feature in java 7, which lets you overwrite the currency. You will happily overwrite BYR to BYN, and now it starts working. This happyness doesn&amp;rsquo;t last long as you realize that now that you support BYN, but not BYR anymore. You might also stumble upon some pages which write that we can&amp;rsquo;t support both currency at the same time.&lt;/p&gt;</description></item><item><title>Why Datanode is Denied Communication With Namenode</title><link>https://log.rowanto.com/posts/why-datanode-is-denied-communication-with-namenode/</link><pubDate>Thu, 07 May 2015 17:55:50 +0000</pubDate><guid>https://log.rowanto.com/posts/why-datanode-is-denied-communication-with-namenode/</guid><description>
&lt;p&gt;So for those trying to setup HDFS out there, and are struggling with this kind of error where it said datanode denied communication with namenode:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;2015-05-07 08:04:19,694 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Block pool BP-1184863888-172.17.0.3-1430984962919 (Datanode Uuid null) service to dockernamenode.zanox.com/172.17.0.3:8020 beginning handshake with NN
2015-05-07 08:04:19,697 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for Block pool BP-1184863888-172.17.0.3-1430984962919 (Datanode Uuid null) service to dockernamenode.zanox.com/172.17.0.3:8020 Datanode denied communication with namenode because hostname cannot be resolved (ip=172.17.0.5, hostname=172.17.0.5): DatanodeRegistration(0.0.0.0, datanodeUuid=f8c97ad9-3cb3-49a1-9e4e-bc2341779f19, infoPort=50075, ipcPort=50020, storageInfo=lv=-56;cid=CID-9ab30cb5-ada8-4201-9d94-6400e83af6e4;nsid=1471492370;c=0)
at org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager.registerDatanode(DatanodeManager.java:904)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.registerDatanode(FSNamesystem.java:5042)
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.registerDatanode(NameNodeRpcServer.java:1069)
at org.apache.hadoop.hdfs.protocolPB.DatanodeProtocolServerSideTranslatorPB.registerDatanode(DatanodeProtocolServerSideTranslatorPB.java:92)
at org.apache.hadoop.hdfs.protocol.proto.DatanodeProtocolProtos$DatanodeProtocolService$2.callBlockingMethod(DatanodeProtocolProtos.java:27329)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:619)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1060)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2044)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2040)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1671)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2038)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It could actually be because of many configurations problem, but in the end it boils to one thing and that&amp;rsquo;s what I am going to tell you. It costed me one day just to fix this problem when I was running test-kitchen to provision hadoop servers.&lt;/p&gt;</description></item></channel></rss>