Category Archives: Uncategorized

Hive JDBC Spring Boot Restful Webservice in Pivotal Cloud Foundry

Introduction In this post, lets build a Hive JDBC program, expose it as a restful webservice using Spring Boot and  host it in Pivotal Cloud Foundry Under src/main/resources db.url=jdbc:hive2://<server>:10000/<db>;principal=hive/<principal>@<domain>;sess_var_list?<queuename> db.driver=org.apache.hive.jdbc.HiveDriver Include the following files too hive-jaas.conf { … Continue reading

Posted in hive, Uncategorized | Tagged , , , , , | Leave a comment

Spark: Transformations with Examples

FILTER List<String> strList = Arrays.asList(“qqqqqqqqwwwww”, “eeeeerrrrrrrrr”, “ttttttttyyyyyyyyy”); SparkConf conf = new SparkConf();static SparkConf conf = new SparkConf(); static JavaSparkContext jsc = new JavaSparkContext(conf); JavaRDD<String> filterStrRDD = strRDD.filter ( new Function<String, Boolean>(){JavaRDD<String> filterStrRDD = strRDD.filter ( new Function<String, Boolean>(){ @Override public … Continue reading

Posted in Uncategorized | Tagged , , , , , | Leave a comment

Spark: Actions with Examples

REDUCE Reduces the elements of this RDD using the specified commutative and associative binary operator. reduce(<function type>) takes a Function Type ; which takes 2 elements of RDD Element Type as argument & returns the Element of same type Example:- … Continue reading

Posted in spark, Uncategorized | Tagged , , , , | Leave a comment

Spark: Resolving Errors

 java.lang.OutOfMemoryError: Java heap space Fix: Increase the driver memory using –driver-memory

Posted in spark, Uncategorized | Tagged , | Leave a comment

Use Case: Automate data flow into HDFS / Hive using Oozie

I am planning to publish few use cases relating to Big data that will be helpful to any industry. Intro Automate data load process into HDFS, Hive and Hive ORC tables ! Suppose you are receiving daily feeds from any … Continue reading

Posted in Uncategorized, use case | Tagged , , , , , , , | Leave a comment

Oozie: CRON style scheduling in Oozie

Cron scheduling adds a lot of flexibility while scheduling jobs using the Oozie coordinator. Its bit tricky, but once you familiarize its going to benefit a lot. Here, just focus on the frequency part in your coordinator.xml <coordinator-app name=”oozie-coordinator” frequency=”0/10 … Continue reading

Posted in oozie, Uncategorized | Tagged , , | Leave a comment

Oozie: How to pass current date to Work Flow

Coordinator.xml <coordinator-app name=”oozie-coordinator” frequency=”1440″ start=”2017-10-06T15:00Z” end=”2099-09-19T13:00Z” timezone=”Canada/Eastern” xmlns=”uri:oozie:coordinator:0.1″> <action> <workflow> <app-path>${workflowxml}</app-path> <configuration> <property> <name>currentDate</name> <value>${coord:formatTime(coord:dateOffset(coord:nominalTime(), 0, ‘DAY’), “yyyyMMdd”)} </value> </property> </configuration> </workflow> </action> </coordinator-app> **Change “0” to -1 if you prefer PREVIOUS DATE Access currentDate in your workflow.xml and pass … Continue reading

Posted in oozie, Uncategorized | Tagged , , , , , | Leave a comment