Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
Introduction - Here is a small demo how NiFi can help you monitor and alert on YARN Application failure. - Here you can view the screen recording that Demonstrates how it works!Prerequisite - Make sure you have your HDP cluster/Sandbox up and running. - NiFi_0.6.1//HDF_1.2 is available up and running.Steps: 1. Assuming you have NiFi UI Available, lets drop GetHTTP processor to pull data from YARN REST API: Configure Processor with URL given as below, which pulls all Applications in Killed and Failed state. node1 is my Resource Manager: http://node1:8088/ws/v1/cluster/apps?states=KILLED,FAILED Lets schedule the processor to run only every 10sec so that you don’t query too often. 2. As the Rest call outputs the application details in Json format, lets use a SplitJson processor to separate individualapplication details. Provide “JsonPath Expression” value as “$.apps.app” in the configuration. 3. Connect GetHTTP to SplitJson for success relation and auto terminate r
HDF DevOps It's become enough of an ask that I had to post to answer it. The ask is something like this, "What's with all this UI stuff, I want devops, automation, command line et al." So did I in 2002. It's nice to see everything and have a nice diagram on a website without any extra tools or ssh. Okay that didn't convince anyone. So here is a proper DevOps solution for you. Option 1: REST The full documentation for the NiFi REST API is here: https://nifi.apache.org/docs/nifi-docs/rest-api/ The follow is some examples I have accessed via CURL (if you have security, you will need to account for that, see the specifications. curl http://hw13125.local:8080/nifi-api/resources curl http://hw13125.local:8080/nifi-api/tenants/user-groups curl http://hw13125.local:8080/nifi-api/tenants/users curl http://hw13125.local:8080/nifi-api/flow/about curl http://hw13125.local:8080/nifi-api/flow/banners curl http://princeton1.field.hortonworks.com:8080/nifi-api/flow/bulletin-board curl http://hw13125.l
PROBLEM I have a non kerberized cluster. I did apply https://community.hortonworks.com/articles/81910/how-to-enable-user-impersonation-for-jdbc-interpre.html however the jdbc intepreter is still not impersonated. NOTE: From HDP 2.6.2 (Zeppelin 0.7.2) JDBC interpreter on non-kerberised cluster is impersonated by having the following property added into Zeppelin UI -> Interpreter -> JDBC config: hive.proxy.user.property=hive.server2.proxy.user SOLUTION1. Go to Zeppelin UI -> Interpreter The configuration for JDBC hive interpreter should look like 2. Edit JDBC interpreter Remove properties hive.user and hive.password and save the changes. So, now the configuration looks like 3. Go to Zeppelin UI -> Credential Add the credentials for the user like Entity: jdbc.jdbc Username: <username> Password: <password> 4. Run the query Go to your notebook and run the jdbc query for hive. In RM UI this query is now running by YOU
SymptomsWhen attempting to create a Cloudera Altus cluster in AWS, it fails with INTERNAL_CM_CMD_FAIL DiagnosisCM Deployment is failing at the creation / deployment of CM services due to incorrect or unexpected DNS hostnames of the AWS EC2 instances created for Cloudera Altus.Cloudera Altus requires the options DNS hostnames and DNS resolution are enabled (set to yes) within the AWS VPC settings SolutionSet and confirm DNS hostnames and DNS resolution are set to yes in the AWS VPC used for Cloudera Altus.Details for configuring AWS VPCs with DNS is available here:https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-dns.htmlOnce the AWS VPC DNS settings of the Cloudera Altus Environment are enabled, ensure to delete the previous cluster creation attempt's EC2 instances, both within a Cloudera Altus console, as well as through the AWS EC2 interfaceRetry creating a new Cloudera Altus cluster with the updated settings
If you have recently upgraded from HDP-2.6.1 to HDP-2.6.2, you may end up facing this issue.I have seen this for a Kerberized Cluster and doAs=true in Hive.You may have carried over same configurations for Zeppelin, Interpreter, Hive from 2.6.1 to 2.6.2 yet a simple query like'show databases' may result in this error stacktrace shown below:org.apache.zeppelin.interpreter.InterpreterException: Error in doAs at org.apache.zeppelin.jdbc.JDBCInterpreter.getConnection(JDBCInterpreter.java:415) at org.apache.zeppelin.jdbc.JDBCInterpreter.executeSql(JDBCInterpreter.java:633) at org.apache.zeppelin.jdbc.JDBCInterpreter.interpret(JDBCInterpreter.java:733) at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:101) at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:502) at org.apache.zeppelin.scheduler.Job.run(Job.java:175) at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelSc
Objective:Accessing REST API of Kerberized NiFI Cluster using Bearer TokenPrerequisites:CURL or Postman Installed on Your Laptopkinit - Successful for sales1 userFirefox browser with proper config (network.negotiate)Inside Firefox -> Open New Tab & Type -> about:configFilter by networknetwork.negotiate-auth.trusted-uris -> .us-west-2.compute.internalnetwork.negotiate-auth.delegation-uris ->.us-west2.compute.internalSPNEGO NiFi - Successful when you hit NiFi Home Page URL (sales1).Next steps/Plan:On Nifi Home Page, Enable Developer Tools & Monitor Network Logs to get the Bearer Token (under current-user and Authorization part of Request Headers)Lets use the Bearer Token we got to populate the below commands.CURL option:curl ‘
Recently I come across this command line Ldap connection tool, which is very useful while setting Ranger UserSync. This tool collects minimal input from admin about the ldap/AD server and discovers various properties for users and groups in order to successfully pull only targeted Users and Groups from the Ldap/AD server.DetailsLdap Connection check tool is a command line tool and can be run on any machine where Java is installed and Ldap/AD server access is available. This tool can be used to discover not only user sync related properties but also authentication properties if needed. It also generates ambari configuration properties as well as install properties for manual installation. User is also provided an option to discover both the user and group properties together or separately. As part of the tool, a template properties file is provided for the user to update the values specific to the setup.Tool usageIn order to learn details on how to use the tool, the tool also provides
Environment: HDP on AWS EC2 instances.Problem: When trying to execute a hive ddl script, we get the error file does not exist. Upon checking the file exists and also has the read write privileges. Root Cause: The directory where the script exists does not have read write permission to the user.Solution: Open the directory permission to include the necessary read, write permission to the user.Following is a screenshot that shows the problem and solution used to fix it.
Use S3 as storage for Zeppelin Notebooks.Step 1. Use external storage to point to S3 bucket in Cloudbreak advance options. This will use S3access profile and AWS credentials. CB takes care of that set up. In addition to thatStep 2 Change these 3 inzeppelin-env.shexport ZEPPELIN_NOTEBOOK_S3_BUCKET=yourBucketNameexport ZEPPELIN_NOTEBOOK_S3_ENDPOINT="http://s3.amazonaws.com/yourBucketName" export ZEPPELIN_NOTEBOOK_S3_USER=adminStep 3 Change this 1 inzeppelin-site.xmlPoint zeppelin.notebook.storage to org.apache.zeppelin.notebook.repo.S3NotebookRepoDetailed Steps below1.Complete AWS pre-requisites2.Create AWS credentials in Cloudbreak3.Launch HDP cluster on AWS using Cloudbreak.4.Enable Zeppelin Storage on S3.3. Launch HDP Cluster on AWS using Cloudbreak.Not all the screenshots are included, only capturing screenshots that focus on some key Advance features that enable the required Zeppelin Storage. a.Use the Advance tab on Cloudbreak.b.Cloudbreak uses AWS credentials that will provide the
Short Description:This article walks you through how to deploy a custom parser on kerberized cluster in Metron .ArticleWhen adding a net new data source to Metron, the first step is to create kafka topic 'sensor_topic' to push the events from the new telemetry data source into Metron. The second step is to configure Metron to parse the telemetry data source so that downstream processing can be done on it. This wiki doc will walk you through how to perform both of these steps. In this article I have added steps to perform the same operation on a kerberised cluster. On kerberised cluster we need to add the required ACL's to metron user and parser group for the created topic. Also we need to provide the storm authorization while deploying the topology. 1. Switch to the kafka user . su kafka 2. create sensor topic /usr/hdp/current/kafka-broker/bin/kafka-topics.sh --zookeeper $ZOOKEEPER --create --topic sensor_topic_name --partitions 1 --replication-factor 1 3. Add required ACL to metr
Being a secured cluster, the data transfer protocol of DataNode does not use the RPC framework of Hadoop, DataNode must authenticate itself by using privileged ports which are specified by dfs.datanode.address and dfs.datanode.http.address. This authentication is based on the assumption that the attacker won’t be able to get root privileges. When you execute hdfs datanode command as root, server process binds privileged port at first, then drops privilege and runs as the user account specified by HADOOP_SECURE_DN_USER. You can identify that it is a kerberized cluster from the ps -ef output, in the end it says SecureDatanode. "XX:+PrintGCDateStamps -Xms2048m -Xmx2048m -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT -Dhadoop.security.logger=INFO,RFAS org.apache.hadoop.hdfs.server.datanode.SecureDataNodeStarter" ps -ef|grep datanode ( have cut short the output for space purpose)root 2454 1 0 Jul27 ? 00:00:00 jsvc.exec -Dproc_datanode -outfile /var/log/hadoop/hdfs/j
Topic: IoT Edge Processing with Apache NiFi and MiniFi and Multiple Deep Learning LibrariesPart 1: Multiple Devices with DataKeywords: Deep Learning On The Edge, GPS Ingestion, Sense-Hat and Rainbow Hat Sensor Ingest, WebCam Image IngestIn preparation for my talk at Strata in NYC, I am updating my IoT demos for more devices, more data types and more actions.I have three streams coming from each device including web camera images. When we are sending data from a MiniFi agent we need to define a port on an Apache NiFi server/cluster to receive it.So I design my MiniFi flow in the Apache NiFi UI (pretty soon there will be a special designer for this). You then highlight everything there and hit Create Template. You can then export it and convert to config.yml. Again, this process will be automated and connected with the NiFi Registry very shortly to make this less clicks.This is an example. When you connect to it in your flow you design in Apache NiFi UI you will connect to
Ingesting Blockchain data from btc.com and blockchain.com(.info).Like everything in Apache NiFi, this is trivial easy to ingest all these different feeds, process them, route them and store them for SQL access.API:blockchain.comhttps://blockchain.info/latestblockhttps://api.blockchain.info/charts/transactions-per-second?timespan=5weeks&rollingAverage=8hours&format=jsonhttps://blockchain.info/blocks/BTC.com?format=jsonhttps://api.blockchain.info/pools?timespan=5dayshttps://api.blockchain.info/statshttps://blockchain.info/tickerhttps://blockchain.info/tobtc?currency=USD&value=10000Blocks For Today
A quick example NiFi flow to demonstrate sending logs to syslog from NiFi.Steps:1. Wait for new compressed files (gz) to land in folder (/tmp/nifi/syslog/src/*.gz) with log lines.2. Decompress the file3. Split the file into individual lines4. Send data to syslogNiFi Template : Download the following NiFi template and import the flow into your NiFi instance. Instructions to import a NiFi template is available here - Importing NiFi templatessend-to-syslog.xmlSend to Syslog Template Walkthrough :The Flow is broken down into 3 sectionsSection 1 : Test Data GenerationSection 2 : Processing (decompress files and send to local syslog)Key HighlightsExtractText Processor :We are using the extract text processor to get the content of the flowfile into the flowfile attribute "msg". We are grabbing the entire content of the flowfile into "msg" by using the regular expression (.*). You may get only specific fields by providing appropriate regular expression here.PutSyslog processor :We are using t
This article mainly focuses mainly on what all supported options available in User sync and how they can be used to target specific use cases. For some common use cases examples and how ranger can be configured in those cases, please refer to Configuring Ranger UserSync with AD/LDAPUser based search without enable group sync: This configuration can be used in cases where customers want to sync users based on a OU or a user search filter and get all the groups the users belong to.This case is supported only when the user object has the group membership attributes like “memberof” or “ismemberof”. This option is available only in Full sync case (i.e., when Incremental sync is disabled in Ranger User sync configuration)User based search with enable group sync: This configuration can be used in cases where - customers want to sync users based on a OU or a user search filter and want to limit the groups that these user belong to based on the OU or a group search filter.Group membership attri
Short Description:In this tutorial we will install the browser connected version of RServer on to the HDP Sandbox.ArticleInstalling RStudio on HDP Sandbox IntroductionRStudio is an Integrated Development Environment (IDE) for the R language which includes a direct code execution console, as well as tools for plotting and debugging, you can find more information about the RStudio features here.RStudio is used as the primary tool in the Predicting Airline Delays using SparkR Hortonworks tutorial in which you will learn to train and analyze Machine Learning models to predict Airline delays.PrerequisitesDownload the latest HDP SandboxComplete the Learning the Ropes of the Hortonworks Sandbox tutorial1. SSH on to the SandboxUse the following command to SSH on to the Sandbox as root user:ssh root@sandbox-hdp.hortonworks.com -p 2222NOTE: If this is your first time signing on the default password is hadoop.2. Begin installationOn CentOS 7, the base OS for the Sandbox, R is available through th
1. Installed expect first:# yum install expect -y (or use your Linux distribution's package manager if you're not Using CentOS or RHEL)2. Then create and run the following expect script: # cat /tmp/ambari-server-sync-ldap-unattended.sh#!/usr/bin/expect set timeout 20spawn /usr/sbin/ambari-server sync-ldap --groups=/etc/ambari-server/ambari-groups.csvexpect "Enter Ambari Admin login:" { send "admin\n" }expect "Enter Ambari Admin password:" { send "notTheRealPasswordOfCourse\n" }interact3. If customer wants password to NOT be in plain text, ask them to look at something like Ansible which handles decrypting passwords from a file.
Tokens are wire-serializable objects issued by Hadoop services, which grant access to services. Some services issue tokens to callers which are then used by those callers to directly interact with other services without involving the KDC at all. Block Tokens A BlockToken is the token issued for access to a block; it includes:(userId, (BlockPoolId, BlockId), keyId, expiryDate, access-modes)Block Keys Key used for generating and verifying block tokens. Block Keys are managed in the BlockTokenSecretManager, one in the NN and another in every DN to track the block keys to which it has access.How this Works:1. Client asks NN for access to a path, identifying via Kerberos or delegation token. 2. Client talks to DNs with the block, using the Block Token. 3. DN authenticates Block Token using shared-secret with NameNode. 4. if authenticated, DN compares permissions in Block Token with operation requested, then grants or rejects the request. The client does not have its identity checked b
Roaring Elephant Podcast – Episode 92 – Roaring newshttps://roaringelephant.org/2018/06/12/episode-92-roaring-news/Another week, another edition of Roaring Big Data News. This time, Dave talks about driving teens and Jhon takes a detailed look at an Eventbrite data pipeline article. Breaking NewsPlay in new window | Download (Duration: 46:08 — 31.9MB)Dave Driver monitoring isn’t just for teens; adults can benefit, too https://arstechnica.com/cars/2018/05/buicks-smart-driver-explains-why-my-gas-mileage-sucks-and-my-editors-doesnt/ Jhon Looking under the hood of the Eventbrite data pipeline! https://www.eventbrite.com/engineering/looking-under-the-hood-of-the-eventbrite-data-pipeline/ Please use the Contact Form on this blog or our twitter feed to send us your questions, or to suggest future episode topics you would like us to cover.
A distributed compute engine for pricing financial derivatives using QuantLib with Spark running in Docker containers on YARN with HDP 3.0. Introduction Modern financial trading and risk platforms employ compute engines for pricing and risk analytics across different asset classes (equities, fixed income, FX etc.) to drive real-time trading decisions and quantitative risk management. Pricing financial instruments involves a range of algorithms from simple cashflow discounting to more analytical methods using stochastic processes such as Black-Scholes for options pricing to more computationally intensive numerical methods such as finite differences, Monte Carlo and Quasi Monte Carlo techniques depending on the instrument being priced – bonds, stocks or their derivatives – options, swaps etc. and the pricing (NPV, Rates etc) and risk (DV01, PV01, higher order greeks such as gamma, vega etc.) metrics being calculated. Quantitative finance libraries, typically written in low level p
Context Hortonworks tutorials are a great resource and one I use often to explore new topics or re-enforce my current knowledge. Recently, I went through the Predicting Airline Delays using SparkR tutorial. This tutorial is using SparkR and RStudio, running on the HDP Sandbox. For those, like me, who want to run rstudio on an HDP node running on something else than the sandbox, the configuration of rstudio differs a little from the article linked in this tutorial, which is why I thought of writing this quick article. This tutorial will thus detail the installation and unit testing of RStudio Server for the following environment versions: Hortonworks Data Platform: HDP 2.6 OS: Centos 7 64bit Cloud Infrastucture: OpenStackInstalling rstudio-server on Centos 71. Connect to the server onto which you want to install rstudio-server:$ ssh [your_user]@[your_server]Note: the user with which you connect must have sudo priviledges.2. Install R:$ sudo yum install R -y3. Once connected, fo
The ProblemTraditional 'distcp' from one directory to another or from cluster to cluster is quite useful in moving massive amounts of data, once. But what happens when you need to "update" a target directory or cluster with only the changes made since the last 'distcp' had run. That becomes a very tricky scenario. 'distcp' offers an '-update' flag, which is suppose to move only the files that have changed. In this case 'distcp' will pull a list of files and directories from the source and targets, compare them and then build a migration plan.The problem: It's an expensive and time-consuming task. Furthermore, the process is not atomic. First, the cost of gathering a list of files and directories, along with their metadata is expensive when you're considering sources with millions of file and directory objects. And this cost is incurred on both the source and target namenode's, resulting in quite a bit of pressure on those systems.It's up to 'distcp' to reconcile the difference between
ProblemI have a problem with accessing spark history data for killed streaming jobs. The problem looks like the one mentioned here:When I click on History under Tracking UI for the FINISHED Spark Job I am redirected to: http://dan3.dklocal:18080/history/application_1491987409680_0013/jobs/ - Spark History URL However, when doing the same for the KILLED one I am redirected to: http://dan3.dklocal:8088/cluster/app/application_1491987409680_0012 - application log on RM UI. And the need is to be redirected for the KILLED jobs to Spark History URL.SolutionKilling the spark job using 'yarn application -kill' is the not the right way of doing it.When doing: 'yarn application -kill' - the job got killed (status in RM UI is State: KILLED, FinalStatus: KILLED), the '.inprogress' suffix got removed. But the History does not go to Spark History but RM log. When having done: kill -SIGTERM <Spark Driver>, the job also get killed. In RM UI is State: FINISHED, FinalStatus: SUCCEEDED, t
HiveServer2 is a thrift server which is a thin Service layer to interact with the HDP cluster in a seamless fashion. It supports both JDBC and ODBC driver to provide a SQL layer to query the data. An incoming SQL query is converted to either TEZ or MR job, the results are fetched and send back to client. No heavy lifting work is done inside the HS2. It just acts as a place to have the TEZ/MR driver, scan metadata infor and apply ranger policy for authorization. HiveServer 2 maintains two type pools 1. Connection pool : Any incoming connection is handled by the HiveServer2-handler thread and is kept in this pool which is unlimited in nature but restricted by number of threads available to service an incoming request . An incoming request will not be accepted if there are no free HiveServer2-handler thread to service the request. The total no of threads that can be spawnned with the HS2 is controlled by parameter hive.server2.thrift.max.worker.thread.2. Session pool (per queue) : t
Key Take away :1. For a hiveServer2 client the connection time seen is the total time to interact with AD(TGT + Zookeper Service ticket + HiveServer2 Service Ticket) + Zookeeper + HiveServer2 (mysql + YARN allocation).2. In case your AD is slow, the hive connection will take long time. 3. time beeline -u "zookeeper String" -e "select 1" can be used to find how much time the beeline is taking.4. In general it takes 4 to 10 seconds for connection to establish. 5. Neither AD, zookeeper or HiveServer2 can ever deny a connection, the connection time can be more but it can never be denied ideally.6. Clients can only have a timeout (configurable parameter in most of clients like HUE, SAS, Alation, health check scripts ), as neither zookeeper of HS2 can ever deny a connection. 7. HiveServer2 will try to allocate resources in YARN before acking that it has accepted connection. In case your queue is full The connection time will be impacted. 8. Kindly set hive.server2.tez.initialize.defaul
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.