Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
Introduction The AM2CM is an offline tool that converts the Ambari blueprint to Cloudera Manager Deployment template.Import the converted template to Cloudera Manager, start the services through the Cloudera Manager UI, and validate the cluster. The latest version of the tool can be downloaded here:Software download matrix for 3.1.5 to CDP 7.1.xNote: This article is written on am2cm version 2.0.4.0-4. Latest version might have some new features which are not covered in this article. Internals of workingFiles comes with AM2CM script, configs files, and lib directories. am2cm-2.0.4.0-4 % ls -1am2cm-2.0.0.2.0.4.0-4.jaram2cm.shambari7_blueprint.jsoncm_migration.logconfconfigs_summary.logkerberos_summary.jsonlibrestore_collections.py AM2CM script uses blueprint from Ambari cluster as input, and based on user input HDP version, makes a decision regarding the config mapping file need to be used. This mapping files consists of mapping rule from Ambari world to C
I just tried out the new NiFi 0.7.0 version's Slack.SourceI used Twitter, since it has some fun data and gets you a nice big stream. Sometimes with Twitter Feeds will be limited and Twitter will give you the 420 Enhance Your Calm Message. https://httpstatusdogs.com/420-enhance-your-calm Usually you can just wait 5-20 minutes and you will be serving again. Sometimes you might need to use a different of your apps, reset the tokens in your app or create a new app (https://apps.twitter.com/). ProcessingUse the Pull Key Attributes, to Find Only Tweets (remove null) Sink to SlackFor the PutToSlack ProcessorSet the Webhook URL to the URL generated by the incoming webhook page in slack.com.Set the Webhook Text to ${twitter.msg}, this will send your Twitter message to slack.Set the Channel to #general, or a channel of your choosing.I created a slack board for receiving my messages, https://nifi-se.slack.com/messages/general/.You can easily create your own (or using your existing Slack b
In our organization we have noticed that the native Power BI connector for Impala that is provided by Microsoft is not able to communicate with a Cloudera CDP cluster that is "behind" an Apache Knox reverse proxy (using Apache Knox means that among other things the transport mode 'HTTP' is needed for ODBC connections). While the different ways to connect via ODBC to Python, R, or other common end-user tools are extensively documented here on this site, we have so far not found any documentation of a way to set up Power BI with Direct Query capabilities in a cluster with Impala behind Apache Knox. Using a custom connector enables Direct Query with Impala via Apache Knox In order to achieve connectivity with Impala with Direct Query capabilities in Power BI (computations are sent to the cluster via ODBC), we created a fork of the Impala connector that Microsoft provides for Power BI and inserted the changes to the connection string that are needed in the setup I sketched above. Since the
For a recent project I was tasked with configuring DBeaver to connect to Phoenix running in an instance of the CDP Datahub. CDP provides a means of creating a Datahub for running an Operational Database (HBase) and using JDBC via Phoenix to query it.Let's start a Datahub from an Operational Database template.Provision an Operational DatabaseLog into a CDP InstanceSelect Data Hub ClustersSelect Create Data HubChoose the Cloud environmentChoose the template 7.2.2 - Operational Database with SQLProvide a unique name for the clusterClick Provision Cluster This will start a Datahub cluster running HBase and Phoenix as well as all of the security dependencies provided by SDX. For example, Knox - this will be important when connecting to our instance. Once the cluster has started we need to collect some configuration details. This is best done on the Datahub information page and in the Cloudera Manager Console. We will use the Phoenix thin driver, and this requires a JDBC string of
Cyber/Log data ingestion is super simple using CDP NiFi; however, it alone does not complete the full picture InfoSec & Threat hunters are interested in. Often these uber pros are looking for breadcrumbs/clues to shorten their "hunting" exercise. CDP DataViz immediately provides rich visualizations on high fidelity cyber/log data to shorten mean time to vulnerability detection. Additionally, I've observed these teams often need the ability to run ad hoc analysis, enrichment, and/or correlation on stream using an intuitive interface; not to mention, without writing code. Ah yes, SQL on Stream. The entire demo looks less than a few hours to build; proving in cyber, we don't always have to engineer (i.e. Grok) our way through difficult data challenges. Demo:
The CDP Public Cloud Release Summary for the month of April is now available. It summarizes all major features introduced in CDP Public Cloud Management Console, Data Hub, and data services. See CDP Public Cloud Release Summary - April 2022.
When I first joined Hortonworks I wrote an article on integrating Apache Hive and Spring Boot since I came from Pivotal and was a huge fan of Spring Boot. It's been almost 1.5 years and Spring Boot is now in 2.0 and Apache Hive is now in LLAP with ACID transactional tables. So it's time for a remix!It is crazy easy to start your project, just head to https://start.spring.io/ and build a bomb POM and let's being. You will need to modify the built POM.XML (Maven) to include some Hadoop and Hive references. No big deal.Clone it then own it:git clone https://github.com/tspannhw/hivereader.gitYou can build the code via build.sh.mvn install Then run it via run.sh (change HDP version to match yours).java -Xms512m -Xmx2048m -Dhdp.version=2.6.4 -Djava.net.preferIPv4Stack=true -jar target/hivereader-0.0.1-SNAPSHOT.jarYou must have the Java JDK, Git and Maven installed on your machine. If you don't why are you running Java programs. Obviously this can be inside a docker container or vi
This article explains how to use the Snowflake Connector for Spark in Cloudera Machine Learning. Save your Snowflake password for your account. Go to Account Settings > Environment Variables and create a new entry with Name as "SNOW_PASSWORD" and Value as your <password>. Create a new session in your CML project. Use any of the editors, and the Python 3.7 kernel. You also need to enable Spark for this session and select the Spark 2.4.7 version. Download required dependencies.To initiate the connection, you need to have a Snowflake Connector for Spark and a Snowflake JDBC Driver that's compatible with CML's Spark version. You can get these from the Maven Central Repository: spark-connector and jdbc-driver. Place them in a ./jars folder in your CML Project.cdsw@ysezv3fm94edq4pb:~$ ls -l ./jars/total 28512-rw-r--r-- 1 cdsw cdsw 28167364 Mar 17 21:03 snowflake-jdbc-3.13.16.jar-rw-r--r-- 1 cdsw cdsw 1027154 Jan 27 01:18 spark-snowflake_2.
This article explains how to connect to Snowflake from Cloudera Machine Learning. Save your Snowflake password for your account.Go to Account Settings > Environment Variables and create a new entry with Name: "SNOW_PASSWORD" and Value: <your password> Create a new session in your CML Project. You can use any of the editors, and a Python kernel: Install required Python packagespip install pandas snowflake-connector-python snowflake-connector-python[pandas] Initiate the Snowflake connection. You need to set your Snowflake Account ID and your username for the connection. Your Snowflake password is retrieved from the environment variable that you configured in the Account Settings. I'm using the default Snowflake warehouse and a sample database/schema.import os import pandas as pdimport snowflake.connectorconn = snowflake.connector.connect( account='<Account ID>', user='<Username>', password=os.environ['SNOW_PASSWORD'], warehouse='COMPU
We frequently get asked questions by customers about how to run, deploy and/or debug Cloudera’s Operational Database, which is based on Apache HBase & Phoenix. This post shares the most frequently asked questions and how they were addressed. Can I run HBase on HDP 7.1.4 for my production environment?Answer: HDP 7.1.4 is only an intermediate step in the upgrade from HDP2 or HDP 3 to CDP. Once HDP 7.1.4 is deployed, you need to use the AM2CM migration tool to complete the upgrade to CDP. HDP 7 is not supported for production environments. HBase is not expected to be stable in HDP 7 but will be stable after the completion of the upgrade to CDP. How can I repair my HBase metadata?Answer: Use the hbck2 meta repair feature. For more information about this feature, see this github link. Alternatively, if there is no important data there, you can clean up the whole HDFS HBase root directory and also remove the HBase ‘znode’ from ZooKeeper using the deleteall/hbase comman
In this post, we will learn how to create a Kafka topic and produce and consume messages from a Kafka topic. After testing the basic producer and consumer example, we will test it with Spark using spark-examples.jar file. Creating a Kafka topic: # kafka bootstrap serverKAFKA_BROKERS="localhost:9092"# kafka topic nameTOPIC_NAME="word_count_topic"# group nameGROUP_NAME="spark-kafka-group"# creating a topic/opt/cloudera/parcels/CDH/lib/kafka/bin/kafka-topics.sh --create --topic ${TOPIC_NAME} --bootstrap-server ${KAFKA_BROKERS}# describing a topic/opt/cloudera/parcels/CDH/lib/kafka/bin/kafka-topics.sh --describe --topic ${TOPIC_NAME} --bootstrap-server ${KAFKA_BROKERS} Producing messages to Kafka topic: # producing kafka messages/opt/cloudera/parcels/CDH/lib/kafka/bin/kafka-console-producer.sh --topic ${TOPIC_NAME} --broker-list ${KAFKA_BROKERS} Consuming messages from Kafka topic: # consuming kafka messages/opt/cloudera/parcel
Intro Online shopping is on the rise as more of us stay at home and let our credit cards do the walking. Keeping pace with that trend is an unfortunate increase in credit card fraud. It’s no surprise, really. According to Forbes, online fraud has been a growing problem for the past few years. And now, as consumers and businesses adapt to the worldwide pandemic and make more credit card transactions in the card-not-present (CNP) space, the resulting uptick in online shopping and e-commerce has opened up an even bigger playground for fraudsters to try out new tricks. Fraud detection has been a major issue for financial services and institutions. But artificial intelligence has an enormous potential to reduce financial fraud. Artificial intelligence applications have a great potential to detect and prevent fraud. Therefore, we will start a series of articles talking about that and how we can use Cloudera mechanisms to implement a whole Credit Card Fraud detection solution. But first, le
If you have erasure coded some directory and perform some operations on the directory you might have observed WARN messages like belowWARN erasurecode.ErasureCodeNative: Loading ISA-L failed: Failed to load libisal.so.2 (libisal.so.2: cannot open shared object file: No such file or directory)WARN erasurecode.ErasureCodeNative: ISA-L support is not available in your platform... using builtin-java codec where applicableThis WARN messages are due to ISA Library not being present on the node. Below are the steps to enable the library1) Clone the isa-l github repository.# git clone https://github.com/01org/isa-l.git2) Go to the cloned directory# cd isa-l3) Install yasm if you do not have it already# yum install -y yasm ---> centOS# apt-get install yasm ----> ubuntu4) Build the library # make -f Makefile.unx5) Copy the library files to lib directory# cp bin/libisal.so bin/libisal.so.2 /lib646) Verify that isa-l library is enabled properly# hadoop checknativeExpected output18/10/12 10
This video contains a step by step process that shows how to connect to Hive running on a secure cluster while using a JDBC Uber driver from MS Windows. Open the video on YouTube here Prerequisites: Validate username belong to the same @DOMAIN /Realm as the one setup on cluster nodes. Install DbVisualizer. Download Hive Uber driver for same version as HDP. Kerberos Java Config Get Kerberos /etc/krb5.conf from cluster, scp this file from any cluster node to c:\windows. Rename krb5.conf to c:\windows\krb5.ini. Edit krb5.ini and add property: (see video) property udp_preference_limit = 1 DbVisualizer Setup Add Hive Uber driver .jar to DBVisualizer as driver for Hive (see video). Add startup Java command line options to DBVisualizer for kerberos , under Tools (see video): -Dsun.security.krb5.debug=true-Djavax.security.auth.useSubjectCredsOnly=false-Djava.security.krb5.conf=c:\windows\krb5.in
in August 2021, we released CDP Private Cloud Base 7.1.7 LTS.This article will outline what that means.For each software release, we provide a version, General Availability (GA) date, and End of Service (EoS) date. These are all published and described here. CDP Private Cloud Base 7.1.7 LTS has a GA date of August 2021 and an EoS date of August 2025, providing a 4-year support window. We then offer two paths,Service Pack TrainThe Service Pack train is for customers who value a stable platform, service a lot of users or use-cases, and want a low risk, low costs in maintenance and operations. Rather than taking the new feature release, customers can instead take regular Cumulative Hotfix (CHF)*. These hotfixes are released pro-actively to address break-fix issues and CVEs. At certain pre-planned release date, the hotfixes will be rolled up into a Service Pack (e.g. SP1)**. * Cumulative Hotfix means each hotfix includes those that came before up to the initial release
Steps to connect from Legacy Cluster to CDP Public Cloud Hive: Build a connection string as follows using Hive Server Endpoint from DataHub by just adding the sslTrustStore and trustStorePassword along with workload username and password for PAM authentication.jdbc:hive2://master0.repro.cloudera/default;transportMode=http;httpPath=new/cdp-proxy-api/hive;ssl=true;sslTrustStore=gateway-client-trust.jks;trustStorePassword=*****;user=chella; Get the JKS file downloaded from CDP Knox (Token Integration) and copy it to HDP/CDH host. Get the latest JDBC jar "hive-jdbc-3.1.0-SNAPSHOT-standalone.jar" from CDW.CDP Control Plane > Management Console > Data Warehouse > click the 3 dots from any of Hive VW and "Download JDBC JAR" Copy the jar "hive-jdbc-3.1.0-SNAPSHOT-standalone.jar" to HDP/CDH host. Get into beeline from HDP/CDH host Add the jar using the following commandBeeline version 3.1.0.3.1.5.26-1 by Apache Hive 0: jdbc:hive2://c1544-node2> !addlocaldriverjar /roo
Perform the following steps to access the Hive MetaStore database :- SSH to the Data lake CM Node as 'cloudbreak' user.Run 'sudo -i' to gain root access.source activate_salt_envexport PGPASSWORD=$(salt-call pillar.get postgres:hive:password 2>/dev/null| tail -n 1 | awk '{print $1}')HIVE_DB=$(salt-call pillar.get postgres:hive:database 2>/dev/null| tail -n 1 | awk '{print $1}')HIVE_DB_USER=$(salt-call pillar.get postgres:hive:user 2>/dev/null| tail -n 1 | awk '{print $1}')psql -U ${HIVE_DB_USER} -d ${HIVE_DB}e.g. [root@xxxx-master0 ~]# source activate_salt_env(salt_3001.8) [root@xxxx-master0 ~]# export PGPASSWORD=$(salt-call pillar.get postgres:hive:password 2>/dev/null| tail -n 1 | awk '{print $1}')(salt_3001.8) [root@xxxx-master0 ~]# HIVE_DB=$(salt-call pillar.get postgres:hive:database 2>/dev/null| tail -n 1 | awk '{print $1}')(salt_3001.8) [root@xxxx-master0 ~]# HIVE_DB_USER=$(salt-call pillar.get postgres:hive:user 2>/dev/null| tail -n 1 | awk '{print $1
In NiFi the data being passed between operators is referred to as a FlowFile and can be accessed via various scripting languages in the ExecuteScript operator.In order to access the data in the FlowFile you need to understand a few requirements first.In this example we will access the json data being passed into the ExecuteScript operator via a getTwitter operator.This could be any data ingestion operator.Using the ExecuteScript (Note: Execute script will use Jython libraries which are good but limited. If you have a python script which uses other libs and produces an output you can use Execute Process instead which will execute the python script on the machine using the full python lib and the output will become your flow file. ) operator set the script type to python and in the "script body" section enter the following code:import jsonimport java.iofrom org.apache.commons.io import IOUtilsfrom java.nio.charset import StandardCharsetsfrom org.apache.nifi.processor.io import Stre
SYNOPSIS The Optimized Row Columnar (ORC) file is a columnar storage format for Hive. Specific Hive configuration settings for ORC formatted tables can improve query performance resulting in faster execution and reduced usage of computing resources. Some of these settings may already be turned on by default, whereas others require some educated guesswork. The table below compares Tez job statistics for the same Hive query that was submitted without and with certain configuration settings. Notice the performance gains with optimization. This article will explain how the performance improvements were achieved. QUERY EXECUTION Source Data: 102,602,110 Clickstream page view records across 5 days of data for multiple countries Table is partitioned by date in the format YYYY-MM-DD. There are no indexes and table is not bucketed. The HiveQL is ranking each page per user by how many times the user viewed that page for a specific date and within the United
This short example outlines how to configure Cloudera Machine Learning to integrate with the Data lake, Hive, and Iceberg tables.Apache Iceberg has a number of qualities that make it very suitable for Machine Learning. It maintains the metadata for the data layout alongside the data; this means there are no heavy network demands on the main catalog. The main catalog in this case Hive Metastore maintains a lightweight set of references to the data on the Data lake. Iceberg also supports snapshots and time-travel so that data can be versioned and queried at a specific point in time. Enable parallel processing in Spark Setup user credentials and default paths to the Data lake.spark-defaults.confspark.executor.instances 2spark.executor.memory 1gspark.executor.cores 2spark.hadoop.yarn.resourcemanager.principal christopherroylesspark.yarn.access.hadoopFileSystems s3a://demo-aws-go02/ Setup a Spark session Load the appropriate Iceberg JAR Add the required SQ
Cloudera has added a StreamNative community-supported processor. Reading OpenSea NFT with Apache NiFi, Apache Pulsar, and Friends. Meetup. StreamNative Upcoming Meetup Demo Apache Pulsar and Apache NiFi for Cloud Data Lakes Pulsar Build bin/pulsar-admin topics delete persistent://public/default/nftbin/pulsar-admin topics delete persistent://public/default/cryptobin/pulsar-admin topics create persistent://public/default/nftbin/pulsar-admin topics create persistent://public/default/cryptobin/pulsar-client consume "persistent://public/default/crypto" -s "nftreadercrypto" -n 0bin/pulsar-client consume "persistent://public/default/nft" -s "nftyreader" -n 0bin/pulsar-admin schemas get "persistent://public/default/nft" Apache NiFi Flows NiFi -> Pulsar Flow Example NFT JSON Record { "date" : "Thu, 24 Feb 2022 22:26:41 GMT", "short_description" : "", "featured" : "false", "image_thumbnail_url" : "https://lh3.googleusercontent.com/-dsYkPkvAQW6KvP0Nnbjecb4Pqo1RsLvTlKKDdSPiUR4LF
Running Livy on HDP 2.5Ingest Metrics REST API From Livy with Apache NiFi / HDFUse GetHTTP To Ingest The Status On Your Batch From LivyRunning LivyThe first step, we download Livy from github. To install on HDP 2.5, is simple. I found a node that wasn't too busy and put the project their. To run, it's simple:export SPARK_HOME=/usr/hdp/current/spark-client/ export HADOOP_CONF_DIR=/etc/hadoop/conf nohup ./livy-server &That's it, you have a basic unprotected Livy instance running. This is important, there's no security on there. You should either put Knox in front of this or enable Livy's security.I wanted to submit a Scala Spark Batch Job. So I wrote a quick one below to have something to call.Source Code for Example Spark 1.6.2 Batch Application: https://github.com/tspannhw/links https://community.hortonworks.com/repos/73816/links-spark-batch-application-example.html?shortDescriptionMaxLength=140Step 1: GetFileStore File /opt/demo/sparkrun.js with JSON to trigger Spark thr
Cloudera Machine Learning now offers Snippet to connect to Data Sources available within the CDP Environment. Administrators can configure custom Spark, Hive or Impala Virtual Warehouse data connections manually or they can use CML’s features to autodetect and configure all connections from the same CDP Environment. Data Scientists can then access the preconfigured Data Connections from their ML Projects. The Data Connection and Snippet support simplifies getting started on ML Projects. Once a project is created, the first time the users create a session they are offered code snippets to create a connection to their selected data store. Users don’t need to look up the connection boilerplate from the documentation or copy an example code from other projects, they can easily initiate the connection via CML’s connection library and immediately start solving their business problems. To learn more, you can read the How To article in the Cloudera Docs.
DISCLAIMER / CREDITS: The majority of the content of this community article was written by Adam Antal.My piece was correcting, adding, or revising the contents. I would like to thank Benjamin Teke, Andras Gyori, and Rudolf Reti for the reviews of this article.IntroductionThis community article is for Cloudera Data Platform Administrators and will clarify how the recent improvements in YARN logging will benefit their ability to manage and support their customers' workloads. In some circumstances YARN will generate a similar order of magnitude of data as that of the application and that can prove challenging for administrators to make use of for diagnostics. This article will illustrate how administrators can use these new features to streamline problem resolution and will be of benefit to developers that are designing YARN applications.The processes of YARN and its launched containers almost always generate application logs that can be potentially large, depending on the type of th
Zeppelin Best Practices Install & Versions Leverage Ambari to install Zeppelin and always use the latest version of Zeppelin. With HDP 2.6.2, Zeppelin 0.7.2 is available and it contains many useful stability & security fixes that will improve your experience. Zeppelin in HDP 2.5.x has many known issues that were resolved in 2.6.2Deployment Choices While you can select any node type to install Zeppelin, the best place is a gateway node. The reason gateway node makes most sense is when the cluster is firewalled off and protected from outside, users can still see the gateway node.Hardware Requirement More memory & more Cores are betterMemory: Minimum of 64 GB nodeCores: Minimum of 8 cores# of users: A given Zeppelin node can support 8-10 users. If you want more users, you can set up multiple Zeppelin instances. More details in MT section.Security: Like any software, the security depends on threat matrix and deployment choices. This section assumes a MT Zeppelin deployment. Aut
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.