Tuesday, January 31, 2017

RPD Deployment in OBIEE-12c server

RPD Deployment in Obiee 12c server is unlikely different from 11g. In 12c, EM does not have any option for deployments of rpd.We should be using weblogic scripting command “uploadrpd’ to upload repository to Oracle BI Server.

Steps to follow:
  1. Open the command prompt and type “cd \”to change the directory and press Enter
  2. Type “cd <Oracle_Home>/user_projects/domains/bi/bitools/bin”, press Enter
  3. Do "Ls", to find the utility, data-model-cmd.sh on UNIX and data-model-cmd.cmd on Windows.
  4. Run the data-model-cmd.cmd utility along with the upload rpd parameters below:
Syntax:
uploadrpd -I <RPD_NAME>.rpd -W <RepositoryPWD> -U <Weblogic_username> -P <Weblogic_Password> -SI <serviceinstance_name>

Example:
uploadrpd -I BI1_SAMPLE.rpd -W Ora234 -U weblogic -P weblogic17-SI ssi

If the operation completes successfully, you will see the following message:

“Operation Successful. RPD upload completed successfully. ”

To understand further these parameters, see below. Along with above parameters, yiu can also use S, N, SSL etc.
  • I specifies the name of the repository that you want to upload.
  • W is the repository’s password. If you do not supply the password, then you will be prompted for the password when the command is run. For security purposes, Oracle recommends that you include a password in the command only if you are using automated scripting to run the command.
  • SI specifies the name of the service instance.
  • U specifies a valid user’s name to be used for Oracle BI EE authentication.
  • P specifies the password corresponding to the user’s name that you specified for U. If you do not supply the password, then you will be prompted for the password when the command is run. For security purposes, Oracle recommends that you include a password in the command only if you are using automated scripting to run the command.
  • S specifies the Oracle BI EE host name. Only include this option when you are running the command from a client installation.
  • N specifies the Oracle BI EE port number. Only include this option when you are running the command from a client installation.
  • SSL specifies to use SSL to connect to the WebLogic Server to run the command. Only include this option when you are running the command from a client installation.
  • H displays the usage information and exits the command.
Example: data-model-cmd.sh uploadrpd -I <RepositoryName.rpd> -SI ssi -U weblogic -S server.example.com -N 8003 -SSL

Wednesday, January 25, 2017

What is Hadoop ? View of Hadoop Ecosystem & Architecture

What is Hadoop?


Like we discussed in last blog, Big Data is not just Hadoop. Similarly Hadoop is not one only monolithic thing, but is an ecosystem which consists of various  hadoop components and an amalgamation of different technologies.Like HDFS (Hadoop Distributed File System), Map Reduce, Pig, Hive,Hbase, Flume and so on.

But What makes Hadoop so special ? Basically , Hadoop is a way of storing enormous data sets across distributed clusters of servers and then running, "distributed" analysis in each cluster. It is designed to be robust, ie your Big Data applications will continue to run even when individual servers or clusters fail. And it’s also designed to be efficient, because it doesn’t require your applications to shuttle huge volumes of data across your network.

Hadoop Ecosystem
 
We can combine Hadoop components in many ways, but most of all HDFS and Map reduce constitute a technology system to support application with large data sets in BI/ DW and analytics. The other Hadoop projects like Impala, which being an SQL engine supports BI/DW by providing low latency data access to HDFS and Hive data.

Below image describes the Hadoop Ecosystem.




Today's view of Hadoop architecture gives prominence to Hadoop common, YARN, HDFS and MapReduce.

1) Hadoop Common refers to the collection of common utilities ,libraries,OS level abstraction, necessary Java files and scripts that support other Hadoop modules. It is an essential part or module of the Apache Hadoop Framework.Hadoop Common is also known as Hadoop Core.

2) Hadoop YARN is described as a clustering platform or framework that helps to manage resources and schedule tasks.It is a great enabler for dynamic resource utilization on Hadoop framework as users can run various Hadoop applications without having to bother about increasing workloads. The Apache software foundation, the license holder for Hadoop, describes Hadoop YARN as 'next-generation MapReduce’ or 'MapReduce 2.0.’




3) HDFS is a distributed file system that runs on standard or low-end hardware. Developed by Apache Hadoop, HDFS works like a standard distributed file system but provides better data throughput and access through the MapReduce algorithm, high fault tolerance and native support of large data sets.

