Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
Some time ago I faced an interesting problem with a cluster failing to start after I replaced an MIT KDC with a FreeIPA KDC. For the replacement, I installed the ipa-client package on the cluster nodes, and then, changed the KDC configuration in Cloudera Manager (CM) (changed realm and KDC details, imported Kerberos user, re-generated credentials, etc..) The cluster refused to start. Besides that, CM's KDC Login monitor kept complaining about the KDC not being healthy. I could manually kinit successfully, though, and there seemed to be no KDC problems at first glance. After enabling debug at different places I saw that there were socket timeouts when processes tried to connect to the KDC and that those processes were actually trying to connect to the KDC over UDP, rather than TCP. The UDP requests explained the problem, since UDP traffic was blocked between the cluster and the KDC. What's strange, though, is that the kr
The page Connecting Kafka clients to Data Hub provisioned clusters in the Cloudera documentation explains how to configure the Kafka Console Consumer to connect to a Kafka cluster in DataHub. In this article, I will expand that explanation for a generic Java client and will show how to configure the client to use Schema Registry for the storage and retrieval of schemas. A full version of the code in this article can be found in GitHub. Client initialization The initialization of the KafkaConsumer or KafkaProducer client is done simply by passing a Properties object to its constructor. The Properties object can be either initialized programmatically or loaded from a properties file. Example: Properties props = new Properties();props.put("bootstrap.servers", "kafka-1.example.com:9093");... initialize other properties ...KafkaConsumer<String, Transaction> consumer = new KafkaConsumer<>(props); The initialization of a KafkaProducer is identical to the above. This con
Objective This tutorial walks you through a NiFI flow that utilizes the QueryRecord processor and Record Reader/Writer controller services to convert a CVS file into JSON format and then query the data using SQL. Note: The record-oriented processors and controller services were introduced in NiFi 1.2.0. As such, the tutorial needs to be done running Version 1.2.0 or later.Environment This tutorial was tested using the following environment and components: Mac OS X 10.11.6 Apache NiFi 1.3.0QueryRecord FlowSupport Files Here is a template of the flow discussed in this tutorial: queryrecord-csvtojson.xml Here is the CSV file used in the flow: users.txt (Change the extension from .txt to .csv after downloading) Note: The CSV data originated from the site, RandomUser. This useful site provides a free API to pull down randomly generated user data. For example: https://randomuser.me/api/0.6/?results=10&format=SQL.Demo ConfigurationInput Directory Create a local input direc
A short how-to article on how to list CDP Data hub Kafka topics via command line:PrerequisitesCDP DataHub Kafka clusterWorkload username & passwordCDP PC trust storeStepsFetch CDP cert and store in a trust storeCreating TLS truststoreor simple fetch it from any node /var/lib/cloudera-scm-agent/agent-cert/cm-auto-global_truststore.jks ssh into any Data hub Kafka node using CDP workload username/passwordCopy trust store onto the nodeSet broker host BROKER_HOST=$(hostname -f) Create jaas.conf KafkaClient {org.apache.kafka.common.security.plain.PlainLoginModule requiredusername="<workload username>"password="<workload password>";}; Set KAFKA_OPTS environment variable to point to location where jaas.conf is located export KAFKA_OPTS=-Djava.security.auth.login.config=<LOCATION-OF-YOUR-JAASCONF>/jaas.conf Create client-kerberos.properties
This article provides the steps and fields required to configure Streams Replication Manager using external accounts between two kerberized clusters. This article assumes that Kerberos is configured properly between the clusters and we can produce and consume data correctly. Environment details: Cluster A: co-located cluster (SRM and Kafka running in this cluster) CDP 7.1.7 Cluster B: External cluster which is another CDP 7.1.7 Both clusters are using SASL_PLAINTEXT security.protocol for their clients Clusters are configured with cross-domain realm (MIT kerberos), more details on cross-domain realm configuration here Steps to configure external accounts (feature available from CDP 7.1.7) Go to cluster A > Cloudera Manager > Administration > External accounts > Kafka Credentials tab Configure the following fields: Name Bootstrap servers Security protocol JAAS Secret [1-3] JAAS Template Kerberos Service Name SASL Mechanism Example: Name c289 Bootstrap
Spark uses the blacklist mechanism to enhance the scheduler’s ability to track failures. When a task fails on an executor, the blacklist module tracks the executor and host which has failed to execute the task. Beyond a threshold, the scheduler won't be able to schedule any more tasks on that node. If spark.blacklist.enabled is set to true, we need to always set the value of spark.blacklist.task.maxTaskAttemptsPerNode to greater than spark.task.maxFailures, else the Spark job will fail with the following error message: ERROR util.Utils: Uncaught exception in thread mainjava.lang.IllegalArgumentException: spark.blacklist.task.maxTaskAttemptsPerNode ( = 2) was >= spark.task.maxFailures ( = 2 ). Though blacklisting is enabled, with this configuration, Spark will not be robust to one bad node. Decrease spark.blacklist.task.maxTaskAttemptsPerNode, increase spark.task.maxFailures, or disable blacklisting with spark.blacklist.enabled. If you try to trigger the following job from shell of e
Running SQL on stream is super simple with SQL Stream Builder, via Flink SQL. I recorded a live demo and this article is to provide supporting artifacts to run it. Demo Flink SSB Credit Card Fraud Demo Prerequisite Quick setup Note If you experience any challenges with running SSB, as a sanity check run the following on the cluster flink-yarn-session -d \ -D security.kerberos.login.keytab=<keytab_filename>.keytab \ -D security.kerberos.login.principal=<workload_username> If the above works as a sanity check, kill the yarn job. yarn application -appStates RUNNING -listThat will display all running yarn apps. Your app will show up in this list. Then run this to kill the appyarn application -kill application_xxxx customer_inferences table CREATE TEMPORARY TABLE customer_inferences ( `customer_id` INT, `account_number` STRING, `center_inferred_lat` FLOAT, `center_inferred_lon` FLOAT, `max_inferred_distance` STRING,
Prerequisites Base cluster with Hive on Tez, Zookeeper, Spark services installed DDL files copied to the base cluster Steps Using beeline Kinit with hive user to base cluster host where Zookeeper is installed. We can get Zookeeper using CM client services.Example: Execute beeline command on Zookeeper host. Sample beeline URL: beeline -f {data.sql} -u 'jdbc:hive2://{zookeeper_server}:2181/default;" \ f"serviceDiscoveryMode=zooKeeper;ssl=true;sslTrustStore={crt.jks};trustStorePassword={password} Using Impala shell Kinit with impala user to base cluster host where Zookeeper/impala-server is installed. We can get Zookeeper, impala server using CM client services Execute impala-shell command on Zookeeper/Impala host. Sample impala-shell command: impala-shell -i {impala_server}:25003 -d default -k --ssl -f {data}.sql
I often encounter the following question - "How to connect a Java application to CDP Kafka?". The good news is, it's simple. Public docs: Connecting Kafka clients to Data Hub provisioned clusters CDP Kafka, by default, is secure and governed. That means CDP Kafka uses TLS and CDP workload users for security and authorization. CDP Kafka supports all Apache Kafka authentication capabilities. Again, by default, CDP Kafka is automatically secured <SASL_SSL> and governed by Apache Ranger. Prerequisites CDP Public Cloud with a Kafka DataHub instance. Connectivity requirements To connect to CDP Kafka, the following is required: CDP TrustStore CDP Workload Username/Password Kafka Broker Name JaaS File Java Example Properties properties = new Properties(); properties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "<KAFKA-BROKER>:9093,<KAFKA-BROKER>:9093,<KAFKA-BROKER>:9093"); properties.put(ProducerConfig.KEY_SERIALI
The purpose of this article is to explain what Process Groups and Remote Process Groups (RPGs) are and how input and output ports are used to move FlowFiles between them. Process groups are a valuable addition to any complex dataflow. They give DataFlow Managers (DFMs) the ability to group a set of processors on to their own imbedded canvas. Remote Process groups allow a DFM to treat another NiFi instance or cluster as just another process group in the larger dataflow picture. Simply being able to build flows on different canvases is nice, but what if I need to move NiFi FlowFiles between these canvases? This is where input and output ports come in to play. They allow you move FlowFiles between these canvases that are either local to a single NiFi or between the canvases of complete different NiFi instances/clusters. Embedded Process Groups: Lets start by talking about the simplest use of multiple embedded canvases through process groups. When you started NiFi for the very first time
Recently I came around an interesting problem: how to use boto to get data from a secure bucket in a Jupyter notebook in Cloudera Machine Learning. The missing piece was: I needed to get my code integrated with my AWS permissions given by IDBroker.Since CML already authenticated me to Kerberos, all I need was getting the goods from IDBroker. In this article, I will show you pseudo code on how to get these access keys both in bash and python.Note: Special thanks to @Former Member to whom I owe this article and many more things. Find your IDBroker URL Regardless of the method, you will need to get the URL for your IDBroker host. This is done simply in the management console of your datalake. The following is an example: Getting Access Keys in bash After you are connected to one of your cluster's node and ensure you kinit, run the following:IDBROKER_DT="$(curl -s --negotiate -u: "https:/[IDBROKER_HOST]:8444/gateway/dt/knoxtoken/api/v1/token")"
This article describes the method to remove Ranger Plugin status records for unused services. For example, the records are underlined in the following screenshot. There is no menu option to remove such records in the web user interface. The only way to remove them is to manually delete the records from x_plugin_info table directly from the Ranger database. Once connected to the Ranger database, run the following:select * from x_plugin_info; Identify the record ID for the record you want to remove.delete from x_plugin_info where id = Record_ID;
Many times, Support need to have a look at the Microsoft AD tree for AD internal configuration (e.g. CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration, <domain>). The problem with this part of the AD tree is - it is not visible by default in the AD directory structure. This article will help the reader to explore the hidden AD tree. Any change in AD should be carried out by the customer’s AD team or admin. Instructions Here are the steps: Log on to the AD server Run the ADSIEdit.exe program from Start > Run menu. Select the top-most entry of the left side, and then, select Action > Connect to... from the menu. In the next dialog box, select Select a well known Naming Context radio button, and select Configuration from the drop-down menu. Click OK and ADSI Edit will now show CN=Configuration and its sub-tree. We can now traverse to CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration, <domain> part easily as seen above. Example: For Mic
HiveServer2 is a thrift server which is a thin Service layer to interact with the HDP cluster in a seamless fashion. It supports both JDBC and ODBC driver to provide a SQL layer to query the data. An incoming SQL query is converted to either TEZ or MR job, the results are fetched and send back to client. No heavy lifting work is done inside the HS2. It just acts as a place to have the TEZ/MR driver, scan metadata infor and apply ranger policy for authorization. Configurations :TEZ parameters Tez Application Master Waiting Period (in seconds) -- Specifies the amount of time in seconds that the Tez Application Master (AM) waits for a DAG to be submitted before shutting down. For example, to set the waiting period to 15 minutes (15 minutes x 60 seconds per minute = 900 seconds):tez.session.am.dag.submit.timeout.secs=900 Enable Tez Container Reuse -- This configuration parameter determines whether Tez will reuse the same container to run multiple queries. Enabling this parameter improves
Since Ranger 0.5 there has been the ability to summarize audit events that differ only by timestamp to reduce the amount of events logged in a busy system. When enabled, if a Ranger plugin logs consecutive audit events that differ only by timestamp it will coalesce all such events in to a single event and set 'event_count' to the number of events logged and 'event_dur_ms' to the time difference in milliseconds between the first and last event.To enable this feature you must set the following properties in the Ranger plugin's configuration:Configuration nameNotesxasecure.audit.provider.summary.enabledTo enable summarization set this property to true. This would cause audit messages to be summarized before they are sent to various sinks.By default it is set to false i.e. audit summarization is disabled.xasecure.audit.provider.queue.sizeIf unspecified this value defaults to 1048576, i.e. the queue is sized to store 1M (1024 * 1024) messages.Note the difference in property name that contr
Objective With the release of NiFi Registry 0.2.0, flow contents can now be stored under a Git directory using the new GitFlowPersistenceProvider. This tutorial walks you through how to configure this provider in NiFi Registry so that versioned flows in NiFi are automatically saved to a Git repository. A video version of this tutorial can be seen here: https://youtu.be/kK7eVppg9Aw Environment This tutorial was tested using the following environment and components: Mac OS X 10.11.6 Apache NiFi Registry 0.2.0 Apache NiFi 1.7.1 GitFlowPersistenceProvider Git Configuration First, create a new GitHub repo: then clone it locally using the git clone command (e.g. git clone https://github.com/andrewmlim/versioned_flows.git): Next, go to GitHub’s “Developer settings” and create a new “Personal access token”: NiFi Registry Configuration In the ./conf/providers.xml file, configure the following properties: Set org.apache.nifi.registry.provider.
When you install Cloudera Manager you can configure the mail server you will use with the Alert Publisher. However, if you need to change these settings, you can do so under the Alert Publisher section of the Management Services configuration tab. Through Alert Publisher we can get the alerts for a different type of service status like Bad, Warning, Good. Under the Alert Publisher role of the Cloudera Manager Management Service, you can configure email or SNMP delivery of alert notifications and you can also configure a custom script that runs in response to an alert. The information on how to configure the alert can be found in the official documentation of Cloudera. Please check the provided link [1].However, we will discuss some of the common issues faced while configuring or receiving the alert delivery. Common Issues Over Alert Publisher-> 1- Sometimes we are not able to receive the alert to the SMTP/SNMP server end. While checking the alert-publisher logs, the b
What is CRN?CRN is an acronym for Customer Resource Number and this is a Cloudera-specific identifier for an environment. The CRN uniquely identifies the environment as well as the CDP control plane that is used to create it.Where can I find the CRN?It is located prominently on the Details page of each CDP environment. Steps to find the CRN for an environment:Click Environments from the CDP Management Console in the left panel next to Dashboard Type in the name of the environment in the search bar. In the screenshot here, the search key is "orrep-aw-env"Click on the "Name" of the environment. This should show the details of the environmentClick Data LakeNow, click Copy to Clipboard icon next to "crn: ..." in the header This should copy the CRN to the clipboard. Now you can paste it as and where needed.
In this article, we will learn how to integrate Zeppelin JDBC (Phoenix) interpreter example. 1. Configuring the JDBC (Phoenix) interpreter:Login to Zeppelin UI -> Click on the user name (in my case, admin) at the right-hand corner. It will display a menu > click on Interpreter. Click on + Create at the right-hand side of the screen. It will display a popup menu. Enter Interpreter Name as jdbc and select Interpreter Group as jdbc. Then, it will populate Properties in table format. Click on + button and add the Phoenix-related properties according to your cluster, and click on the Save button. phoenix.driver org.apache.phoenix.jdbc.PhoenixDriver phoenix.url jdbc:phoenix:localhost:2181:/hbase phoenix.user phoenix.password 2. Creating the Notebook: Click Notebook dropdown menu in the top left-hand corner and select Create new note and enter Note Name as Phoeni
This article describes various "recipes" on how to accomplish certain tasks with the NiFi processor ExecuteScript, with examples given in Groovy, Jython, Javascript (Nashorn), and JRuby. This is Part 3 in the series, I will be discussing advanced features such as dynamic properties, modules, state management, and accessing/using Controller Services. Part 1 - Introduction to the NiFi API and FlowFiles Getting a flow file from an incoming queue Creating new flow files Working with flow file attributes Transferring a flow file Logging Part 2 - FlowFile I/O and Error Handling Reading from a flow file Writing to a flow file Reading and writing to/from a flow file Error Handling Part 3 - Advanced Features Using Dynamic Properties Adding Modules State Management Accessing Controller Services Advanced Features The first two articles in the series covered the basics of flow file operations, such as reading/writing attributes and content, as well as retrieving and transferring flow
Components required: jconsole (UI required) jmxterm (for Linux environment - CLI only) Kafka client (java producer/consumer) exposing JMX Kafka Brokers exposing jmx Steps to get the available metrics (mbeans) available in a Kafka consumer (Environment with a UI available): Add the following JVM properties to your java consumer:-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false After starting, your consumer uses jconsole to connect to the host:port specified in Step 1. After we add the <producer-hostname>:<JMXPort>, we should be able to see the following in the jconsole UI. Here, we have to click on the mbeans tab and navigate through the available metrics, in this example, we want to see the "records-consumer-rate" which in the program has the following definition "The average number of records consumed per second".In this case, the average
Problem: Trying to use sudo to run commands(as root) in a cluster gives error " Stderr: Pseudo-terminal will not be allocated because stdin is not a terminal. sudo: sorry, you must have a tty to run sudo" This is a common situation where you are login as some other user in a terminal and then sudo to root to perform the task. And you can only ssh from the user you logged in and not from root. Solution: Note: You have to install pssh if it is not already installed. in your cluster.Keep all host names in a file say all_hosts This kind of execution will fail:pssh -i -h all_hosts "sudo whoami;hostname -f" Will fail to execute and give error: Stderr: sudo: sorry, you must have a tty to run sudo OR pssh -i -h all_hosts -x "-t" "sudo whoami;hostname -f" Will fail to execute and give error:Stderr: Pseudo-terminal will not be allocated because stdin is not a terminal. sudo: sorry, you must have a tty to run sudo The correct command should be run like this:pssh -i -h all_hosts -x "-t -t" "sudo
This article will show you how to interact with Atlas APIs in CDP-public to create tags and associate tags with entities (in preparation for use with Ranger's tag based policies) In Cloudera CDP-public offering, Apache Atlas is a part of SDX DataLake cluster that is created when you create your first Environment: Introduction to Data Lakes Pre-requisites A. First, you will need to find the Atlas endpoint using the Cloudera CDP management console: Accessing Data Lake services Sample Atlas endpoint: https://pse-722-cdp-xxxxx.cloudera.site/pse-722-cdp-dl/cdp-proxy-api/atlas/api/atlas/ B. Next, you will need to set your user's workload password Setting the workload password Now you can use the following sample bash code to interact with Atlas APIs from a CentOS instance outside CDP: From Atlas endpoint, you can extract the first 2 params below. You will also need to set your username and password: export datalake_name='pse-722-cdp-dl'export lake_ip='pse-722-cdp-xxxxx.
This article applies to HDP 2.5.x and below. For HDP 2.6, please check new article. Zeppelin can be configured to leverage an organization's Active Directory infrastructure for user authentication. By doing this, the existing Active Directory users can login to Zeppelin UI using their Active Directory credentials. This article discuss how to configure this kind of setup. Environment Setup: HDP 2.5 cluster / Sandbox - I'm using HDP 2.5 Sandbox on VirtualBox. Get one from here ! Ambari 2.4+ - I'm using Ambari 2.4.0.0 which comes with HDP 2.5 Sandbox 'Zeppelin Notebook' Service installed in Ambari - With HDP 2.5 Sandbox, it will be Zeppelin version 0.6.0 - If you don't have Zeppelin installed, it can be installed via 'Add Service' option in Ambari Active Directory - I'm using Active Directory 2012 R2 version - Make sure that you have 'working' Active Directory details handy like URI, bind DN/password, search base etc. Configuration Steps: 1. From Ambari Dashboard, navigate to Zeppelin Not
My previous article demonstrated how to use the CDE-managed Airflow instance to read files from CML. To close the loop, here is a short demonstration on how to write files to CML using CDE's managed Airflow instance. Artifacts Airflow dag Demo
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.