Find and share helpful community-sourced technical articles
Recently active
Hortonworks DataFlow 2.0 comes with the ability to configure TLS for Apache NiFi through Apache Ambari, this is implemented using the tls-toolkit in client/server mode.To demonstrate this functionality, lets set up a 3 node NiFi secured cluster through Ambari locally in Docker containers.First, install docker on your machine. Please note that the default docker-machine vm size is too small for this guide. You should have at least 8 gigs of ram, a few cpus, and 100 gigs of hard drive space allocated to the docker-machine you’re using.Build the Ambari stack: mkdir toolkit-demo-3/cd toolkit-demo-3/git clone https://github.com/brosander/dev-dockerfiles.gitdev-dockerfiles/ambari/server/centos6/buildStack.sh http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.4.0.1/ambari.repoGenerate an ssh key for use talking to the gateway and Ambari: mkdir ambari-ssh-keysssh-keygen -t rsa -b 4096 -f ambari-ssh-keys/id_rsaRun the Ambari stack and install HDF mpack: wget -P mpack http://publi
Once you have Atlas up and running( see this for getting started. ) you will want to create your first tag and use it to tag data to begin exploring what Atlas can do. Lets start by creating a tag that will be called "PII" which we will later use it to tag Personally Identifiable data. Log into Atlas and select the + icon on the homepage. Enter "PII" for the tag name and click create. That's it! Now we have a tag to use. Now click on the search tab select "dsl" and from the drop down select "hive_table" hit enter and select the "customer" table.You should see the summary details for the customer table in hive. Select the schema tab. Here you see all columns available in the customer data table. Let's mark the "account_num" field as "PII". Next to "account_num" click the + icon and select "PII" from the drop down.Now the column has been tagged and both searchable from Atlas as well as configured to be administered through Hive for auditing and permissions. Click the "Tags" tab in Atlas
Env: HDP-2.3.4.0-3485Java 8Attached code contain:—pom.xml to manage all the dependencies— HiveClientSecure.java - oozie java action to be configured into workflow.xml— jaas.conf — oozie uses jaas configuration for kerberos login— log4j.properties - to capture logsjaas.conf: modify principal name and key tab location accordingly and place it to on each node on the cluster.I have placed it on /tmp/jaas/jaas.conf for testing purpose.Client {com.sun.security.auth.module.Krb5LoginModule requireduseKeyTab=trueuseTicketCache=trueprincipal="ambari-qa-hbase234@HWXBLR.COM"keyTab="/etc/security/keytabs/smokeuser.headless.keytab"debug="true"doNotPrompt=true;};workflow.xml:<workflow-app xmlns="uri:oozie:workflow:0.2" name="java-main-wf"> <start to="java-node"/> <a<action name="java-node"> <java> <job-tracker>${jobTracker}</job-tracker> <name-node>${nameNode}</name-node> <configuration>
You have a need of debugging, testing and operating a Hadoop cluster, especially when you run dangerous dfsadmin commands, try customized packages with changes of Hadoop/Spark source code, trying aggressive configuration values. You have a laptop and you have a production Hadoop cluster. You don't dare to operate the production cluster blindly, which is appreciated by your manager. You want to try something on a hadoop cluster and even you breaks it, no one blames you. You have several choices (perhaps you're using one of them now): psudo-distributed Hadoop cluster on a single machine, which is nontrivial to run HA, to use per-node configurations, to pause and launch multiple nodes, or to test HDFS balancer/mover etc. setting up a real cluster, which is complex and heavy to use, and in the first place you can afford a real cluster. building Ambari cluster using vbox/vmware virtual machines, nice try. But if you run 5 nodes cluster, you'll see your CPU is overloaded and memory is
Logical Disk EncryptionThe approach is to avoid using HDFS encryption and use Disk LUKS encryption for data at rest encryption requirement specially when using public cloud IAAS.To build manually encrypted volumes or drives ,use following steps on a d2*8xLarge instance flavor.lsblkcryptsetup --verbose --verify-passphrase luksFormat /dev/xvdbcryptsetup --verbose --verify-passphrase luksFormat /dev/xvdccryptsetup --verbose --verify-passphrase luksFormat /dev/xvddcryptsetup luksOpen /dev/xvdb vol1cryptsetup luksOpen /dev/xvdc vol2cryptsetup luksOpen /dev/xvdd vol3dd if=/dev/urandom of=/root/keyfile1 bs=1024 count=4chmod 0400 /root/keyfile1cryptsetup luksAddKey /dev/xvdb /root/keyfile1cryptsetup luksAddKey /dev/xvdc /root/keyfile1cryptsetup luksAddKey /dev/xvdd /root/keyfile1mkfs.ext4 /dev/mapper/vol1mkfs.ext4 /dev/mapper/vol2mkfs.ext4 /dev/mapper/vol3echo "/dev/mapper/vol1 /data/vol1 ext4 defaults,nofail,nodev 0 2" >> /etc/fstabecho "/dev/mapper/vol2 /data/vol2 ext4 defaults,nofail,
Ambari 2.4.0.0 officially supports LogSearch Component [ Tech Preview] . To learn more about Log Search component please refer to link Ambari LogSearch . While LogSearch component does support pushing the logs to Kafka topic [ based on which real time log analytics can be performed ] this is official not supported in Ambari 2.4.0.0. This might get addressed in Ambari 2.5.0.0 probably.This article provides the details on how to configure LogSearch [ LogFeeder component ] to push to Kafka topic if there is a need to capture and perform real time analytics based on logs in your cluster.1.After installing LogSearch component from Ambari 2.4.0.0, go to the LogSearch component config screen and add below property under "Advanced logfeeder-properties" to property "logfeeder.config.files"{default_config_files},kafka-output.json2. Create the kafka-output.json file with below content under directory /etc/ambari-logsearch-logfeeder/conf/ on the nodes which has logfeeder [ ideally all the nodes i
ObjectivesThis tutorial will walk you the process of starting Atlas on the Hortonworks Sandbox for HDP 2.5. By default the service is disabled. However manually starting the service will fail unless you start the dependencies. Atlas depends on Ambari Infra (which provides Solr), Kafka and HBase. Atlas will start with just the Ambari Infra service running, you won't have proper functionality without Kafka and KBaseScopeThis has been testing on the following: VirtualBox 5.1.6Hortonworks Sandbox for HDP 2.5StepsStart Atlas ServiceGet your sandbox up and running and log into Ambari. Click on the Atlas service link. You should see something similar to this:Because Atlas is in maintenance mode, it will not automatically start. When you try to start it by going to Service Actions -> Start like this:You will see the following error:If you look at the error message provide you will see the problem is related to Solr:Client is connected to ZooKeeperUsing default ZkACLProviderUpdating cl
eu-hdfs-restart.pngDuring the process of Express Upgrade for a cluster that was deployed using Blueprint configured to be a HDFS HA, for a cluster with versions HDP 2.4.2 and Ambari 2.2.2, the NN failed to restart as shown below. 13debf893a605e8a88df18a7d8d214f571e05289; compiled by 'jenkins' on 2016-04-25T05:46Z\nSTARTUP_MSG: java = 1.8.0_60\n************************************************************/\n16/09/14 18:40:33 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT]\n16/09/14 18:40:33 INFO namenode.NameNode: createNameNode [-bootstrapStandby, -nonInteractive]\n16/09/14 18:40:34 WARN common.Util: Path /hadoopfs/fs1/hdfs/namenode should be specified as a URI in configuration files. Please update hdfs configuration.\n16/09/14 18:40:34 WARN common.Util: Path /hadoopfs/fs1/hdfs/namenode should be specified as a URI in configuration files. Please update hdfs configuration.\n16/09/14 18:40:35 INFO ipc.Client: Retrying connect to server: <IP ADDRESS>:80
This has come up a few times. You’ll sometimes notice that after a Banana deployment in SOLR that you can’t save your dashboards in Banana. To enable this, you have to create an index that stores these dashboards. In order to enable this, all you need to do is run the following statement which will create a banana-int index.sh ${SOLR_HOME}/bin/solr create_core -c banana-int -d ../server/solr-webapp/webapp/banana/resources/banana-int-solr-5.0/confThen restart SOLR...sh ${SOLR_HOME}/bin/solr restartThen you can...1) Save your dashboard:2) And access your saved dashboard:Happy searching!
Objective This tutorial is intended to describe the process of converting the Hortonworks HDP 2.5 Technical Preview sandbox, which is a VirtualBox virtual machine, into a Vagrant box.Overview Given the limited resources of a single virtual machine, it can be difficult to run and manage multiple demo environments within a single virtual machine. It is a common desire to add additional software components to the sandbox. Adding additional components often means having to manually manage port forwarding rules in VirtualBox or you have to add an additional network interface to the virtual machine to directly access it via an IP address using either host-only or bridged networking. Given the steps involved, it is common to do this once and try to reuse the same virtual machine. This may not always be ideal. Using Vagrant, you can quickly create a clean sandbox with a simple command like vagrant init HDP25TP && vagrant up. Vagrant makes it easy to connect to the virtual mach
Objectives: This article will walk you through the process of creating a dashboard in Kibana using Twitter data that was pushed to Elasticsearch via NiFi. The tutorial will also cover basics of Elasticsearch mappings and templates. Prerequisites: You should already have installed the Hortonworks Sandbox (HDP 2.5 Tech Preview). You should already have completed the NiFi + Twitter + Elasticsearch tutorial here: HCC Article Make sure your GetTwitter and PutElasticsearch processors in your NiFi data flow are stopped. NOTE: While not required, I highly recommend using Vagrant to manage multiple Virtualbox environments. You can read more about converting the HDP Sandbox Virtualbox virtual machine into a Vagrant box here: HCC Article Scope This tutorial was tested using the following environment and components: Mac OS X 10.11.6 HDP 2.5 Tech Preview on Hortonworks Sandbox Apache NiFi 1.0.0 (Read more here: Apache NiFi) Elasticsearch 2.3.5 and Elasticsearch 2.4.0 (Read more here: Elasticsear
The most recent release of Kafka 0.9 with it's comprehensive security implementation has reached an important milestone. In his blog post Kafka Security 101 Ismael from Confluent describes the security features part of the release very well.As a part II of the here published post about Kafka Security with Kerberos this post discussed a sample implementation of a Java Kafka producer with authentication. It is part of a mini series of posts discussing secure HDP clients, connecting services to a secured cluster, and kerberizing the HDP Sandbox (Download HDP Sandbox). In this effort at the end of this post we will also create a Kafka Servlet to publish messages to a secured broker.Kafka provides SSL and Kerberos authentication. Only Kerberos is discussed here.Kafka from now on supports four different communication protocols between Consumers, Producers, and Brokers. Each protocol considers different security aspects, while PLAINTEXT is the old insecure communication protocol.PLAINT
Why not trying a Kaggle Challenge (Titanic) !(This is a work in progress, I will update this article as soon as I get more free time. Hope you will enjoy it !) Let's create the corresponding database first : CREATE DATABASE IF NOT EXISTS kaggle_titanic; And then load the data : USE kaggle_titanic;DROP TABLE IF EXISTS train_tmp;ADD JAR csv-serde-1.1.2-0.11.0-all.jar;CREATE TABLE train_tmp ( PassengerId DOUBLE COMMENT 'regex : 999', Survived DOUBLE COMMENT 'regex : 9', Pclass INT COMMENT 'regex : 9', Name STRING COMMENT 'regex : _Zzz!_Zzzzz_!Zzzzzzzzz_!!Zzzzzz!!_Zzzzzz_Zzzzz!!', Sex STRING COMMENT 'regex : zzzzzz', Age DOUBLE COMMENT 'regex : 99!9', SibSp DOUBLE COMMENT 'regex : 9', Parch DOUBLE COMMENT 'regex : 9', Ticket STRING COMMENT 'regex : ZZZZZ!Z!Z!_9999999', Fare DOUBLE COMMENT 'regex : 999!9999', Cabin STRING COMMENT 'Z99_Z99_Z99_Z99', Embarked STRING COMMENT 'regex : Z')ROW FORMAT SERDE 'com.bizo.hive.serde.csv.CSVSerde'with serdeproperties ( "separatorChar" =
In this article I will review the steps required to enrich and filter logs. It is assumed that the logs are landing one at a time as a stream into the nifi cluster. The steps involved Extract Attributes - IP and ActionExtract Attributes - IP and ActionCold Store non ip logs GeoEnrich the IP addressCold store local IP addressesRoute the remaining logs based on threat levelStore the low threat logs in HDFSPlace high threat logs into an external tableExtract IP Address and Action - ExtractText Processor This processor will evaluate each log and parse the information into attributes. To create a new attribute add a property and give it a name(soon to be attribute name) and a java-style regex command. As the processor runs it will evaluate the regex and create an attribute with the result. If there is no match it will be sent to the 'unmatched' result which is a simple way of filtering out different logs.GeoEnrichIP - GeoEnrichIP Processor This processor takes the ipaddr attribute gener
Sensor Reading with Apache NiFi 1.0.0There are many types of sensors, devices and meters that can be great sources of data. Some can push data, some can pull data, some provide APIs, some give you access to install software. How To Access SensorsOne option is to install MiNiFi on the device if you have root access. This will provide fast access to allow you to script and manage your local data. Another option for bigger devices is to install a full Java based NiFi node. It starts becoming harder once you have tens of thousands of devices. You can install an HDF Edge and communicate from this node to your HDF cluster via Site-to-Site protocol. From this Edge Node that acts as an accumulator for many devices (a good idea so that you don't send 10,000 network requests a second from each set of devices, keep as much traffic locally to save time, time-outs, networking and cloud costs). You can also now aggregate and send larger batches of data and also process some summaries
It is helpful to see values in the input fields of the wizard that actually worked! Ambari helps you at this point with some tooltips, but still you might doubt about the expected syntax of the values to provide. Sometimes you learn the hard way that the values provided are just not what Ambari expects them to be. Note: this only applies to the Kerberos wizard with the "use an existing Active Directory" option.1. (KDC host) The FQDN of your AD host2. (Realm name) The realm name, make sure you use UPPERCASE here, otherwise the install will fail !! In my case the realm name is the same the AD domain, but that is not required. If you already did submit a lowercase Realm, here is help to fix this.3. (LDAP uri) The use of secure ldap (ldaps) is required here4. (Container DN) Distinguished Name of the container (or 'OU' Organisational Unit in ldap lingo) that will hold the Ambari/HDP service accounts. This OU has to exist already in your AD.5. (Domains) Optional---
Running Spark Jobs Through Apache Beam on HDP 2.5 Yarn Cluster Using the Spark Runner with Apache Beam Apache Beam is still in incubator and not supported on HDP 2.5 or other platforms.sudo yum -y install git wget http://www.gtlib.gatech.edu/pub/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz After you get Maven downloaded, move it to /opt/demo/maven or into your path. The maven download mirror will change, so grab a new URL from http://maven.apache.org/.Using Yum will give you an older Maven not supported and may interfere with something else. So I recommend getting a new Maven just for this build. Make sure you have Java 7 or greater, which you should have on an Apache machine. I am recommending Java 8 on your new HDP 2.5 nodes if possible.cd /opt/demo/ git clone https://github.com/apache/incubator-beam cd incubator-beam /opt/demo/maven/bin/mvn clean install -DskipTests If you want to run this on Spark 2.0 and not Spark 1.6.2, look here for changing environme
HDP 2.4.3.0 is released and available for immediate use. This release builds upon the last HDP 2.3.6.0 and HDP 2.4.2.0 releases, and adds over 200+ bugs from 2.3.6.0. Spark 1.6.2 is also included in this release.Please refer to the documentation site and the release notes for any late breaking information and details on how to start your installs/upgrades.This will be made available on Azure's HDInsight offering in due time.
Thanks Rob for an excellent article .. https://community.emc.com/community/products/isilon/blog/2016/08/16/configuring-ambari-hive-view-with-onefs
I often hear stories of wanting faster performance from Hadoop & spark without knowing basic statistics within ones environment. One of the first questions I ask is whether the hardware can perform at the level which is being expected. The software is still bound to the physics of the hardware.If your IO disk speed is 10MB per sec, Hadoop/Spark nor any other software will magically make that disk speed faster. Again we are bound to the physical limits of the hardware we choose. What makes Hadoop and other distributed processing engines amazing is its ability to add more "cheap" nodes to the cluster to increase performance. However we should be aware the maximum throughput per node. This will help level set expectations before committing to any SLA bound to performance.Typically I love to use the sysbench tool. SysBench is a modular & multi-threaded benchmark tool for evaluating OS parameters ie. CPU, ram, IO, and mutex. I use sysbench prior to installing any software outs
Hortonworks Data Platform 2.5 enhances your data access experience by redesigning and centralizing data access content, including providing you with content roadmaps for Apache Hive and Apache HBase. These content roadmaps help you find your way through the wider HDP and Apache libraries, with links to relevant sites and topics based on your task.Working with Hive? You might want to try the technical preview of Interactive and Sub-Second SQL Queries through LLAP. HDP 2.5 also includes improved security through row-level filtering and column masking. And by default, the Hive View now supports a JDBC connection.HBase users, you can now backup and restore datasets that run on production clusters by performing a single full backup and then capturing incremental changes to the dataset. HDP 2.5 also provides HBase Medium Object (MOB) Storage support.Using Apache Phoenix? HDP 2.5 supports Apache Phoenix version 4.7 including improved integration of HBase and Phoenix namespaces. And you can co
Objective: The purpose of this tutorial is to walk you through the process of using NiFi to pull data from Twitter and push it to Elasticsearch. I also show an example Zeppelin dashboard which queries the Twitter data in Elasticsearch. This is the second of two articles covering Elasticsearch on HDP. The first article covers manually creating Movie data in Zeppelin and pushing that data to Elasticsearch. 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). You should already have enabled the Elasticsearch interpreter in Zeppelin. See this article: HCC Article You should already have twitter access keys. You create your access keys here: Twitter Apps. Read more here: Twitter Docs. Note: While not required, I recomm
There’s a new Data Movement and Integration (DMI) guide for the HDP 2.5.0 release. The guide currently focuses on Falcon features and functionality around the definition and scheduling of jobs for the backup, mirror, transfer, and processing of data. It also includes some content related to Flume, Sqoop, and Oozie.The existing Falcon content was moved out of the Data Governance Guide and into the DMI guide. New content was also added to the DMI guide to reflect changes to the Falcon UI and new Falcon features. In addition, the content has gone through an initial reorganization in an effort to more closely reflect the user’s experience.Significant changes to Falcon content in the guide include: Rewrote Tasks based on an improved, redesigned UI.Added Content about new functionality, including: RDBMS backup capabilitySnapshot-based backupsHive data mirroringMirroring data between on-premise and cloud data with Azure and AWS S3Ability to edit cluster entities using safe modeNew entity depe
Ranger installation is not as simple as Adding Service on Ambari.Ranger also requires DB and Solr for audit.In this tutorial we will go through installing Ranger or default postgres DB installed during Ambari Server installation.If you did a vanilla Ambari-server Install (HDP 2.4) you should have postgres running.Verify Default Post gresql running on Ambari-ServerOn the Ambari-Server if you run "ps -eaf | grep ambari | grep postgres" you should be able to verify postgres db running.We can see the process id is 9595. Running "netstat -anp | grep 9595" gives you the port number postgres DB is running on. We can try connecting using psql command. In our case it is running on default installation port 5432.Now Let's create DB for ranger and give it permissions. If you have sudo you can log into postgres with postgres user. For reference please take a look at (https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/configuring_postgresql_for_ranger.html)Confirm by
When you create a database or internal tables in hive cli then by default it creates with 777 permission.Even though if you have umask in hdfs then also it will be same permission. But now you can change it with the help of following steps.1.From the command line in the Ambari server node, edit the filevi /var/lib/ambari–server/resources/common–services/HIVE/0.12.0.2.0/package/scripts/hive.pySearch for hive_apps_whs_dir which should go to this block:params.HdfsResource(params.hive_apps_whs_dir,type=“directory”,action=“create_on_execute”,owner=params.hive_user,group=params.user_group,mode=0755)2. Modify the value for mode from 0777 to the desired permission, for example 0750.Save and close the file.3. Restart the Ambari server to propagate the change to all nodes in the cluster:ambari–server restart4. From the Ambari UI, restart HiveServer2 to apply the new permission to the warehouse directory. If multiple HiveServer2 instances are configured, any one instance can be restarted.hive>
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.