Library of utilities, related to Hadoop and Cloud Foundry. This library is intended for TAP (link) applications developers. It supports Cloud Foundry brokers and facilitates access to Hadoop (kerberized) clusters.
- maven 3.x
- java 8
mvn clean install
...and add following dependency to your pom.xml :
<dependency>
<groupId>org.trustedanalytics</groupId>
<artifactId>hadoop-utils</artifactId>
<version>0.5.4</version>
</dependency>
Following example assumes that instances of hdfs service and kerberos service are bound to the app.
More about those services can be found here :
- https://github.com/trustedanalytics-ng/hdfs-broker,
- https://github.com/trustedanalytics-ng/hdfs-broker#kerberos-configuration
FileSystem hdfsFs = Hdfs.newInstance().createFileSystem();
Or, if all you need is a configuration, you can get it like this :
Configuration hdfsConf = Hdfs.newInstance().createConfig();
Following example assumes that instances of hbase service and kerberos service are bound to the app.
More about those services can be found here :
- https://github.com/trustedanalytics-ng/hbase-broker,
- https://github.com/trustedanalytics-ng/hbase-broker#kerberos-configuration
Connection hbaseConn = Hbase.newInstance().createConnection();
Or, if all you need is a configuration, you can get it like this :
Configuration hbaseConf = Hbase.newInstance().createConfig();
Following example assumes that instances of hive service and kerberos service are bound to the app.
More about those services can be found here :
- https://github.com/trustedanalytics-ng/hive-broker,
- https://github.com/trustedanalytics-ng/hive-broker#kerberos-configuration
Connection hiveConn = Hive.newInstance().createConnection();
Or, if all you need is a configuration, you can get it like this :
Configuration hiveConf = Hive.newInstance().createConfig();
There is a lot more. Check out the javadocs. For more advanced examples, see advanced.