Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
Hey Cloudera Community!We're thrilled to announce our latest addition to the Cloudera AMP catalog - Text Summarization and more with Amazon Bedrock! If you've been keen on tapping into the power of foundation models from leading AI companies like Amazon, this AMP is crafted just for you.What are AMPs?Applied ML Prototypes (AMPs) are pre-packaged ML projects designed for easy deployment within Cloudera AI. AMPs enable data scientists to go from an idea to a fully working ML use case in a fraction of the time.What's Inside:Guided Setup: Navigate effortlessly through the setup process and start using the Amazon Bedrock API in no time.Highlighted Models: Dive deep with two powerful models:amazon.titan-tg1-largeanthropic.claude-v2 (Supports a whopping 100K tokens in the prompt!)Flexibility in Action: Customize the instruction prompts as needed to instruct the models for diverse text generation tasks.API Guidance: Benefit from clear directions on prompt formats and request API schema for has
Synopsis.ORC is a columnar storage format for Hive.This document is to explain how creation of ORC data files can improve read/scan performance when querying the data. TEZ execution engine provides different ways to optimize the query, but it will do the best with correctly created ORC files.ORC Creation Strategy.Example:CREATE [EXTERNAL] TABLE OrcExampleTable(clientid int, name string, address string, age int)stored as orcTBLPROPERTIES ("orc.compress"="ZLIB","orc.compress.size"="262144","orc.create.index"="true","orc.stripe.size"="268435456","orc.row.index.stride"="3000","orc.bloom.filter.columns"="clientid,age,name");Ingesting data into Hive tables heavily depends on usage patterns. In order to make queries running efficiently, ORC files should be created to support those patterns. -Identify most important/frequent queries that will be running against your data set (based on filter or JOIN conditions)-Configure optimal data file size-Configure stripe and stride size-Distribute and so
Pandas is a fast, powerful and flexible Python data analysis and manipulation tool. It has gained incredible popularity in the Data Science community as one of the most important packages for data wrangling and preparation. With the Pandas DataFrame at the core of its API, it is very simple to use and performant on relatively small datasets. On the other hand, Apache Spark is an open-source, distributed processing system used for big data workloads. It has also gained extreme popularity as the go-to engine for prototyping and deploying Data Engineering and Machine Learning pipelines at scale. Due to the maturity and reliability that the Spark project has achieved in recent years it is widely used for production use cases in the enterprise.Like Pandas, Spark features an API with the DataFrame as a foundational data structure for analyzing data at scale. However, while it is dramatically more performant at scale than Pandas it has never been quite as easy and intuiti
After updating from CM 7.6.1 to CM 7.7.1, we are unable to connect the multiple PQS with the KNOX using the ODBC, Always getting the 500 error. But there is no issues when we are using the JDBC. The cause of the issue is due to the topology change after the CM upgrade, for services such as HIVE and AVATICA. --------------------------------------------------------------------------------------from:<value>enabled=true;maxFailoverAttempts=3;failoverSleep=1000;maxRetryAttempts=300;retrySleep=1000;</value>to:<value>enableStickySession=true;noFallback=true;enableLoadBalancing=true</value>---------------------------------------------------------------------------------------- This is in order to support the Knox load balancer feature. And we followed the below steps to revert the changes for existing cluster. Knox --> Configuration --> Knox Gateway Advanced Configuration Snippet (Safety Valve) for conf/cdp-resources.xml<name>providerConfigs:pam</name>
High level Problem ExplanationThe primary garbage collection challenge often arises when the heap configuration of the Namenode or Datanode is inadequate. GC pauses can trigger Namenode crash, failovers, and performance bottlenecks. In larger clusters, there is no response at the time of transitioning to an another Namenode.Detailed Technical ExplanationThe Namenode comprises three layers of management:Inode ManagementBlock ManagementSnapshot ManagementAll of these layers are stored in the Namenode in-memory heap, and any substantial modifications to them can lead to increased heap usage.Similarly, the Datanode also maintains block mapping information in its memory.Example Of Inode Reference <inode> <id>26890</id> <type>DIRECTORY</type> <name>training</name> <mtime>1660512737451</mtime> <permission>hdfs:supergroup:0755</permission> <nsquota>-1</nsquota><dsquota>-1</dsquota>&
ObjectiveThis article provides a Quickstart for using XGBoost with Spark in Cloudera Machine Learning. CML users who are looking to test a distributed version of XGBoost are welcome to use the code in their environments. The notebook is available in this Git repository. Cloudera Machine LearningCloudera AI on the Cloudera Data Platform increases data scientists' productivity by providing a single, unified platform that is all-inclusive for powering any AI use case.CML is purpose-built for agile experimentation and production ML workflows. It is designed to manage everything from data preparation to MLOps and predictive reporting. For more information on CML, please visit this page.XGBoost and SparkIn Machine Learning, Decision Tree methods are a type of Supervised Learning model. They have been used for decades in both classification and regression tasks. There are many types; generally, they are constructed by identifying ways to split data into hierarchical s
OverviewThis handbook focuses on Cloudera’s new adapter dbt-hive that enables users to use dbt on top of the Hive data warehouse system. 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.15Cloudera Data Warehouse on CDP v 1.4.2-b118dbt-core: 1.2.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-hive-example/Installing the packages:Run the following commands in your terminal to install the required packages/dependencies using pip/pip3:python3 -m pip install dbt-corepython3 -m pip install sqlparams==3.0.0python3 -m pip install impyla==0.18python3 -m pip install dbt-hiveCloudera Data Warehouse&
Issue During the installation of the latest version of mlflow for the custom runtime engine in CDSW 1.10.x, it's still using cmladdon’s version rather than the version installed via pip. For example, in one case, the error recorded was the following: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflict mlflow-cml-plugin 0.0.1 requires protobuf==3.19,4, but you have protobuf 4.24.0 which is incompatible. onnx 1.12.0 requires protobuf<=3.20.1,>=3.12.2, but you have protobuf 4.24.0 which is incompatible.ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflict mlflow-cml-plugin 0.0.1 requires protobuf==3.19,4, but you have protobuf 4.24.0 which is incompatible. onnx 1.12.0 requires protobuf<=3.20.1,>=3.12.2, but you have protobuf 4.24.0 which
Hi Everyone, I ran into a situation where I have to the following XML Input: <workspace id="1234"><documents totalCount="2"><document id="5555" title="document1" revision="1"><file name="file1.pdf" type="pdf"/><attributes> <attribute name="custAtt1" value="v1"/> <attribute name="custAtt2" value="v2"/> <attribute name="custAtt3" value=""/></attributes></document><document id="6666" title="document2" revision="0"> <file name="file2.xlsx" type="xlsx"/> <attributes> <attribute name="custAtt1" value="v1"/> <attribute name="custAtt2" value="v2"/> <attribute name="custAtt3" value="v3"/> </attributes></document></documents></workspace> Here, each /workspace/documents/document record needed to be split and transformed into JSON, where: Each document object needs to have the workspace ID it belongs to. Each document attribute value will be as
Introduction: This article is designed to get the reader to call a deployed CML model from Apache NiFi or Cloudera Data Flow as quickly as possible. It will require using one of Cloudera's Applied Machine Learning Prototypes (AMPs) on Customer Churn and the Apache NiFi Flow provided in this article. (Git Repo Here) Prerequisites: Apache NiFi instance is running. CML's AMP Customer Churn App is running with a Churn Model deployed. Download the user data file and Apache Nifi flow from this repo. The user data file needs to be added to the file location where NiFi's GetFile Processor has permissions. Launch CML Churn AMP In the AMP catalog, select Churn Modeling with skit-learn, and configure a new project. This will take 5-7 minutes to complete. You will need to deploy a model inside of CML, which isn't in the scope of this article. Once you finish, you will be able to see the following screen, which will provide the URL location an
In this article, we will learn how to run scheduled ETL workloads on CDE ( Cloudera Data Engineering ) and CDW ( Cloudera Data Warehouse) using Airflow. CDE 1.4 release provides the capability to schedule Airflow jobs (shipped along with CDE). If we need to learn more about Airflow, refer to the Airflow website. This release adds two Airflow operators: CDEJobRunOperator and CDWOperator. The CDEJobRunOperator behind the scene calls the jobs API of CDE to run Spark jobs. More details on jobs API can be found here. The CDWOperator behind the scene makes use of JDBC connection to interact with CDW Hive Virtual warehouse or Impala Virtual warehouse. In this article to demonstrate ETL workload, we will be reading CSV from AWS S3 bucket using Spark, perform a transformation (via CDEJobRunOperator) and load the processed data to CDW warehouse using Airflow CDWOperator. Pre-Requisite CDP environment is created and CDW, CDE experience are provisio
This is a simple command that can be used to run via a browser to change the log level without needing a restart.For Hbase Master:http://<SERVER-HOSTNAME>:16010/logLevel?log=org.apache.hadoop.hbase& level=<DESIRED-LOG-LEVEL>For HBase Region Server:http://<SERVER-HOSTNAME>:16030/logLevel?log=org.apache.hadoop.hbase& level=<DESIRED-LOG-LEVEL> **NOTE:Please make sure there is no space between '&' and 'level'. There seems to be a formatting issue in HCC because of which a space was introduced in the syntax.<SERVER-HOSTNAME> : Represents the hostname of the server where the daemon is running.<DESIRED-LOG-LEVEL>: Represent the log level that is desired by the user to have. Ex. INFO, DEBUG,..
Spark3 HBase Integration This blog post will guide you through the process of integrating Spark 3 with HBase, providing you with valuable insights and step-by-step instructions.Note: This blog post will cover both Spark3 and HBase services only when they exists in the same cluster. If HBase is in remote cluster, you can go through the hbase-configure-spark-connector-remote-cluster tutorial.PrerequisitesTo use HBase-Spark3 connector, we need to ensure that CDP version is 7.1.7 SP1 Spark3 parcel or above.Ensure that every Spark node has the HBase Master, Region Server, or Gateway role assigned to it. If no HBase role is assigned to a Spark node, add the HBase Gateway role to it, which ensures that the HBase configuration files are available on the Spark node.HBase Integration with Spark3HBase integration with Spark can be achieved using the HBase-Spark Connector, which provides a seamless way to interact with HBase from within Spark applicati
Description Repo Name: cml_vscode_with_python310Repo Info: VsCode using Python 3.10, instead of the existing VsCode example using Python 3.7. Repo URL: https://github.com/ryancicak/cml_vscode_with_python310
I recently received a question "We'd like to have Python and R installed in the docker image for a package. Is it possible to have such customized docker with python >=3.7, R>=4.0 and CUDA==11.7?" I'd like to go through how I accomplished this using the pbj-workbench-r4.1-standard.Dockerfile. This runtime has the essentials (Python and R) except for CUDA (NVIDIA GPU). Therefore, we'll use pbj-workbench-r4.1-standard.Dockerfile as a base image. It's important to note that CML requires a runtime kernel that needs to be either R or Python, it can't be both. I'll go through three different iterations of this image: Iteration 1 - Since this image already has R and Python installed, we'll change the runtime NOT to use Rryancicak/pbj_r-and-python:v9 -> Python 3.10 (GitHub Tag: python/3.10/standard_dockerhub_v9)https://github.com/ryancicak/pbj_r-and-python/blob/python/3.10/standard_dockerhub_v9/Dockerfile Iteration 2 - G
Spark Streaming Graceful shutdownSpark Streaming jobs are long-running jobs and their tasks need to be executed 7*24 hours, but there are cases like upgrading the code or updating the Spark configuration, where the program needs to be actively stopped. However, for distributed programs, there is no way to kill processes one by one. It is very important to shut down all configurations gracefully.There are two ways to shut down streaming applications:Non-graceful shutdownGraceful shutdown1. Non-graceful shutdownA non-graceful shutdown is a violent shutdown process. Stopping Spark streaming violently may cause problems. For example, if your data source is Kafka, and a batch of data has been loaded into Spark streaming for processing. If it is forced to stop, consumption will be repeated or some data will be lost at the next startup. Disadvantages:Spark Streaming works based on the micro-batch mechanism, RDD is generated according to the interval time. If a violent shut
OBJECTIVE:Provide a quick-start guide for using the Jolt language within a NiFi JoltTransform (JoltTransformJSON or JoltTransformRecord).OVERVIEW:The NiFi JoltTransform uses the powerful Jolt language to parse JSON. Combined with the NiFi Schema Registry, this gives NiFi the ability to traverse, recurse, transform, and modify nearly any data format that can be described in AVRO or, using JSON as an intermediary step.Although the language itself is open-source, and some documentation is available in the JavaDoc, this article can provide a starting point for understanding basic Jolt operations.PREREQUISITES:HDF 3.0 or later (NiFi 1.2.0.3 or later)BASICS OF JOLT:Simplified OverviewThe JoltTransform applies a set of transformations described in a JSON specification to an input JSON document and generates a new output JSON document.Jolt SpecificationOverviewA Jolt Specification is a JSON structure that contains two root elements:operation (string): shift, sort, cardinality, modify-default-b
Starting from NiFi 1.14, you can specify the TLS ciphers to be used by NiFi web service by using below property: nifi.web.https.ciphersuites.include You can also specify the TLS Ciphers to be excluded by using below property: nifi.web.https.ciphersuites.exclude This enhancement is part of Apache Jira NIFI-3580. For Cloudera CFM, these properties are exposed (and usable) from CFM 2.1.3 and above. Note: The values for above properties should take the form of a comma-separated list of common cipher names as specified here. The regular expressions (for example ^.*GCM_SHA256$) may also be specified.
Spark3 Kudu Integration This blog post will guide you through the process of integrating Spark 3 with Kudu, providing you with valuable insights and step-by-step instructions. Apache Kudu Kudu is a distributed columnar storage engine optimized for OLAP workloads. Kudu runs on commodity hardware, is horizontally scalable, and supports highly available operations. Kudu Integration with Spark Apache Kudu can be integrated with Apache Spark using the built-in Spark-SQL-Kudu library. This integration allows us to read from and write to Kudu tables directly from Spark applications using Spark SQL. Kudu integrates with Spark through the Data Source API as of version 1.0.0. To integrate Kudu with Spark3, we need to use kudu-spark3_2.12 library. Below are the step-by-step instructions to seamlessly integrate Kudu with Spark3: Impala/Kudu: Step 1: Launch the impala-shell Go to the Cloudera Manager > Impala > Status > Copy the Impala Shell Com
When starting NiFi, it uses the default staging path which is /home/NiFi/. This path needs the Execute permissions for NiFi binaries to avoid NiFi from failing to starting . The below error would also indicate the cause of this issue; Caused by: java.lang.UnsatisfiedLinkError: /home/nifi/.cache/JNA/temp/jna3526468256198020468.tmp: /home/nifi/.cache/JNA/temp/jna3526468256198020468.tmp: failed to map segment from shared object: Operation not permitted Solution In case of security hardening (noexec) for /home, you need to change the default staging directory in NiFi by using the below parameters: CM > NIFI > ConfigsNiFi Node Advanced Configuration Snippet (Safety Valve) for staging/bootstrap.conf.xmladd the following:Name: java.arg.jnaValue: -Djna.tmpdir=/NEWPATHRestart NIFI services.
Windows Event Logs are stored and exported in the evtx format. This makes them difficult to work with in a programmatic fashion, especially outside the Windows ecosystem. In order to facilitate the processing of Windows event data in Apache NiFi, a processor capable of parsing evtx files has been created.It works using a parser ported from Python into pure Java and modified to read the file one chunk (64k) at a time to allow for processing large files without pulling the entire input FlowFile into memory.The Processor expects incoming FlowFiles with evtx files as their contents. It only requires the user to specify a desired granularity of output. This allows the user to decide how the evtx file is broken up into individual FlowFiles with the event records translated to XML.ParseEvtx has 4 output relationships. It will output the unmodified FlowFile to the original relationship. Any malformed chunks encountered will be sent to the bad chunk relationship. Regardless of the configuration
IntroductionRecently I was asked how to monitor and alert flowfile count in a connection queue when it exceeds a predefined threshold, I am trying to capture the steps to implement the same.Prerequisites1) To test this, Make sure HDF-2.x version of NiFi is up an running.2) You Already have a connection with data queued in it(say more than 20 flowfiles). Else you can create one like below:3) Make a note of the Connection name and uuid to be monitored:Creating a Flow to Monitor Connection Queue Count.1) Drop a GenerateFlowFile processor to the canvas and make "Run Schedule" 60 sec so we dont execute the flow to often.2) Drop an UpdateAttribute processor, connect GenerateFlowFile's success relation to it and add below properties to it( the connection uuid noted above, threshold say 20, your NiFi host and port):CONNECTION_UUID : dcbee9dd-0159-1000-45a7-8306c28f2786COUNT : 20NIFI_HOST : localhostNIFI_PORT : 80803) Drop a InvokeHTTP processor to the canvas, connect Upda
After upgrading to CFM 2.1.5 SP1from an older version, PublishKafkaRecord_1_0 stops working with the below error: PublishKafka_1_0[id=36f1cffe-503d-3181-a562-ae216b5616b5] Processing halted: yielding [1 sec] java.lang.IllegalArgumentException: SaslMechanism value [null] not found at org.apache.nifi.kafka.shared.property.SaslMechanism.lambda$getSaslMechanism$1(SaslMechanism.java:57) at java.base/java.util.Optional.orElseThrow(Optional.java:408) at org.apache.nifi.kafka.shared.property.SaslMechanism.getSaslMechanism(SaslMechanism.java:57) at org.apache.nifi.kafka.shared.login.DelegatingLoginConfigProvider.getConfiguration(DelegatingLoginConfigProvider.java:51) at org.apache.nifi.kafka.shared.property.provider.StandardKafkaPropertyProvider.setSecurityProperties(StandardKafkaPropertyProvider.java:86) at org.apache.nifi.kafka.shared.property.provider.StandardKafkaPropertyProvider.getProperties(StandardKafkaPropertyProvider.java:75) This happens due an improvement performed in N
Summary As Kafka works with many log segment files and network connections, the Maximum Process File Descriptors setting may need to be increased in some cases in production deployments, if a broker hosts many partitions Warnings observed Concerning : Open file descriptors: 18,646. File descriptor limit: 32,768. Percentage in use: 56.90%. Warning threshold: 50.00%. In case of such open file descriptor warnings in Kafka for CDP, you need to increase file descriptors in Kafka cluster. As per the guide [1], below formula is used (number of partitions)*(partition size / segment size)Details about these parameters are as follows:a. Number of partitions > it can be seen if you go to SMM and brokers tab. Alternatively, you can simply perform a file count of the kafka data directory. You can find this directory in CM > Kafka > log.dirsb. Partition size > it is the size of log.dirs directory, you can check the disk usage of log.dirs using du -sh command to find this size.c. Segment
High level Problem Explanation The occurrence of the "block missing" and "block corruption" alerts is observed in the Cloudera Manager dashboard or the namenode webui. While there isn't a common cause, these alerts can be due to any of the outlined issues. Detailed Technical Explanation When the namenode does not receive reports for all of the block replicas of a file, it marks those blocks as missing. Similarly, when all the block replicas are corrupted, the namenode marks them as corrupt. However, if at least one of the block replica(1/3) is reported as being healthy, then there is no missing or corruption alert. There are multiple scenarios in which blocks can be marked as missing and corrupt. Scenario 1 During a major upgrade, users may encounter block missing errors. This issue arises due to insufficient datanode heap. The upgrade process involves migrating the disk layout and requires additional datanode heap space. users who are upgrading to releases C
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.