Category: Hadoop

How often does YARN purge locally cached resources?

If you are stretched for space locally, this may come in handy. By default, localized resources are purged every ten minutes… [root@cmhlddlkedat01 2.2.4.2-2]# grep -A1 yarn.nodemanager.localizer.cache.cleanup.interval-ms yarn-default.xml yarn.nodemanager.localizer.cache.cleanup.interval-ms 600000 [root@cmhlddlkedat01 2.2.4.2-2]# Of course, this can be overridden.

Phoenix to a secure HBase cluster

This is just a simple example of using a custom JDBC class to connect to an HBase cluster that is secured by kerberos. import java.sql.*; import java.util.*; public class phoenixTest { public static void main(String args[]) throws Exception { Connection…

Are files in HDFS immutable?

Call me cynical, I just am a bit of a doubting Thomas. Using our previous write test code, we simply run the exact same test, only we do it twice. [root@cmhlpdlkedat15 ~]# hadoop HDFSWriteTest foobar.txt hdfs://cmhlpdlkedat14.expressco.com:8020 [root@cmhlpdlkedat15 ~]# hdfs dfs…

Hadoop HA namenode example

In earlier versions of hadoop, the namenode was the Achilles heel. While there was the option of failing over to a secondary namenode, this required manual intervention, or heavy scripting at best. Even then, failover wasn’t instantaneous. With Hadoop 0.23…

Querying Hadoop from Tomcat

Below is a very simple example for how to print in Tomcat the contents of a file stored in HDFS. I am not entirely sure where this would be useful, for the following reasons: * Unless you have a list…