HDFS comprises of 3 important components-NameNode, DataNode and Secondary NameNode. HDFS operates on a Master-Slave architecture model where the NameNode acts as the master node for keeping a track of the storage cluster and the DataNode acts as a slave node summing up to the various systems within a Hadoop cluster.

It provides data reliability by replicating each data instance as three different copies - two in one group and one in another. These copies may be replaced in the event of failure.

Default replication is 3
• 1st replica on the local rack
• 2nd replica on the local rack but different machine
• 3rd replica on the different rack

The HDFS architecture consists of clusters, each of which is accessed through a single NameNode software tool installed on a separate machine to monitor and manage the that cluster's file system and user access mechanism. The other machines install one instance of DataNode to manage cluster storage.
Because HDFS is written in Java, it has native support for Java application programming interfaces (API) for application integration and accessibility. It also may be accessed through standard Web browsers.




 

4) MapReduce is a programming model introduced by Google. It breaks down a big data processing job into smaller tasks. It is responsible for the analyzing large data-sets in parallel before reducing it to find the results. In the Hadoop ecosystem, Hadoop MapReduce is a framework based on YARN architecture. YARN based Hadoop architecture, supports parallel processing of huge data sets and MapReduce provides the framework for easily writing applications on thousands of nodes, considering fault and failure management.
It is highly scaleable & has several forms of implementation provided by multiple programming languages, like Java, C# and C++. )

The MapReduce framework has two parts:
  1. A function called "Map," which allows different points of the distributed cluster to distribute their work
  2. A function called "Reduce," which is designed to reduce the final form of the clusters’ results into one output
The main advantage of the MapReduce framework is its fault tolerance, where periodic reports from each node in the cluster are expected when work is completed.
A task is transferred from one node to another. If the master node notices that a node has been silent for a longer interval than expected, the main node performs the reassignment process to the frozen/delayed task.




As discussed above, there are several other Hadoop components that form an integral part of the Hadoop ecosystem with the intent of enhancing the power of Apache Hadoop in some way or the other like- providing better integration with databases, making Hadoop faster or developing novel features and functionalities. To know further about some of the eminent Hadoop components used by enterprises extensively, please read my Next Blog.

To continue further to understand how Hadoop works, please read  my blog



Big Data Challenges and how Hadoop came into existence

Big Data as word describes is large set of data which has many bottlenecks related to its :
  • Storage
  • Transfer
  • Sharing
  • Analysis
  • Processing
  • Visualization
  • Security 
Big data is not just about size
–Finds insights from complex, noisy, heterogeneous, longitudinal, and voluminous data
–It aims to answer questions that were previously unanswered

In our existing traditional approach, we use a Data-warehouse to store data (OLTP-OLAP) in structured format. Process it , do data mining and build reports for further high level analysis.
This approach works fine with those applications that process less volume of data which can be accommodated by standard db servers, or up to the limit of the processor that is processing the data. But when it comes to dealing with huge amounts of scale-able data, it becomes a problem to process it using this tradition approach.

This is when Big Data got Distributed System into picture. It most of all related to Map-Reduce technology.
For example, 1 machine with 4 I/O channels can process 1 terabyte of data in approx 42 mins if the channel speed is 100 mb/s.
But if we have a distributed system of 100 machines, each with 4 I/O channels, and each channel speed is 100 mb/s, then it will take few sec to process the data.

 To adopt distributed System, Map reduce algorithm was used.This algorithm divides the task into small parts and assigns them to many computers (cluster), and collects the results from them which when integrated, form the output data-set.



Using the above solution, Doug Cutting and his team developed an Open Source Project called HADOOP. Its written in java that allows distributed processing of large data-sets across clusters of computers using simple programming models. The Hadoop framework application works in an environment that provides distributed storage and computation across clusters of computers. Hadoop is designed to scale up from single server to thousands of machines, each offering local computation and storage.

Challenges with Hadoop :

Hadoop is not suitable for On-Line Transaction Processing workloads where data is randomly accessed on structured data like a relational database.Also, Hadoop is not suitable for OnLine Analytical Processing or Decision Support System workloads where data is sequentially accessed on structured data like a relational database, to generate reports that provide business intelligence. As of Hadoop version 2.6, updates are not possible, but appends are possible.

To proceed further and understand Hadoop Architecture, please read my  Next Blog 





What is Big Data ? Is it Only Hadoop ?

