Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
PROBLEM: There are multiple issues connecting Windows clients such as Squirrel client to Phoenix / Hbase on a cluster enabled with Kerberos. SOLUTION: Please follow below working steps. 1. Create Jaas configuration file hbase.jaas on client machine. Client { com.sun.security.auth.module.Krb5LoginModule required useKeyTab=false useTicketCache=true renewTicket=true serviceName="zookeeper"; keytab="" principal="" }; 2. Copy kerberos config file from cluster nodes to local client machine (krb5.conf/krb5.ini) 3. Add below java options in Squirrel launcher script. [/Applications/SQuirreLSQL.app/Contents/MacOS/squirrel-sql.sh ] -Djava.security.auth.login.config="/Users/gsharma/hbase/hbase.jaas" -Djava.security.krb5.conf="/Users/gsharma/hbase/krb5.conf" e.g $JAVACMD -Xmx256m -cp "$CP" -Djava.security.auth.login.config="/Users/gsharma/hbase/hbase.jaas" -Djava.security.krb5.conf="/Users/gsharma/hbase/krb5.conf" $MACOSX_SQUIRREL_PROPS -splash:"$SQUIRREL_SQL_HOME/icons/splash.jpg" n
In this post, we will see how to configure node labels on YARN.Before we go for the configuration part, let’s understand what is node label in YARN.Node labels allows us to divide our cluster in different parts and we can use those parts individually as per our requirements. More specifically, we can create a group of node-managers using node labels, for example group of node managers which are having high amount of RAM and use them to process only critical production jobs! This is cool, isn’t it? So lets see how we can configure node labels on YARN..Types of node labels:Exclusive – In this type of node labels, only associated/mapped queues can access the resources of node label.Non Exclusive(sharable) – If resources are not in use for this node label then it can be shared with other running applications in a cluster..Configuring node labels:.Step 1: Create required directory structure on HDFSNote – You can run below commands from any of the hdfs client.sudo su hdfshadoop fs -mkdir -p
This article describes to store your zeppelin notes in a GitHub repo.1) Create a GitHub repo where you want to store your zeppelin notes. I have created a repo named 'zeppelin-notes'.Select ssh for cloning. We will be using ssh key to perform git operations.2) Copy the ssh public key from the node where Zeppelin is installed and add it in git hub. The command displays the public key and screenshot tells how to add the ssh key to github# su zeppelin# cat ~/.ssh/id_rsa.pubClick on "New SSH Key" , give a title for the key and paste the content and click save.3) Clone the git repo in the node where zeppelin is installed and set proper permissions to the foldersu zeppelincd /usr/hdp/current/zeppelin-server/git clone git@github.com:cvr-aditya/zeppelin-notes.git chown zeppelin:zeppelin zeppelin-noteschmod -R 777 zeppelin-notes4) Change the zeppelin notebook directory path. Go to Ambari -> Zeppelin -> Configs -> Advanced zeppelin-config and set the value for zeppelin.notebook.dir to t
resource_management.core.exceptions.Fail: Failed to download file from http://ambari1.hdp.hadoop:8080/resources//mysql-connector-java.jar due to HTTP error: HTTP Error 404: Not FoundBy the following command, the problem is fixed:Ambari Server:(Ref: https://discuss.pivotal.io/hc/en-us/articles/115001611807-Hive-Services-Fail-to-Start-giving-Error-HTTP-Error-404-Not-Found- )sudo yum install mysql-connector-java*ls -al /usr/share/java/mysql-connector-java.jarcd /var/lib/ambari-server/resources/ln -s /usr/share/java/mysql-connector-java.jar mysql-connector-java.jar
For 2018, some awesome new in-demand features have come to my favorite Swiss Army Knife of IoT and Enterprise development, Apache NiFi. Speaking of knives, for fun say, “Apache NiFi” to Google Assistant. Okay, back to the awesome new release of Apache NiFi.So there are a couple of new Processors that I want to highlight first. I am liking the new CountText processor, useful for counting elements of text documents like words and lines. My example flow is using it and I see some useful metrics gathering there. I also think some of these could be used as file validation checks to feed to machine learning algorithms. My files of type X are usually of this # of lines and words, but not this time. I have come across a couple of use cases on file ingest in the past that could use this. In one example a company was reading personnel files from an sFTP. The first step in validation was checking to see they received the proper number of lines, since one person per line. Another occasio
One of the really cool features of the new Apache NiFi Registry UI are the deep links. This capability enhances collaboration by providing shareable URL’s to various perspectives within the NiFi Registry web application. The following deep links are available within the ‘administration’ perspective:/nifi-registry/administration/workflow – This ‘administration’ perspective displays a sortable table of all buckets the current user is authorized to view. /nifi-registry/administration/workflow(sidenav:manage/bucket/:bucketId) – This administration’ perspective side panel displays the requested bucket’s details and a sortable table of all of the policies created for this :bucketId./nifi-registry/administration/users ** – This ‘administration’ perspective displays a sortable table of all users and groups the current user is authorized to view. /nifi-registry/administration/users(sidenav:manage/user/:userId) ** – This administration’ perspective side panel displays the requested user’s deta
The HDF 3.1 release supports single-sign on to NiFi using KnoxSSO. This article will assume you've already completed setting up KnoxSSO, as discussed in part I and part II of this series.We'll further assume that NiFi has been configured for baseline security, as documented in this HCC article.Once the websso topology has been defined in your Knox configuration, the steps to make NiFi a participating application in KnoxSSO are straightforward. A couple of notes: 1) make sure nifi.security.user.login.identity.provider is blank, since you'll be using the KnoxSSO topology's authentication method--i.e., a JWT-based Federation Provider--to gain access to the NiFi UI, and 2) make sure the value for knoxsso.token.ttl is reasonable, the default is 30000 ms, or 30 s. A larger value like 36000000--or 10 hours--likely makes sense for production environments.Once the websso topology has been defined for KnoxSSO, as discussed in part I and part II of this series, we'll need to grab the Knox server'
Hello,I've compiled this article after I struggled quiet a bit to have the ingestion working.Credits to @Kuldeep Kulkarni, @Rahul Pathak and @awhitter for helping me figuring out these steps.Feel free to contact me. I'll make sure to keep this up-to-date.Sqoop is the tool of choice for ingesting OLTP data to HDFS of Hive. Incremental ingestion requires to keep track of the last row ingested in order to know where to start the next round from. Using a shared Sqoop metastore and sqoop job will let sqoop take care of keeping track of the ingestion.Oozie will be setup to call the sqoop job at the required interval of time. For this a coordinator will be required,1 Sqoop1a. Shared MetastoreCreate a Sqoop metastore on a node (preferably not on a data/worker node). - Create a folder to save the metastore DB file (e.g. "/var/lib/sqoop/metastore)- configure the Metastore from Ambari > Sqoop > Configssqoop.metastore.server.location "/var/lib/sqoop/metastore/shared.db"sqoop.metastore.c
Apache Deep Learning 101 SeriesThis is for people preparing to attend my talk on Deep Learning at DataWorks Summit Berling 2018 (https://dataworkssummit.com/berlin-2018/#agenda) on Thursday April 19, 2018 at 11:50AM Berlin time.You can easily run Apache MXNet on an OSX machine or a Linux workstation utilizing a Python script. I have forked the standard Apache MXNet Wine Detector Tutorial (http://mxnet.incubator.apache.org/tutorials/embedded/wine_detector.html) to read our local OSX webcam (you may need to change your OpenCV WebCam port from 0 to 1 or to 2, depending on your number of webcams and which one you want to use. I am running this on an OSX laptop connected to a monitor that has a built in webcam, so I use that one which is 1. The webcam numbering starts at 0. If you only have one, then use 0.Let's get this installed!git clone https://github.com/apache/incubator-mxnet.gitThe installation instructions at Apache MXNet's website (http://mxnet.incubator.apache.org/install/i
Sqoop# Sandbox 2.3.2# using postgres ambari database# edit pg_hba.conf file in /var/lib/pgsql/data# Add the following line as the first line of pg_hba.conf. It allows access to all databases for all users with an encrypted password:********************************# TYPE DATABASE USER CIDR-ADDRESS METHODhost all all 0.0.0.0/0 md5********************************### POSTGRES ###su postgrespsql\c ambari#list all tables\dt ambari.*select * from ambari.hosts;### SQOOP ####check sqoop versionsqoop version# get list of commandssqoop help# more command specificsqoop help import### DEMO #### Download Postgres Drivercurl -L 'http://jdbc.postgresql.org/download/postgresql-9.2-1002.jdbc4.jar' -o postgresql-9.2-1002.jdbc4.jar# put in the sqoop librarysudo cp postgresql-9.2-1002.jdbc4.jar /usr/hdp/current/sqoop-client/lib/# list tables in ambari database / username ambari password bigdatasqoop list-tables --connect jdbc:postgresql://127.0.0.1/ambari --username ambari -P# sqoop ambari hosts table into
Introduction OpenID Connect (OIDC) is an authentication layer on top of OAuth 2.0, an authorization framework. It uses simple JSON Web Tokens (JWT), which is an open standard for securely transmitting information as a JSON object. These objects are normally signed with an RSA key and contain information such as if the user was authenticated or the user's id and email. More information and examples can be found here: https://auth0.com/docs/tokens/concepts/jwts Knox, together with pac4j, a Java security engine, uses OpenID Connect (and also SAML, CAS, OAuth) to enable Single Sign On using a variety of 3rd party Identity Providers that support these protocols. For example, Knox can be integrated with a service such as https://auth0.com to provide users authenticated to auth0 access to Hadoop resources (without a need to enter their credentials again or even integrate Knox with an LDAP). Following is an example of how Knox can integrate with auth0 using OpenID Connect. Setup auth0 Sign up
Objective This tutorial walks you through how to install and secure a NiFi Registry using client certificates. A quick example of modifying user privileges in the Registry is also included.A video version of this tutorial can be seen here: https://youtu.be/qD03ao3R-a4 Note: To learn the basics of setting up an unsecured Registry and integrating with Apache NiFi see the HCC article Versioned DataFlows with Apache NiFi 1.5 and Apache NiFi Registry 0.1.0.Environment This tutorial was tested using the following environment and components: Mac OS X 10.11.6 Apache NiFi Registry 0.1.0 Apache NiFi Toolkit 1.5.0Secure NiFi Registry ConfigurationDownload & Extract Tarballs Download the tarball for the 0.1.0 Registry release: nifi-registry-0.1.0-bin.tar.gz and the tarball for the 1.5.0 NiFi Toolkit: nifi-toolkit-1.5.0-bin.tar.gz Extract the tars: tar xzvf nifi-registry-0.1.0-bin.tar.gz tar xzvf nifi-toolkit-1.5.0-bin.tar.gzGenerate Configuration and Certificate Files We will use t
We can configure Hive View 2.0 to view Ranger Policies associated with any Table. It will not be configured by default (as of HDP 2.6.3) and we need to follow the below steps:1. Go to Ambari Dasboard -> admin -> Manage Ambari2. In the Manage Ambari page under Views section, expand Hive and then click on Hive View 2.03. Under the setting section, please provide the details as below:- Ranger Service Name: Go to Ranger Admin UI and check the Ranger Service Name which is configured for Hive (shown as below). Here it is tsk_hive- Provide the Ranger Admin username and password as you have configured- WebHDFS Authentication for kerberos enabled cluster: auth=KERBEROS;proxyuser=<proxyuser> Provide the ambari user principal name in place of <proxyuser>4. After adding the above details, click on "Save". Leave the other settings as default.Additional Steps (only when you are not using local cluster): - If you are using the Local Cluster, then it is not required to change any pa
Whenever in SmartSense bundle if ranger metric related information is not there and if there is any consistent error or if the json files are completely blank. There is probability that the metric generating scripts doesn't get environment variable so please perform the below given steps and verify again.1) Open file /etc/ambari-server/conf/ambari.properties 2) Check for java.home variable and copy its value 3) Go to Ranger conf directory, cd /usr/hdp/current/ranger-admin/conf/ 4) Create a new file ranger-admin-env.sh with below content and save it.export JAVA_HOME=<paste the java.home variable path value copied from ambari.properties file> 5) Go to Ranger KMS conf directory, cd /usr/hdp/current/ranger-kms/conf/6) Create a new file ranger-kms-env.sh with below content and save it.export JAVA_HOME=<paste the java.home variable path value copied from ambari.properties file> 7) From Amabari Restart Ranger and Ranger KMS😎 Generate bundle from Ambari -> SmartSense View an
The intent of this article is to show how NiFi policies in Ranger map to what you would see when using NiFi's default file based authorizer via the NiFi UI. This article will cover what access each of the policies granted to the entities (user and server) that assigned to them.There are controller level policies and component level policies in NiFi.The controller level policies are not tied to any specific component uuid. In Ranger those policies will just show as/<some policy name>-These include the following: Ranger Policy (Base policies):NiFi Policies (Hamburger menu)Ranger permissions description:/resources *** Note: No policies will be available until this policy is manually added.N/AThis policy allows Ranger to retrieve a listing of all available policies from NiFi. The server/user from the keystore being used by Ranger must be granted “read” privileges to this resource./flow* See note [3] belowView the user interfaceRead/View - This policy gives users the ability to v
Prerequisite 1. You have HDF-1.2 installed on your server2. Make sure KDC is installed on your server and is started, will try to describe steps briefly in the tutorial, below is the link to detailed steps from HDP documentation:HDP-Documenation-for-Kerberos Installing and Configuring KDC:1. Lets install a new version of KDC server:# yum -y install krb5-server krb5-libs krb5-auth-dialog krb5-workstation2. Using a text editor, open the KDC server configuration file, located by default here:# vi /etc/krb5.conf [realms] EXAMPLE.COM = { kdc = node1 admin_server = node1 }add your host name, mine is node1.3. Use the utility kdb5_util to create the Kerberos database, when asked lets put password ‘hadoop’:# kdb5_util create –s 4. Lets Start the KDC server and the KDC admin server, set them to auto-start on boot# /etc/rc.d/init.d/krb5kdc start# /etc/rc.d/init.d/kadmin start# chkconfig krb5kdc on# chkconfig kadmin on5. Lets add a service principal for a server and export the keytab from t
The solution in this article was tested for DB2 and could work for other databases as well , that are not available in the GenerateTableFetch Database Type dropdown.I was trying to develop a flow that extracted data from a few tables in DB2 database and the goal was to land that data into HDFS. Our flow was a Basic ListDatabaseTables followed by a GenerateTableFetch followed by a ExecuteSSQL. The idea was to generate multiple queries that could parallelly extract data from the db2 nodes, utilizing all the 3 NiFi nodes in the cluster.The problem we ran into was that there is no option for DB2 in the GenerateTableFetch DBType property. Which means we had to select the generic option.Upon running the flow, the select query failed to execute on DB2. On investigating we found that the query generated by GenerateTableFetch looked like thisselect id,name,update_dt,state,city,address from customers where update_dt<='01-01-2018 12:00:00' order by update_dt offset 10000 limit 10000The limit
Here are the steps to get pyspark working on SHCa) add the following into Ambari -> Spark -> Configs -> Advanced spark-env -> spark-env templateexport SPARK_CLASSPATH=/usr/hdp/current/hbase-client/lib/hbase-common.jar:/usr/hdp/current/hbase-client/lib/hbase-client.jar:/usr/hdp/current/hbase-client/lib/hbase-server.jar:/usr/hdp/current/hbase-client/lib/hbase-protocol.jar:/usr/hdp/current/hbase-client/lib/guava-12.0.1.jar:/usr/hdp/current/hbase-client/lib/htrace-core-3.1.0-incubating.jar:/usr/hdp/2.6.0.3-8/spark/conf/b) kinit as e.g. hbase userc) run$ pyspark --packages com.hortonworks:shc:1.0.0-1.6-s_2.10 --repositories http://repo.hortonworks.com/content/groups/public/d) call each line separately:from pyspark.sql import Row data = range(0,255) rdd = sc.parallelize(data).map(lambda i : Row(name=i,age=i)) import json cat = json.dumps({"table":{"namespace":"default", "name":"dk", "tableCoder":"PrimitiveType"},"rowkey":"key","columns":{"name":{"cf":"rowkey", "col":"key", "type"
Apache NiFi evolution from version 1.2 included in HDF 3.0 and version 1.5 included in HDF is significant. I find myself quite often puzzled when required to provide differences between releases and just reading the release notes history at https://cwiki.apache.org/confluence/display/NIFI/Release+Notes and looking at the latest list of NiFi processors is not trivial to determine which new processors were added.I put together matrix which I hope will help developers to take advantage of new processor to improve old and develop new flows.In a nutshell, main functionality added is around:AzureEventHubKafka 0.11 and 1.0 processorsRecord processorsRethinkDBFlatten JsonExecute Spark InteractiveExecute Groovy ScriptMy favorite improvements are around record processors, flattening JSON and executing Spark interactively.The following is a table of the matrix, arranged alphabetically from A-D:See here for the Matrix Table from E-JSee here for the Matrix Tabke from K-ZForNiFi 1.5NiFi 1.4NiFi 1.3N
In this article, we will see how an organization can tackle the data science challenge for an Internet of things use case. This article shows how a trucking company can leverage data and analytics to solve its logistics problem by leveraging Hortonworks Data Platform (HDP), Apache NiFi, and IBM’s Data Science Experience (DSX) to build a real-time data science solution to predict any violation events by the driver. IBM DSX is a data science platform from IBM that provides all favorite data science toolkits at one place. DSX and HDP solve some of the major pain points of running data science at scale such as - ease of deployment and maintenance of machine learning models, scaling the developed model to big data scale, ease of using different open source tools, and collaboration. DSX comes in multiple flavors: cloud, desktop, and local. DSX can run on top of you HDP cluster to provide advanced analytics capabilities. Following diagram show major stages of a data science project -Stage 1:
To print GC details, please add the following line in Spark--> config--> Advanced spark-env --> spark-env template and restart spark history server.export SPARK_DAEMON_JAVA_OPTS=" -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:{{spark_log_dir}}/spark_history_server.gc.`date +'%Y%m%d%H%M'`"
Rolling upgrade from HDF-3.0.2.0 to 3.1In HDF 3.1 the concept of Rolling Upgrade will be introduced for the first time. Prior to this release, HDF only supported Express Upgrade which orchestrated a stop all, upgrade and start all approach to upgrades.Rolling Upgrade orchestrates the upgrade in an order that is meant to preserve cluster operation and minimize service impact during upgrade. This process has more stringent prerequisites (particularly regarding cluster high availability configuration) and can take longer to complete than an Express Upgrade.In the case of HDF, we have components that do not need to be brought down while upgrading HDF from older to newer version. These include Storm (long running topologies), Kafka (data being ingested into topics or topics being accessed by other services), Streaming Analytics Manager (Live streaming analytics applications), Schema Registry (shared repository of schemas to allow application to interact with each other) t Therefore from
In this article I will explain an easy way to automate some basic tasks in NiFi as an introduction to NiPyApi, an automation package for Apache NiFi and its sub-projects.Environment Setup RequirementsYou will need a Python environment 2.7 or 3.6 are tested, and most computers come with one of theseor you can create a virtualenvor you can install Python on OSX using homebrewYou will need a recent internet browser, given you're reading this I assume you have one - I'm using ChromeYou will need NiFi services to test against - if you have Docker installed you can use the following commands to prepare NiFi & NiFi Registry services:user$: curl https://raw.githubusercontent.com/Chaffelson/nipyapi/master/test_env_config/docker_compose_latest/docker-compose.yml | docker-compose -f - up -duser$: docker psDocker will download and start the NiFi containers, and show you the details:You should be able to browse to both NiFi and NiFi-Registry at the following URLs:http://localhost:8080/nifi/htt
Problem:While implementing Auto-Hdfs, following errors were thrown in Nimbus log:Caused by: org.apache.hadoop.security.authentication.client.AuthenticationException: Authentication failed, URL: https://da0gdal202.match.corp:9393/kms/v1/?op=GETDELEGATIONTOKEN&doAs=gdsreader&renewer=hdfs-hdpprod%40MATCH.CORP&user.name=hdfs, status: 403, message: Forbiddenat org.apache.hadoop.security.authentication.client.AuthenticatedURL.extractToken(AuthenticatedURL.java:278)at org.apache.hadoop.security.authentication.client.PseudoAuthenticator.authenticate(PseudoAuthenticator.java:77)at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticator.authenticate(DelegationTokenAuthenticator.java:132)at org.apache.hadoop.security.authentication.client.KerberosAuthenticator.authenticate(KerberosAuthenticator.java:212)at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticator.authenticate(DelegationTokenAuthenticator.java:132)at org.apache.hadoop.security.au
Assuming you start with a kerberized HDP cluster with Hbase installed.First check what your service principal is i.e.klist -kt /etc/security/keytabs/hbase.service.keytabKeytab name: FILE:hbase.service.keytabKVNO Timestamp Principal---- ----------------- -------------------------------------------------------- 2 12/20/16 13:51:21 hbase/hdp252.hdp@HWX.COM 2 12/20/16 13:51:21 hbase/hdp252.hdp@HWX.COM 2 12/20/16 13:51:21 hbase/hdp252.hdp@HWX.COM 2 12/20/16 13:51:21 hbase/hdp252.hdp@HWX.COM 2 12/20/16 13:51:21 hbase/hdp252.hdp@HWX.COM In Ambari head to Hbase -> Configs -> Advanced -> Custom Hbase-Site.xml and add the following new parameters with the keytab / principal substituted: hbase.thrift.security.qop=authhbase.thrift.support.proxyuser=truehbase.regionserver.thrift.http=truehbase.thrift.keytab.file=/etc/security/keytabs/hbase.service.keytab hbase.thrift.kerberos.principal=hbase/_HOST@HWX.COM hbase.security.authentication.spnego.kerberos.keytab=/etc/security/
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.