Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
kinit PRINCIPAL -kt /etc/security/keytabs/PRINCIPAL.keytab hive --hiveconf hive.execution.engine=mrSET hive.execution.engine=tez;SET tez.queue.name=QUEUE_NAME;use MON_SCHEMA;select count(*) from TABLE where id =1; By starting Hive CLI with mr, it open the terminal quickly than default, this is because it will not request for AM resource. PS : Hive CLI is not recommended and must be deprecated in your production environment, check here for more info
Complementary article to Hive CLI security to clarify the risk of using Hive CLI.Hive CLI ( or Hive shell ) is not recommended and Apache asked users to move to Beeline even if it's still supported by Hortonworks ( HDP2.6 )Ranger Hive plugin does not enforce permissions for Hive CLI users however it doesn’t bypass systematically “All” Ranger policies, it bypass only hive policies.This risk is therefore for all hive managed tables. ( ones under /apps/hive/warehouse/ ) All external DB/Tables will still be protected by HDFS policies.
Overview This tutorial is intended to walk you through the process of creating a Process Group in NiFi to feed multiple Twitter streams to Elasticsearch. This tutorial is the second part of a two part series. The first part can be found here: HCC Article. In this part of the series, we will create a process group which contains multiple Twitter feeds funneled to a single Elasticsearch instance. This allows you to have multiple feeds of data with different processing needs prior to pushing to Elasticsearch. We will be able to query Elasticsearch to see data from both of our example streams. Admittedly this is a contrived example. However, the concept is fundamentally useful across a variety of NiFi use cases. NOTE: The only required software components are NiFi and Elasticsearch which can be run in just about any Linux environment. However I recommend deploying these as part of your HDP sandbox or test cluster allowing for a broader integration of tools and capabilities such as Pig, Hiv
Ambari kills the process of the namenode when it detects a java error with type : HDFS -> Under hadoop-env template replace-XX:OnOutOfMemoryError=\"/usr/hdp/current/hadoop-hdfs-secondarynamenode/bin/kill-secondary-name-node\"by -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\"/tmp/heap\"This will only allow you to start the namenode , investigate what is causing the issue.But this is a temporary solution, you need to analyze your heap dump and see what's wrong with it.--SOLR could be one of the causes of this, when creating huge logs that needs to be written to hdfs.You can clear the logs of NN and SNN here : /var/log/hadoop/hdfs/audit/solr/spoolBecareful on deleting only on Standby NN - then do a failover to delete from the other server. do not delete logs while the namenode is active.
There are five ways to connect to HS2 with JDBCDirect - Binary Transport mode (Non-Secure|Secure)Direct - HTTP Transport mode (Non-Secure|Secure)ZooKeeper - Binary Transport mode (Non-Secure|Secure)ZooKeeper - HTTP Transport mode (Non-Secure|Secure)via Knox - HTTP Transport mode Connecting to HS2 via ZooKeeper (3-4) (and knox, if backed by ZooKeeper) provides a level of failover that you can't get directly. When connecting through ZooKeeper, the client is provided server connection information from a list of available servers. This list is managed on the backend and the client isn't aware of them, before the connection. This allows administrators to add additional servers to the list without reconfiguring the clients.NOTE: HS2 in this configuration is considered a Failover and is not automatic once a connection has been established. JDBC connections are stateful. The data and session information kept on HS2 for a connection is LOST when the server goes down. Jobs currently in progre
Part II can be found hereThere are many web UIs--think Ambari, Ranger, etc.--in the HDP platform that require user authentication and traditionally every UI required a separate login. With the federation capabilities provided by Apache Knox, the HDP platform can support federated identity and a single sign-on experience for users.In particular, the flexibility of the Knox authentication and federation providers allows KnoxSSO to support generalized authentication events, via exchange of a common JWT-based token. Without the token exchange capabilities offered by KnoxSSO, each UI would need to integrate with each desired IAM solution on its own.KnoxSSO comes with its own Form-based IdP. This allows for easily integrating a form-based login with the enterprise AD/LDAP server. We will cover that in a future article, as we'll focus at present on the integration with Okta using SAML 2.0. You can find more information regarding SAML on Okta's website: https://developer.okta.com/standards/SAM
This article helps to perform distcp between 2 clusters. Here each cluster is Kerbeorized with a different KDC server. And the cross-realm trust is setup between the two MIT KDC servers. Follow this blog to setup Kerberos cross realm trust setup: https://community.hortonworks.com/articles/18686/kerberos-cross-realm-trust-for-distcp.htmlOnce above setup is completed, proceed further. Add the below property to mapred-site.xml and restart all affected components.<property> <name>mapreduce.job.send-token-conf</name> <value>yarn.http.policy|^yarn.timeline-service.webapp.*$|^yarn.timelineservice.client.*$|hadoop.security.key.provider.path|hadoop.rpc.protection|dfs.nameservices|^dfs.namenode.rpcaddress.*$|^dfs.ha.namenodes.*$|^dfs.client.failover.proxy.provider.*$|dfs.namenode.kerberos.principal|dfs.namenode.kerberos.principal.pattern </value> Assuming here 2 clusters one is cluster1 and other is cluster2 Now run the hadoop distcp as below from clust
This article serves as an addendum to the main Metron MaaS README doc in Apache Metron github. It is highly recommended that you go through the README article in github to understand the concepts and working principle. This article only intends to capture the steps specific to the Metron full dev vagrant platform so it is easy for a user to copy-paste-run and get it working quickly.Further, this article only covers the successful startup, deployment and validation of the Metron MaaS service. Refer to the master github README for further steps.Prerequisites * You need to have a working Metron full dev platform before you proceed with the instructionsStep 1:Install Required Packages Run the following commands to install Flask, Jinja2, Squid client and the Elasticsearch HEAD plugin: vagrant ssh #To SSH onto the full-dev platformsudo yum install python-flasksudo yum install python-jinja2sudo yum install squidsudo service start squidsudo /usr/share/elasticsearch/bin/plugin install mob
Example Log94.158.95.124 - - [24/Feb/2016:00:11:58 -0500] "GET / HTTP/1.1" 200 91966 "http://creativelabs.biz" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"SBTname := "Logs"version := "1.0"scalaVersion := "2.10.6"jarName in assembly := "Logs.jar"libraryDependencies += "org.apache.spark" % "spark-core_2.10" % "1.6.1" % "provided"libraryDependencies += "org.apache.spark" % "spark-sql_2.10" % "1.6.1" % "provided"libraryDependencies += "com.databricks" %% "spark-avro" % "2.0.1"Scala Program Piecesimport org.apache.spark.{SparkConf, SparkContext}import org.apache.spark.serializer.{KryoSerializer}import org.apache.spark.SparkConfimport org.apache.spark.SparkContextimport org.apache.spark.rdd.RDDimport org.apache.spark.serializer.{KryoSerializer, KryoRegistrator}import org.apache.log4j.Loggerimport org.apache.log4j.Levelimport org.apache.spark.sql.SQLContextimport com.databricks.spark.avro._case class LogRecord( clientIp: String, clientIdentity: String, user:
Description: Once you have a Hadoop cluster that is using Kerberos for authentication, you have to do the following in Ambari to configure Knox to work with that cluster.1) Grant proxy privileges for Knox in core-site.xml hadoop.proxyuser.knox.groups=*hadoop.proxyuser.knox.hosts=*2) Grant proxy privileges for Knox in webhcat-site.xmlwebhcat.proxyuser.knox.groups=*webhcat.proxyuser.knox.hosts=*3) Grant proxy privileges for Knox in oozie-site.xmloozie.service.ProxyUserService.proxyuser.knox.groups=*oozie.service.ProxyUserService.proxyuser.knox.hosts=*4) Update hive-site.xml and set the following properties on Hive Server2 hosts. Some of the properties may already be in the hive-site.xml. Ensure that the values match the ones below.hive.server2.allow.user.substitution=truehive.server2.transport.mode=httphive.server2.thrift.http.port=10001hive.server2.thrift.http.path=cliserviceNOTE: The properties shown above allows all users and all hostnames. Please consider security and update the valu
In Apache NiFi 1.2, there are processors to Get and Put data to an MQTT broker, which is popular in IoT because of it's small footprint and speed. MQTT is supported by Eclipse and IBM.I created an example on the HDP 2.6. I downloaded and installed the latest Apache NiFi 1.2 there as well as an example MQTT Broker (Mosquitto) http://mosquitto.org/.To Install Mosquitto on HDP 2.6 (Centos 7.x)sudo wget http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-6/home:oojah:mqtt.reposudo cp *.repo /etc/yum.repos.d/sudo yum -y updatesudo yum -y install mosquittoTo Verify the Settings and Prepare Logs[root@sandbox opt]# cat /etc/mosquitto/mosquitto.conf# Place your local configuration in /etc/mosquitto/conf.d/pid_file /var/run/mosquitto.pidpersistence truepersistence_location /var/lib/mosquitto/#log_dest file /var/log/mosquitto/mosquitto.loginclude_dir /etc/mosquitto/conf.d[root@sandbox opt]# vi /etc/mosquitto/mosquitto.conf[root@sandbox opt]# mkdir -p /var/log/mosquitto[ro
I have written a small Java 8 Spring Boot application to view Twitter tweets that I have ingested with NiFi and stored as JSON files in HDFS. I have an external Hive table on top of those, from those raw tweets I ran I Spark Scala job that added Stanford CoreNLP Sentiment and saved it to an ORC Hive Table. That is the table I am querying in my Spring Boot visualization program. To show something in a simple AngularJS HTML5 page, I have also queried that microservice which has a method for calling Spring Social Twitter to get live tweets. For this you will need JDK 1.8 and Maven installed on your machine or VM. I used Eclipse as my IDE, but I usually use IntelliJ, either will work fine.Java BeanI have a few of the fields specified, this is to put our Hive data into and transport to AngularJS as JSON serialized.public class Twitter2 implements Serializable { private static final long serialVersionUID = 7409772495079484269L; private String geo; private String unixtime; private Stri
When users run hive query in zeppelin via jdbc interperator then it is going to some anonymous user not an actual user.INFO [2017-11-02 03:18:20,405] ({pool-2-thread-2} RemoteInterpreter.java[pushAngularObjectRegistryToRemote]:546) – Push local angular object registry from ZeppelinServer to remote interpreter group 2CNQZ1ES5:shared_processWARN [2017-11-02 03:18:21,825] ({pool-2-thread-2} NotebookServer.java[afterStatusChange]:2058) – Job 20171031-075630_2029577092 is finished, status: ERROR, exception: null, result: %text org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException Unable to fetch table ushi_gl. org.apache.hadoop.security.AccessControlException: Permission denied: user=anonymous, access=EXECUTE, inode=”/apps/hive/warehouse/adodb.db/ushi_gl”:hive:hdfs:drwxr-x— at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:319)at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkTrave
I've seen some postings (including This one) where people are using CSVSerde for processing input data. CSVSerde is a magical piece of code, but it isn't meant to be used for all input CSVs. tl;dr - Use CSVSerde only when you have quoted text or really strange delimiters (such as blanks) in your input data - otherwise you will take a rather substantial performance hit...When to use CSVSerde: For example: If we have a text file with the following data:col1 col2 col3----------------------121 Hello World 4567232 Text 5678343 More Text 6789Pipe delimited it would look like:121|Hello World|4567|232|Text|5678|343|More Text|6789|but Blank delimited with quoted text would look like (don't laugh - Progress database dumps are blank delimited and text quoted in this exact format): 121 'Hello World' 4567232 Text 5678343 'More Text' 6789Notice that the text may or may not have quote marks around it - text only needs to be quoted if it contains a blank. This is a particularly nast
The steps to set up Atlas with Ldaps (ssl) are below. Download the AD CA certificate on Atlas instance echo -n | openssl s_client -connect ad.xx.xx.com:636 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /root/ldaps-ca.cert View the certificate openssl x509 -noout -text -in /root/ldaps-ca.cert Import the AD CA certificate to trust-store in Atlas instance. $JAVA_HOME/bin/keytool -import -alias AD -keystore /home/nixon/ad-truststore -file /root/ldaps-ca.cert #remember the password used while importing into trust-store Verify the certificate added to trust-store. $JAVA_HOME/bin/keytool -list -alias AD -keystore /etc/atlas/conf/ad-truststore Change ownership of trust-store if needed chown atlas:hadoop /etc/atlas/conf/ad-truststoreAdd the following config to Atlas Advanced atlas-env metadata_opts via Ambari, so that ATLAS_OPTS is set within atlas-env.sh-Djavax.net.ssl.trustStore=/etc/atlas/conf/ad-truststore -Djavax.net.ssl.trustStorePassword=<password> Or can be
Apache Kafka Network Bandwidth Quotas Quotas enable cluster servers to impose limits on the volume of data or number of requests served to clients, hence mitigating the effects of DOS [1] attacks and preventing ill behaved clients from becoming a source of DOS towards other clients.In Apache Kafka there are two types of quotas. Network bandwidth quotas (since v0.9) impose byte rate thresholds and are specified in bytes/s. Request rate quotas are specified as a percentage of CPU utilization.Managing Quotas In Kafka quotas are unlimited by default. It is possible to set quota defaults and overrides for tuples (user,client-id), users and clients [2]. Client quotas can be enforced in secure and non-secure clusters using the client property client.id. User and (user,client-id) quotas are suitable for secure environments. All the clients that belong to the same logical grouping [3] will be subject to the quota for that grouping. Furthermore, the quota will be shared across all the instanc
For this article, I am using Ambari-2.5.2.0 and trying to upgrade HDP-2.5.3 to HDP-2.6.2.If you have a large HBase cluster, it can take a long time to do a HBase snapshot. As part of upgrade, this is one of the steps which Ambari will perform for you. However, for a large cluster, this step can actually lead to a timeout from Ambari UI and may result in further inconsistencies just before the Finalize Upgrade step.To overcome this, a lot of people have started performing a manual HBase Snapshot before the upgrade.However, not many have found a way to force Ambari to skip this step and save some time instead of waiting for it to timeout in order to proceed to next step during the upgrade.Here is how you can skip HBase Snapshot step altogether (in case you want to perform it manually before the upgrade):Caution: The steps described below are a hack! It is not recommended that we go about making changes to upgrade XML files based on our needs. Please exercise caution and measure your risk
For this edge use case we are using NVidia's TensorRT as well as Apache MXNet. From TensorRT I am using imageNet for image recognition and detectNet for object localization. For Apache MXNet, I am using their image classifier. So we have multiple deep learning frameworks run on the same capture from an attached USB webcam. For this example I am using a Logitech HD1080, while the Jetson TX1 supports 6+ concurrent high end cameras for those with high end use cases. They also have a more powerful Jetson TX2 for more intense use cases as it has more RAM and a better GPU. Quick Hardware Breakdown NVIDIA Maxwell™ GPU with 256 NVIDIA® CUDA® Cores 4 GB LPDDR4 Memory Python Script# 2017 load pictures and analyze# https://github.com/tspannhw/mxnet_rpi/blob/master/analyze.pyimport timeimport sysimport datetimeimport subprocessimport sysimport urllib2import osimport datetimeimport tracebackimport mathimport random, stringimport base64import jsonfrom time import gmtime, strftimeimport m
OverviewPartner demo kit is built and maintained by the Hortonworks Partner Solutions team. The purpose of the demo kit is to enable the partners to:Quickly bring up a HDP environments with pre-built demosLeverage available demos to understand the capabilities of the platformUse the demos as part of business conversation to demonstrate the art of possibleThe remainder of this article provides a short description of the 3 demos packaged within the demo kit and step by step instruction on:How to launch the demo kit on AWS or on private cloudHow to execute the demos provided with the demo kitOther VersionsThe Security/Governance Demo kit for HDP 2.6 can be found hereThe previous version of demo kit (for HDP 2.5) can be found herePre-requisitesWhen using AWS, you must already have created your Amazon Web Services account. Sample steps for doing this can be found here. If you have an AWS promo code, you can apply it to your account using the steps here.For running the sentiment demo, you mu
In order to utilize the directory server's nested groups information across hadoop, nested groups information must be retrieved for hadoop group mapping as well as for Ranger policy authorization. Retrieving nested group information for Ranger is explained here. This article covers the configuration required for retrieving nested group information for hadoop LdapGroupMapping.Nested group membership in LdapGroupMapping is introduced as part of HADOOP-12291 and is available in HDP 2.6. Let's take the same directory server structure example that is used for Ranger.Sample Active directory structure with Nested groupsUsecase: Admin wants "Marketing Group" and "AMER Marketing Group" to be represented as hdfs groups for users "Adam Will", "John Doe", and "Mary Sam"In the above example, user "John Doe" is a member of "US Marketing Group". But the directory server structure also contains multiple nested group levels like - “US Marketing Group” is a member of “AMER Marketing Group” which again i
I have been working on EDW for last 10 years. Applying well established relational concepts to Hadoop I have seen many anti-patterns. How about some patterns which work? Lets get to work.Slowly changing dimensions are a known and well established design pattern. Patterns were established on relational theory. Why? Those were the dominant database tech used by virtually everyone. This article in no way expresses the only way to do SCD on Hadoop. I am sharing with you a few patterns which lead to victory.What is relational theory you ask?"In physics and philosophy, a relational theory is a framework to understand reality or a physical system in such a way that the positions and other properties of objects are only meaningful relative to other objects." - wikiSo now we have a challenge. Hadoop and all the integrated animals were not based or found on relational theory. Hadoop was built on software engineering principles. This is extremely important to understand and absorb. Do
INGESTING RDBMS DATAI previously posted an article on ingesting and converting data (https://community.hortonworks.com/articles/64069/converting-a-large-json-file-into-csv.html). Once you have a SQL database loaded, you will eventually need to store your data in your one unified datalake. This is quite simple with NiFi. If you have a specialized tool that reads from your RDBMS logs and sends them to Kafka or JMS, that would be easy to ingest as well. For those wishing to stay open source, NiFi works great. If you don't have a good increasing key to use, you can add an article one that increases on every insert. Almost every database supports this from MariaDB to Oracle.ALTER TABLE `useraccount` ADD COLUMN `id` INT AUTO_INCREMENT UNIQUE FIRST; For mine, I just added an autoincrement id column to be my trigger.For Apache NiFi, you will need connections to all your sources and sinks. So I need a DB Connection Pool for Apache Phoenix and MySQL (DBCPConnectionPool) as well as Hi
Update:This is an update to my previous article on the same topic. This covers the new features added in HDP 2.6 (and Zeppelin 0.7). Motivation:Starting HDP 2.6, a new Shiro configuration implementation has been added in Zeppelin to handle LDAP/Active Directory authentication and authorization. It fixes lot of known issues (Bind issue, limited search/filter options, Group based authorization etc.) present in earlier versions and this should be used for any kind of LDAP/AD authentication + authorization going forward.Configuration:1. While most of the configuration steps remain same from the previous article, the following "shiro_init_content" is where the most of the magic happen:Note: Before pasting this configuration in your Zeppelin configuration, please change the Active Directory details to suit your AD environment.# Sample LDAP configuration, for Active Directory user Authentication, currently tested for single Realm[main]ldapRealm=org.apache.zeppelin.realm.LdapRealmldapRealm.con
DescriptionDuring HDP Upgrade, Hive Metastore restart step fails with message - "ValueError: time data '2017-05-10 19:08:30' does not match format '%Y-%m-%d %H:%M:%S.%f'"Following is the stack trace:Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 211, in <module> HiveMetastore().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 329, in execute method(env) File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 841, in restart self.pre_upgrade_restart(env, upgrade_type=upgrade_type) File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 118, in pre_upgrade_restart self.upgrade_schema(env) File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 150, in upgrade_schema status_params.tmp_dir) File "/usr
IntroductionAdding a group as a member to another group is called nesting. If a group (groupA) is a member of another group (groupB), then the users belonging to the member group (groupA) are part of the parent group (groupB) as well. Nesting can be very useful in delegating access through inheritance. Several large enterprises have their groups in LDAP/AD nested within other groups. Security admins want the users in those nested groups to be associated in Ranger so that they are available for policy authoring in Ranger Admin. In HDP 2.6 (RANGER-1735), ranger usersync introduced support of nested group membership representation for policy authoring. Note:- In order to utilize the nested group mapping across hadoop, this feature must be configured for hadoop LdapGroupMapping as well. Configuring hadoop LdapGroupMapping for nested groups is explained here.Sample Active directory structure with Nested groupsUsecase: Admin wants to give access to some resources for all the users under “AME
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.