Big Data, the new buzz word in the today's technology is gaining more importance due to its high rewards. A systematic and focused approach toward the adoption of Big Data allows one to derive maximum value and utilize the power of Big Data.

 Its nothing but a new framework or system to get insight of existing different data forms and increasing the researchers/analyst power to get more out of existing system.

As BG Univ says, "Big data is about the application of new tools to do MORE analytic on MORE data for More people."

Lifecycle of data can be defined as :

 
 

People get confuse with Big Data & Hadoop as 2 similar things. But no, Big data is not only Hadoop

Big Data is not a tool or single technique. Its actually a platform or a framework having various components like Data Warehouses (providing OLAP data/History), Real time Data systems and Hadoop (provides insight to structured/semi or unstructured Data).

Examples of Big Data are like Traffic data, Flights Data/ Search engine data etc.

Thus Big Data includes huge volume, high velocity, and extensible variety of data. The data in it will be of three types :

a) Structured data: Relational data.
b) Semi Structured data: XML data.
c) Unstructured data: Word, PDF, Text, Media Logs.

 Big Data can be characterized by 3 V's :

1) Velocity -> Batch processing data, real time
2) Variety-> Structured, semi-structured, unstructured and polymorphic data
3) Volume-> Terabytes to Petabytes


Big Data puts existing traditional systems into trouble due to many reasons because when data increases the complexity, Security, maintenance, processing time of it also increases. Big Data gets Distributed processing system into picture. Its using multiple system/disk for parallel processing.

There are various tools & technologies in the market from different vendors including IBM, Microsoft, etc., to handle big data. Few of them are:


1) No SQL Big Data systems are designed to provide operational capabilities for real-time, interactive workloads where data is primarily captured and stored. It allows massive computations to be run inexpensively and efficiently. This makes operational big data workloads much easier to manage, cheaper, and faster to implement. For example MongoDB

2)MPP & MapReduce provide analytical capabilities for complex analysis including lot of data. Based on them we have Hadoop, Hive, Pig, Impala

3) Storage (HDFS ie Hadoop Distributed File System)
4) Servers (Google App Engine)

There are major challenges with Big Data. Read my Next Blog  to understand this.

Tuesday, January 24, 2017

What are the difference between Hive / Impala & Pig


Comparing Impala to Hive & Pig

Similarities:
  • Queries expressed in high-level languages
  • Alternatives to writing map-reduce code
  • Used to analyze data stored on Hadoop cluster

Differences:

Impala  

It was created based on Google's Dremel paper.
1) It is an interactive SQL like query engine that runs on top of Hadoop Distributed File System (HDFS).
2) Its an open source massively parallel processing (MPP) query engine on top of clustered systems like Apache Hadoop.
3) MPP style parallel databases have a relation model, more suitable for processing structured and semi-structured data. Due to its architectural advantages, it doesn't involve the overheads of a MapReduce jobs viz. job setup and creation, slot assignment, split creation, map generation etc., hence enables low-latency.
4) It offers lower latency / processing time for the queries at the cost of less scalability and less stability.
5) Impala supports high-performance UDF (User Defined Function) written in C++, as well as reusing some Java-based Hive UDFs.
6) Impala does not return column overflows as NULL, so that customers can distinguish between NULL data and overflow conditions similar to how they do so with traditional database systems.
7) Impala does not store or interpret timestamps using the local timezone, to avoid undesired results from unexpected time zone issues. Timestamps are stored and interpreted relative to UTC.
8) Impala utilizes the Apache Sentry authorization framework for Security, which provides fine-grained role-based access control to protect data against unauthorized access or tampering.
9) It can query data stored in HDFS or HBase tables
10) Uses subset of SQL 92 and do not support Stored Procedure
11) The Impala TIMESTAMP type can represent dates ranging from 1400-01-01 to 9999-12-31.  
12) With Impala, you can query the following File formats:Parquet /Avro /RCFile /SequenceFile
 /Unstructured text
13)  Impala shares the meta store with Hive
14) Impala can process in milliseconds when running at low load conditions and Impala is one of the valid choices if no SQL parallel processing is executed.
15) Impala is an MPP-like engine, so each query you are executing on it will start executor on each and every node of your cluster. This delivers the best performance for a single query running on the cluster, but the total throughput degrades heavily under high concurrency. In such systems you should limit the amount of parallel queries to kinda low value of ~10.


