Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
Ambari server typically gets to know about the service availability from Ambari agent and using the '*.pid' files created in /var/run. Following covers couple of scenarios to troubleshoot:Scenario 1: Ambari Agent is not communicating appropriately with Ambari ServerIf all the services are shown to be down in a given node, then it is most likely an Ambari agent issue.Following steps could be used to troubleshoot Ambari agent issues# ambari-agent status Found ambari-agent PID: 19715 ambari-agent running. Agent PID at: /var/run/ambari-agent/ambari-agent.pid Agent out at: /var/log/ambari-agent/ambari-agent.out Agent log at: /var/log/ambari-agent/ambari-agent.logand check if the pid indeed exist by doing a ps -ef. In case the pid doesn't exist, also run ps -ef | grep 'ambari_agent' to see if a stale process is around. Eg,# ps -ef | grep "ambari_agent" root 18626 13528 0 04:45 pts/0 00:00:00 grep ambari_agent root 19707 1 0 Feb17 ? 00:00:00 /usr/bin/python2 /usr/lib/p
1. Configure the FTP client (Below is a screenshot from Cyberduck)2. Refer the below link for the HDP stack version http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.1.0/bk_ambari-installation/content/hdp_stack_repositories.htmlFor ex: I'm interested in this repohttp://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.5.0.0/hdp.repo3. Navigate to the above path manually, right click the respective hdp.repo and select HTTPS URL. In the below screen print I have showed the same and you'll download the tar file in HTTPS. Hope this helps!Thanks
Getting started with MiNiFiIn this tutorial, we will learn how configure MiNiFi to send data to NiFi: Installing HDFInstalling MiNiFiSetting up the Flow for NiFiSetting up the Flow for MiNiFiPreparing the flow for MiNiFiConfiguring and starting MiNiFiEnjoying the data flow!ReferencesFor a primer on HDF, you can refer to the tutorials here Tutorials and User GuidesInstalling HDF If you do not have NiFi installed, please follow the instructions found hereNOTE: The above installation guide is for HDF 1.2.0.1, this is the version that matches Apache MiNiFi 0.0.1. Although HDF 2.0 may work, for this exercise -- it is not recommended at this time. Installing MiNiFiNow that you have NiFi up and running it is time to download and install MiNiFi. Open a browser. Download the MiNiFi Binaries from Apache MiNiFi Downloads Page. There are two options: tar.gz a format tailored to Linux and a zip file more compatible with Windows. If you are using a Mac either option is just fine. Figure 1. MiNiFi d
For the Devops crowd, you can take it a step further and automate provisioning of Ambari server. For that consider using community contributions like https://supermarket.chef.io/cookbooks/ambari if you were to use Chef, for example. For an exhaustive tour of the REST API, consult the docs https://github.com/apache/ambari/blob/trunk/ambari-views/docs/index.mdThis recipe assumes you have an unsecured HDP cluster with Namenode HA. Tested on Ambari 2.4.2.# list all available views for the current version of Ambaricurl --user admin:admin -i -H 'X-Requested-By: ambari' -X GET http://localhost:8080/api/v1/views/# get Files View onlycurl --user admin:admin -i -H 'X-Requested-By: ambari' -X GET http://localhost:8080/api/v1/views/FILES# get all versions of Files View for the current Ambari releasecurl --user admin:admin -i -H 'X-Requested-By: ambari' -X GET http://localhost:8080/api/v1/views/FILES/versions# get specific version of FILES view curl --user admin:admin -i -H 'X-Requested-By: ambari'
Building schemas is tedious work and fraught with errors. The InferAvroSchema processor can get you started. It generates a compliant schema for use. There is one caveat, you have to make sure you are using Apache Avro safe field names. I have a custom processor that will clean your attributes if you need them Avro-safe. See processor listed below.Example Flow Utilizing InferAvroSchemaInferAvroSchema DetailsStep 0: Use Apache NiFi to Convert Data to JSON or CSVStep 1: Send JSON or CSV Data to InferAvroSchemaI recommend setting output destination to flowfile-attribute, input content type to json, pretty avro output to true.Step 2: The New schema is now in attribute: inferred.avro.schema.inferred.avro.schema{ "type" : "record", "name" : "schema1", "fields" : [ { "name" : "table", "type" : "string", "doc" : "Type inferred from '\"schema1.tableName\"'" } ] } This schema can then be used for conversions directly or stored in Hortonworks Schema Registry or Apache NiFi Built-
Overview There are a couple of different options for importing data from Teradata into Hadoop: Sqoop and the Teradata JDBC driver (documentation) Hortonworks Connector for Teradata (documentation) Teradata Connector for Hadoop (TDCH) (download README here or get the PDF doc) This article will explore examples of each of the three above along with some of the pros/cons. The aim of this document is help understand when to use each option while keeping the following in mind: Goal is to create a schema which is as close to Teradata as possibleHive tables will usually end up as ORC but may need intermediate tables stored as TEXTFILE. The examples below use textfile.I have not tested all possible column types. If you have more information, please let me know.Versions tested with: HDP 2.3.2, Sqoop 1.4.6, TDCH 1.4.1 or 1.4.4 All of the examples will use the following common environment variables which you would define at the top of a bash script. The variables are plugged in to the v
In one of the previous articles Extending SAM with Custom Processors & User Defined Functions we saw how SAM can be extended to incorporate any custom processing logic using Custom Processors & User Defined Functions. That is a very useful feature if one is writing application logic from scratch. However, there are cases where such code is already written and one wants to reuse that code. A good example of this is an existing Apache Storm Spout or Bolt that is interacting with a proprietary system. How would one be able to plug in such a Spout or Bolt in SAM? This is what this article will attempt to explain.For people who are more hands on and want to try out adding a Custom source to SAM and run it as part of a SAM application we have created an example at SAM Custom Source. Please follow the instructions in README.md to execute the steps on your existing SAM installation. For people who want to first get in to the details, continue reading on the rest of this article. You
1) Enable librdkafka extensionPlease reference https://github.com/apache/nifi-minifi-cpp/blob/master/README.mdcmake -DENABLE_LIBRDKAFKA ..2) Configure PublishKafka Processor with below propertiesKnown Brokers: A comma-separated list of known Kafka Brokers in the format <host>:<port> which map to kafka configuration bootstrap.serversTopic Name: The Kafka Topic of interestDelivery Guarantee: Specifies the requirement for guaranteeing that a message is sent to Kafka like all/1/0 which map to kafka configuration request.required.acksMax Request Size: Maximum Kafka protocol request message size which map to kafka configuration message.max.bytesRequest Timeout: The ack timeout of the producer request in milliseconds which map to request.timeout.msClient Name: Client Name to use when communicating with Kafka which map to kafka configuration client.idBatch Size: Maximum number of messages batched in one MessageSet which map to kafka configuration batch.num.messagesQueue Buffering M
Mandatory Pre-requisiteUpgrade JDK from 1.7 to 1.8If the step is missed it will result in to below errors. Nodemanager will fail to start if spark shuffle service is enabled."java.lang.UnsupportedClassVersionError: org/apache/spark/network/yarn/YarnShuffleService : Unsupported major.minor version 52.0" Hive Metastore will fail to start."Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/hadoop/hive/ql/log/NullAppender : Unsupported major.minor version 52.0" Service checks will fail. YarnHiveFinalize upgrade will fail and cluster have to be downgraded.
Summary Because patients visit many doctors, trends in their ailments and complaints may be difficult to identify. The steps in this article will help you address exactly this problem by creating a TagCloud of the most frequent complaints per patient. Below is a sample: We will generate random HL7 MDM^T02 (v2.3) messages that contain a doctor's note about a fake patient and that patient's fake complaint to their doctor. Apache NiFi will be used to parse these messages and send them to Apache Solr. Finally Banana is used to create the visual dashboard. In the middle of the dashboard is a TagCloud where the more frequently mentioned symptoms for a selected patient appear larger than others. Because this project relies on randomly generated data, some interesting results are possible. In this case, I got lucky and all the symptoms seem related to the patient's most frequent complaint: Morning Alcohol Drinking. The list of all possible symptoms comes from Google searches. Summary of step
This is for HDP 2.5 only. If you are seeing the same error HDP 2.6, there could be something else that has failed before this stage. Please check the full log. After enabling Hive LLAP, it fails to start with: ERROR impl.LlapZookeeperRegistryImpl: Unable to start curator PathChildrenCache. Exception: {}org.apache.zookeeper.KeeperException$InvalidACLException: KeeperErrorCode = InvalidACL for /llap-sasl/user-hive at org.apache.zookeeper.KeeperException.create(KeeperException.java:121) ~[zookeeper-3.4.6.2.5.0.0-1245.jar:3.4.6-1245--1] at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) ~[zookeeper-3.4.6.2.5.0.0-1245.jar:3.4.6-1245--1] at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783) ~[zookeeper-3.4.6.2.5.0.0-1245.jar:3.4.6-1245--1] at org.apache.curator.utils.ZKPaths.mkdirs(ZKPaths.java:232) ~[curator-client-2.7.1.jar:?] at org.apache.curator.utils.EnsurePath$InitialHelper$1.call(EnsurePath.java:148) ~[curator-client-2.7.1.jar:?] Steps to fix: 1. /
This article provides an overview of various debugging aspects of the system when using LLAP - how are things run, where logs are located, what monitoring options are available, etc. See the parent article for architecture overview and specific issue resolution.HS2 when using LLAP When using LLAP (“Hive interactive”), Ambari starts a separate HS2 (HS2 Interactive). This HS2 is not connected to the other HS2, and has a separate connection string, machine (or ports), configuration and logs . HS2 interactive and LLAP configs in Ambari are split similarly to regular Hive configs, but have “-interactive-“ in their name. HS2 interactive logs are called “hiveServer2Interactive” and are separate from regular HS2 logs.YARN apps when using LLAP; getting query logs Ambari starts LLAP as a YARN app that is shared by everyone using the cluster. It should have N+1 containers, where N is the number of LLAP daemons, and there’s slider AM. LLAP YARN app is called “llap0” by default:Tez sessio
The Apache Ambari project is aimed at making Hadoop management simpler by developing software for provisioning, managing, and monitoring Apache Hadoop clusters. Ambari provides an intuitive, easy-to-use Hadoop management web UI backed by its RESTful APIs.Ambari enables System Administrators to:Provision a Hadoop ClusterAmbari provides a step-by-step wizard for installing Hadoop services across any number of hosts.Ambari handles configuration of Hadoop services for the cluster.Manage a Hadoop ClusterAmbari provides central management for starting, stopping, and reconfiguring Hadoop services across the entire cluster.Monitor a Hadoop ClusterAmbari provides a dashboard for monitoring health and status of the Hadoop cluster.Ambari leverages Ambari Metrics System for metrics collection.Ambari leverages Ambari Alert Framework for system alerting and will notify you when your attention is needed (e.g., a node goes down, remaining disk space is low, etc).Ambari enables Application Developers a
OverviewWe create Apache Hive tables for analytics automagically from DDL generated by Apache NiFi.Hortonworks SAM Run TimeThe results of this produces HBase and Druid analytics.SAM has produced two Druid Datasources that we can slice up and explore in superset.In Apache Zeppelin, we can run our Hive DDL (listed below) and run all of our queries including joining our two patient data tables. We can sort and create some basic graphs.All of this data is available to you in your favorite BI tools.Generated Apache Hive Tables from ORC Files (DDL)CREATE EXTERNAL TABLE IF NOT EXISTS patientdata (PID_SSNNumberPatient INT, email STRING, gender STRING, ip_address STRING, drug_provider STRING, icd9 STRING, icd9_description STRING, icd9P_proc STRING, icd9_proc_description STRING, user_agent STRING, drug_used STRING) STORED AS ORC LOCATION '/patientdata';CREATE EXTERNAL TABLE IF NOT EXISTS ccda (problemSectionact_02observationproblemStatuscodecodeSystemName STRING, vitalSignsSectionorganizerobser
Executor memory size and map join memory for LLAP This article is intended for understanding map join memory sizing and related configurations specific to LLAP. For detailed information about LLAP sizing and setup, please refer to LLAP Sizing and Setup Executor memory size is shared among several components like join hash table loading, map-side aggregation hash tables, PTF operator buffering, shuffle and sort buffers. We recommend 4Gb for a general case (per LLAP Sizing and Setup), configuring less memory can slow down some queries (e.g. hash joins will turn into sort merge joins) and configuring more memory can be wasteful or lead to GC pressure (although more memory can provide more room for hash joins, it can adversely affect query performance when all/many executors load huge hash tables resulting in severe GC pauses). LLAP adds 2 new changes for hash table loaders for map joins Oversubscription of memory (from other executors) to provide more room for in-memory hash tables a
OverviewIn this section of HL7 processing, we look at what to do next with HL7 data now that it has been converted into Big Data friendly AVRO with a schema attached.We can easily combine that data with our other patientdata that came from MQTT. We do a simple JOIN on SSN and send this combined data to Kafka with a new schema and to Druid for analytics.We also Route some of the data to HDFS and HBase for storage and another feed to Druid for analytics.S.A.M. Flow OverviewI have a Simple Hortonworks Streaming Analytics Manager application that ingests two Kafka feeds (one for PatientData and one for HL7 Converted to AVRO by Apache NiFi). I join those two records together on a key and push them to Kafka and to Druid.Our Environment For Running SAM, Just Click what you needI added Druid, Apache HBase, HDFS, Apache Hive, Apache Kafka, Apache Storm and Apache Zookeeper. I am using all except Apache Hive.We can merge together the Kafka feeds sent from Apache NiFi. One feed is of pat
In this article, we’ll discuss tuning repository settings to achieve the highest possible throughput in MiNiFi C++. We’ll begin by benchmarking the SSD that we have. Based on reported numbers, the SSD in this 15” Macbook Pro is rated at 676 MB/s sequential write and 728 MB/s sequential read. Far from the highest, but our goal with this post is to achieve the highest possible throughput with the greatest guarantees. We’ll try different variations with and without volatile stores. Our benchmark shows that we are achieving near optimal speeds across various runs. We’ll create a MiNiFi C++ processor named Throughput Measure [1] that will be placed at the end of our graph to measure bytes output and measure the simple output from our flow. In our case, we’ll generate a flow file and simply measure the output. This won’t give us a completely accurate measure; however, it will be useful for tuning our setup. The first thing we need to be cognizant of is that we need to have enough space in o
Step 1: Collect HL7 Health Records Python to Send JSON Data to MQTT (Data Generated by https://www.mockaroo.com/) import paho.mqtt.client as mqttimport json# MQTTclient = mqtt.Client()client.connect("localhost", 14162, 60)row = [{"PID_SSNNumberPatient":823456789,"email":"ahospital0@census.gov","gender":"Male","ip_address":"138.135.180.206","drug_provider":"OrchidPharma Inc","icd9":"94140","icd9_description":"Deep necrosis of underlying tissues [deep third degree] without mention of loss of a body part, face and head, unspecified site","icd9P_proc":"7942","icd9_proc_description":"Closed reduction of separated epiphysis, radius and ulna","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.801.0 Safari/535.1","drug_used":"Naratriptan"}]json_string = json.dumps(row)client.publish("patientdata",payload=json_string,qos=1,retain=False)client.disconnect() Step 2: Get to Apache NiFi via FTP, sFTP, File, Apache Kafka, MQTT, REST AP
Finding out the hit rate It is possible to determine cache hit rate per node or per query. Per node, you can see hit rate by looking at LLAP metrics view (<llap node>:15002, see General debugging):Per query, it is possible to see LLAP IO counters (including hit rate) upon running the query by setting hive.tez.exec.print.summary=true, which should produce the counters output at the end of the query, for example - empty cache:Some data in cache:Why is the cache hit rate lowConsider the data size and the cache size across all nodes. E.g. with a 10 Gb cache on each of the 4 LLAP nodes, reading 1 Tb of data cannot achieve more than ~4% cache hit rate even in the perfect case. In practice the rate will be lower due to effects of compression (cache is not snappy/gzip compressed, only encoded), interference from other queries, locality misses, etc. In HDP 2.X/Hive 2.X, cache has coarser granularity to avoid some fragmentation issues that are resolved in HDP 3.0/Hive 3.0. This can cause c
This article is a short summary of LLAP-specific causes of query slowness. Given that a lot of the Hive query execution (compilation, almost all operator logic) stay the same when LLAP is used, queries can be slow for non-LLAP-related reasons; general Hive query performance issues (e.g. bad plan, skew, poor partitioning, slow fs, ...) should also be considered when investigating. These issues are outside of the scope of this article.Queries are slow On HDP 2.5.3/Hive 2.2 and below, there’s a known issue where queries on LLAP can get slower over time on some workloads. Upgrade to HDP 2.6.X/Hive 2.3 or higher.If you are comparing LLAP against containers on the same cluster, check LLAP cluster size compared to the capacity used for containers. If there are 27 nodes for containers, and a 3-node LLAP cluster, it’s possible containers will be faster because they can use many more CPUs/memory.Generally, queries on LLAP run just like in Hive (see Architecture). So, the standard Hive performanc
Introduction: how does LLAP fit into Hive LLAP is a set of persistent daemons that execute fragments of Hive queries. Query execution on LLAP is very similar to Hive without LLAP, except that worker tasks run inside LLAP daemons, and not in containers. High-level lifetime of a JDBC query: Without LLAP With LLAP Query arrives to HS2; it is parsed and compiled into “tasks” Query arrives to HS2; it is parsed and compiled into “tasks” Tasks are handed over to Tez AM (query coordinator) Tasks are handed over to Tez AM (query coordinator) Coordinator (AM) asks YARN for containers Coordinator (AM) locates LLAP instances via ZK Coordinator (AM) pushes task attempts into containers Coordinator (AM) pushes task attempts as fragment into LLAP RecordReader used to read data LLAP IO/cache used to read data or RecordReader used to read data Hive operators are used to pro
Short Description: How to configure KNOX for Hive1 and Hive2(LLAP) in parallel.Article By default KNOX is configured for Hive1, this article will help you to configure KNOX for Hive2(LLAP). Step 1. Before configuring KNOX for Hive2, you have to configure Hive2 for http mode as, Go to Ambari-> Services -> Hive -> configs -> custom hive-interactive-site.xml -> add below properties,hive.server2.thrift.http.path=cliservicehive.server2.transport.mode=http Restart Hive service. Step 2. Now configure KNOX for Hive2(LLAP) as, 1) Go to the below location in your KNOX server machine:-# cd /usr/hdp/<HDP VERSION>/knox/data/services 2) Copy the hive directory present in the location and rename it as llap# cp -rp hive llap3) Edit the services.xml and rewrite.xml as below:-# cd llap/0.13.0/# vim service.xml------------<service role="LLAP" name="llap" version="0.13.0"> <routes> <route path="/llap"/> </routes> <dispatch classname="org.
This is the central page that links to other LLAP debugging articles. You can find articles dealing with specific problems below; to provide some background and to help resolve other issues, there are also some helpful general-purpose articles:A one-page overview of LLAP architecture: https://community.hortonworks.com/articles/149894/llap-a-one-page-architecture-overview.htmlOn the general debugging - where to find logs, UIs, metrics, etc.: https://community.hortonworks.com/articles/149896/llap-debugging-overview-logs-uis-etc.htmlYou might also find this non-debugging LLAP sizing and setup guide interesting: https://community.hortonworks.com/articles/149486/llap-sizing-and-setup.htmlBefore getting to specific issues, there are some limitations with LLAP that you should be aware of; the following significant features are not supported: HA (work in progress).doAs=true (no current plans to support it).Temporary functions (will not be supported; use permanent functions).CLI access (use be
We need to ingest C-CDA files, which often have weird names in them. To Compound the naming issues, the Extract C-CDA processor flattens XML to have periods which are not allowed in Apache Avro names.Apache NiFi DataFlow Ingest C-CDA XML FilesExtract C-CDA AttributesRoute on AttributeAttributeCleaner - my new custom oneAttributeToJSONSetSchemaQueryRecordConvertAvroToORCPutHDFSAttributeCleanerProcessor is my new processor to rename all the attributes. This is a very simple version.These are the converted file names.Above is the JSON fields with values.Route when code field is not null.If code is active then convert to Apache ORC for Hive.SQL TableCREATE EXTERNAL TABLE IF NOT EXISTS ccda (problemSectionact_02observationproblemStatuscodecodeSystemName STRING, vitalSignsSectionorganizerobservations_05idsroot STRING, problemSectionact_02observationproblemStatusstatusCodecode STRING, vitalSignsSectionorganizerobservations_01texttext_01value STRING, vitalSignsSectionorganizerobservations_0
When running a custom Java application that connects via JDBC to Hive, after migration to HDP-2.6.x, the application now fails to start with a NoClassDefFoundError or ClassNotFoundException related to a Hive class, like:Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hive/service/cli/thrift/TCLIService$Ifaceat org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)at java.sql.DriverManager.getConnection(DriverManager.java:664)at java.sql.DriverManager.getConnection(DriverManager.java:270)Root CausePrior to HDP-2.6.x, the hive-jdbc.jar is a symlink which points to the "standalone" jdbc jar (the one intended to be used for non-hadoop apps, like a generic app that has JDBC driver DB accessibility), for example in HDP 2.5.0:/usr/hdp/current/hive-client/lib/hive-jdbc.jar -> hive-jdbc-1.2.1000.2.5.0.0-1245-standalone.jarBut from newer versions, HDP-2.6.x onwards, the hive-jdbc.jar now points to the "hadoop env" JDBC driver, which has dependencies on many other H
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.