Find and share helpful community-sourced technical articles
Recently active
Hive view is a web GUI that lets you easily interact with HIVE, which comes pre-deployed in the Ambari managed cluster. Ambari 2.5.0 comes with the new version of Hive view (2.0.0). The hive view 2.0 supports a lot of new features, one of them is Table Manager. Before Ambari 2.5.0, managing and creating table had to done through query tab, by writing queries. Table manager in Hive 2.0.0 provides a GUI wizard to create a table definition, or create a table, alter a table and load data by uploading the file of format CSV, JSON or XML.This article is an introduction to Table manager in Hive View 2.0Creating a new Hive View 2.0 Instance Ambari comes with auto created instances of Hive view. If you wish to create a new instance of hive view, follow the steps:Click Manage Ambari to open the Ambari Administration user interface.Click Views, expand the Hive View, and click Create Instance.On the Create Instance page, select the Version as 2.0.0. Table Manager Wizard To create a table using Ta
GOALS Configure Ranger + Ranger KMS Create an encryption Zone OS used is CentOS/Redhat 6.6 At the end, should be able to create an encryption zone and validate using Hive NOTE: This article is in a walkthrough mode wherein snapshots were taken from relevant screens to create a step-by-step guide on installing Ranger and Ranger KMS along with creation and validation of encrypted zones in Hadoop. https://www.scribd.com/presentation/341887712/HDFS-Encryption-Zone-Hive-Orig
IntroductionGetting Apache Metron (Incubating) installed on an Ubuntu cluster has not yet been something that has gotten a lot of attention. Building on the work of Michael Miklavcic in setting up Elasticsearch and Kibana on Ubuntu, we can proceed to tackle how to install Metron on a working HDP Ubuntu cluster with Elasticsearch and Kibana. For maximum transparency, we will do this manually.This article assumes the following to be installed and running: HDP 2.5.0+ with HDFSHBaseStormZookeeperKafkaElasticsearch 2.4Kibana 4.5.3We also assume that the access node that we are on has Oracle Java 8 on the classpath.Install MetronPreliminariesThe following steps should be done on an access node. This node should have the following installed:The Hadoop clientThe Storm clientI will assume that the user executing the following sectionHas suitable permissions to write to /apps in HDFSHas suitable permissions to start Storm topologies on the clusterHas sudo accessIn order to build Metron, we will
OverviewRaspberry Pi is an interesting little machine. Even more so with the release of the Raspberry Pi 3. While it may not technically be the most powerful device in this form-factor, it definitely wins on overall community, breadth of support and stability. Naturally, there is sizable interest in running something like NiFi on this little edge device. And that's exactly what we have been doing for the past 8 months (as of May 2016). Today I'd like to share a set of best practices for running NiFi on the Pi that came out of this exercise.In general, recommendations fall into 2 categories:Raspberry Pi configuration – OS, system-level settings for running an always-on NiFi instance.NiFi configuration – tweaks and changes within NiFi itselfLet’s start with some prep work.Raspberry Pi ConfigurationI’m assuming the Raspberry Pi is fully under one’s control, including physical access to SD card and USB slots, together with a root account.SD CardIf you bought a starter kit, it probably came
IntroductionWhat we’re doing: Committing to <2 hours setup time Deploying a matched pair of 3 node HDF clusters into two different zones on AWS EC2 Configuring some basic performance optimisations in EC2/NiFi Setting up site-to-site to work with EC2's public/private FQDNsWhat you will need:AWS account with access / credits to deploy 3x EC2 machines in two different regionsApprox 80Gb SSD disk per machine, for 480GB total3x Elastic IPs per region(Preferable) iTerm or similar ssh client with broadcast capabilityYou should use two different AWS regions for your clusters, I’ll refer to them as regionA and regionBCaveats:We’re going to use a script to setup OS pre-requisites and deploy HDF on the server nodes to save time, as this article is specific to AWS EC2 setup and not generic HDF deploymentWe’re not setting up HDF Security, though we will restrict access to our nodes to specific IPsThis is not best practice for all use cases, particularly on security; you are advised to take what
Environment- HDP 2.5.3- Kerberos disabledProblemI have a problem to use hiveContext with zeppelin. For example this code does not works:%pysparkfrom pyspark.sql import HiveContext sqlContext = HiveContext(sc)sample07 = sqlContext.table("default.sample_07")sample07.show()Here is the error displayed:You must build Spark with Hive. Export 'SPARK_HIVE=true' and run build/sbt assembly Py4JJavaError: An error occurred while calling None.org.apache.spark.sql.hive.HiveContext. : java.lang.RuntimeException: java.lang.RuntimeException: java.io.IOException: Permission denied at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:522) at org.apache.spark.sql.hive.client.ClientWrapper.<init>(ClientWrapper.scala:204) at org.apache.spark.sql.hive.client.IsolatedClientLoader.createClient(IsolatedClientLoader.scala:238) at org.apache.spark.sql.hive.HiveContext.executionHive$lzycompute(HiveContext.scala:225) at org.apache.spark.sql.hive.HiveContext.executionHive(HiveContext.scal
ProblemWhen trying to import larger notebooks into Zeppelin, the import does nothing. Checking the /var/log/zeppelin/ logs, it is apparent that this is a jetty websocket text size issue.WARN [2017-03-13 14:22:30,427] ({qtp110945054-15} Parser.java[notifyWebSocketException]:235) - org.eclipse.jetty.websocket.api.MessageTooLargeException: Text message size [2408484] exceeds maximum size [1024000] at org.eclipse.jetty.websocket.api.WebSocketPolicy.assertValidTextMessageSize(WebSocketPolicy.java:140) at org.eclipse.jetty.websocket.common.Parser.assertSanePayloadLength(Parser.java:127) at org.eclipse.jetty.websocket.common.Parser.parseFrame(Parser.java:482) at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:254) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:632) at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:480) at org.eclipse.jetty.io.AbstractConn
ProblemHere is my user I run %livy.sparkr with%sh whoami admin Permissions set to directory and file:%shls -lrt /home/admintotal 12-rwxr-xr-x 1 admin admin 3950 Mar 9 13:12 common.rdrwxrwxr-x 2 admin admin 4096 Mar 10 15:25 analysisdrwxrwxr-x 3 admin admin 4096 Mar 13 12:49 motorAnalysis%shls -lrt /home/admin/motorAnalysistotal 8-rwxrwxr-x 1 admin admin 3950 Mar 10 16:49 common.rdrwxrwxr-x 5 admin admin 4096 Mar 10 16:49 dataRunning %livy.sparkr I am getting%livy.sparkr ...source("/home/admin/motorAnalysis/common.r") null device 1 Error in file(filename, "r", encoding = encoding) : cannot open the connection Calls: source -> file In addition: Warning message: In file(filename, "r", encoding = encoding) : cannot open file '/home/admin/motorAnalysis/common.r': No such file or directory SolutionRestart livy interpreter from Zeppelin UI fixes the problem
Q: Is there any way to change the user my hive jobs run as under LLAP? They always seem to run as 'hive' user.A: Hive LLAP does not currently support hive.server2.enable.doAs=true. All sessions will run under the hive account.
ProblemWhen I run the below code on Pig View (HDP 2.5.3 and Ambari 2.4.2) in Kerberos enabledREGISTER '/usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-pig-adapter.jar';a = LOAD 'test123.foo' USING org.apache.hive.hcatalog.pig.HCatLoader();dump a;I get the following errors- PIG log...07 Mar 2017 12:22:32,971 ERROR [ambari-client-thread-28] [PIG 1.0.0 Pig] JobService:232 - Exception occurred :java.io.FileNotFoundException: File /user/<userID>/pig/jobs/pighivetest_07-03-2017-12-22-15/stderr not found....Caused by: org.apache.hadoop.ipc.RemoteException(java.io.FileNotFoundException): File /user/<userID>/pig/jobs/pighivetest_07-03-2017-12-22-15/stderr not found....- Application log...2017-03-07 12:22:45,223 [main] ERROR org.apache.thrift.transport.TSaslTransport - SASL negotiation failurejavax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)] at com.sun.se
IntroductionNiFi Site to Site (S2S) is a communication protocol used to exchange data between NiFi instances or clusters. This protocol is useful for use case where we have geographically distributed clusters that need to communicate. Examples include:IoT: collect data from edge node (MiNiFi) and send them to NiFi for aggregation/storage/analysisConnected cars : collect data locally by city or country with a local HDF cluster, and send it back to a global HDF cluster in core Data CenterReplication : synchronization between two HDP clusters (on prem/cloud or Principal/DR)S2S provides several benefits such as scalability, security, load balancing and high availability. More information can be found hereContextNiFi can be secured by enabling SSL and requiring users/nodes to authenticate with certificates. However, in some scenarios, customers have secured and unsecured NiFi clusters that should communicate. The objective of this tutorial is to show two approaches to achieve this. Discussi
There are two great additions you can make to your current Hive. The first is HPL/SQL that brings stored procedure programming to the Hadoop world. The second is Hive Mall which brings advanced functions and machine learning to your Hive queries.HPL/SQL HPL/SQL is included in Hive 2.0 and will be included in Hive 2.1 on HDP 2.6. You can manually download and install it now. It is Hybrid Procedural SQL on Hadoop. For developers coming from Oracle and SQL Server, these procedures will feel very familiar and will allow you to port a lot of your existing PL/SQL and TSQL code over to Hive.This gives you another interface to Hive and Hadoop, it will be included in future Hadoop and be tied into the very fast Hive LLAP 2.1.HPL/SQL https://community.hortonworks.com/content/idea/43847/hplsql-make-sql-on-hadoop-more-dynamic.htmlhttp://www.hplsql.org/connections http://www.hplsql.org/cli http://www.hplsql.org/download http://www.hplsql.org/start To Run A Stored Procedurecd hplsql-0.3.17 ./hpl
1. You can update the share lib with the following jars or can be directly passed in oozie workflow.xml. ( Make sure you use 3.2 version not 4.x datanucleus jars )/usr/hdp/current/spark-client/lib/datanucleus-rdbms-3.2.9.jar /usr/hdp/current/spark-client/lib/datanucleus-core-3.2.10.jar/usr/hdp/current/spark-client/lib/datanucleus-api-jdo-3.2.6.jar To copy jars to sharelib#hdfs dfs –put /usr/hdp/current/spark-client/lib/datanucleus-rdbms-3.2.9.jar /user/oozie/share/lib/lib_*/spark/ If you copy the jars to sharelib make sure run oozie sharelibupdate Update oozie sharelib:# oozie admin -oozie http://<oozie-server>:11000/oozie -sharelibupdate Verify the current spark action sharelib with all the above files:# oozie admin -oozie http://<oozie-server>:11000/oozie -shareliblist spark* Make sure you have hive-site.xml in sharelib too and have the following properties in it. Replace the values with your hive-site.xml values.<configuration><property><name>hive.me
When NiFi flow runs in mission critical production environment, customer would concern about how to change NiFi flow logic but don't impact business.One solution was implemented in customer production is as follow steps:1. Add an extra non-logic processor, for example "UpdateAttribute", between ListenPort and main ProcessGroup2. Updated NewProcessGroup, add into canvas3. Stop "UpdateAttribute" process, make sure RunningProcessGroup consume all flowfiles in the previous queue. But client components can still send messages to Listen Port4. After all queued flowfiles are processed by RunningProcessGroup, move the queue end connection to the NewProcessGroup5. Start "UPdateAttribute" process and NewProcessGroup6. At the end, remove the old RunningProcessGroupFollow these steps, the production flow change is transparent for client components, and guarantee no data lost.
A common error to see in initial installations is the following from Accumulo TabletServer logsCaused by: org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /apps/accumulo/data/wal/myhost.mydomain.com+9997/1ff916a2-13d0-4bb7-aa38-c44b69831519 could only be replicated to 0 nodes instead of minReplication (=1). There are 3 datanode(s) running and no node(s) are excluded in this operation. at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget4NewBlock(BlockManager.java:1649) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getNewBlockTargets(FSNamesystem.java:3198) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:3122) at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:843) at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:500) at org.apache.hadoop.hdfs.prot
Error message:Below error message from dmesg.txt[1294523.092549] python2.6[11900]: segfault at 11 ip 00007f36b7cd4e90 sp 00007ffd31ce5830 error 4 in libcrypto.so.1.0.0[7f36b7baf000+1d5000][1294523.530806] python2.6[11901]: segfault at 11 ip 00007f33ef805e90 sp 00007ffe41443280 error 4 in libcrypto.so.1.0.0[7f33ef6e0000+1d5000][1294523.934818] python2.6[11902]: segfault at 11 ip 00007f29280d5e90 sp 00007fff7b5facc0 error 4 in libcrypto.so.1.0.0[7f2927fb0000+1d5000][1294524.379260] python2.6[11903]: segfault at 11 ip 00007f2cfd50be90 sp 00007ffe17504610 error 4 in libcrypto.so.1.0.0[7f2cfd3e6000+1d5000]Below error message from /var/log/hue/supervisor.log[15/Feb/2017 17:43:58 +0000] supervisor ERROR Exception in supervisor main loopTraceback (most recent call last): File "/usr/lib/hue/desktop/core/src/desktop/supervisor.py", line 414, in main wait_loop(sups, options) File "/usr/lib/hue/desktop/core/src/desktop/supervisor.py", line 424, in wait_loop time.sleep(1) File "/usr/l
For this tutorial we will be using Ubuntu 14.04.5. This setup can further be leveraged with Apache Metron (Incubating). Additional installation instructions for Metron core will be provided in another article.Install Elasticsearch First we'll install Elasticsearch 2.4. You'll need the following prerequisites: wget apt-transport-https Java You can install them by logging into your ES node and executing the following: sudo apt-get updatesudo apt-get install -y wget apt-transport-https# If using oracle jdk 8sudo apt-get install -y software-properties-commonsudo apt-add-repository -y ppa:webupd8team/javasudo apt-get updateecho "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudodebconf-set-selectionssudo apt-get install -y oracle-java8-installer Now let's install Elasticsearch. Run the following commands on the node where you want to install ES. # Get the Elasticsearch packageswget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key ad
How to connect GetKafka to Kafka through StunnelStunnel is a proxy that can make insecure network transmission secure by wrapping it with SSL. This article contains example and illustrations describing how it works and how to configure it.Most part of it is derived from this informative Git comment I wouldn't be able to set it up without this comment. Thank you for sharing such detailed example. How it works?Let's see how it can be applied to NiFi GetKafka. I used two servers for this experimentation. 0 and 1.server.aws.mine. A single Zookeeper and Kafka broker is running on 0.server. A GetKafka NiFi processor in 1.server consumes messages through Stunnel:Kafka Broker joins the Kafka cluster and declares its address as 127.0.0.1:9092. If Zookeeper is in different server (recommended) and you need to secure this connection via Stunnel as well, then you need to apply the same method as the one used between GetKafka and Zookeeper.GetKafka's Zookeeper Connection String is set to 127.0.0.1
ISSUE : Even after configuring falcon to use https, ambari alert checks Falcon UI on http and fails. Falcon service will be running fine but Ambari shows Falcon WEB UI alert. ROOT CAUSE : Ambari alert script is hardcoded to check Falcon on http WORKAROUND : 1. Login to Ambari UI 2. Open one more tab and go to this UI : http://AMBARI_HOST:8080/api/v1/clusters/CLUSTER_NAME/alert_definitions 3. Search for falcon_server_webui and get the alert definitions ID.Example : { "href" : "http://mon-ravi.ironman.com:8080/api/v1/clusters/ironman/alert_definitions/301", "AlertDefinition" : { "cluster_name" : "ironman", "id" : 301, "label" : "Falcon Server Web UI", "name" : "falcon_server_webui" }301 is the alert definition here. 4. Delete this alert definition using curl curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://AMBARI_HOST:8080/api/v1/clusters/CLUSTER_NAME/alert_definitions/301 5. On the ambari server, edit this file /var/li
Documentation It is recommended to create the following documents as part of the Upgrade Planning and Execution phase. ● Upgrade plan ● Upgrade guide ● Upgrade log (list of issues and their workarounds) ● Validation test results ● Hand-over documents Learnings from the Field Phased approach to Upgrades ● Upgrade Dev/Test cluster first before touching production environment. This will catch issues which are specific to the environments. ● Upgrade Dev/Test cluster first, create a runbook along with all issues which occurred during upgrade ●Just setting up fresh cluster with the new version in Dev and testing applications is not enough. While it does take care of application tests, upgrade issues are not tested. It is recommended to upgrade Dev/Test in line with upgrade path for Production. Updating Configurations ● Any major update to the configurations should be designed and tested in advance. ● For example – Capacity Scheduler ●Recommend to prep
OVERVIEWDocker supplies multiple storage drivers to manage the mutable and immutable layers of images and containers. Many options exist with varying pros and cons. Out of the box, docker uses devicemapper loop-lvm. The loop-lvm storage driver is not recommended for production, but requires zero setup to leverage.When attempting to increase the base size of the mutable layer, it was observed that docker client operations slow. The alternative of using smaller base layers causes failures due to out of storage conditions.The intent of this article is to outline testing that was performed to determine sane defaults for the docker storage driver options.TESTINGThe following testing methodology was used: Build the centos6 image with different combinations of base sizes and storage drivers (build)Create a container from the image (run)Stop the container (stop)Remove the container (rm)Stop dockerDelete/reprovision the docker graph storage locationRepeatThe following scenarios were tested: loo
Considering data is often times being "sent into NIFI" from other processes, and "sent out of NIFI" to other processes, data safety is a legitimate concern. When data is being exchanged between processes, we have the following possible delivery semantics:1. at most once delivery2. at least once delivery3. exactly once deliveryFirst of all, speaking of the communication between multiple NIFI/MINIFi instances via site-to-site protocol, because of the 2 phase commit provided at the framework level, at least once delivery is guaranteed. And not only that, the chance of "exactly once" delivery is maximized. "Exactly once delivery" isn't guaranteed only if your system breaks between the two commits (literally between those two lines of code), or if there was any error in NIFI when committing the state of things. As an example, after data is being delivered to the receiving side, but before your sending side commits, network connection is somehow lost. In that case, sending side will try to s
Storm 1.1.X provide an external storm kafka client that we could use to build storm topology. Please note this is support for Kafka 0.10 onwards. Below is the step by step guide on how to use the API's.Add below dependency to your pom.xml<dependency> <groupId>org.apache.storm</groupId> <artifactId>storm-kafka-client</artifactId> <version>1.1.1-SNAPSHOT</version></dependency>The kafka spout implementation for the topology is configured using KafkaSpoutConfig. Below is a sample config object creation.KafkaSpoutConfig spoutConf = KafkaSpoutConfig.builder(bootStrapServers, topic) .setGroupId(consumerGroupId) .setOffsetCommitPeriodMs(10_000) .setFirstPollOffsetStrategy(UNCOMMITTED_LATEST) .setMaxUncommittedOffsets(1000000) .setRetry(kafkaSpoutRetryService) .setRecordTranslator (new TupleBuilder(), outputFields, topic ) .build();Above class follows builder pattern. bootS
Assumption - HDP 2.5.3 and above versions and kerberized cluster. Create a hplsql-site.xml as per the below template. <configuration><property><name>hplsql.conn.default</name><value>hive2conn</value><description>The default connection profile</description></property><property><name>hplsql.conn.hiveconn</name><value>org.apache.hive.jdbc.HiveDriver;jdbc:hive2://</value><description>HiveServer2 JDBC connection (embedded mode)</description></property><property><name>hplsql.conn.init.hiveconn</name><value>set hive.execution.engine=mr;use default;</value><description>Statements for execute after connection to the database</description></property><property><name>hplsql.conn.convert.hiveconn</name><<value>true</value><description>Convert SQL statements before execution</description><</property&
I found it is a little tricky to get started with a Kerberos enabled Kafka cluster. I created this step by step recipe for securing Kafka with Kerberos, sending and receiving data on console. This is tested on HDP2.5.0 and Ambari 2.4.1.Enabled Kerberos using the Ambari Kerberos setup wizard under Admin -- Kerberos menu.On Ambari Kafka Config UI, change "listeners" property to "PLAINTEXTSASL://localhost:6667".Restart Kafka as requested by Ambari.Create a test topic in Kafka. Must use the kafka service user to do this.$ cd /usr/hdp/current/kafka-broker/bin$ sudo su kafka$ kinit -k -t /etc/security/keytabs/kafka.service.keytab kafka/ip-10-0-1-130.ap-northeast-1.compute.internal$ ./kafka-topics.sh --zookeeper ip-10-0-1-130.ap-northeast-1.compute.internal:2181 --create --topic foo --partitions 1 --replication-factor 1Created topic "bar".Grant permission to user. This can be done using Kafka native ACL mechanism or Apache Ranger. In the example, we use Kafka ACL. User bob needs to be existin
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.