Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
Cloudera Data Engineering is Cloudera's new Spark as a Service offering on Public Cloud. It features kubernetes auto-scaling of Spark workers for efficient cost optimization, a simple UI interface for job management, and an integrated Airflow Scheduler for managing your production-grade workflows. In this article, we will not focus on service deployment. For that, refer to Enabling Cloudera Data Engineering. What we will cover is how to adjust your applications to fit CDE's paradigm, deploy them and schedule them by working through some example applications in Python and Scala. Developing Apps for Cloudera Data Engineering In CDE, an application is called a job. This takes the form of a main jar file or Python script. Depending on which language you wish to use, the development setup will be slightly different. We will go through those at a high level later. For creating and managing jobs, you can interact with CDE through the UI or the CLI. We will mainly use the UI here. For instr
Table of ContentsOverviewDesignPrerequisitesImplementationConclusionOverviewOver the last few years, Cloudera has evolved to become the Hybrid Data Company. Inarguably, the future of the data ecosystem is a hybrid one that enables common security and governance across on-premise and multi-cloud environments. In this article you will learn how Cloudera enables key hybrid capabilities like application portability, and data replication in order to quickly move workloads and data to the cloud. Let's explore how Cloudera excels at following hybrid use cases, through data pipeline replication and data pipeline migration exercises to the public cloud.Develop Once and Run AnywhereDe-risk Cloud MigrationDesignThe following diagram shows a data pipeline in private & public form factors -PrerequisitesA data pipeline in a private cloud environment. Please follow the instructions provided in cdp-pvc-data-pipeline to set one up.Cloudera on Amazon Web Services
Oftentimes data hubs will need additional steps performed in order to support your specific workload or use case. For me this usually is something like adding a jar to enable database connectivity on a Data Flow or Streams Messaging hub. Recently I was working with Kafka Connect on a Streams Messaging data hub for MySQL change data capture. This required uploading a particular jar file to each node in the cluster, placing it in a specific folder, renaming it, and changing the permissions. The tasks themselves weren't difficult, but by the time I had done it on the 3rd broker node I was ready for a better solution. By the end of this article we will have that better way implemented. Enter CDP Recipes. Recipes are essentially bash or python scripts that execute while the cluster is spinning up. They are analogous to "user data" when you spin up an EC2 instance, which can run commands to make initializing an instance easier so it's
OpenLDAP is an open-source implementation of the Lightweight Directory Access Protocol and is used for central management of accounts (users, hosts, and services) and can be used in concert with a KDC to provide authentication within the Hadoop ecosystem. Fundamentally, LDAP functions like a database in many ways and can be used to store any information.We will assume that you have a fresh CentOS 7 host available that will host OpenLDAP. Make sure you have network connectivity between any clients and this server and that DNS resolution is working. Let's ssh to the host, and install, as root, the packages we need with yum:yum -y install openldap compat-openldap openldap-clients openldap-servers openldap-servers-sql openldap-develWe'll also start the LDAP daemon (called slapd) and enable it to auto-start on system boot:systemctl start slapd.servicesystemctl enable slapd.serviceNext, run the slappasswd command to create an LDAP root password. Please take note of this root password, the en
HBase Region NormalizerRegion Normalizer a new feature available in HBase-1.2, can be used to perform normalization of inefficiently created HBase table regions. It basically carries out a set of pre-calculated merge/split actions to resize certain regions that are either too large or too small compared to the average region size for a given table. Region Normalizer when invoked computes a normalization plan for all of the tables in HBase. System tables (such as hbase:meta, hbase:namespace, Phoenix system tables etc) and user tables with normalization disabled are ignored while computing this normalization plan. For normalization enabled tables, normalization plan is carried out in parallel across multiple tables.Normalizer can be enabled or disabled globally for the entire cluster using ‘normalizer_switch’ command from HBase shell. Normalization can also be controlled per table basis, which is disabled by default when a table is created. Normalization for a table can be enabled or d
Command to delete a particular solr collection:-Example:-curl "http://<SOLR-HOSTNAME>:8886/solr/audit_logs/update?commit=true" -H "Content-Type: text/xml" --data-binary "<delete><query>evtTime:[* TO NOW-7DAYS]</query></delete>"In this example,audit_logs - is the collection name.TO NOW-7DAYS - Will delete the data older than 7 days.
Hi All,Below are the steps to setup load balancer on top of multiple Knox gateways. I will assume that you have KnoxSSO already set and services are going through it. Install knox gateway on another node Ambari/CM -> Hosts -> Select any host(where you want to install knox) and add knox gateway.Installation of HAproxy and Rsyslog: yum install -y haproxy rsyslog Step 3: Update the Rsyslog for checking the haproxy logs /etc/rsyslog.conf: ## Uncomment below line$ModLoad imudp$UDPServerRun 514##Add following directive in the same file.# HAProxy Logginglocal2.* /var/log/haproxy.log Create SSL certificate for haproxy: openssl genrsa -out /etc/haproxy/haproxy.key 2048openssl req -new -key /etc/haproxy/haproxy.key -out /etc/haproxy/haproxy.csr -subj "/C=US/ST=North Carolina/L=Raleigh/O=HWX/OU=Support/CN=$(hostname -f)"openssl x509 -req -days 365 -in /etc/haproxy/haproxy
Introduction Apache Ranger delivers a comprehensive approach to security for a Hadoop cluster. It provides a centralised platform to define, administer and manage security policies consistently across Hadoop components.More details about Ranger can be found here https://www.cloudera.com/products/open-source/apache-hadoop/apache-ranger.html Ranger API policy documentation https://ranger.apache.org/apidocs/index.html This article focuses on Export and Import of Ranger policies using API calls during HDP to CDP migration. Export List of Services configured in Ranger ### Command to get list of services curl -s -u admin:pass -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://<hostname>:<ranger-port>/service/public/v2/api/service" > services.json Export of Policies ### Export all policies To export all policiescurl -X GET --header "text/json" -H "Content-Type: text/json
With the need of keeping metrics centralized into a single spot, people have sought a way to configure grafana for observability by attempting to collect the wide range of metrics available in a Datahub / Datalake in order to keep their dashboards arranged in a centralized hub. This tutorial will walk you through step-by-step in how to configure Grafana to query the metrics available in the Cloudera Manager of a datahub cluster. First, we need to ensure that the machine where Grafana is running has direct connection with the CM Server. In other words, it must be able to resolve the CM FQDN and establish a straight up connection with the service, bypassing knox completely. Unlike the Grafana utilized by other experiences, such as DWX, CDW and so forth of which use prometheus for integration, this grafana will have to integrate with CM Server for authentication and during the creation of a datasource when querying the metrics therein. This integration i
After Jun 1, 2021, the following changes are introduced to S3Guard in CDW service on CDP Public Cloud[1]:S3 Guard disabled for custom Database Catalogs and default Database Catalogs on AWS environmentsDuring new AWS environment activation in CDW:If you have not specified a DynamoDB table name during environment registration in Management Console, the S3 Guard feature is disabled for all Database Catalogs and Virtual Warehouses.If you have specified a DynamoDB table name during environment registration in Management Console, the S3 Guard feature is enabled for default Database Catalogs and Virtual Warehouses. However, it is disabled for non-default (custom) Database Catalogs.For all environments that were activated before the June 1, 2021 release, S3 Guard is enabled. [1] https://docs.cloudera.com/data-warehouse/cloud/release-notes/topics/dw-whats-new-24.html
Overview:This handbook focuses on Cloudera’s new adapter dbt-spark-cde that enables users to use dbt on top of Apache Spark by leveraging the use of CDE. Cloudera Data Engineering (CDE) is a serverless service for Cloudera Data Platform that allows you to submit Spark jobs to an auto-scaling cluster.Links to a dbt example project that can be used to bootstrap a user’s dbt journey can be found below.Version Notes:The adapter has been tested on the following version:python: 3.9Cloudera Data Engineering release (1.15-h1)dbt-core: 1.3.0Installing dbt and requirementsPrerequisites: Make sure python3, git, and pip are available on your system.Cloning the repo:Run the following command in your terminal to clone the example project repository:git clone https://github.com/cloudera/dbt-spark-cde-example/Installing the packages:Run the following commands in your terminal to install the required packages/dependencies using pip/pip3:pip install dbt-corepip install dbt-spark-cdeCDE and SparkFor
COD - CDE Spark-HBase tutorial In this article related to CDP Public Cloud, we will walk through steps required to be followed to read/ write to COD (Cloudera Operational Database) from Spark on CDE (Cloudera Data Engineering) using spark-hbase connector.If you are looking to leverage Phoenix instead, please refer to this community article. Assumption COD is already provisioned and database is created. Refer to this link for the same.For this example, we will assume "amallegni-cod" as the database name. CDE is already provisioned and the virtual cluster is already created. Refer to this link for the same. COD Download client configuration Spark in CDE to be able to talk to COD, would require the hbase-site.xml config of the COD cluster. Do the following steps to retrieve the same: Go to the COD control plane UI and click on "amallegni-cod" database. Under the Connect tab of COD database, look for HBase Client Configuration
ObjectiveThis tutorial is the second article of a three part series. We will walk-through a Apache NiFi CDC flow which uses MySQL bin logs to create a copy of a table and keep the copy in sync with row-level changes to the source. The last article in the series will delve into the finer details of the flow configuration, suggest best practices and highlight potential trouble spots.EnvironmentThis tutorial was tested using the following environment and components:Mac OS X 10.11.6 MySQL 5.7.13 Apache NiFi 1.3.0NiFI CDC Flow Walk ThroughPrerequisitesThe first article in this tutorial series has been completed and the finalized CDC flow is on your NiFi canvas.Your MySQL instance (with binary logging enabled) is running. A 'users' table exists in your "source" database. Your "copy" database is empty. All controller services are enabled.Flow OverviewHere is a quick overview of the CDC flow:1. CaptureChangeMySQL reads the bin logs to generate FlowFiles (JSON)2. FlowFiles are routed based on e
With the release of HDP 2.6 comes the Hive ACID Merge feature. This is long sought after feature for people who want to batch update table content in ACID manner. This tutorial will walk you through step-by-step how to use this new feature with some really simple dataset. The example is done on HDP 2.6.0.3 installation. First, ACID in Hive need to be turned on in Ambari UIThen we will create 2 tables, one as the target of merge and one as the source of merge. Please note that the target table must be bucketed, set as transaction enabled and stored in orc format.CREATE DATABASE merge_data;CREATE TABLE merge_data.transactions( ID int, TranValue string, last_update_user string)PARTITIONED BY (tran_date string)CLUSTERED BY (ID) into 5 buckets STORED AS ORC TBLPROPERTIES ('transactional'='true');CREATE TABLE merge_data.merge_source( ID int, TranValue string, tran_date string)STORED AS ORC;Then we will populate the target and source table with some data.INSERT INTO merge_data.transactions PA
IntroductionMigration PathsHDP 2.6 to CDPExportImportHDP 3.X to CDPBackupRestoreUseful Links & ScriptsIntroduction Apache Atlas provides open metadata management and governance capabilities for organisations to build a catalog of their data assets, classify and govern these assets and provide collaboration capabilities around these data assets for data scientists, analysts and the data governance team. This article focuses on backup and restore of Atlas data during HDP to CDP migration. Migration Paths HDP 2.6 to CDP ExportNote: Following commands need to be executed on HDP ClusterDownload the migration script to download on to Atlas server host. ## Download the scriptwget https://archive.cloudera.com/am2cm/hdp2/atlas-migration-exporter-0.8.0.2.6.6.0-332.tar.gz## Untartar zxvf atlas-migration-exporter-0.8.0.2.6.6.0-332.tar.gz##copy the contentsmkdir /usr/hdp/2.6.5.0-292/atlas/tools/migration-exporter/cp atlas-migration-exporter-0.8.0.2.
OverviewThis article focuses on Cloudera’s new adapter dbt-spark-livy that enables users to use dbt on top of Apache Spark by connecting to it using Apache Livy. Livy is a REST web service for managing long-running Spark Contexts and submitting Spark jobs. Instead of running the Spark Contexts in the Server itself, Livy manages Contexts running on the cluster managed by a Resource Manager like YARN.Cloudera Data Platform provides Spark with Livy in the Datahub form factor. Links to a dbt example project that can be used to bootstrap a user’s dbt journey can be found below.Version Notes:The adapter has been tested on the following version:python: 3.9.13Cloudera Manager CM VERSION 7.6.2 RUNTIME VERSION 7.2.15CDP Datahub with the template - 7.2.14 - Data Engineering: Apache Spark2/Spark3dbt-core: 1.3.0Installing dbt and requirementsPrerequisites: Make sure python3, git, and pip are available on your system.Cloning the repo:Run the following command in your terminal to clone the examp
There are a numerous ways of doing event driven architectures in Cloud with Cloudera Data Platform(CDP) but, lately I was working on a use case which required Spark inferences and transformations on streaming log data in Azure cloud environment on a near realtime basis. The use case is to kickoff Spark transformations as soon as the files get landed in the Azure storage container. The preferred way of doing Spark transformations for Data Engineering use cases in CDP is by leveraging Cloudera Data Engineering(CDE) which runs Spark on Kubernetes. CDE provides much better isolation, job orchestration with help of Airflow, Spark version independence, scales faster, efficiently utilizes the cloud native resources and the best part is that it does dependency management like a rockstar. Just makes your life easy and simple. &nb
This has been a recurring question in the Community forum. I replied to those a few times so I've decided to post the answer here as an article so that's easier to find and reference. The question is: if you have a ZIP file that contains other ZIP files (which may in turn contain other ZIP files, etc.), how can I extract all the ZIP files, recursively, using NiFi? One way to do that is to implement the following data flow: The RouteOnAttribute processor checks the file name and if it's a ZIP file it sends it for unpacking. Otherwise sends the non-zip file downstream. You can find the flow definition attached below. HTH,André
With the May 2022 release of Cloudera Machine Learning, administrators now have the ability to specify a unique subdomain for the CML Workspace. This enables a new CML workspace to leverage the endpoint of a previously deleted CML Workspace. This ensures that deployed models and applications deployed in the new Workspace will have the same endpoint as the same models and applications deployed in the old Workspace. The text box to enter the Subdomain is available once you toggle the Advanced Options switch during Workspace creation. For more information, see CML Static Subdomain in Provisioning ML Workspaces.
We are pleased to announce the release of the dbt-impala adapter v1.1.0. This release is compatible and tested with dbt-core v1.1.0.https://pypi.org/project/dbt-impala/1.1.0/https://github.com/cloudera/dbt-impala/releases/tag/v1.1.0 Full dbt-core v1.1.0 release notes can be found here, including a number of bug-fixes and improvements and support for Python 3.10 under the hood. Adapter Enhancements and New FeaturesAdopted new dbt methods provided in dbt 1.1.0Fix for an issue with get_catalog that caused empty catalog to be generated (#36)Ensure lower case for pattern passed to "show tables in" query (#37)Add timeout for snowplow endpoint to handle air gapped environments (#38)Bump version number to 1.1.0 to align with dbt-core versioningPython 3.10 compatibility as a result of migrating to dbt-core=1.1.0Getting started with dbt-impalaRead the Getting started with dbt-impala & Cloudera Data Warehouse guideWatch the video Using the dbt-impala example
The video below will take you through using the dbt-impala-example repo. This is an example dbt project, containing a few seeds, tests and models to help you bootstrap your own dbt project. If you haven't gotten started with dbt & Impala on CDP yet, take a look at the previous post Getting started with dbt-impala & Cloudera Data Warehouse.
Kerberos cross realm trust for distcp This article is to demonstrate how to setup cross realm trust for distcp between two secure HDP clusters with their own Kerberos realms(KDC’s). Prerequisites Both HDP clusters must be running JDK 1.7 or higher. JDK 1.6 has some known issues Lets assume first HDP DEV cluster realm : HDPDEV.DEV.COM Lets assume second HDP QA cluster realm : HDPQA.QA.COM Step 1 : To set up cross realm trust between HDPDEV.DEV.COM and HDPQA.QA.COM, for example a client of realm HDPDEV.DEV.COM to access a service in realm HDPDQA.QA.COM, both realms must share a key for a principal name krbtgt/ HDPDQA.QA.COM@ HDPDEV.DEV.COM and both keys must have the same key version number associated with them. Cross realm trust is unidirectional by default. So for clients in HDPQA.QA.COM also to have access services in HDPDEV.DEV.com, both realms must share a key for principal krbtgt/ HDPDDEV.DEV.COM@ HDPQA.QA.COM. Add both krbtgt principals on both clusters #HDP DEV Cluster kadmin.l
The ListS3 and FetchS3 processors in Apache NiFi are commonly used to retrieve objects from Amazon S3 buckets, but they can be easily configured to retrieve objects from IBM Cloud buckets. Assume, I have an IBM Cloud bucket that contains three CSV files: First, get the following from your IBM Cloud bucket configuration :Bucket NamePrivate Endpoint Then, from the Service Credentials of your Cloud Object Storage, get:Access Key IDSecret Access Key Note: If you don't have Service Credentials for the storage instance, create a new one with HMAC set to "true" (https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-uhc-hmac-credentials-main) Create or confirm that your IBM Cloud user has the necessary Bucket Access Policy to view and download objects (https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-iam-bucket-permissions) : With this setup information confirmed, add to and connect ListS3 and FetchS3 proc
We all love Hue. However, it isn't always the perfect tool for doing a lot of querying, so you've probably looked toward some 3rd party tools for database connectivity. There are many such tools, but DBeaver has a very capable free version and is among the most popular. Connecting it to a Hive virtual warehouse isn't difficult, but there are a few gotchas that can make it frustrating. So let's conquer those obstacles. Here is a video walkthrough of the process. Provision a Hive Virtual Warehouse Log into a CDP instance Navigate to Data Warehouse Enable your Data Warehouse Environment & Database Catalog Create a New Virtual Warehouse Give your virtual warehouse a unique name Select Hive Select your database catalog from the dropdownSSO may be enabled or disabled, the choice is yours! Set Availability Zone and User Groups per your requirements or leave as-is Pick the size (aka decide how much money you want to spend)The remaining options are going to depend on your needs, but the
What is Apache Knox?In summary, Apache Knox was designed to provide access to the Big Data environment through a reverse proxy gateway, enabling perimeter protection when combined with a firewall. The Cloudera Data Platform supports Apache Knox and makes it simpler to install and administer by integrating it with the other components of the platform. Please, check the Cloudera Security Overview for additional information about how to increase the security in CDP. The figure below shows a high-level architecture of Apache Knox: When using the Apache Knox Gateway we benefit from a number of advantages, such as:Single sign-on and enterprise authenticationPerimeter securityCentral access managementGranular access control to cluster servicesProxied JDBC connections and streamingExtensible APIEtc. Please, check the Apache Knox official site for more information. However, as all connections go through Knox, it becomes a critical piece of access to the envi
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.