Find and share helpful community-sourced technical articles
Recently active
Using SQOOP with MySQL as metastoreTo set up MySQL for use with SQOOP: On the SQOOP Server host, install the connector. Install the connector RHEL/CentOS/Oracle Linux yum install mysql-connector-java SLES zypper install mysql-connector-java Confirm that .jar is in the Java share directory. ls /usr/share/java/mysql-connector-java.jar Make sure the .jar file has the appropriate permissions - 644. Create a user for SQOOP and grant it permissions. For example, using the MySQL database admin utility: # mysql -u root -p CREATE USER '<SQOOPUSER>'@'%' IDENTIFIED BY '<SQOOPPASSWORD>'; GRANT ALL PRIVILEGES ON *.* TO '<SQOOPUSER>'@'%'; CREATE USER '<SQOOPUSER>'@'localhost' IDENTIFIED BY '<SQOOPPASSWORD>'; GRANT ALL PRIVILEGES ON *.* TO '<SQOOPUSER>'@'localhost'; CREATE USER '<SQOOPUSER>'@'<SQOOPSERVERFQDN>' IDENTIFIED BY '<SQOOPPASSWORD>'; GRANT ALL PRIVILEGES ON *.* TO '<SQOOPUSER>'@'<SQOOPSERVERFQDN>'; FLUSH PR
Steps to connect from a client machine (MAC in this case) to Hadoop cluster using hive JDBC. Here are couple of links that i have used to build this out Link that talks about hive drivers and jar files https://streever.atlassian.net/wiki/pages/viewpage.action?pageId=4390924 Link that talks about how to setup java jdbc setup for hive jar files https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients1.Here are the jar files you need to connect to HS2 For HDP 2.3 You'll only need 2 jar files for the JDBC Client with HDP 2.3 # From /usr/hdp/current/hive-client hive-jdbc.jar (should be a symlink to the hive-jdbc-xxx-standalone.jar) # From /usr/hdp/current/hadoop-client hadoop-common.jar (hadoop-common-....jar) 2. Make sure that java home is set on your machine This is value that i have on my machine for JAVA_HOME echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home 3. Move these jar files to java library directory on my machine /Library/Java/Ex
IntroductionBy default, Zookeeper runs without the option of becoming a superuser to administrate znodes in the ZK ensemble, for example, to fix ACLs, remove znodes that are not required anymore, or create new ones in specific locations. Zookeeper grants permissions through ACLs through different schemas or authentication methods, such as 'world', 'digest', or 'sasl' if we use Kerberos. We can potentially we locked out if we were to grant everyone just read permissions to a znode, as we would not be able to delete it or modify it anymore.Example of the problemFor example, we connect to Zookeeper through zkCli:/usr/hdp/current/zookeeper-client/bin/zkCli.sh -server `hostname -f`:2181[zk: sandbox.hortonworks.com:2181(CONNECTED) 1] getAcl /config/topics'world,'anyone: r If we need to modify that znode so that, for example, user 'kafka' can have access to it to create new topics:[zk: sandbox.hortonworks.com:2181(CONNECTED) 2] setAcl /config/topics world:anyone:r sasl:kafka:cdrwaAuthenticati
ObjectiveIf you are managing multiple copies of the HDP sandbox for Docker (see my article here:How to manage multiple copies of the HDP Docker Sandbox.), you may find yourself running out of storage within your Docker VM image on your laptop. There is a way to increase the available storage space of the Docker VM image. Increasing the storage space will allow you to have more copies of sandbox containers in addition to other images and containers.This tutorial will guide you through the process of increasing the size of the base Docker for Mac VM image. We will increase the size from 64GB to 120GB. This tutorial is the second in a two part series. The first tutorial in the series is: How to move Docker for Mac vm image from internal to external hard drive.For a tutorial on increasing the base Docker VM image on CentOS 7, read my tutorial here: How to modify the default Docker configuration on CentOS 7 to import HDP sandboxPrerequisitesYou should have already completed the following tu
In previous post we have seen how to Automate HDP installation with Namenode HA using Ambari Blueprints. In this post, we will see how to Deploy single node HDP Cluster with Kerberos authentication via Ambari blueprint.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 single node cluster with Kerberos Authentication(MIT KDC) 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.h
SYMPTOM: While performing step for Namenode HA, on the step of 'hdfs namenode -initializeSharedEdits' it failed with below error - ERROR: [root@localhost conf]# sudo su hdfs -l -c 'hdfs namenode -initializeSharedEdits'16/11/22 09:43:56 INFO namenode.NameNode: STARTUP_MSG:/************************************************************STARTUP_MSG: Starting NameNodeSTARTUP_MSG: host = locahost/10.200.206.12STARTUP_MSG: args = [-initializeSharedEdits]STARTUP_MSG: version = 2.7.1.2.3.0.0-2557STARTUP_MSG: classpath = /usr/hdp/2.3.0.0-2557/hadoop/conf:/usr/hdp/2.3.0.0-2557/hadoop/lib/commons-cli-1.2.jar:/us r/hdp/2.3.0.0-2557/hadoop/lib/xmlenc-0.52.jar:/usr/hdp/2.3.0.0-2557/hadoop/lib/jsch-0.1.42.jar:/usr/hdp/2.3.0.0-2557/ ...STARTUP_MSG: build = git@github.com:hortonworks/hadoop.git -r 9f17d40a0f2046d217b2bff90ad6e2fc7e41f5e1; compiled by 'jenkins' on 2015-07-14T13:08ZSTARTUP_MSG: java = 1.8.0_51************************************************************/16/
To post random data to Azure Event hubs using HTTP, use a generate flowfile processor to first generate the random data. Connect this to an UpdateAttribute processor to add your SAS (Share Access Signature) as a new attribute called "Authorization" to the flow file's attributes. Finally use PostHTTP to submit the data to Event HubsPlace the following processors on the pallet and set the run schedule of the generate flowfile processor to something reasonable like 10 seconds.Configure Update Attribute, adding the "Authorized" property with a SAS token. For more information on creating a SAS token see https://community.hortonworks.com/articles/69823/creating-shared-access-signature-sas-for-posting-d.htmlConfigure the PostHTTP to post the URL https://eventhub-nifi.servicebus.windows.net/hub-nifi/messagesNote: I set the content type to text/plain you should set this to suit your use case.Only the truststore needs to be configured for this example as we only need to trust the server certific
ISSUE : Ranger HA fails if admin password is changed to non default passwordError stack :Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 208, in <module> RangerAdmin().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute method(env) File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 59, in install setup_ranger_admin_passwd_change() File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 598, in setup_ranger_admin_passwd_change Execute(cmd, environment={'JAVA_HOME': params.java_home, 'RANGER_ADMIN_HOME': params.ranger_home}, user=params.unix_user) File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__ self.env.run() File "/usr/lib/python2.6/site-packages/resource_manag
HDP 2.5.3.0 and Ambari 2.4.2.0 with SmartSense 1.3.1 is now available for immediate use.Being maintenance releases, there are no features introduced. These releases contain bug fixes. HDP 2.5.3.0 has about 300 bugs since HDP 2.5.0.0. Ambari 2.4.2.0 contains about 140 fixes since Ambari 2.4.0.1 was released.Please consult the HDP 2.5.3.0 documentation and release notes. Also the Ambari 2.4.2.0 documentation and release notes.Thank you
Quick tips on how to find low level hardware performance stats. I use it often for NiFi/Spark/Hadoop. This is not limited to those use services. Additionally, this is not a exhaustive list nor am I advocating one tool over the another. Just a few I have ran over the years during my implementations/POCs experience. These give me insights whether I have allocated enough physical resources to run the services. I highly recommend not assuming what your hardware can or can't do. Benchmark it! How? Read my article here.Lets get to it.CPU stats iostat -c 1 3 will provide you cpu stats every 1 second 3 times. Output of the report (sourced right from here😞 CPU Utilization ReportThe first report generated by the iostat command is the CPU Utilization Report. For multiprocessor systems, the CPU values are global averages among all processors. The report has the following format:%userShow the percentage of CPU utilization that occurred while executing at the user level (application).
After completing Ambari upgrade from Ambari 1.7 to Ambari 2.0.2, Ambari failed to start because of below error(s):[root@xyz ~]# service ambari-server start Using python /usr/bin/python2.6 Starting ambari-server Ambari Server running with administrator privileges. Organizing resource files at /var/lib/ambari-server/resources... Server PID at: /var/run/ambari-server/ambari-server.pid Server out at: /var/log/ambari-server/ambari-server.out Server log at: /var/log/ambari-server/ambari-server.log Waiting for server start.................... ERROR: Exiting with exit code -1. REASON: Ambari Server java process died with exitcode 255. Check /var/log/ambari-server/ambari-server.out for more information. .If you check /var/log/ambari-server/ambari-server.out logs, you get below error(s):[root@xyz ~]# cat /var/log/ambari-server/ambari-server.out [EL Warning]: metadata: 2016-12-01 10:01:23.436--ServerSession(306824177)--The reference column name [resource_type_id] mapped on the element [field perm
This article describes how to launch Apache NiFi 1.0.0 on docker. To launch Apache NiFi 1.1.0 on docker go here.During my development of the Json2CSV processor here, I quickly found a need for an environment to test my processor. I don't want to build and install NiFi from my laptop since I need all my applications isolated from each other for ease of maintenance. Docker to the rescue! Similar to how I launch a PyCharm IDE from a docker image here which will rerender back to my laptop. Isolation! I like to keep it simply. Put everything in a Dockerfile and allow myself to quickly launch a NiFi Docker image. Here are the steps to get you up and runningPrerequisitesDownload latest virtualbox from here.To run docker containers or build images a docker machine is required. Download docker machine from here.First pull the prebuilt and complied docker image (https://hub.docker.com/r/sunileman/dockernifi/) by running this command:docker pull sunileman/dockernifiNow you have the docker
There are many ways to run Hadoop on virtual machines. Earlier this year I tried several approaches, and ended up using a helpful Quick Start Guide written by Yusaku Sako. The Quick Start uses VirtualBox, Vagrant, and predefined scripts to set up a multi-node HDP cluster. You can choose which version of Ambari to install, and then choose and install an associated version of the HDP stack. For anyone new to virtual machines, there is now a Quick Start for New VM Users. The extended version adds background information and additional details for installing Ambari and the HDP stack. Topics include: Terminology Prerequisites Installing VirtualBox and Vagrant Starting Linux Virtual Machines Accessing Virtual Machines Installing Ambari Installing the HDP Stack Troubleshooting Reference information for basic Vagrant commands
Over the last year, Oracle has continued to update and add support for Hortonworks HDP. Below is a list of products which support using Hortonworks HDP 2.5.0.0Big Data SQL https://www.oracle.com/database/big-data-sql/index.htmlBig Data Connector https://www.oracle.com/database/big-data-connectors/certifications.html Includes -Oracle SQL Connector for HDFS-Oracle Loader for Hadoop-Oracle Data Integrator-Oracle XQuery for Hadoop-Oracle R Advanced Analytics for Hadoop-Oracle Datasource for HadoopSpatial and Graph https://www.oracle.com/database/spatial/index.htmlGoldenGate for Big Data https://www.oracle.com/middleware/data-integration/goldengate/big-data/index.htmlOracle Data Integrator Enterprise Edition https://www.oracle.com/middleware/data-integration/enterprise-edition-big-data/index.htmlBig Data Discovery https://www.oracle.com/big-data/big-data-discovery/index.html
Prerequisites1) Service Ambari Infra installed -> Ranger will use Ambari Infra's SolrCloud for Ranger Audit2) MySQL installed and running (I'll use Hive's Metastore MySQL instance * MySQL is one of the many DB options)Installing Apache Ranger using Ambari Infra (SolrCloud) for Ranger Audit1) Find the location of mysql-connector-java.jar (assume /usr/share/java/mysql-connector-java.jar) run the following command on the Ambari serversudo ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar 2) In Ambari, click Add Service 3) Choose Ranger and click Next4) Choose "I have met all the requirements above." and click Proceed (this was done in #1 above)5) Assign master(s) for "Ranger Usersync" and "Ranger Admin" and click Next6) Assign Slaves and Clients - since we did not install Apache Atlas, Ranger TagSync is not required and click Next7) Customize Services -> Ranger Audit, click on "OFF" to enable SolrCloudBefore clicking:After clicking:😎 Customi
- Suppose if we have a webserver configured in front of the ambari server something like following "/etc/httpd/conf/httpd.conf"<VirtualHost erie1.example.com:80> ServerAdmin erie1.example.com ProxyPass / http://erie1.example.com:8080/ </VirtualHost>Means any request coming to "http://erie1.example.com" will be passed to "http://erie1.example.com:8080/" now with this setup we will see that ambari is working fine and accessible.However when we try to access the PigView then we will see that the PigView is not able to load the scripts:Also we will see that in the debugger tool that the script URL is not accessible (404 http response)http://erie1.example.com/api/v1/views/PIG/versions/1.0.0/instances/Pig_A/resources/file/%2Fuser%2Fadmin%2Fpig%2Fscripts%2Fsmalldatatest-2016-11-25_09-26.pigAbove is the URL using which PigView tries to read the script that is stored in the HDFS. Even when we open this URL in the browser we get the same 404 error. However we see that the
Usually Ambari server generates certs with 1 year validity. after an year all Agent would fail to communicate with Ambari-server. Agent and Server certs would be expired. below steps can be followed to replace/resolve the expired certs. 1. stop ambari-server2. take a back of existing /var/lib/ambari-server/keys folder and empty it.3. download the attached keys.zip file and copy it to /var/lib/ambari-server/ , your new folder structure should be like /var/lib/ambari-server/keys/ca.config,/var/lib/ambari-server/keys/db/, - basically this is a fresh keys folder ( this is what you get when you install ambari-server )4. Take a back up of all the Agent certs located at /var/lib/ambari-agent/keys/ in all the hosts.5. Delete all the files under /var/lib/ambari-agent/keys/ folder6. restart ambari-server.Note: ambari-server should create new certs under /var/lib/ambari-server/keys/ca.crt , /var/lib/ambari-server/keys/ca.key ....7. restart ambari-agentNote: ambari-agent should create
I.OverviewHadoop can use a lot of network bandwidth as well as disk storage. Typical configuration options such as data replication settings to 3x can further increase demands to the network as can normally desirable technologies such as network storage. For example, loading a 1 TB file with a 3x replication factor can end up consuming 3 TB of network traffic to successfully load the file and another 3 TB of data movement if network drives are utilized. The sections below highlight an aggregation of previously identified best practices to best setup the network to support the deployment of an HDP cluster.II.Network Topology Machines should be on an isolated network from the rest of the data center. This means that no other applications or nodes should share network I/O with the Hadoop infrastructure. This is recommended as Hadoop is I/O intensive, and all other interference should be removed for a performant cluster.Machines should have static IPs. This will enable stability in the
Here is the scenario:1. I have workflow.xml which contains hive action..2. I have added <job-xml> tag inside hive action and provided path to the hive-site.xml (say /tmp/hive-site.xml).3. I have added hive-site.xml to the ${wf.application.path}/lib directory as well..4. I have hive-site.xml to the oozie sharelib under:/user/oozie/sharelib/lib_<timestamp>/oozie/hive-site.xml/user/oozie/sharelib/lib_<timestamp>/sqoop/hive-site.xml/user/oozie/sharelib/lib_<timestamp>/hive/hive-site.xml.5. My simple hive workflow is failing with below error:Oozie Hive action configuration ================================================================= Using action configuration file /hadoop/data01/hadoop/yarn/local/usercache/root/appcache/application_1443111597609_2691/container_1443111597609_2691_01_000002/action.xml ------------------------ Setting env property for mapreduce.job.credentials.binary to: /hadoop/data01/hadoop/yarn/local/usercache/root/appcache/application_144311159
Grafana username and password is stored in a sqlite3 database. One of the way is to reset the password back to admin first and then can be changed in Grafana Dashboard. To do the same, following steps could be used:1. Logon to the node where Grafana is installed and invoke Grafana sqlite3 database as follows:# sqlite3 /var/lib/ambari-metrics-grafana/grafana.dbsqlite> select salt, password from user;pyaUhfDzYg|54c7d1ce2eeaa6000bd84407d0f8ab4663dfa575e0a326bc70dc5cab4b864f6677b21879dbf5e33427c88f9160f744b625bfsqlite> update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'admin';sqlite> .exit2. Once done, edit Ambari Metrics Server-Configs and update Grafana Password to "admin"3. Restart the Ambari Metrics Server4. Access Grafana page using the Quick Links under Ambari Metric Server Dashboard5. Click on the Grafana Symbol in the top left corner of the screen and Sign-in
Sometimes, after disabling Kerberos successfully, you can get below error while accessing NN or RM UIs..Because of this, all the alerts, Ambari metrics data can be broken because JMX data won't be available to Ambari Metrics or Alerts via HTTP..Resolution:Modify below propery in core-site.xml via Ambari and restart required services.hadoop.http.authentication.simple.anonymous.allowed=trueNote - Most of the times issue happens because of this property being set as false after disabling Kerberos.Please also compare below property and see if it is correct. hadoop.security.authentication=simple.Issue is simple but it takes lot of time to troubleshoot. Hence posting this article to reduce someone's time 🙂Please comment if you face any issues or need any further help on this. Happy Hadooping!! 🙂
HDP 2.5 GA'd phoenix query server. This makes connecting to phoenix much easier. Article will walk through steps on how to connect to phoenix Phoenix Query Server via DBVisualizer. Grab the phoenix thin jdbc driver onto your desktop. On the HDP 2.5 here is the location of the jdbc driverStart up DBVisualizer. From the top menu bar select Tools->Driver ManagerPopoluate the fields:Name:Apache Phoenix Thin ClientI used phoenixthin.URL Format: jdbc:phoenix:thin:url=<scheme>://<server-hostname>:<port>[...]Client on the folder iconLocate your phoenix thin jdbc driver you downloaded to your desktop. Once selected click on ok and and now you have the driver loaded.Lets connect to phoenix. Click on the icon shown below which creates a new db connection. Then select "Use Wizard".Enter a connection name. I used phoenix-QPSNow select the driver you loaded in the previous steps. I named my driver phoenixthinNext enter your userid & password. For this example I use
The objective of this article is to have a discussion and capture critical points for consideration when developing a Streaming Application using Storm, Spark or any other streaming technology. Intent is to add additional points from discussion and comments to evolve this article into a comprehensive guideline for Stream Engineering.Here are a few points synthesized from my experience developing streaming applications using Storm and Flume:1. Select Streaming Application’s SLAs requirementsMost Streaming Applications can be classified based on their SLA requirements into:At-most once (data drops are acceptable)At-least once (data drops are NOT acceptable)Exactly once (idempotent computations)These requirements tend to heavily drive design requirements like whether or not to ack tuples (in Storm), or if downsampling is acceptable (sensor data processing)2. Minimal and careful data replaysIn Guaranteed Processing SLA use cases, data replay must be minimized by application logic to avoid
BehaviorThe number of cells returned to the client are normally filtered based on the table configuration; however, when using the RAW => true parameter, you can retrieve all of the versions kept by HBase, unless there was a major compaction or a flush to disk event in meanwhile.DemonstrationCreate a table with a single column family:create 't1', 'f1' Configure it to retain a maximum version count of 3:alter 't1',NAME=>'f1',VERSIONS=>3Perform 4 puts:put 't1','r1','f1:c1',1put 't1','r1','f1:c1',2put 't1','r1','f1:c1',3put 't1','r1','f1:c1',4Scan with RAW=>true. I used VERSIONS as 100 for a catch-all. It could have been anything greater than 3 (number of versions set previously). Unless specified, only the latest version is returned by scan command.scan 't1',{RAW=>true,VERSIONS=>100}The above scan returns all four versions.ROW COLUMN+CELL r1 column=f1:c1,timestamp=1479950685181, value=4 r1 column=f1:c1,timestamp=1479950685155, value=3 r1 column=f1:c1,timestamp=14799
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.