Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
First, you should go to the Apache Spark downloads web page to download Spark 2.0. Link to Spark downloads page:http://spark.apache.org/downloads.htmlSet your download options (shown in image below), and click on the link next to "Download Spark" (i.e. "spark-2.0.0-bin-hadoop2.7.tgz"):This will download the gzipped tarball to your computer.Next, startup the HDP 2.5 Sandbox image within your virtual machine (either using VirtualBox or VMFusion). Once the image is booted, startup a Terminal session on your laptop and copy the tarball to the VM. Here is an example using the 'scp' (secure copy) command, although you can use any file copy mechanism.scp -p 2222 spark-2.0.0-bin-hadoop2.7.tgz root@127.0.0.1:~ This will copy the file to the 'root' user's home directory on the VM. Next, login (via ssh) to the VM:ssh -p 2222 root@127.0.0.1Once logged in, unzip the tarball with this command:tar -xvzf spark-2.0.0-bin-hadoop2.7.tgzYou can now navigate to the "seed" directory already created for Spar
Note:Ranger communicates with Plug-ins only with 2 WAY SSL (1 way SSL in not allowed).[Updated] Appears like one way SSL is possible with latest patch - https://issues.apache.org/jira/browse/RANGER-1094First get server keystore as skeystore.jks and truststore strustore.jks and client keystore as ckeystore.jks and ctruststore.jks (you can create these keystore/truststores once you get the signed certs from CA Signing.here is the steps:1. Login to AmbariGo to Ranger > Configs > Ranger Settings > External URL points to a URL that uses SSL: https://<hostname of Ranger>:<https port, default is 6182> andranger.service.https.attrib.ssl.enabled to false 2. Go to HDFS > Configs > Advanced > ranger-hdfs-policymgr-ssl and set the following properties: xasecure.policymgr.clientssl.keystore = /etc/hadoop/conf/ckeystore.jks xasecure.policymgr.clientssl.keystore.password = bigdata xasecure.policymgr.clientssl.truststore = strustore.jks xasecure.policymgr.clie
There are two sections which illustrate moving the Journal directory on the same Host. You can follow one of the section according to your need. Section 1: ( Service Downtime is not required ) 1. Change the settings in Ambari for journal node edits directory(dfs.journalnode.edits.dir) from /hadoop/hdfs/journal/ to /data/1/journal/ 2. Don't restart any services immediately. 3. Stop the journal node on NODE1. a. SSH to NODE1b. sudo mkdir -p /data/1/journalc. sudo chown hdfs:hadoop /data/1/journald. sudo rsync -ahvAX /hadoop/hdfs/journal/* /data/1/journal/ Start the journal node on NODE1 4. Repeat step 3 for remaining two journal nodes NODE2 and NODE3. 5. Restart the required services accordingly (Rolling or All at once) Section 2: ( Service Downtime is required ) 1. Create the new directory on all Journal nodes. Example:# mkdir -p /data/1/journal/ 2. Change ownership to "hdfs:hadoop" on all Journal nodes. Example:# chown hdfs:had
After trying to disable kerberos via the UI the following message is seen in the ambari-server logs and the service fails to start....INFO [main] KerberosChecker:57 - Checking Ambari Server Kerberos credentials. WARN [main] KerberosChecker:81 - /etc/security/keytabs/ambari.server.keytab doesn't exist ERROR [main] KerberosChecker:115 - Configuration Error - either doNotPrompt should be false or at least one of useTicketCache, useKeyTab, tryFirstPass and useFirstPass should be true Edit: /etc/ambari-server/conf/ambari.properties Ensure the following is set: kerberos.check.jaas.configuration=false Further disable kerberos for ambari server by removing: "-Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf-Djava.security.krb5.conf=/etc/krb5.conf-Djavax.security.auth.useSubjectCredsOnly=false" from AMBARI_JVM_ARGS value in /var/lib/ambari-server/ambari-env.sh If you decide to enable kerberos again, you have to manually revert changes in /var/lib/ambari-serv
Short description: This article describes how to enable Knox SSO authentication on Kerberos enabled Oozie UI The goal is to provide a single authentication handler for redirecting to an external endpoint for acquiring a JWT (JSONWebToken) token to be used as a SSO representation of an authentication event. The hadoop common JWTRedirectAuthenticationHandler can be used to add this support to component UIs. It is an extension of AltKerberosAuthenticationHandler, which require kerberos to be enabled on the HTTP endpoints in order to work. This means that UIs will use SSO for authentication, but at the same time REST APIs will still be using kerberos. For authenticating REST APIs with Knox SSO as well, there is a filter based authentication provider in Knox. SSL must be enabled on Oozie server to be able to use redirection. Enable SSL on Oozie Configuration in Ambari Set the following properties at the Oozie config page: oozie.authentication.type=org.apache.hadoop.s
Objective This tutorial demonstrates how to use the PutMongoRecord processor to easily put data from a CSV file into MongoDB. Note: The PutMongoRecord processor was introduced in NiFi 1.4.0. As such, the tutorial needs to be done running Version 1.4.0.Environment This tutorial was tested using the following environment and components: Mac OS X 10.11.6 Apache NiFi 1.4.0 MongoDB 3.4.9PutMongoRecord (CSVReader)Demo ConfigurationMongoDB For my environment, I had a local MongoDB 3.4.9 instance installed. Start MongoDB and create a database "hcc" and a collection "movies" for use with this tutorial: >use hcc switched to db hcc > db.createCollection("movies") { "ok" : 1 } > show collections movies I like to use Robot 3T to manage/monitor my MongoDB instance:Initial Flow A powerful feature about the record-oriented functionality in NiFi is the ability to re-use Record Readers and Writers. In conjunction with the Record processors, it is quick and easy to change
There are situations, when one might want to submit a Spark job via a REST API: If you want to submit Spark jobs from your IDE on our workstation outside the cluster If the cluster can only be accessed via Knox (perimeter security) One possibility is to use the Oozie REST API and the Oozie Spark action, However, this article looks into the option of using the YARN REST API directly. Starting with the Cluster Applications API I tried to come up with an approach that resembles the spark-submit command. 1) Copy Spark assembly jar to HDFS Per default the spark assembly jar file is not available in HDFS. For remote access we will need it. Some standard locations in HDP are: HDP 2.3.2: Version: 2.3.2.0-2950 Spark Jar: /usr/hdp/2.3.2.0-2950/spark/lib/spark-assembly-1.4.1.2.3.2.0-2950-hadoop2.7.1.2.3.2.0-2950.jar HDP 2.4.0: Version: 2.4.0.0-169 Spark Jar: /usr/hdp/2.4.0.0-169/spark/lib/spark-assembly-1.6.0.2.4.0.0-169-hadoop2.7.1.2.4.0.0-169.jar This is a one
Ambari is a great tool to manage the Hortonworks Data Platform. However, as the complexity of the applications that run on HDP grows and more and more components from the stack are required, it may be necessary to begin automating tasks like configuration changes. Using the Ambari REST interface it is possible to install, control, interrogate, and even change configuration of HDP services. This example demonstrates how to automate the install and configuration of Nifi. However, the same approach can be applied to any service. This example uses curl to make all REST API request.Make sure that the bits required to actually install the service in Ambari are available on the host running the Ambari server. In the case of Nifi, the bits should be present in /var/lib/ambari-server/resources/stacks/HDP/$VERSION/services/NIFI.1. Check Service Status:curl -u admin:admin -H "X-Requested-By:ambari" -i -X POST http://sandbox.hortonworks.com:8080/api/v1/clusters/Sandbox/services/NIFIUse regex of so
' The Onion Omega 2+ is a small IoT device that runs a simple busybox Linux and can run Micropython. This let's you run some simple application and interact with some sensors and an OLED. Onion Omega 2+ Stats 580MHz Cpu128MB memory32mb storageadded usb 32gbusb 2microusbb/g/n wifi15 gpio2 pwm2 uart1 i2c1 spi1 i2s Setting Up the Omega opkg install python-pippip install --upgrade setuptoolspip install paho-mqttopkg install pyOledExpUpgrading pyOledExp on root from 0.4-1 to 0.5-1...Downloading http://repo.onion.io/omega2/packages/onion/pyOledExp_0.5-1_mipsel_24kc.ipkConfiguring pyOledExp.mkdir /mnt/sda1mount /dev/sda1 /mnt/sda1./run.sh> Initializing display> Setting display to ON> Enabling horizontal scrolling to the left> Writing '[{"ipaddress": "192.168.1.176", "endtime": "2018-01-29 00:50:39", "end": "1517187039.44"}]' to display0crontab -ecrontab -l*/1 * * * * /opt/demo/run.sh1517187305: New connection from 192.168.1.176 on port 1883.1517187305: New client conn
The Matrix Creator is an interesting multiple sensor hat that fits on a Raspberry Pi 3.First step is to connect it, which is a simple snap, no soldering required.The specs are pretty impressive:Xilinx Spartan 6 XC6SLX4 FPGAAmtel Cortex-M3 ATSAM3S2 Microcontroller8 MEMS MP34DB02 audio sensor digital microphonesST LSM9DS1 3D accelerometer, 3D gyroscope, 3d magnetometer IMUST HTS221 capacitive digital sensor for relative humidity and temperatureNXP MPL3115A2 precision pressure sensor with altimetrySilicon Labs EM358X - 2.4 GHz IEEE 802.15.4 ZigbeeSigma Designs ZM5202 - 868/908/921 MHz ZWaveVishay TSOP573 - carrier 38.0 kHz IR ReceiverVishay VEML6070 UV light sensorNXP PN512 NFC readerEverloop 35 RGBW LEDSIt runs on Raspian lite and installs via:curl https://matrix-io.github.io/matrix-documentation/install.sh | shOur Apache NiFi Flow For Processing the Three Types of DataOur Versioned Apache NiFi and MiniFi FlowsWe tail the three files produced by the three example Python sensors readersBo
So I found another low-end affordable platform from China for running MiniFi goodness. For this 512MB RAM machine, I decided to use MiniFi CPP. git clone https://github.com/apache/nifi-minifi-cpp.gitapt-get install cmake gcc g++ bison flex libcurl-dev librocksdb-dev librocksdb4.1 uuid-dev uuid libboost-all-dev libssl-dev libbz2-dev liblzma-dev doxygen -yapt-get install -y libleveldb-devapt-get install -y libxml2apt-get install libpython3-dev -yapt-get install liblua5.1-0-dev -yapt-get install libusb-1.0.0-0-dev libpng12-dev -yapt-get install docker.io python-virtualenv -y apt-get install libpython3-dev -yapt-get install libgps-dev -yapt-get install libpcap-dev -yapt-get install cmake gcc g++ bison flex -y ./bootstrap.shinteractive UIcd nifi-minifi-cpp-0.3.0-source/mkdir buildcd buildcmake ..makemake packageapt-get install libssl-dev -- The following features have been enabled: * EXPRESSION LANGUAGE EXTENSIONS , This enables NiFi expression language * H
Using SiteToSiteProvenanceReportingTask to Send Provenance to Apache NiFi for Processing. Eating our own provenance food!It's almost comically easy to do this. You set up a task on the server you are reporting on that sends the data to your receiver. That other server you make a simple flow to ingest and process that. I stored it to HBase as JSON as it's a good place to put a lot of data fast. Send The DataYou need to create a SiteToSiteProvenanceReportingTask in Controller Settings - Reporting Tasks. It's pretty simple. Set the values above with your destination NiFi server and a port name that you have created already. Receive the Data and Process An Individual JSON Record Split the JSON into Records $.[*] Save to HBase (PutHBaseJSON) First I have to create a table.hbase shellHBase Shell; enter 'help<RETURN>' for list of supported commands.Type "exit<RETURN>" to leave the HBase ShellVersion 1.1.2.2.6.2.0-205, r5210d2ed88d7e241646beab51e9ac147a9
Prior Ranger Version 0.6 it was a common scenario that security admins created per users policies, e.g. grant a user access to project databases (hive) or special HDFS directories. Initially, a policy was created for each user so the admins ended up to manage about thousands of policies. Especially HDFS policies often had the name in the path, e.g. /user/demo/USERNAME/ *.As Ranger 0.6 introduces the user variable, now the security admin have only to create one policy that looks like this in the path: /user/demo/{USER}/ * and assign the appropriate user permissions for the directory.The user can immediate access and use the new HDFS directory with enforced user permissions. dummy_1$ hdfs dfs -copyFromLocal tst.x1 /user/demo/dummy_1dummy_1$ hdfs dfs -ls /usr/demo/dummy_1Found 1 items-rw-r--r-- 3 dummy_1 hdfs19001 2018-03-23 15:36 /user/demo/dummy_1/text.txtWith the use screen-shot-2018-03-23-at-165124.pngof user variables now the security administrators can create more dynamic policies
Simple illustration of locking in Hive when ACID is enabledConsiderations for illustrationCluster Version: HDP -2.5.6.0Hive Version: Hive 1.2.1000Enabled with following properties in place hive.support.concurrency=truehive.compactor.initiator.on=truehive.compactor.worker.threads=1hive.exec.dynamic.partition.mode=nonstricthive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager (if non-Ambari cluster)Types of Supported Locks S = SHARED or SHARED_READX = EXCLUSIVETables used for testingorc_tab (ORC format table with col1 int and col2 string), non-transactional orc_tab_bucketed(ORC format table with col1 int and col2 string, transactional)txt_tab (TEXT format table with col1 int, col2 string, non-transactional, for loading purposes)Either tables have closed to 5 GB data on a Single node clusterSCENARIO 1 (Non Transactional Table)SELECT blocks ALTERSELECT starts first followed by ALTER Session Abeeline -u "jdbc:hive2://localhost:10000/default" -n hive -p '' -e "select col1 from orc_
Our scenario for this walkthrough is as follows: we have a customer table that contains fields for Zip Code, MRN, and Blood Type. Per policy, users in the analyst group cannot access MRN and Blood Type together with Zip Code within the same query, as this would deanonymize sensitive Personal Health Information.In order to make use of Ranger functionality to achieve this, we'll need to register a new policy condition using the Ranger API. Please see my HCC post on this topic for further details. In this case, the policy condition will have the following form (please note itemId value is specific to one's environment) within the policyConditions array contained in the /servicedef/name/hive resource:{ "itemId": 1, "name": "resources-accessed-together", "evaluator": "org.apache.ranger.plugin.conditionevaluator.RangerHiveResourcesAccessedTogetherCondition", "evaluatorOptions": {}, "label": "Resources Accessed Together?", "description": "Resources Accessed Toget
Part 1: https://community.hortonworks.com/articles/82964/getting-started-with-apache-ambari-workflow-design.htmlPart 2: https://community.hortonworks.com/articles/82967/apache-ambari-workflow-designer-view-for-apache-oo.htmlPart 3: https://community.hortonworks.com/articles/82988/apache-ambari-workflow-designer-view-for-apache-oo-1.htmlPart 5: https://community.hortonworks.com/articles/83361/apache-ambari-workflow-manager-view-for-apache-ooz.htmlPart 6: https://community.hortonworks.com/articles/83787/apache-ambari-workflow-manager-view-for-apache-ooz-1.htmlPart 7: https://community.hortonworks.com/articles/84071/apache-ambari-workflow-manager-view-for-apache-ooz-2.htmlPart 8: https://community.hortonworks.com/articles/84394/apache-ambari-workflow-manager-view-for-apache-ooz-3.htmlPart 9: https://community.hortonworks.com/articles/85091/apache-ambari-workflow-manager-view-for-apache-ooz-4.htmlPart 10: https://community.hortonworks.com/articles/85354/apache-ambari-workflow-manager-view-
Objective This article highlights some of the latest UI enhancements added in Apache NiFi 1.5.0.Environment The examples shown in the article utilized the following environment and components: Mac OS X 10.11.6 Apache NiFi 1.5.0"Primary Node" Processors Identification In a NiFi Cluster, processors that have been configured for "Primary node" execution are now identified in the UI by a "P". On the canvas, the "P" is visible next to the processor icon: The "P" is also shown in the Processors tab on the Summary page, specifically in the Name column:Finding Processors Quickly in the Summary Page If your flow has hundreds of processors, it can be difficult differentiating between them in the Summary page (accessible from the top-right Global menu). On the Processors tab, a "Process Group" column has been added to display the name of the parent process group containing the component: Additionally, when hovering over the "Go to location" button the tooltip now includes the path of t
In previous post we have seen how to install single node HDP cluster using Ambari Blueprints. In this post we will see how to Automate HDP installation using Ambari Blueprints. .Note - For Ambari 2.6.X onwards, we will have to register VDF to register internal repository, or else Ambari will pick up latest version of HDP and use the public repos. please see below document for more information. For Ambari version less than 2.6.X, this guide will work without any modifications.Document - https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-release-notes/content/ambari_relnotes-2.6.0.0-behavioral-changes.html.Below are simple steps to install HDP multinode cluster using internal repository via Ambari Blueprints..Step 1: Install Ambari server using steps mentioned under below linkhttp://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.1/bk_Installing_HDP_AMB/content/_download_the_ambari_repo_lnx6.html.Step 2: Register ambari-agent manuallyInstall ambari-agent package on all the
In Apache NiFi 1.2, there are processors for Reading Hive data via HiveQL and Storing to Hive via HiveQL. These processors are SelectHiveQL and PutHiveQL.Configuring a HiveQL processor is simple, you need to enter your query and pick either AVRO or CSV format. AVRO is a better fit, I am waiting for ORC. Most important you need to set a Connection Pool to connect to your cluster.You can just enter a regular SQL that you are doing in Hive.For Hive to work, you must setup a HiveConnectionPool Controller Service. After configuration you will need to enable that and then you can enable your processor(s). For connecting to Hive on the Sandbox, set the Database Connection URL: jdbc://hive2://localhost:10000/default. For Hive Configuration Resources: you set the hive configuration files. You can set the Database User and Password of the user that has access you require for Hive. For documentation on the HiveConnectionPool.For a PutHiveQL, you just need to set a connection po
How to delete Data Dir from the DNs 1. Open the Namenode UI and check the status. It should be healthy i.e. no missing, corrupt or under-replicated blocks 2. Go to Ambari—Services—HDFS—Configs and change the Datanode directories (remove the datadir which is not required) and save the change Note: Please just make the config change and DON’T delete the directories or any files yet. 3. IMP: We need to be very careful here NOT to restart all the services as Ambari will ask to “Restart Required”, otherwise we will see the missing blocks in NN and have to revert the changes back. 4.Go to any one of the DN and restart the DataNode service 5. Login to the same DN from putty and run the block pool report. Run the below command for same hdfs dfsadmin -triggerBlockReport <datanode_host:ipc_port> You can get the datanode ipc port here Ambari---Services---HDFS---Configs and search for dfs.datanode.ipc.address Here is the sample command output ran on the datanode [hdfs@xxxx ~]$
Credits to @mgilman for contributing to this article: Since the introduction of NiFi 1.0.0 administrators have a greater ability to manage policy through the addition of Ranger Integration and a more granular authorization model. This article provides a guide for those looking to define and manage NiFi policies in Ranger. To learn more on configuring NiFi to use Ranger via Ambari please review the parent article HDF 2.0 - Integrating Secured NiFi with Secured Ranger for Authorization Management. Behind the scenes NiFi uses a REST based API for all user interaction; therefore resource based policies are used in Ranger to define users' level of permissions when executing calls against these REST endpoints via NiFi's UI . This allows administrators to define policies by selecting a NiFi resource/endpoint, choosing whether users have Read or Write (Modify) permissions to that resource, and selecting users who will be granted the configured permission. For example the image below sho
<provider> <role>ha</role> <name>HaProvider</name> <enabled>true</enabled> <param> <name>RESOURCEMANAGER</name> <value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true</value> </param> </provider> <service> <role>RESOURCEMANAGER</role> <url><Resource manager 1 url:8088>/ws</url> <url><Resource manager 2 url:8088/ws</url> </service>
1) Enable MQTT extensionPlease reference https://github.com/apache/nifi-minifi-cpp/blob/master/README.mdcmake -DENABLE_MQTT=TRUE ..2) Common Processor PropertiesBroker URI: The URI to use to connect to the MQTT brokerSession state: Whether to start afresh or resume previous flows, default to trueClient ID: MQTT client ID to useUsername: Username to use when connecting to the brokerPassword: Password to use when connecting to the brokerKeep Alive Interval: Defines the maximum time interval between messages sent or receive, default to 60 secConnection Timeout: Maximum time interval the client will wait for the network connection to the MQTT server, default to 30 secQuality of Service: The Quality of Service(QoS) to send the message with. Accepts three values 0, 1, 2Topic: The topic to publish or subscribe the message3) PublishMQTT Processor PropertiesRetain: Retain MQTT published record in broker, default to falseMax Flow Segment Size: Maximum flow content payload segment size for the MQ
Spark Thrift Server is a service that allows JDBC and ODBC clients to run Spark SQL queries on Apache Spark. By default, Spark Thrift Server runs queries under the identity of the operating system account running the Spark Thrift Server. In a multi-user environment, queries often need to run under the identity of the end user who originated the query; this capability is called "user impersonation". This article describes the work done in HDP 2.6 to support user impersonation for the Spark Thrift Server. The feature is supported in HDP 2.5.x and later versions, for Apache Spark 1 versions 1.6.3 and later. When user impersonation is enabled, Spark Thrift Server runs queries as the submitting user. By running queries under the user account associated with the submitter, the Thrift Server can enforce user level permissions and access control lists. Associated data cached in Spark is visible only to queries from the submitting user. User impersonation enables granular access c
ISSUE: While trying to run ConsumeKafka process to consume messages from secure Kafka, it throws following error:org.apache.kafka.common.KafkaException: Failed to construct kafka consumer at org.apache.kafka.clients.consumer.KafkaConsumer.(KafkaConsumer.java:702) ~[na:na] at org.apache.kafka.clients.consumer.KafkaConsumer.(KafkaConsumer.java:557) ~[na:na] at org.apache.kafka.clients.consumer.KafkaConsumer.(KafkaConsumer.java:540) ~[na:na] at org.apache.nifi.processors.kafka.pubsub.ConsumerPool.createKafkaConsumer(ConsumerPool.java:136) ~[na:na] at org.apache.nifi.processors.kafka.pubsub.ConsumerPool.obtainConsumer(ConsumerPool.java:106) ~[na:na] at org.apache.nifi.processors.kafka.pubsub.ConsumeKafka_0_10.onTrigger(ConsumeKafka_0_10.java:285) ~[na:na] at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) ~[nifi-api-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2] at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1099) ~[nifi-fram
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.