Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
Ambari Metrics System (AMS) collects, aggregates, and serves Hadoop and system metrics in Ambari-managed clusters. Basically AMS has four components Metrics Monitors, Hadoop Sinks, Metrics Collector, and Grafana. Metrics Monitors on each host in the cluster collect system-level metrics and publish to the Metrics Collector.Hadoop Sinks plug in to Hadoop components to publish Hadoop metrics to the Metrics Collector.The Metrics Collector is a daemon that runs on a specific host in the cluster and receives data from the registered publishers, the Monitors and the Sinks.Grafana is a daemon that runs on a specific host in the cluster and serves pre-built dashboards for visualizing metrics collected in the Metrics Collector. In this article, we will be checking how we can troubleshoot AMS-related issues effectively.There are multiple issues which arises in AMS that leads to different types of discrepancy such as c
Sometimes you need real CDC and you have access to transaction change logs and you use a tool like QLIK REPLICATE or GoldenGate to pump out records to Kafka, and then Flink SQL or NiFi can read them and process them.Other times you need something easier for just some basic changes and inserts to some tables you are interested in receiving new data as events. Apache NiFi can do this easily for you with QueryDatabaseTableRecord. You don't need to know anything, but the database connection information, table name and what field may change. NiFi will query, watch state and give you new records. Nothing is hardcoded, parameterize those values and you have a generic 'Any RDBMS' to 'Any Other Store' data pipeline. We are reading as records, which means each FlowFile in NiFi can have thousands of records that we know all the fields, types and schema related information for. This can be ones that NiFi infers the schema or ones we use to form a Schema Registry like Cloudera's amazing Open Source
Credits to @mbawa (Mandeep Singh Bawa) who co-built all the assets in this article. Thank you! We (Mandeep and I) engaged on a customer use case where Cloudera Data Engineering (Spark) jobs were triggered once a file lands in S3 (details on how to trigger CDE from Lambda here). Triggering CDE jobs is quite simple; however, we needed much more. Here are a few of the requirements:Decoupling Ingestion Layer / Processing LayerDecoupling apps (sender) from SparkApps can send and forget payloads without the burden of configuring Spark (#number of executors, memory/cpu, etc), the concern of Spark availability (Upgrades, resources availability, etc), or application impacts from CDE API changesReal-time changes to where CDE jobs are sent (Multi CDE)Monitor job status and alertsMonitoring job run times and alerts which may be out-of-spec runtimesFailover to Secondary CDEThrottlingAuthenticationIt may look as though we are trying to make NiFi into an orchestration engine for CDE.
Because spark action in oozie is not supported in HDP 2.3.x and HDP 2.4.0, there is no workaround especially in kerberos environment. We can use either java action or shell action to launch spark job in oozie workflow. In this article, we will discuss how to use oozie shell action to run a spark job in kerberos environment. Prerequisite:1. Spark client is installed on every host where nodemanager is running. This is because we have no control over which node the2. Optionally, if the spark job need to interact with hbase cluster, hbase client need to be installed on every host as well.Steps:1. Create a shell script with the spark-submit command. For example, in the script.sh:/usr/hdp/current/spark-client/bin/spark-submit --keytab keytab --principal ambari-qa-falconJ@FALCONJSECURE.COM --class org.apache.spark.examples.SparkPi --master yarn-client --driver-memory 500m --num-executors 1 --executor-memory 500m --executor-cores 1 spark-examples.jar 32. Prepare kerberos keytab which will be u
To begin you have 2 options.1. Download the Apache NiFi package onto hn0 of your HDI cluster and start nifi using "NIFIHOME"/bin/nifi.sh start2. Install NiFi through AmbariSee this link for a walkthrough of getting the Ambari nifi installer loaded. : https://community.hortonworks.com/content/kbentry/1282/sample-hdfnifi-flow-to-push-tweets-into-solrbanana.htmlTo install Nifi, start the 'Install Wizard': Open Ambari then: On bottom left -> Actions -> Add service -> check NiFi server -> Next -> Next -> Change any config you like (e.g. install dir, port, setup_prebuilt or values in nifi.properties) -> Next -> Deploy. This will kick off the install which will run for 5-10min.That will get you a NiFi instance on your Cluster hn0 and next you will want to set up your laptop to be able to connect to NiFi. To do this you first need to set up an ssh tunnel into hn0. Ex. ssh -L9000:localhost:22 user@example.azurehdinsight.netthis will route all traff
The distributed nature of HBase, coupled with the concepts of an ordered write log and a log-structured merge tree, makes HBase a great database for large scale data processing. Over the years, HBase has proven itself to be a reliable storage mechanism when you need random, realtime read/write access to your Big Data. HBase is able to deliver because of a prioritization mechanism for memory utilization and caching structures over disk I/O. Memory store, implemented as the MemStore, accumulates data edits as they’re received, buffering them in memory (1). The block cache, an implementation of the BlockCache interface, keeps data blocks resident in memory after they’re read.OVERVIEW OF HBASE I/O Memstore The MemStore is important for accessing recent edits. Without the MemStore, accessing that data as it was written into the write log would require reading and deserializing entries back out of that file, at least a O(n)operation. Instead, MemStore maintains a skiplist structure, wh
Custom parcels and CSDs allow partners and clients to bring their libraries and packages to CDP. Traditionally, customers would use recipes to install parcels and CSDs or manually copy them to appropriate nodes. But, with CDP Public Cloud, you need a modular approach to do this. To address that need, Cloudera has developed the capability of specifying the parcel and CSD information as part of the cluster template (blueprint). With this approach, the parcel and CSD will get downloaded, distributed and activated as part of the cluster build process.In the example below, FLINK 1.12 should be installed by default, but a different version of the FLINK parcel and CSD are passed for the Cloudera Manager to download, distribute and activate. FLINK service is added to the cluster during the cluster import.High level steps are as follows:Modify Cluster Template to define roletype, servicetype, hostgroup configs. Get the Image Catalog IDCreate a Custom Request Template : add Parcels/CS
Starting CDP 7.2.7, Knox can be configured to load-balance backend service instances as well as support sticky sessions in HA mode. Prior to this when HA was configured for Knox (using the HaProvider in Knox topology) Knox would route requests to a specific backend service, except in case of failover where Knox would pick the next backend service from the configured list.This approach had some limitations, Knox would only serve one backend, even when there were multiple backends available. This especially was a problem for stateless services that needed even load distribution. Knox also had no support for sticky sessions. With this release, Knox can be configured to load-balance requests for multiple backend service instances configured with HaProvider. Currently, load-balancing is done in a simple round-robin fashion. Following is an example of how to configure only load-balancing for an example HA service WHOAMI <provider> <role>ha</role>
Many access control policies require additional context outside of the resources and security principals that are used by default to evaluate policy decisions. For example, knowledge regarding the time of day and the geographic source of attempted access may dictate whether that access is allowed or denied. Ranger policy evaluation occurs in three distinct steps, 1) request creation, 2) policy evaluation, and 3) post-evaluation. In order to extend the Ranger plugin for a particular service, the request context has to be enriched. For example, enriching the authorization request with the time of day or originating geographic location is needed to evaluate those policies effectively. The first step to enriching the request context is to register a Context Enricher with the service in question. For this example, we will use Hive and our goal will be to enrich the context with its geographic origination. Ranger 0.6 includes the RangerFileBasedGeolocationProvider, which can be used to add
In part 1 of this series we talked about the growing relevance of streaming technologies and covered the need for existing Cloudera customers currently using Apache Flume, to consider moving over to Cloudera DataFlow (CDF). Cloudera DataFlow is an umbrella term that covers the streaming technologies from Cloudera. CDF is supported on CDH 5 / CDH 6 and HDP 2 / HDP 3. So there is nothing stopping customers adopting Cloudera DataFlow right now so that they are in a supported configuration for when they upgrade to the new Cloudera Data Platform (CDP). CDF includes the technology to address a number of areas: Edge Flow Management Core Flow Management Stream Processing Streaming Analytics Enterprises Services A good summary of these components can be found in the blog post Introducing Cloudera Data Flow. Cloudera DataFlow - Data-In-Motion Platform If you are a traditional Cloudera customer using the Cloudera Distribution of Apache Kafka, there are a number of
Cloudera Data Platform recently introduced Cluster Connectivity Manager (CCM) in tech preview, a feature with which CDP can communicate with workload clusters without the need for inbound network connections to customer workload clusters. In this article, I will highlight how to automate the setup of CCM for both AWS and Azure including: Cloud Network Setup CDP Environment setup Before you continue reading: You can find all automation on my github (here) Please refer to the official documentation for more details (here) This is just an example, different deployments require a different set of parameters! Overview As highlighted in the above image, CCM uses reverse tunneling to communicate back to your CDP dedicated control plane. A few things to note: Each tenant (i.e. customer) will have their own dedicated tunnel using a dedicated Apache Mina server The diagram above describes a setup in AWS. The Azure setup is very similar but does not require public sub
COD - CDE using PhoenixIn this article, we will walk through steps required to be followed to read/ write using Phoenix JDBC to COD (Cloudera Operational Database) from Spark on CDE (Cloudera Data Engineering).AssumptionCOD is already provisioned and database cod-db is created. Refer to this link for the same.CDE is already provisioned and virtual cluster is already created. Refer to this link for the same.CODConfigurationSpark in CDE to be able to talk to COD, it would require the hbase-site.xml config of the COD cluster. Do the following steps for retrieve the same:Go to the COD control plane UI and click on cod-db database.Under the "Connect" tab of COD database, look for HBase Client Configuration URL field. Following is the screenshot for the same.The configuration can be downloaded using the following curl command. curl -o "hbase-config.zip" -u "santhosh" "https://XXXXXX.cldr.work/clouderamanager/api/v41/clusters/cod-hvtur2ovawfr/services/hbase/
In this article, we’ll walk through the steps required to connect a Spark Structured Streaming application to Kafka in CDP Data Engineering Experience (DEX). This article extends the official CDP documentation: Connecting Kafka clients to Data Hub provisioned clusters, to include Spark applications run in Cloudera Data Experience. Steps Obtain the FreeIPA certificate of your environment: From the CDP home page, navigate to Management Console > Environments Locate and select your environment from the list of available environments Click Actions Select Get FreeIPA Certificate from the drop-down menu. The FreeIPA certificate downloads. Add the FreeIPA certificate to a Java keystore: All clients that you want to connect to the Data Hub provisioned cluster, will need to use the certificate to communicate over TLS. The exact steps of adding the certificate to the truststore depends on the platform and key management software used. For example
In this article, we will walk through the steps required to connect a Spark Structured Streaming application to Kafka in CDP Data Hub. We use two Data Hubs, one with a Data Engineering Template, and another with a Streams Messaging template. Both Data Hubs were created in the same environment. This article extends the official CDP documentation: Connecting Kafka clients to Data Hub provisioned clusters to include Spark applications. Steps1. Obtain the FreeIPA certificate of your environment:From the CDP Home Page, navigate to Management Console > EnvironmentsLocate and select your environment from the list of available environmentsClick ActionsSelect Get FreeIPA Certificate from the drop-down menu. The FreeIPA certificate downloads.2. Add the FreeIPA certificate to the truststore of the client.The certificate needs to be added for all clients that you want to connect to the Data Hub provisioned cluster. The exact steps of adding the certi
Sometimes you need real CDC and you have access to transaction change logs and you use a tool like QLIK REPLICATE or GoldenGate to pump out records to Kafka and then Flink SQL or NiFi can read them and process them.Other times you need something easier for just some basic changes and inserts to some tables you are interested in receiving new data as events. Apache NiFi can do this easily for you with QueryDatabaseTableRecord. you don't need to know anything but the database connection information, table name and what field may change. NiFi will query, watch state and give you new records. Nothing is hardcoded, parameterize those values and you have a generic Any RDBMS to Any Other Store data pipeline. We are reading as records, which means each FlowFile in NiFi can have thousands of records that we know all the fields, types and schema related information for. This can be ones that NiFi infers the schema or ones we use from a Schema Registry like Cloudera's amazing Open Source Sc
OverviewCDP Public Cloud provides a mechanism for provisioning all of your resources in private subnets (i.e. resources that don't get assigned public IPs). I won't detail the specifics about how each CSP accomplishes this; you can find much more thorough overviews in each CSP's documentation.However, in using this architecture, the problem becomes: how do I interact (UI/API/etc) with these resources if they aren't publicly accessible? In an ideal/ corporate world, some sort of VPN peering would be setup so that merely being on your corporate VPN would allow access to the resources in these subnets. You may find yourself in the unfortunate situation I do, where, you happen to be using an AWS (or Azure) account that doesn't have the fancy VPN peering enabled. Enter the SOCKS5 proxy. I also won't go over the specifics about how this works, but suffice it to say, we will create a bastion host in a public subnet (with a very narrow security group configuration), create an S
In a previous article, I realized that I saved my flow as a flow file instead of a template, which may make it hard to import for some. So in this article, I will explain how to import a flow to NiFi registry in Datahub (knowing that NiFi registry is secure by default in CDP Datahub).Step 1: Download and configure storesConnect to one of the NiFi machines with the Cloudbreak user and the key you used at deployment: $ ssh -i [path_to_private_key] cloudbreak@[your_nifi_host] Next, copy and authorize the key and trust stores: $ sudo su$ cp /var/lib/cloudera-scm-agent/agent-cert/cm-auto-host_keystore.jks /tmp$ cp /var/lib/cloudera-scm-agent/agent-cert/cm-auto-global_truststore.jks /tmp$ chmod a+rw /tmp/cm-auto-host_keystore.jks$ chmod a+rw /tmp/cm-auto-global_truststore.jks Step 2: Create a registry.properties fileGo to /tmp (for instance) and create the following file - registry.properties file: baseUrl=https://fod-nifi-cluster-gateway0.fod-cdp.a465
Smart Stocks with FLaNK (NiFi, Kafka, Flink SQL)I would like to track stocks from IBM and Cloudera frequently during the day using Apache NiFi to read the REST API. After that I have some Streaming Analytics to perform with Apache Flink SQL and I also want permanent fast storage in Apache Kudu queried with Apache Impala. Let's build that application cloud native in seconds in AWS or Azure.Source Code: https://github.com/tspannhw/SmartStocksTo script Loading Schemas, Tables, Alerts, see scripts/setup.sh:Source Code: https://github.com/tspannhw/ApacheConAtHome2020Kafka TopicKafka SchemaKudu TableFlink PrepFlink SQL Client RunFlink SQL Client ConfigurationOnce our automated admin has built our Cloud environment and populated it with the goodness of our app, we can bring out continuous SQL. If you know your data, build a schema, share to the registry One unique thing we added was a default value in our Avro schema and making it a logicalT
Here we demonstrate how to run YCSB workloads for HBase performance testing. The YCSB benchmarking toolkit is available here. Download YCSB. To download YCSB > runcurl -O --location https://github.com/brianfrankcooper/YCSB/releases/download/0.17.0/ycsb-0.17.0.tar.gz Untar YCSB. Untar the downloaded file:tar xfvz ycsb-0.17.0.tar.gz Create HBase table. Run HBase shell and create table usertable. To open Shell, use command:hbase shell Create 'usertable', 'cf' hbase(main):001:0> n_splits = 200 # HBase recommends (10 * number of regionservers) hbase(main):002:0> create 'usertable', 'cf', {SPLITS => (1..n_splits).map {|i| "user#{1000+i*(9999-1000)/n_splits}"}} Set Java Home. Check if JAVA_HOME is already set usingecho $JAVA_HOME If Java home is not set, YCSB will give you an error. In Cloudera, path to jre could be at /usr/java/default. Once you find the path, you can set JAVA_HOME by using the following: export JAVA_HOME=<path-to-jre
Post based on KB article:As soons as you realize that you have accidentally deleted the the files/directories in HDFS, immediately force the name node to go in SafeMode (hadoop namenode -safemode enter) to avoid further damage to file system. If possible, shutdown the NN and DataNodesCheck out the core-site.xml, to verify if Trash is enabled (look for configuration parameter ‘fs.trash.interval’. The value greater than zero value indicates number or minutes that data will be kept in Trash)If the number is more than the duration between delete command execution and namenode shutdown/safe mode, then you can recover the files from user’s Trash folder. If Trash is not enabled, contact Hortonworks support immediately. DO NOT restart the namenode and/or bring it out of safe mode. Doing so may delete your data permanently.
In this video, we'll briefly discuss what is Hive locking mechanism, what are the type of locks and how they work. We will also demonstrate with the help of a query about validation on the locks and removal of obsolete Hive locks from backend. Query used: CREATE TABLE ABORTED_TXNS AS SELECT A.TXN_ID AS HL_TXNID FROM TXNS A , HIVE_LOCKS B WHERE A.TXN_ID=B.HL_TXNID AND A.TXN_STATE='a'; DELETE FROM HIVE_LOCKS WHERE HL_TXNID IN (SELECT HL_TXNID FROM ABORTED_TXNS); Reference Link: https://cwiki.apache.org/confluence/display/Hive/Locking Open YouTube video here
Summary:This article provides the steps for using ConsumeJMS and PublishJMS processors with Weblogic Topics and Queues.Prerequisites:In this article a Weblogic 12c server was used with HDF-3.3.0. Also, for this article the JMS Server, Connection Factory, Queue and Topic have already been added to the Weblogic server. These blogs were used as references for this article, Install Weblogic 12.1.3 server, Basic JMS Demo using WebLogic Queue. Much of the credit for the information here goes to @emattos and @Jay Kumar SenSharma, both provided a great deal of assistance in understanding the Weblogic server and sample java programs for testing.Also, for this you will need the wlfullclient.jar, this can be created by following this guide: Using the WebLogic JarBuilder ToolNote: The JndiJmsConnectionFactoryProvider controller service was introduced in HDF-3.3.0. So, this controller service isn’t available in any earlier versions of HDF.NiFi Setup:In this article we'll use a simple flow to demon
Please follow the steps below to install ambari-shell on your system -Environment setup details -Virtual Box : 5.0.14 OS : CentOS release 6.7 (64-bit) Ambari-shell code : https://github.com/sequenceiq/ambari-shell.git Gradle Version: gradle-1.12 [ https://services.gradle.org/distributions/gradle-2.11-all.zip ] Java Version: 1.7.0_79Installation steps:1.Login using root/superuser 2.Install "git" package using rpm/yum command# yum install -y git[Note: Make sure you have internet access to your system and /etc/yum.repos.d/CentOS-Base.repo in place unless you have local repository configured to download packages] 3.Download Gradle from the link given above and unzip it in a directory. Here i will download code in /opt directory# cd /opt # wget https://services.gradle.org/distributions/gradle-2.11-all.zip # unzip # cd /opt# wget https://services.gradle.org/distributions/gradle-2.11-all.zip# unzip gradle-2.11-all.zip4. Export gradle home path# export PATH=$PATH:/opt/gradle-2.11/bin5. Make su
Experimental: Apache Hadoop Distributed File System (HDFS) is a popular file system in big data world. The HDFS federation provided the flexibility to configure multiple namenodes and improves the overall scalability of the cluster. The ViewFileSystem was introduced to access the federated HDFS cluster in a unified way. However, most of the existing HDFS users did not migrate to it because of the following reasons. It is a new scheme and users have to update their path URIs (for example, Hive stores fully qualified path URIs in its metastore). Also, the mount-table configurations need to be copied to all client nodes. To solve these problems, we enhanced ViewFS and introduced the ViewDistributedFileSystem. Now, users can initialize the filesystem with scheme "hdfs" and configure the mount points. We also introduced central mount-table reading functionality. Users can upload the mount-table configurations into Hadoop compatible file system (for example, HDFS) and configure the pat
Final article of the hybrid cloud series (see parent article here), and it's the funnest one! In this tutorial, we will learn to use Cloudera Viz to create visual apps. We will not go in depth into how to use viz, rather we will import an already existing app, executing on this part of the tutorial flow:PrerequisitesComplete Part 3 of the tutorial series.Step 1: Import Viz App Navigate to your Management console > Data Warehouse > Open Cloudera Viz:You will be redirected to the default examples; Navigate to the DATA tab:Then, click on Default Hive VW (this is your CDW VW):Then, click on Import Visual Artifacts:Finally, import the viz app (link here) as follows:After clicking on Import, you will see a new app:Step 2: Update each maps with Mapbox tokenIn order for the maps to display, you will have to add a mapbox token. I will only detail one of the three dashboard edit here, but you will need to do it for each dashboard.For this, first create an account at https://accou
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.