Find and share helpful community-sourced technical articles
Recently active
Picture the scene...You've run the HDFS Balancer on your cluster and have your data balanced nicely across your DataNodes on HDFS. Your cluster is humming along nicely, but your system administrator runs across the office to you with alerts about full disks on one of your DataNode machines! What now?The Low-DownUneven data distribution amongst disks isn't dangerous as such, though in some rare cases you may start to notice the fuller disks becoming bottlenecks for I/O. As of Apache Hadoop 2.7.3, it is not possible to balance disks within a single node (aka intra-node balancing) - the HDFS balancer only balances across DataNodes and not within them. HDFS-1312 is tracking work to introduce this functionality into Apache HDFS, but it will not be available before Hadoop 3.0.The conservative approach:Modify the following property to your HDFS configurations or add it if it isn't already there: dfs.datanode.du.reserved (reserved space in bytes per volume). This will always leave this much sp
Use CaseI want to hide text messages inside images. When the images arrive somewhere else, I want to extract those messages.It let's you hide text in images, binaries in images and images in images.I was interesting in hiding text messages in images. After seeing
Linkedin PostApache NiFi is an easy to use, powerful, and reliable system to process and distribute data.Apache NiFi is based on technology previously called “Niagara Files” that was in development and used at scale within the NSA for the last 8 years and was made available to the Apache Software Foundation through the NSA Technology Transfer Program. Some of the use cases include, but are not limited to: Big Data Ingest– Offers a simple, reliable and secure way to collect data streams.IoAT Optimization– Allows organizations to overcome real world constraints such as limited or expensive bandwidth while ensuring data quality and reliability.Compliance– Enables organizations to understand everything that happens to data in motion from its creation to its final resting place, which is particularly important for regulated industries that must retain and report on chain of custody.Digital Security– Helps organizations collect large volumes of data from many sources and prioritize which dat
Many deployments in hadoop use Centrify LDAP proxy to integrate Active Directory users with linux accounts. Centrify ldapproxy uses posix properties like uid, gidNumber, uidNumber, memberUid, etc... and are made available for ldap search attributes to the clients like Apache Ranger. Ranger interacts with Centrify ldapproxy for configuring hadoop authorization policies as well as for authentication to ranger UI. In order to sync users and groups from Centrify, ranger performs ldap search against Centrify using all the configured LDAP attributes. Some of the common issues noticed during this integration can be:Issue #1. Users are unable to login to Ranger UI but were successfully sync'd to ranger:For AD/LDAP authentication, Ranger uses the complete DN of the login user for performing an LDAP search. Ranger also uses group search base and group search filter for group membership for obtaining user role information. Few configuration parameters to verify on ranger are:ranger.ldap.user.dnpa
Demonstrate how easy is to create a simple data flow with NiFi, stream to Hive and visualize via Zeppelin.Pre-requisites Apache NiFi 1.1.0.2.1.0.0-165, included with Hortonworks DataFlow 2.1.0Apache Zeppelin 0.6.0.2.5.0.0-1245, included with Hortonworks Data Platform 2.5.0My repo for Apache NiFi "CSVToHive.xml" template, customer demographics data (customer_demographics.header, customer_demographics.csv), "Customer Demographics.json" Apache Zeppelin notebook, customer_demographics_orc_table_ddl.hql database and table DDLsApache Hive 1.2.1 included with HDP 2.5.0Hive configured to support ACID transactions and demo database and customer_demographics created using customer_demographics_orc_table_ddl.hqlStepsImport NiFi TemplateAssuming NiFi is started and the UI available at <NiFiMasterHostName>:8086:/nifi, import the template CSVToHive.xml:screen-shot-2017-03-06-at-74106-pm.pngCreate Data Folder and Upload Data FilesIn your home directory create /home/username/customer_demographic
1. HA provider for webhdfs is needed in your topology. <provider> <role>ha</role> <name>HaProvider</name> <enabled>true</enabled> <param> <name>WEBHDFS</name> <value>maxFailoverAttempts=3;failoverSleep=1000;maxRetryAttempts=300;retrySleep=1000;enabled=true</value> </param></provider> 2. The namenode service url value should contain your name service ID. (This can be found in your hdfs-default.xml under parameter dfs.internal.nameservices) <service> <role>NAMENODE</role> <url>hdfs://chupa</url></service> 3. Make sure webhdfs url for each namenode is added in your WEBHDFS service area. <service> <role>WEBHDFS</role> <url>http://chupa1.openstacklocal:50070/webhdfs</url> <url>http://chupa2.openstacklocal:50070/webhdfs</url></service> 4. Here is a working topology using the knox defau
In previous post we have seen how to Automate HDP installation with Kerberos authencation on single node cluster using Ambari Blueprints. In this post, we will see how to Deploy multinode node HDP Cluster with Kerberos authentication via Ambari blueprint..Note - For Ambari 2.6.X onwards, we will have to register VDF to register internal repository, or else Ambari will pick up latest version of HDP and use the public repos. please see below document for more information. For Ambari version less than 2.6.X, this guide will work without any modifications.Document - https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-release-notes/content/ambari_relnotes-2.6.0.0-behavioral-changes.html.Below are simple steps to install HDP multi node cluster with Kerberos Authentication(MIT KDC) using internal repository via Ambari Blueprints..Step 1: Install Ambari server using steps mentioned under below linkhttp://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-installation/con
Objective This tutorial will walk you through the process of using Ansible to deploy Hortonworks Data Platform (HDP) on Amazon Web Services (AWS). We will use the ansible-hadoop Ansible playbook from ObjectRocket to do this. You can find more information on that playbook here: ObjectRocket Ansible-Hadoop This tutorial is part 2 of a 2 part series. Part 1 in the series will show you how to use Ansible to create instances on Amazon Web Services (AWS). Part 1 is avaiablle here: HCC Article Part 1 This tutorial was created as a companion to the Ansible + Hadoop talk I gave at the Ansible NOVA Meetup in February 2017. You can find the slides to that talk here: SlideShare Prerequisites You must have an existing AWS account. You must have access to your AWS Access and Secret keys. You are responsible for all AWS costs incurred. You should have 3-6 instances created in AWS. If you completed Part 1 of this series, then you have an easy way to do that. Scope This tutorial was tested using the
Found in version Ambari 2.4.2.0 Generation of SmartSense bundle fails with following error:ERROR 2017-02-24 10:52:53,284 shell.py:95 - Execution of command returned 1. Exception in thread "main" java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:857) at java.util.regex.Matcher.replaceAll(Matcher.java:955) at java.lang.String.replaceAll(String.java:2223) at com.hortonworks.smartsense.anonymization.BundleAnonymizer.handleApplyGroupPatternKeyValue(BundleAnonymizer.java:690) at com.hortonworks.smartsense.anonymization.BundleAnonymizer.applyGroupPattern(BundleAnonymizer.java:673) at com.hortonworks.smartsense.anonymization.BundleAnonymizer.applyPropertyRule(BundleAnonymizer.java:612) at com.hortonworks.smartsense.anonymization.BundleAnonymizer.applyRules(BundleAnonymizer.java:393) at com.hortonworks.smartsense.anonymization.BundleAnonymizer.anonymizeFolder(BundleAno
Pre-requsite: 1.Make sure /etc/hosts has the correct ip address and the hostnames and the master hostnames can be pinged from each other . 3. OpenLDAP to be setup. 4. Make sure the logs are captured in a valid log file for slapd process as follows: vi /etc/rsyslog.conf Append the follwowing line to log OpenLDAP messages and restart rsyslogd service: # Point SLAPD logs to /var/log/slapd.loglocal4.* /var/log/slapd.logservice rsyslog restart HA OpenLDAP Sync Setup: The following ldif files needs to be created on the users home directory and should be executed on all the master nodes: basednupdate.ldif syncproc_module.ldif syncproc.ldif addladpservers.ldif NOTE: Please change the cn , dc accordingly. vi /tmp/basednupdate.ldif # updated your base dn below:dn: olcDatabase={1}monitor,cn=configchangetype: modifyreplace: olcAccessolcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth"read by dn.base="cn=Manager,dc=srv
Objective This tutorial will walk you through the process of using Ansible, an agent-less automation tool, to create instances on AWS. The Ansible playbook we will use is relatively simple; you can use it as a base to experiment with more advanced features. You can read more about Ansible here: Ansible. Ansible is written in Python and is installed as a Python module on the control host. The only requirement for the hosts managed by Ansible is the ability to login with SSH. There is no requirement to install any software on the host managed by Ansible. If you have never used Ansible, you can become more familiar with it by going through some basic tutorials. The following two tutorials are a good starting point: Automate All Things With Ansible: Part One Automate All Things With Ansible: Part Two This tutorial is part 1 of a 2 part series. Part 2 in the series will show you how to use Ansible to deploy Hortonworks Data Platform (HDP) on Amazon Web Services (AWS). This tutorial was cr
Business Need: Build Tool Notifications + FunSonicPi is an open source, multiple platform live music synthesizer tool for building music via coding. It's a pretty neat environment and runs on a Mac, RPi, Windows machine or Linux machine. I found a command-line tool that can trigger SonicPi to play your code. I have wired up a dataflow from NiFi to SonicPi, so I can trigger music on demand. My thought is I will tie this into Jenkins and play different songs depending on what's going on. Such as Test Failures, Build Complete, Build Broken, New Deployment, based on various steps in the SDLC.Note: The machine this running on will need Ruby, Gem, Apache NiFi, Sonic Pi and a sound card.Step 1:To trigger Sonic Pi, you must install Sonic Pi Cli, via gem install sonic-pi-cli. Step 2:Run the SonicPI software and have it up and running. As you can see it's a pretty awesome environment, somewhere between a nice IDE and a music tracker.Step 3: ExecuteStreamCommand This calls the com
Part 1: https://community.hortonworks.com/articles/82964/getting-started-with-apache-ambari-workflow-design.htmlPart 2: https://community.hortonworks.com/articles/82967/apache-ambari-workflow-designer-view-for-apache-oo.htmlPart 3: https://community.hortonworks.com/articles/82988/apache-ambari-workflow-designer-view-for-apache-oo-1.htmlPart 4: https://community.hortonworks.com/articles/83051/apache-ambari-workflow-designer-view-for-apache-oo-2.htmlPart 5: https://community.hortonworks.com/articles/83361/apache-ambari-workflow-manager-view-for-apache-ooz.htmlPart 6: https://community.hortonworks.com/articles/83787/apache-ambari-workflow-manager-view-for-apache-ooz-1.htmlPart 7: https://community.hortonworks.com/articles/84071/apache-ambari-workflow-manager-view-for-apache-ooz-2.htmlPart 8: https://community.hortonworks.com/articles/84394/apache-ambari-workflow-manager-view-for-apache-ooz-3.htmlPart 9: https://community.hortonworks.com/articles/85091/apache-ambari-workflow-manager-view-f
Security is very important at all, but most important in production environment. Cloudbreak delivers default settings, but those settings are purposing easy first dating, not security. So first of all what you can do is block all communication ports except 443 on the firewall / security group / what ever you use. Hardly recommended to open SSH port (usually 22) if you have to log in to the Cloudbreak host remotely. Second step is to configure Profile before starting Cloudbreak for the first time. First execute the following command in the directory where you want to store Cloudbreak related files: echo export PUBLIC_IP=[the ip or hostname to bind] > Profile After you have a base Profile you should add custom properties to the Profile file: export UAA_DEFAULT_SECRET='[custom secret]'export UAA_DEFAULT_USER_EMAIL='[default admin email address]'export UAA_DEFAULT_USER_PW='[default admin password]'export UAA_DEFAULT_USER_FIRSTNAME='[default admin first name]'export UAA_DEFAULT_USER_
1. Host a Web Page (index.html) via HTTP GET with 200 OK Status 2. Receive POST from that page via AJAX with browser data 3. Extract Content and Attributes 4. Build a JSON file of HTTP data 5. Store it To accept location in a phone or modern browser you must be running SSL. So I added that for this HTTP Request. Use openssl to create your 2048 RSA X509, PKCS12, JKS Keystore, Import Trust Store and import in browser Your web page can be any web page, just POST back via AJAX or Form Submit. <html><head><title>NiFi Browser Data Acquisition</title><body><script>// Usagewindow.onload = function() { navigator.getBattery().then(function(battery) { console.log(battery.level); battery.addEventListener('levelchange', function() { console.log(this.level); });});};////////////// print these var latitude = ""; var longitude = ""; var ips = ""; var batteryInfo = ""; var screenInfo = screen.width +","+ screen.height + "," + scr
The hadoop.security.auth_to_local under Advanced core-site.xml in HDFS service can be modified to remove spaces in user names. This translation rule is a modification of the default ruleThe default rule has a line which removes the domain name RULE:[1:$1@$0](.*@MYDOMAIN.COM)s/@.*//In order to translate the user name with Spaces "John Doe@MYDOMAIN.COM" to "John_Doe" The following rule can be usedRULE:[1:$1](.* .*)s/ /_/g/L RULE:[1:$1@$0](.*@MYDOMAIN.COM)s/@.*//The first rule replaces the Space with the Underscore while retaining the MYDOMAIN.COM and allows second rule also to be respected. This results in successful replacement of usernames with spaces to underscores.
Ambari Infra Solr Fails to start with "Unrecognized option: --secure-solr-znode" check the versions of ambari-infra like below, notice the version mis-match between client and server.[root@master1 zookeeper]# rpm -qa | grep ambariambari-infra-solr-client-2.4.2.0-136.x86_64ambari-infra-solr-2.5.0.0-771.x86_64Upgrade ambari-infra-solr-client
Download the HDC cli from the cloud controller Although it's possible to download the cli from the cloud controller UI we're going to use CURL for this, since we're about to automate the process. All we need is the address of the cloud controller (we make sure with $(uname) that we download the appropriate binary for our OS, note: all of the instance references are examples, there is no real running aws instance): curl -kL https://ec2-34-251-140-175.eu-west-1.compute.amazonaws.com/hdc-cli_$(uname)_x86_64.tgz | tar -xzOnce it's downloaded we can verify it's version: ./hdc --versionhdc version 1.13.0-2017-02-09T08:56:06 Configure the cli to use our cloud controllerThe cli can connect to multiple cloud controllers by providing it's address and credentials. Each command has parameters to provide these informations (even can be configured with environment variables): --server value server address [$CB_SERVER_ADDRESS] --username value user name (e-mail address) [$CB_USER_NAME] --pas
Q: How and when was Apache Ranger incubated and what is its current status in Apache? Is it a top level project (TLP)?About two years ago, Hortonworks donated the entire code base of about 440,000 lines from its XA Secure acquisition to the Apache Software Foundation (ASF) in order to help jump start Apache Ranger as an Apache Incubator project. It’s been a rewarding journey, from the first version of Apache Ranger released in November 2014, to achieving a major milestone by graduating to a top level Apache open source project. We are excited to report that recently ASF graduated Apache Ranger to a Top-Level Project (TLP) “signifying that the project's community and products have been well-governed under the ASF's meritocratic process and principles.” We, at Hortonworks, extend our hearty congratulations to the Apache Ranger community, without whom TLP status couldn’t have been achieved. This was a great community effort, representing the best of open source and the “Apache Way”!Q: Why
When synchronizing users from AD or LDAP to Ranger using usersync, It is possible that there are spaces in usernames. These spaces in user names and Group Names may be replaced by SSSD to use underscores. (Example SSSD config section below. [sssd]override_space = _ Ranger needs to synchronize users similarly to avoid issues in access permission setup. To enable Ranger to perform this conversion , the following flags can be added to "Ranger --> Configs --> Advanced --> custom ranger-ug-site" By adding 2 propertiesranger.usersync.mapping.groupname.regex, ranger.usersync.mapping.username.regex These two properties can be set to s/ /_/gAfter setting these properties restart ranger service using Ambari and then restart Ranger user sync. User sync will add new user names with Underscores in the user name. Older usernames and group names with Spaces will need manual cleanup. Note: This f
MiNiFi C++ implemented the secure site to site raw socket transport using OpenSSL/TLS.PR MINIFI-184: Add Security Support https://github.com/apache/nifi-minifi-cpp/commit/63dbb8241e851068bff54ab8cef8310cc4a22cb5 implemented the sameIt is using both client and server certificate to do mutual authentication between client and server via OpenSSL/TLS.Please look at http://bryanbende.com/development/2016/08/30/apache-nifi-1.0.0-secure-site-to-site about setting up the NiFi server site security configuration. Before you start to configure MiNiFi C++, you need to have client certificate PEM file, client private key PEM file, client CA certificate PEM file, passphrase to the client certificate. Client certificate PEM file, client private key PEM file can be combined into a single PEM file.You can use openssl tool to convert different certificates formats between PEM/PKCS, etc.Modify conf/minifi.properties to add Site to Site secure setting### Site2Site Security Configuration in minifi.prop
ProblemI have my shiro configured as[users] # List of users with their password allowed to access Zeppelin. # To use a different strategy (LDAP / Database / ...) check the shiro doc at http://shiro.apache.org/configuration.html#Configuration-INISections #admin = password1 admin = change #user1 = password2, role1, role2 #user2 = password3, role3 #user3 = password4, role2 # Sample LDAP configuration, for user Authentication, currently tested for single Realm [main] ldapRealm = org.apache.zeppelin.server.LdapGroupRealm ldapRealm.contextFactory.environment[ldap.searchBase] = ou=my,ou=company,o=com ldapRealm.userDnTemplate = uid={0},ou=my,ou=company,o=com ldapRealm.contextFactory.url = ldap://<ldap_host>:389 ldapRealm.contextFactory.authenticationMechanism = SIMPLE # doc horton ldapRealm.contextFactory.systemUsername = <system_username_bind>ldapRealm.contextFactory.systemPassword = <system_username_password> #sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSess
Sometime we get a situation where we have to get lists of all long running and based on threshold we need to kill them.Also sometime we need to do it for a specific yarn queue. In such situation following script will help you to do your job.#!/bin/bashif [ "$#" -lt 1 ]; then echo "Usage: $0 <max_life_in_mins>" exit 1fiyarn application -list 2>/dev/null | grep "report" | grep "RUNNING" | awk '{print $1}' > job_list.txtfor jobId in `cat job_list.txt`dofinish_time=`yarn application -status $jobId 2>/dev/null | grep "Finish-Time" | awk '{print $NF}'`if [ $finish_time -ne 0 ]; then echo "App $jobId is not running" exit 1fitime_diff=`date +%s`-`yarn application -status $jobId 2>/dev/null | grep "Start-Time" | awk '{print $NF}' | sed 's!$!/1000!'`time_diff_in_mins=`echo "("$time_diff")/60" | bc`echo "App $jobId is running for $time_diff_in_mins min(s)"if [ $time_diff_in_mins -gt $1 ]; then echo "Killing app $jobId" yarn application -kill $jobIdelse echo "App $job
In the big data and distributed system world you may have done a world class job in dev and Unit testing, chances are you still did it on sample data moreover in dev you might not have done it in a truly distributed system but more on one machine simulating distribution. Hence on the prod cluster you could rely on logs and sometime you would also like to connect a remote debugger and other tools you are used to. In this blog post I will go over an example in Java and Eclipse. Partly because I use those and also because I see mostly scala examples so let’s give java a little love.Setting upI have installed a Hortonworks sandbox for this exercise, you can donwload it here. You will also need to open up a port to bind on, on the last post I used port 7777 i’ll stick with this here as well.First we will use a very standard wordcount example you can get in all the spark tutorials. Set up a quick maven project to bundle your jar and dependent libs you might be using. Notice the breakpoint on
Caveat: This feature has been validated by HWX engineer manually but we don't officially support it at the moment.Environment: HDP-2.5.3.0-37Ambari-2.4.2.0-136JDK1.8Kerberos enabledRanger enabledDue to security limitations, we can only launch flume agent processes in Ambari.STEP 1: Create/modify flume configuration file.Ambari -> Flume -> Configs -> flume.conf# Flume agent config#### Global ####demo.sources = logtcp logudpdemo.channels = kafka_channeldemo.sinks = sink#### Sources ####demo.sources.logtcp.type = multiport_syslogtcpdemo.sources.logtcp.ports = 9515demo.sources.logtcp.host = 0.0.0.0demo.sources.logtcp.keepFields = truedemo.sources.logtcp.selector.type=replicatingdemo.sources.logtcp.channels= kafka_channeldemo.sources.logudp.type = syslogudpdemo.sources.logudp.port = 9515demo.sources.logudp.host = 0.0.0.0demo.sources.logudp.keepFields = truedemo.sources.logudp.selector.type=replicatingdemo.sources.logudp.channels = kafka_channel#### Sinks ####demo.sinks.sink.type =
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.