Find and share helpful community-sourced technical articles
Recently active
One of the most gargantuan tasks of any cluster administrator is upgrading the bits since it is a tedious, risky, and inherently complex process that can take days. Ambari comes to the rescue with two features: Rolling Upgrade (RU), and Express Upgrade (EU), aimed upgrading the HDP cluster with a couple of clicks.For starters, Rolling Upgrade was first released in Ambari 2.0.0 (March 2015) and the latest incarnation (as of October 2015) in Ambari 2.1.2 provides added robustness and a couple of goodies.Express Upgrade is set to be released in Ambari 2.2.0 (ETA is Dec 16, 2015).So how does it work? What are the gotcha's? What do I need to know? Overview:Both upgrade mechanisms update the bits and configurations of your cluster. The main difference is that RU upgrades one node at a time, and maintains the cluster and all Hadoop jobs running, while EU stops all services, changes the version and configs, then starts all services in parallel. Therefore, RU is the prime candidate for environm
Enabling SMTP in Cloudbreak---------------------------1. The Profile file2. Bug in mailer.js and a workaround 2.1 The Problem 2.2 The Cause 2.3 Details 2.4 A Workaround3. Fix postfix config---1. The Profile file-------------------In the Profile file, set the following CLOUDBREAK_SMTP_* variables and set CBD_FORCE_START to enable starting Cloudbreak containers with amodified file docker-composer.yml (see section 2.4): cloudbreak $ cd $CBD_ROOT cloudbreak $ more Profile export PUBLIC_IP=example.compute.amazonaws.com export AWS_SECRET_ACCESS_KEY=*** export AWS_ACCESS_KEY_ID=*** export CBD_FORCE_START=true export CLOUDBREAK_SMTP_SENDER_HOST="172.17.0.1" export CLOUDBREAK_SMTP_SENDER_FROM="cloudbreak@compute.amazonaws.com" export CLOUDBREAK_SMTP_AUTH=false export CLOUDBREAK_SMTP_STARTTLS_ENABLE=false---2. Bug in mailer.js and a workaround------------------------------------See https://github.com/sequenceiq/cloudbreak/issues/1492---2.1 The Problem---------------Can not
Apache Zeppelin with HDP 2.4.2In March, 2016 we delivered 2nd technical preview of Apache Zeppelin on HDP 2.4. Meanwhile we and the Zeppelin community continues to add new features. We now give you the final technical preview of Zeppelin, based on snapshot of Apache Zeppelin 0.6.0. The main features in this Zeppelin technical preview are: Ambari Managed InstallationZeppelin Livy integrationSecurity Execute jobs as authenticated userZeppelin authentication against LDAPNotebook AuthorizationPrerequisites:HDP 2.4.2 is installedThe cluster contains Spark 1.6 or 1.5Git is installed on the node running Ambari Server You can install git as ‘ sudo yum install git’Java 8 is installed on the node where Zeppelin is installedThis document provides instructions for :Setting up Zeppelin on HDP 2.4.2 with Spark 1.6 Ambari Managed InstallRunning Zeppelin against Spark on YARN with Livy interpreterAuthentication with ZeppelinAuthenticate users against LDAPAccess Control on NotebooksNote, while both A
Are you eager to see how the new LLAP Hive feature in Hortonworks Data Platform 2.5 Tech Preview optimizes queries? Using Hortonworks Cloud, you can easily stand up a cluster in Amazon Web Services configured with LLAP, load up some benchmark data and compare queries using LLAP and without LLAP.1. A Key Pair is required when logging into an AWS host. If you already have a key pair and its associated PEM file, skip to the next step. If this is the first time you are creating AWS instances in a region or you want to create a new Key Pair, follow the steps in the AWS KeyPair documentation. When you download the key file, make sure you save the file to a known location. You will not be able to log into your instance without it and AWS will not give you another opportunity to download it. If you lose the key file, you can terminate your existing instance and launch new ones.2. Launch a CloudController instance. The CloudController provides a web interface where you can quickly spin up a clu
One of the most highly anticipated features of Apache NiFi 1.0.0 is the introduction of Zero-Master Clustering. Previous versions of NiFi relied upon a single "Master Node" (more formally known as the NiFi Cluster Manager) to show the User Interface. If this node was lost, data continued to flow, but the application was unable to show the topology of the flow, or show any stats. Additionally, Site-to-Site communications continued to send data but could not obtain up-to-date information about cluster topology, which resulted in less efficient load balancing.Version 1.0.0 of NiFi addresses these issues by switching to a Zero-Master Clustering paradigm. This post will explore the approaches taken to ensure that NiFi provides high availability of the control plane without sacrificing the User Experience. After all, the User Experience is what has allowed NiFi to become the go-to solution for providing dataflow management to small organizations as well as the world's l
The objective of this post is to briefly explain how to setup an unsecured NiFi cluster with NiFi 1.0.0 (a three nodes cluster with three embedded ZooKeeper instances). One really important change with this new version is the new paradigm around cluster installation. From the NiFi documentation, we can read:Starting with the NiFi 1.0 release, NiFi employs a Zero-Master Clustering paradigm. Each of the nodes in a NiFi cluster performs the same tasks on the data but each operates on a different set of data. Apache ZooKeeper elects one of the nodes as the Cluster Coordinator, and failover is handled automatically by ZooKeeper. All cluster nodes report heartbeat and status information to the Cluster Coordinator. The Cluster Coordinator is responsible for disconnecting and connecting nodes. As a DataFlow manager, you can interact with the NiFi cluster through the UI of any node in the cluster. Any change you make is replicated to all nodes in the cluster, allowing for multiple e
It is a very common operation to do prefix scan in HBase. For example, when reading HBase table from HBase, we may use the following table scan api:val prefixFilter = new PrefixFilter(prefix)val scan: Scan = new Scan()scan.setFilter(prefixFilter)However, the code above may appear to be very slow when scanning a large HBase table. The reason is: we need to set StartRow before using PrefixFilter. Without setting the start row properly, your HBase scan may have to begin with the very first region and waste lots of time to get to the first right place.The recommended way is to use setRowPrefixFilter(byte[] rowPrefix), from its source code below, we can see that it helps us to set up the start row before doing table scan.409 public Scan setRowPrefixFilter(byte[] rowPrefix) {410 if (rowPrefix == null) {411 setStartRow(HConstants.EMPTY_START_ROW);412 setStopRow(HConstants.EMPTY_END_ROW);413 } else {414 this.setStartRow(rowPrefix);415 this.setStopRow(calculateTheClos
This article is an update of one on http://hadooped.blogspot.com/2013/10/apache-oozie-part-13-oozie-ssh-action_30.html, authored by @Anagha Khanolkar.Below are the steps to setup Oozie workflow using ssh-action: Step 1. Create job.properties.Example:#************************************************* # job.properties#*************************************************nameNode=hdfs://<namenode-machine-fqdn>:8020jobTracker=<resource-manager-fqdn>:8050queueName=defaultoozie.libpath=${nameNode}/user/oozie/share/liboozie.use.system.libpath=trueoozie.wf.rerun.failnodes=trueoozieProjectRoot=${nameNode}/user/${user.name}appPath=${oozieProjectRoot}oozie.wf.application.path=${appPath}inputDir=${oozieProjectRoot}focusNodeLogin=<username>@<remote-host-where-you-have-your-shell-script(s)>shellScriptPath=~/uploadFile.shemailToAddress=<email-id> Step 2. Write workflow.xmlExample:<!--******************************************--><!--workflow.xml
First lets create a sample file in S3: In the AWS Console , Go to S3 and create a bucket “S3Demo” and pick your region. Upload the file manually by using the upload button (example file name used later in scala: S3HDPTEST.csv)In the HDP 2.4.0 Sandbox :Download the aws sdk for java https://aws.amazon.com/sdk-for-java/ Uploaded it to the hadoop directory. You should see the aws-java-sdk-1.10.65.jar in /usr/hdp/2.4.0.0-169/hadoop/[root@sandbox bin]# ll /usr/hdp/2.4.0.0-169/hadoop/total 242692-rw-r--r-- 1 root root 32380018 2016-03-31 22:02 aws-java-sdk-1.10.65.jardrwxr-xr-x 2 root root 4096 2016-02-29 18:05 bindrwxr-xr-x 2 root root 12288 2016-02-29 17:49 clientlrwxrwxrwx 1 root root 25 2016-03-31 21:08 conf -> /etc/hadoop/2.4.0.0-169/0drwxr-xr-x 2 root root 4096 2016-02-29 17:46 etc-rw-r--r-- 1 root root 17366 2016-02-10 06:44 hadoop-annotations-2.7.1.2.4.0.0-169.jarlrwxrwxrwx 1 root root 40 2016-02-29 17:46 hadoop-annotations.jar -> hadoop-annotati
Cluster upgrade is a well-planned maintenance activity. Before starting the upgrade, it is important to ensure that your cluster is ready for upgrade. Ambari has built-in pre-checks that are executed before the actual upgrade to check the overall health of your cluster and validate its readiness for upgrade. Let us look at the pre-checks, their purpose and how to remediate the issues, so that your cluster upgrade process is smooth. A bit of background first:BackgroundAmbari supports two kinds of stack (cluster) upgrades: Rolling Upgrade (RU) and Express Upgrade (EU). Pre-checks apply to both upgrade methods, although RU has a larger set of pre-checks since the upgrade does not involve any downtimeFirst up, the types of pre-checks: Cluster level checks: Example – newer version packages should be installed on all hosts in the clusterService level checks: Example – all service components should be in installed state (no failures)Host level checks: All hosts must be communicating with Amba
SynopsisBoth Pig and Spark (PySpark) excel at iterative data processing against weblogs data in text delimited format. Is one faster than the other? Pig on Tez shows to outperform PySparkPySpark using the Databricks CSV parser shows to outperform Pig on TezPig Apache Pig allows users to MapReduce transformations using a simple scripting language called Pig Latin. Pig translates the Pig Latin script into MapReduce so that it can be executed within YARN against a dataset stored in the Hadoop Distributed File System (HDFS) Apache Tez is a distributed data processing framework for building batch and interactive applications. Tez improves the MapReduce paradigm by dramatically improving its speed, while maintaining MapReduce’s ability to scale to petabytes of data. Pig on Tez excels at iterative data processing. It is fast, easy, and the optimal solution to implement when it comes to parsing weblogs.Spark General purpose in-memory distributed data processing engine API’s to write cod
Objective: The purpose of this tutorial is to walk you through the process of enabling the Elasticsearch interpreter for Zeppelin on the HDP 2.5 TP sandbox. As part of this process, we will install Elasticsearch and use Zeppelin to index and query data using Zeppelin and Elasticsearch.This is the first of two articles covering Elasticsearch on HDP. The second article covers pushing Twitter data to Elasticsearch using NiFi and provides a sample Zeppelin dashboard. You can find that article here: HCC Article Note: The Zeppelin Elasticserch interpreter is a community provided interpreter. It is not yet considered GA by Hortonworks and should only be used for development and testing purposes.Prerequisites: You should already have installed the Hortonworks Sandbox (HDP 2.5 Tech Preview). Note: While not required, I recommend using Vagrant to manage multiple versions of the Sandbox. Follow my tutorial here to set that up: HCC ArticleScope: This tutorial was tested using the following
Self Service Hadoop – well some starting pointsSay you want to get started with Big Data and concurrently want to start to empower your relatively savvy end users that have been in the frustrating desktop data management land for a long time. This very simple article will hopefully help with a few options.This diagram below gives a little perspective around some of the sources and mechanisms around ingesting, manipulating and using your data assets. You can see following the numbers from 1 to 6 that you have many options with working with your data. This article will concentrate on just showing a simple end user example of ingesting data, understanding it and using options for using the data from a self service approach. Really an approach to get started and help promote some of the value of a modern data architecture as your team matures.An end users want to self service some data from their desktop/server into HDFS and be able to query and understand that data from their existing
There are three main installation paths for creating a new Cloudera Manager deployment: Installation Path A - Automated Installation by Cloudera Manager (Non-Production Mode). "This path is recommended for demonstration and proof-of-concept deployments, but is not recommended for production deployments because it's not intended to scale and may require database migration as your cluster grows"[1]. Installation Path B - Installation Using Cloudera Manager Parcels or Packages. This path requires you to first manually install and configure an external database for the Cloudera Manager Server, Cloudera Management services and any other CDH services that may reside on this database instance (such as Hue, Hive, Oozie etc.). Installation Path C - Manual Installation Using Cloudera Manager Tarballs. In this path, you install the the Oracle JDK, Cloudera Manager server and Agent software using tarballs. This tutorial covers the Path B installation of Cloudera Manager
IntroductionAmbari 2.4 introduces the Hue-to-Views Migration tool, which is specifically designed to migrate existing Hue artifacts to an Ambari View.Currently in Hue the hive queries are saved in ‘Saved Queries’ in Hue UI. These queries can be invoked by the user by going to Saved Queries in Hue UI. HUETOAMBARI_MIGRATION would help in migrating these saved Hive artifacts from Hue to Ambari Hive View. Once the migration is done, the Saved Queries can be viewed from Ambari Hive View. Currently HUETOAMBARI_MIGRATION would help in migrating the following artifacts from Hue to Ambari Views.Hive - Saved Queries, Query History Pig - Saved Scripts, Pig JobsThe view would use JDBC to connect to Hue database to obtain the artifacts. Once obtained, these would be stored in the Ambari View Server database.Today, the view migrates the scripts one user at a time. The user to be migrated would be specified during the migration.Note:- This view does not validate scripts. Non-working Hue scripts wil
Here is the steps to enable HTTPS for HBASE Master UI. 1. Add following properties in "Custom hbase-site" hbase.ssl.enabled=truehbase.http.policy=HTTPS_ONLY hadoop.ssl.enabled=true2. In HBASE, there is no direct option to add/configure the keystore files (JKS), it uses HADOOP configurations files. Lets say If HTTPS is already enabled for HDFS Web UI then your host would have already configured with JKS files in ssl-server.xml and ssl-client.xml files, so HBASE also uses same ssl-server.xml files. You can find more details to configure HTTPS for HDFS at https://community.hortonworks.com/articles/52875/enable-https-for-hdfs.html3. If you are planning to have different JKS files for HDFS and HBASE then you can copy the the ssl-server.xml to /etc/hbase/conf path and configure the JKS file. Restart HBASE server and server should come fine and should be accessable https://HOSTNAME:16010/ Note:Please note that there is a bug in AMBARI because of that HBASE quick always try to open with HTTP
Recently I had a client ask about how would we go about connecting a windows share to Nifi to HDFS, or if it was even possible. This is how you build a working proof of concept to demo the capabilities!You will need two Servers or Virtual machines. One for windows, one for Hadoop + Nifi. I personally elected to use these two The Sandbox http://hortonworks.com/products/hortonworks-sandbox/A windows VM running win 7 https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/linux/You then need to install nifi on the sandbox, I find this repo to be the easiest to follow. https://github.com/abajwa-hw/ambari-nifi-serviceBe sure the servers can talk to each other directly, I personally used a bridged network connection in virtual box and looked up the IPs on my router's control panel.Next you need to setup a windows share of some format. This can be combined with active directory but I personally just enabled guest accounts and made an account called Nifi_Test. These instruct
SYNOPSIS Which is faster when analyzing data using Spark 1.6.1: HDP with HDFS for storage, or EMR? Testing shows that HDP using HDFS has performance gains over using EMR. HDP/HDFS outperforms EMR by 46% when tested against 1 full day of 37 GB Clickstream (Web) data.HDP/HDFSEMRTime Elapsed3 mins, 29 sec5 mins, 5 sec * See below at end of article for validation and screen prints showing Resource Manager logs HDP Hortonworks Data Platform (HDP) is the industry's only true secure, enterprise-ready open source Apache Hadoop distribution. The Hadoop Distributed File System (HDFS) is a Java-based distributed block storage file system that is used to store all data in HDP. EMR Amazon Elastic MapReduce (Amazon EMR) is a managed Hadoop framework to distribute and process vast amounts of data across dynamically scalable Amazon EC2 instances. S3 is an inexpensive object store that can theoretically scale out infinitely without the limitations inherent to a hierarchical block stora
In the recent weeks I have tested Hadoop on various IaaS providers in hope to find additional performance insights. BigStep blew away my expectation in terms of Hadoop performance on IaaS. I wanted to take the testing a step further. Lets quantify performance measures by adding nodes to a cluster. Even for a small 1TB data set, would 5 nodes perform far greater then 3? I have heard a few times when it comes to small datasets adding more nodes may not have a impact. So this led me to test a 3 node cluster vs a 5 node cluster using 1TB dataset. Does the extra 2 nodes increase performance with processing and IO? Lets find out.Started the testing with dfsio which is a distributed IO benchmark tool. Here are results:From 3 to 5 data nodes IO read performance increased approx. 36%From 3 to 5 data nodes IO write performance increased approx. 49%With 2 additional data nodes a performance IO throughput of 49%! Wish I had more boxes to play with. Can't image where this would take the m
New table region split/merge APINew API in HBase HDP 2.5 allows user to disable/enable automatic region splits and merges. From HBase shell you can run the following commands:Enable region splits hbase> splitormerge_switch 'SPLIT', trueDisable region splitshbase> splitormerge_switch 'SPLIT', falseEnable region mergeshbase> splitormerge_switch 'MERGE', trueDisable region mergeshbase> splitormerge_switch 'MERGE', falseCheck region split switch statushbase> splitormerge_enabled 'SPLIT'Check region merge switch statushbase> splitormerge_enabled 'MERGE'Usage in HBase hbck toolHBase hbck tool can automatically use this API during restore operation if the following command-line argument is specified: -disableSplitAndMerge or tool is run in repair mode. Disabling region splits and merges during repair or diagnostic runs improves tool's ability to diagnose and repair HBase cluster.Usage in table snapshots It is recommended now to disable both: region splits and merges before
Sharing source code I wrote to a prospect that wants to try Phoenix + .NET.It's a simple code that POST the query to Phoenix Server and parse result JSON and prints results on console:using System;using System.Net;using System.Collections.Generic;using Newtonsoft.Json;using System.Text; namespace ConsoleApplication1{ class PhoenixSample { public class FirstFrame { public String offset; public List<List<String>> rows; } public class Result { public FirstFrame firstFrame; public int updateCount; } public class PhoenixResult { public string response { get; set; } public List<Result> results { get; set; } } static void Main(string[] args) { try { string url = "http://192.168.56.203:8765"; string query = "select * from test"; var syncClient = new WebClient
Brandon Wilson has a great article that shows how to use the "CACHE TABLE" cmd in Tableau, however more recent drivers have come out and you can now connect directly to the thriftserver using a spark-sql driver. This is using HDP 2.5 and SimbaSparkOdbc.First pull up a Tableau connection and select the thriftServer. Additionally had to open the virtualbox port 10015. Next if you don't have the driver Tableau will jump you to a page where you can download a spark-sql driver and inside that package chose this driver.Once you establish a valid connection you will see Tableau flag the connects based on the driver. Below you will see the Hive connection from Brandon's article and now the new Spark connection.Next using the CACHE cmd enter the below into Tableau's initial SQL box.Finally check the storage of spark for the warehouse/crimes table in memory. Or any table of your chosing for that matter.Some visuals from Tableau.
Microsoft HDInsights provides the four different options under Cluster Type and they are: Hadoop, Hbase, Storm and Spark (Preview); Some of HDP components are not standard in the HDInsight distribution of choice. In this particular case, the customer was interested in Spark / Spark Notebooks Components and especially Zeppelin. When choosing the Spark Option, only these services will be provided under Ambari: HDFS, MR2, YARN, Tez, Hive, Pig, Sqoop, OOzie, Zookeeper, Ambari Metrics, Jupyter, Livy (Livy is the remote job submission server for Spark), and Spark; Zeppelin is missing from the HDI Spark distro at the time of writing this article; So in order to install Zeppelin When choosing 'Spark' as the HDI ‘Cluster Type' , and under 'New HDInsights Cluster' >> 'Optional Configuration’ >> 'Scripts Action' put the following URI as shown below: https://hdiconfigactions.blob.core.windows.net/linuxincubatorzeppelinv01/install-zeppelin-spark151-v01.sh Further services
Linkedin PostHave you heard of computing on traditional disk-based or flash-based technologies? We all use disks/flash storage in our laptops, desktop or servers sitting in the data center.What is Apache Ignite In-Memory Data Fabric ?It's high-performance, integrated and distributed in-memory platform for computing and transacting on large-scale data sets in real-time "orders of magnitude faster than possible with traditional disk-based or flash-based technologies."Fabric: In information technology, fabric is a synonym for the words framework or platform. You can view Ignite as a collection of independent, well-integrated, in-memory components geared to improve performance and scalability of your application.Source How Ignite fits with HDFS? (Ignite file system , IGFS)IGFS shakes hand with HDFS. Hadoop can run over IGFS in plug-n-play fashion and significantly reduce I/O and improve both, latency and throughput.Why do we need another layer on the top of HDFS? IGFS supports dual-mode. A
Atlas API : Create Trait TypeTraits are Atlas types that act like decorators to provide a mechanism for classification. Traits can be applied to any Atlas entities (instances of classes). An entity can have any number of traits. For example, a SECURITY_CLEARANCE trait could be defined with an attribute ‘security_level’. An Atlas entity (e.g. an instance of Person class) could be tagged with the SECURITY_CLEARANCE trait by providing a value for the trait’s ‘security_level’ attribute.In order to use a trait, you first need to define the trait type. You can do that by posting to the Types resource of the Atlas REST APIs.Types ResourceA type is the description of any representable item. In this case we are creating a trait type but the same resource is used to represent enums, structs and classes as well. /typesPOSTSubmits a types definition containing a type definition representing a trait.Request BodyTypes Definition application/json Response BodyTypes Response application/json
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.