Posts

Showing posts from November, 2016

Hive Tutorial | Hive Collection data types example

Image
Nowadays Big data is trending in the market, and that's why to analyse those dataset too many technologies are in the market every year or you can say on every six months a new big data technology is introduced and California city is the hub of start-up company where most of the technologies are getting matured. Apache Hive is one of the popular big data technology used in the market. Anyway in this tutorial post, I am going to list you the complex data types supported in Apache Hive, with the example of Map Collection data type. If you are new to Apache Hive, than you need to set-up your Hive environment first before starting and here is a step by step guide to set-up your Hive environment. What is Apache Hive? Apache Hive is a data warehouse tool to process and analyse structure dataset, with schema on read feature based on Hadoop infrastructure. Hive was developed at Facebook and mainly used for data presentation phase. You can start with word count tutorial in hive . ...

Hive Tutorial | Struct data type in Hive Example

Image
Apache Hive is a popular data warehouse, based on Hadoop infrastructure and very demanding for data analytic. Nowadays Hive is almost used in every data analytic job. It's very much similar to any sql-oriented rdbms syntax but the objective of Hive is totally different than, traditional RDBMS. Hive is very popular for batch processing. In this article, I am going to show you an example of one of the collection data type in hive known as struct, although we have already seen a complete hive data type tutorial here . Hive's collection data type support four different  type and those are- Collection data type in Hive: Array : Indexed based collection of similar type. Struct: Object(object contains different types of fields) Map : Collection of Key-Value pair. uniontype: is a collection of heterogeneous data types. In our previous post, we have already seen Array Collection type in Hive , now lets explore the Struct type in this article. Struct data type in Hive: ...

Hive Tutorial | Collection data type in Hive | Array Example in Hive

Image
Apache Hive is a popular data warehouse, based on Hadoop infrastructure and one of the demanding technology among the big data technologies . Nowadays almost all the analytic companies are using Hive to perform analytics on big data, because of the simplicity of hive  and also hive is very much sql oriented. Hive enables easy way to summarize your big data , perform ad-hoc queries, and analysis of big data sets. If you are new to Big data technology and want to build your carrier in big data technology, than you should must know What is Hadoop and Hive. Anyway, for installation of hive you may visit my previous step by step guide to install Apache hive . In this, tutorial, I'm going to show you an example of one of the commonly used collection data type in hive, that is Array in Hive. Collection data type: Four different Collection data type supported in hive- Array : Indexed based collection of similar type. Struct : Object(object contains different types of fields) Map...

Scala Tutorial | Scala Variables Example

Image
The Scala stands for "Scalable Language" is a pure object oriented with fully supported functional programming language. Scala is concise and very much comparable with Java programming language. The origin of Scala is mix of many languages like Java, C#, C++, Haskell etc. Scala runs on JVM(Java Virtual Machine), Scala source code compiled into byte code similar to Java, you can easily mix Java code inside Scala or you can use Java libraries inside you Scala project. Although Scala is very much similar to Java but still it has some differences which makes it more demanding in a very short period of time unlike other languages. Here is detailed differences between Scala and Java Scala Vs Java In this tutorial, I am going to show you What is Scala Variables and different types of Variables in Scala like var, val, lazy with example. In Scala variables comes in three different variety- var val lazy val var A variable with mutable state or you can say mutable variab...

Scala Tutorial | Scala Lazy Evaluation Example

Image
The Scala stands for "Scalable Language" is a pure object oriented with fully supported functional programming language. Scala is concise and very much comparable with Java programming language. The origin of Scala is mix of many languages like Java, C#, C++, Haskell etc. Scala runs on JVM(Java Virtual Machine), Scala source code compiled into byte code similar to Java, you can easily mix Java code inside Scala or you can use Java libraries inside your Scala project. Although Scala is very much similar to Java but still it has some differences which makes it more demanding in a very short period of time unlike other languages. Here is detailed differences between Scala and Java Scala Vs Java We have already seen how many types of variables are available in Scala and when to use them with step by step guide at here . And, In this article, I am going to show you a simple example of lazy evaluation in Scala. Lazy evaluation Scala lazy val are calculated on demand when they...

Scala Tutorial | Hello World in Scala using Eclipse

Image
The Scala stands for "Scalable language", Scala is pure object oriented programming language as well as fully supported functional programming. Scala is concise and very much compatible with Java programming language. The syntax of Scala is very much similar to Java, one can easily mix both Scala and Java code in one place. It's a high level language with strongly statically typed, the execution model of Scala is derived from Java. For more on Scala overview you may read this and for Scala installation you may read Scala installation guide . Although Scala is very much similar to Java, but still it has various differences that's why nowadays Scala is on demanding, for detailed differences between Scala and Java read Scala vs Java separate post. In this tutorial, I am going to show you an example of Hello World program in Scala using eclipse IDE. Step 1: Open IDE,Go to File->New->Scala Project It will ask for project name, provide the project name and cl...

Java instanceof Operator Example

Image
The instanceof operator also known as type comparison operator, and it's very useful to compare the type of object. It compares an object to a specified type. One can use instanceof operator to test if an object is an instance of class,sub-class or interface, just like checking of serializable interface after implementation of serializable. In this post, I am going to show you few examples of how to use instanceof operator in your code. Example 1: We know that, String class by default implement the Serializable interface,lets check this. package com.javamakeuse.poc.bd; import java.io.Serializable; public class InstanceOfOp { public static void main(String[] args) { String str = "implemented serializable"; if (str instanceof Serializable) { System.out.println("String by default implement Serializable"); } } } Output: String by default implement Serializable Example 2: package com.javamakeuse.poc.bd; public class InstanceOfOp { public s...