Being highly used it still has cons like:

1)  Impala can't handle complex data types(Array,Map or Struct)
2)  Impala is not fault tolerant For e.g. if you run a query in Impala and if the query fails you will have to start the query all over again
3) Doesnot not support Parameters in scripts

4) Impala does not currently support many of HiveQL statements like ,ANALYZE TABLE (the Impala equivalent is COMPUTE STATS),DESCRIBE COLUMN,DESCRIBE DATABASE,EXPORT TABLE,IMPORT TABLE, many more
5) Impala does not implicitly cast between string and numeric or Boolean types. Always use CAST() for these conversions.
6) Impala does perform implicit casts among the numeric types, when going from a smaller or less precise type to a larger or more precise one. For example, Impala will implicitly convert a SMALLINT to a BIGINT or FLOAT, but to convert from DOUBLE to FLOAT or INT to TINYINT requires a call to CAST() in the query.
7) Impala does perform implicit casts from string to timestamp. Impala has a restricted set of literal formats for the TIMESTAMP data type and the from_unixtime() format string.
8) Impala, is not currently supported by YARN 
9) Impala is not the best choice if there is a batch execution, and SQL parallel execution 




Hive 

It is a component of Horton works Data Platform(HDP). 
1) Hive provides a SQL-like interface to data stored in Hadoop clusters. 
2) It translate SQL queries into MapReduce/Tez/Spark jobs and executes them on the cluster, to implement batch based processing. Hence best suited for ETL- long running queries.
3) Its used by Data Analyst for completely structured data.
4) Supports complex Data types like arrays, Struct etc, custom file formats, "DATE" data type,XML and JSON functions.
5) Its fault tolerant .For e.g. if you run a query in hive mapreduce and while the query is running one of your data-node goes down still the output is given as  query will start running mapreduce jobs in other nodes.Its fault tolerant.
6) Supports Parameters Which Can Come Handy While Writing Hive Scripts.
7)  Its supported by YARN. So you can manage your resources for mapreduce or any other applications supported by YARN
8) Hive runs on top of MapReduce/Tez framework which requests resources based on the amount of data to process. This way for large clusters it would give you much better concurrency for “small” queries, as each of them would request small amount of execution resources which would result in more queries running in parallel.
9) The Hive component included in CDH 5.1 and higher now includes Sentry-enabled security .GRANT, REVOKE, and CREATE/DROP ROLE statements. Earlier Hive releases had a privilege system with GRANT and REVOKE statements that were primarily intended to prevent accidental deletion of data, rather than a security mechanism to protect against malicious users.
10) Uses subset of SQL 92 and do not support Stored Procedure
11) Hive TIMESTAMP type can represent dates ranging from 0000-01-01 to 9999-12-31. 
12) Hive supports several file formats like Text File /SequenceFile /RCFile/ Avro Files/ORC Files
     / Parquet/ Custom INPUTFORMAT and OUTPUTFORMAT. 



But the cons are big as well – 

1) Since Hive uses MapReduce to access Hadoop clusters, query overheads results in high latency. 
2) lower performance especially for table joins
3) No query optimizer 



 Pig

Pig which is a scripting language with a focus on data flows.It has two parts:
a) A language for processing data, called Pig Latin.

b) A set of evaluation mechanisms for evaluating a Pig Latin program. Current evaluation mechanisms include (a) local evaluation in a single JVM, (b) evaluation by translation into one or more Map-Reduce jobs, executed using Hadoop

1) Pig can process data of any format, such as tab delimited text files, are supported via built-in capabilities. A user can add support for a file format by writing a function that parses the bytes of a file into objects in Pig's data model, and vice versa.
2) Pig's data model is similar to the relational data model.
3) In Pig, tables are called bags. Pig also has a "map" data type, which is useful in representing semi-structured data, e.g. JSON or XML.
4)  It can combine multiple data sets, via operations such as join, union or co-group, OR can split a single data set into multiple ones, using an operation called split.
5) It is a Procedural Data Flow Language and mostly used by Researchers or programmers.
6) Pig is Fault Tolerant
7) Pig supports "maps" of (key, value) pairs, where retrieving the value associated with a given key is an efficient operation. Maps provide a convenient way to represent semi-structured data, where the set of non-null fields varies from record to record. Maps are helpful when processing JSON, XML, and sparse relational data (i.e., tables with a lot of null values).