Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
Hive Insert Query OptimizationSome business users deeply analyze their data profile, especially skewness across partitions.There are many other tuning parameters to optimize inserts like tez parallelism, manually changing reduce tasks (not recommended), setting reduce tasks etc.This article focuses on insert query tuning to give more control over handling partitions with no need to tweak any of these properties.Consider a scenario where we are inserting 3 million records across 200 partitions. The file format is ORC and it is further bucketed and sorted for quicker retrieval during select. Apart from writing, bucketing/sorting is going to add additional work for the reducer.Target Tablecreate table if not exists final.final_data_2 (creation_timestamp bigint,creator string,deletion_timestamp bigint,deletor string,subject string,predicate string,object string,language_code string )partitioned by(range_partition bigint)CLUSTERED BY(creation_timestamp) SORTED BY(creation_timestamp) INTO 8
SANDBOX VERSION AFFECTEDHDP 2.6.0.3 Sandbox as identified below.# wget https://downloads-hortonworks.akamaized.net/sandbox-hdp-2.6/HDP_2.6_docker_05_05_2017_15_01_40.tar.gz# md5sum HDP_2.6_docker_05_05_2017_15_01_40.tar.gz886845a5e2fc28f773c59dace548e516 HDP_2.6_docker_05_05_2017_15_01_40.tar.gzISSUEWhen using classic Hive CLI after a while the following error surfaces.[root@sandbox demos]# hivelog4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.Logging initialized using configuration in file:/etc/hive/2.6.0.3-8/0/hive-log4j.propertiesException in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.UnknownHostException: sandbox at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:547) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.
ProblemWhile using LLAP, (can happen anytime, even though it was working a second ago), you might see a MetaException complaining about incorrect MySQL server syntax. Here is the the error output with 10 retries by default, so this could get lengthy.0: jdbc:hive2://xlautomation-1.h.c:10500/defa> analyze table L3_MONTHLY_dw_dimRisk compute statistics for columns;Getting log thread is interrupted, since query is done!Error: Error while compiling statement: FAILED: RuntimeException Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient (state=42000,code=40000)org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: RuntimeException Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:277) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:263) at org.apache.hive.jdbc.HiveStatement.runAsyncOnServer(HiveStatement.java:303) at org.apa
The feature of being able to download client configs after cluster deployment was initially added to Ambari in 1.7.0 version. This feature helps Hadoop admin in following known use cases:This can be helpful if Hadoop admin or some other developer wants to setup a client host that is not being managed by ambari. Ambari as of now (2.5.0 version) does not support multiple cluster and if user environment has multiple clusters with same set of client hosts that needs to be configured to interact with all clusters, then these hosts cannot be added to any one particular ambari cluster and needs to be managed outside of the ambari. In this scenario being able to download all client configs can be a helpful feature to set up these client hosts.Further this feature can also be helpful if user wants to create automation scripts for hadoop application running on an ambari managed cluster without using any existing node of the ambari cluster for running automation code. This will require to do set
We needed to create a data lake of all the companies data, the first set of data was from SQL Server. So using Apache NiFi 1.1.x I ingested it into Hive / ORC. A few of the smaller constantly changing tables need to stay in SQL Server so we need to be able to join tables in Hive with tables in SQL Server. Fortunately, Microsoft provides a very cool extension to SQL Server called Polybase that let's us build external tables pointing to Hadoop. Once those tables are referenced they act like regular tables. So now all the companies data including other data sources loaded into Hadoop Hive ORC tables can be queried and joined. And it's fast! Step 1: Apache NiFi MagicQueryDatabaseTable: One for each table picking a sequence id primary key the tables have. Could also do timestamp.ConvertAVROtoORC: Point to /etc/hive/conf/hive-site.xmlPutHDFS: Store in a separate HDFS, write this down as we need it for polybase.ReplaceText (GenerateHiveDDL): Builds create Hive table st
Why should you care about Taxonomy? Taxonomy is the missing link in information management projects. By organizing all corporate data, the usability of knowledge increases considerably!In this tutorial we will explore how Apache Atlas enables you to apply a Taxonomy to the data in you HDP data lake. Log into Apache Atlas.If you don't see a screen that looks like this (With Taxonomy available) You need to enable Taxonomy.To enable Taxonomy Go to Ambari and click on Atlas in the Services menu.Then select Configs and Advanced:Scroll to the bottom and in the Custom application-properties add a property atlas.feature.taxonomy.enable and set to true.Now restart Atlas.You should now see Taxonomy in the Atlas UI.In the Taxonomy tab click on the "..." elipse by Catalog and select "Create Sub-Term".I will create a term for Tagging Twitter related Assets used in the previous tutorials. You are free to create your own terms how you see fit or follow along. Click the Catalog drop down and select th
Vision Thing Part 3: Image AnalyticsOpen Source Computer Vision with TensorFlow, Apache MiniFi, Apache NiFi, OpenCV, Apache Tika and PythonIn preparation for this talk, I am releasing some articles detailing how to work with images. In this oneFor Linux machines I recommend building OpenCV yourself and installing the Python connector.sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpmsudo yum update -ysudo yum groupinstall 'Development Tools' -ysudo yum install cmake git pkgconfig -ysudo yum install libpng-devel libjpeg-turbo-devel jasper-devel openexr-devel libtiff-devel libwebp-devel -ysudo yum install libdc1394-devel libv4l-devel gstreamer-plugins-base-devel -ysudo yum install gtk2-devel -ysudo yum install tbb-devel eigen3-devel -ysudo yum install -y python36u python36u-libs python36u-devel python36u-pip -ypip3.6 install numpycd ~git clone https://github.com/Itseez/opencv.gitcd opencvgit checkout 3.1.0git clone https://github.com/Itseez/opencv_contrib.gitcd opencv_
On HDP 2.4, some services may have corrupted jar and tar.gz files on HDFS. The specific files I have seen broken are as follows: hive.tar.gzmapreduce.tar.gzhadoop-streaming.jarpig.tar.gzspark-hdp-assembly.jarsqoop.tar.gztez.tar.gzAll of these are found in the /hdp/apps/<hdp-version> directory. On my install, they all had zero size (reported as 0.1 kB on HDFS File View). This led to errors in a variety of services, including the following: gzip: /foo/bar/yarn/local/filecache/11_tmp/tmp_mapreduce.tar.gz: unexpected end of filetar: This does not look like a tar archive Error: Could not find or load main class org.apache.spark.deploy.yarn.ExecutorLauncher There may be other errors, but those are the ones I personally experienced. This is fairly easy to fix. Each corrupt file has a healthy version on the local file system. The healthy version must be copied from the local system to HDFS, replacing the corrupt version. For example, to update Tez, perform the following:$ hdfs dfs -rm /h
Problem Description Atlas uses Solr to store Lineage meta information and uses Zookeeper for co-ordination and store/maintain configuration. Due to heavy load on Zookeeper on larger cluster we need to increase timeout for ZK session for some services from default. One such config is for Ambari infra (Solr) zookeeper time on Atlas side. ERROR: java.util.concurrent.TimeoutException: Could not connect to ZooKeeper vb-hortonwork.com:2181/infra-solr within 15000 ms java.util.concurrent.TimeoutException: Could not connect to ZooKeeper vb-hortonwork.com:2181/infra-solr within 15000 ms RESOLUTION: We can increase the session timeout from default 15000 by adding below properties in custom application-properties in atlas -> configatlas.graph.index.search.solr.zookeeper-connect-timeout=60000 atlas.graph.index.search.solr.zookeeper-session-timeout=60000
ENV: HDP 2.5Please follow following steps to configure1. under Ambari-> Knox -> Advanced topologies 2. add the following snippet in advanced topologies <provider> <role>ha</role> <name>HaProvider</name> <enabled>true</enabled> <param> <name>HIVE</name> <value>maxFailoverAttempts=3;failoverSleep=1000;enabled=true;zookeeperEnsemble=rkk3.hdp.local:2181,rkk2.hdp.local:2181,rkk1.hdp.local:2181;zookeeperNamespace=hiveserver2</value></param> </provider> comment out the url from hive service tag<service> <role>HIVE</role> <!-- <url>http://{{hive_server_host}}:{{hive_http_port}}/{{hive_http_path}}</url> --> </service> 3. Restart KNOX4. Open Beeline and connect to HS2beelineBeeline version 1.2.1000.2.5.0.0-1133 by Apache Hivebeeline> !connect jdbc:hive2://rkk1.hdp.local:8443/;ssl=true;sslTrustStore=/var/lib/knox/data-2.5.0.0-1133/security/keystores/gateway.jks;tr
If you’re using Apache Kafka, you know it persists all the messages on disk as a distributed commit log. You might sometimes want to take advantage of that and reprocess some of the messages. Assuming that you want to reprocess all the messages currently stored on your brokers and you set auto.offset.reset to smallest, you can just delete your consumers’ data from Zookeeper. After restarting, your consumers should start from the beginning. But what if you forgot or didn’t want to set auto.offset.reset in you consumers to smallest? Then you can manually set the offsets for each partition for your consumers to the smallest currently available offset.List all topicskafka-topics --list --zookeeper localhost:2181 Get Offsets for the topickafka-run-class kafka.tools.GetOffsetShell --broker-list localhost:9092 -topic vital_signs --time -1 Set the offset manually$ ZOOKEEPER_HOME/zkCli$ ls /consumers/flasfka/offsets/vital_signs$ set /consumers/flasfka/offsets/vital_signs/0 11492949 Verify the n
Issue: While performing HDP upgrade it failed on last step. Error Finalizing HDP upgrade Failed on: Save Cluster StateSample screenshot is attached below -Many times error might change, and in my case below was the error -Begin finalizing the upgrade of cluster TEST_DEV to version 2.5.0.0-1245 The following 7 host(s) have not been upgraded to version 2.5.0.0-1245. Please install and upgrade the Stack Version on those hosts and try again. Hosts: host1.example.com, host2.example.com, host3.example.com, host4.example.com, host5.example.com, host6.example.com, host7.example.com Root Cause: When check in ambari DB for "host_version" table we were able to see the 7 hosts were pointing to state as INSTALLED as shown below -The repo_version_id=151 should be in "CURRENT" state which was not the case. It was in INSTALLED state.Solution:1. First set the previous repo_version_id ie 101 to INSTALLED state using below command -mysql> update host_version set state='INSTALLED' where repo_version_id
Changing the amb_ranger_admin password is possible. This user password is stored in two different locations. If for any reason there is difference between them you will run into issues. On this article I will go over the locations and steps to change the password.Locations1. The amb_ranger_admin user and password exist in Ranger Admin database (encrypted) by default as an internal user. This user's password is the first location.2. Ambari keeps a copy of the amb_ranger_admin password to create repositories and default policies for each plugin. This password is stored in ambari database (encrypted) as part of configuration of ranger-env."ranger_admin_password" : "SECRET:ranger-env:2:ranger_admin_password", "ranger_admin_username" : "amb_ranger_admin",How to update amb_ranger_admin password?1. Login to Ranger Admin UI, and navigate to Settions > Users and Groups. Then search for the amb_ranger_admin user and click on the username to edit. Click on the Change Password tab and enter new
To use DPS services, i.e. DLM, for replication between HDP clusters over wired encryptions leverages the Knox gateway functionality. For that two services must be configured in Knox and one Ranger Policy created. This is the quick setup of the required Ambari services in Knox and Ranger.Adding two new services (AMBARI and AMBARIUI) to the Knox advance topology configuration <service> <role>AMBARI</role> <url>http://knox-gw:8080</url> </service> <service> <role>AMBARIUI</role> <url>http://knox-gw:8080</url> </service>In Ranger define a policy to allow the access to AmbariUI Then restart the all marked service in the cluster. Test that it works and login to Ambari by proxying Knox (default port: 8443).Now you can join the cluster in DPS.
HDP deploy with CB CLI This article provides step by step instruction for installing cloudbreak 2.5 release candidate on OSX and launch HDP Environment OSX HighSierra (laptop) Openstack environment keystone-v3 via VPN (internal facing) Pre-Requisite Homebrew Java 1.8+ If you start from scratch on OSX High Sierra # install homebrew/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"# install caskbrew tap caskroom/cask#install pre-reqbrew cask install java8 optionally - installing docker, While the official docs state docker and docker-machine are required, you can skip installing them because cbd brings it with it into ".deps" folder in cloudbreak home. brew cask install dockerbrew install docker-machine-driver-xhyve Concepts and Components We are going to use the following 3 components Cloudbreak Deployer (cbd) Cloudbreak Application (14 docker containers with cloudbreak application at the center) Cloudbreak Command
HDP deploy with CB CLI This article provides step by step instruction for installing cloudbreak 2.5 release candidate on OSX and launch HDP and HDF clusters into Openstack IaaSEnvironment OSX HighSierra (laptop) Openstack environment keystone-v3 via VPN (internal facing)Pre-Requisite Homebrew Java 1.8+ If you start from scratch on OSX High Sierra# install homebrew/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"# install caskbrew tap caskroom/cask#install pre-reqbrew cask install java8# optional - installing docker, While the official docs state docker and docker-machine are required, you can skip installing them because cbd brings it with it into ".deps" folder in cloudbreak home.brew cask install dockerbrew install docker-machine-driver-xhyve</ul><h2>Concepts and Components</h2><p>We are going to use the following 3 components</p><ol> <li>Cloudbreak Deployer (cbd) </li> <li>Cl
In previous post we have seen how to Automate HDP installation with Kerberos authentication on multi node cluster using Ambari Blueprints.In this post, we will see how to deploy multi-node node HDP Cluster with Resource Manager HA via Ambari blueprint..Below are simple steps to install HDP multi node cluster with Resource Manager HA using internal repository via 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.Step 1: Install Ambari server using steps mentioned under below linkhttp://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-installation/content/ch_Install
With HIVE-13670Till today we need to remember the complete Hive Connection String either you are using direct 1000 port or ZK connection string. After the above Jira we can optimize that by setting up the environment variable(/etc/profile) on the Edge nodes. export BEELINE_URL_HIVE="<jdbc url>"Example:export BEELINE_URL_HIVE="jdbc:hive2://<ZOOKEEPER QUORUM>/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2"Now just type beeline -u HIVEEven we can setup multiple connection strings just by setting different naming connections like BEELINE_URL_BATCH, BEELIVE_URL_LLAP. Hope this helps you.
Issue: Knox Gateway fails to start with "org.apache.hadoop.gateway.services.security.KeystoreServiceException: java.io.IOException: Keystore was tampered with, or password was incorrect"Below are the startup logs.2018-03-13 05:17:47,189 INFO hadoop.gateway (GatewayServer.java:logSysProp(193)) - System Property: user.name=knox2018-03-13 05:17:47,193 INFO hadoop.gateway (GatewayServer.java:logSysProp(193)) - System Property: user.dir=/var/lib/knox2018-03-13 05:25:26,853 INFO hadoop.gateway (GatewayServer.java:logSysProp(193)) - System Property: java.runtime.name=OpenJDK Runtime Environment2018-03-13 05:25:26,853 INFO hadoop.gateway (GatewayServer.java:logSysProp(193)) - System Property: java.runtime.version=1.8.0_131-b112018-03-13 05:25:26,854 INFO hadoop.gateway (GatewayServer.java:logSysProp(193)) - System Property: java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-2.b11.el7_3.x86_64/jre2018-03-13 05:25:27,230 INFO hadoop.gateway (GatewayConfigImpl.java:loadConfigResource(322)
HelloAs some of you already know, Solr through knox on HDP platform isn't fully supported yet, however, it is possible to achieve that using an IBM IOP distribution.Here are some steps:Problems like that are usually related with kerberos issues.Pre-reqs: You should have already configured your knox with the desired authentication mode:OBS: In order to use this flag "Dsun.security.krb5.rcache", the jdk 1.8 or above must be used.Root cause: a) You may have not configured your browser for authentication ( SPNEGO ), b) You haven't included your users into the SolR Plugin on Ranger.c) You are hitting a known issue related with this parameter "Dsun.security.krb5.rcache=none", which is better described in this forumhttps://community.hortonworks.com/content/supportkb/150162/error-gssexception-failure-unspecified-at-gss-api.html1) Add the following parameters into your Hadoop core-site.xml:hadoop.proxyuser.knox.groups = *hadoop.proxyuser.knox.hosts = *OBS: You can change the impersonation requi
For security reasons, sometimes we might need to deactivate the ambari users ,rather deleting.In these scenerios make the user inactive from ambari UI, however if the users are more we might need to automate it from rest API as mentioned below.The objective is to deactivate the user "ritesh" . One of method is from UI Go to Admin --> manage users --> users --> click on user name We can see the user is in ACTIVE State. You can use this toggle button to change the value.Deactivate a user from REST API.1. If you try to curl the rest API link http://172.26.113.155:8080/api/v1/users, it will show you all the users in the ambari. To get the properties for a particular user, append the user name at the end of the API (like below)If we analyze above output, we see an element "active"="true" which controls the status of that user (active/inactive)Hence to disable the user, run this below command. Please notice that the command has argument ("Users/active":"false") for PUT method and ha
Cloudbreak 2.4.0 and newer includes a neat feature which allows you to obtain CLI commands from the web UI. This feature can save you a lot of time if you are just getting started with the CLI.PrerequisitesYou must have an instance of Cloudbreak running.You downloaded and configured Cloudbreak CLI. if you still need to do this, refer to Installing the CLI. Obtain Cluster JSON from the UI By far the most useful feature is being able to obtain cluster JSON file from the web UI. There are two easy ways to do this.Option 1 (Does not require creating a cluster)Navigate to the create cluster wizard and specify all required parameters. Once done, on the last page of the wizard there is an option to SHOW CLI COMMAND, which allows you to generate a JSON skeleton of your cluster:You can click COPY the JSON, paste it to a text edit, and save it as template.json. Next, you can copy the command listed in the web UI below the CLI skeleton to create a cluster from the template.json file: cb cluster
Steps to enable Query logging in Ambari server with Postgres Database 1. If it is Postgres as DB then add following property in ambari.properties server.jdbc.properties.loglevel=2 After restart you can see SQL query logging to Ambari-server.out file 2.If it is MySQL as DB then add/update following property in ambari.properties. append below value in JDBC URL ?logger=com.mysql.jdbc.log.Slf4JLogger&profileSQL=trueEx:server.jdbc.rca.url=jdbc:mysql://apappudb.hdp.com:3306/ambariupgrade?logger=com.mysql.jdbc.log.Slf4JLogger&profileSQL=trueandserver.jdbc.url=jdbc:mysql://apappudb.hdp.com:3306/ambariupgrade?logger=com.mysql.jdbc.log.Slf4JLogger&profileSQL=true After re-start you will find the logs in ambari-server.log
Zeppelin is A web-based notebook that enables interactive data analytics. You can make beautiful data-driven, interactive and collaborative documents with SQL, Scala and more.The latest version of zeppelin is 0.6.2 when this article is written, although the community has made lots of effort to improve it. Sometimes you would still meet some weird issues due to environment issue, wrong configuration or zeppelin’s bug of itself. This article would try to illustrate to you to how to diagnose zeppelin if you meet some issues that you can't figure out what’s wrong.Zeppelin Architecture Before I go to details I’d like to give an illustration of zeppelin’s architecture. So that we can understand where to diagnose. The above is a diagram of zeppelin’s diagram. Overall it has 3 layers: FrontendZeppelin ServerInterpreter Process I would not talk about the details, but just want you to have an overall picture of what components zeppelin has, and usually we hit issues on zeppelin server and in
AbstractThis article objective is to cover the end to end lineage capture with in bigdata platformIntroduction A visual representation of data lineage helps to track data from its origin to its destination. It explains the different processes involved in the data flow and their dependencies. Metadata management is the key input to capturing enterprise dataflow and presenting data lineage from end to end and especially in banking industry due to CCAR requirements and regulations. When it comes to Hortonworks platforms ( HDP Hortonworks Data Platform , Hortonworks Data Flow) there are several components involved beginning from data ingestion, cleansing/transformation all the way through data analytics using Kaka, Nifi, Spark, Hive, Hive LLAP etc in solving enterprise bigdata problems.Problem Statement Apache Atlas provides a scalable and extensible set of core foundational governance services including lineage. Capturing lineage from end to end is complex problem to solve for
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.