Find and share helpful community-sourced technical articles
Recently active
This article is first series of three articles, next coming articles with some code and mechanism present in latest version of HBase supporting HBase Replication. HBase ReplicationHbase Replication solution can solve the cluster security, data security, read and write separation, operation and maintenance, and the guest operating errors, and so the ease of management and configuration, provide powerful online applications support.Hbase replication currently used in the industry are rare, because there are many aspects, such as HDFS has multiple backup copies in a way to help security HBASE underlying data, and the relatively small number of companies in the cluster size. Another reason the data is not very high degree of importance, such as some logging system or as a second warehouse of historical data to split a large number of read requests. Such data lost to be present or back up at other places (database cluster). For such cases the Slave Replication cluster become dispensable, th
Update: apparently when you initiate a support case resolution capture, let's say for HBase service, it will pull HDFS namenode logs in addition to the HBase logs. You may be faced with the same issue and may have to apply the approach below to overcome timeouts. In SmartSense 1.3.0 this will no longer be an issue. Until then, this is a way to avoid capture time outs. Firstly, lets discuss the difference between capture for analysis and support case resolution. Analysis bundles do not collect service logs. For support cases, you're going to fetch configuration and logs. Then based on how much anonymization you will want to apply, large log files will take a long time to collect. This is especially prominent with HDFS namenode logs. They tend to be big and this is exactly the scenario we're trying to address. Firstly, increase the threshold for agent time out in Ambari. In my case it was 30min. Feel free to raise it up to 2hrs on the Ambari SmartSense Operations page. Then, we're going
OpenHAB - Build your smart home in no time! Welcome to http://www.openhab.org/ A vendor and technology agnostic open source automation software for your home. OpenHAB is a mature, open source home automation platform that runs on a variety of hardware and is protocol agnostic, meaning it can connect to nearly any home automation hardware on the market today. If you’ve been frustrated with the number of manufacturer specific apps you need to run just to control your lights, then I’ve got great news for you: OpenHAB is the solution you’ve been looking for – it’s the most flexible smart home hub you’ll ever find. Source Demo: Go to http://www.openhab.org/getting-started/downloads.html Download Runtime core and Demo files Extract Runtime core files in a directory called openHAB and extract Demo files under OpenHAB. See the following: Now, download smartphone app called openHAB in your smartphone. I am using iOS and once you launch the app then disable DEMO tab and e
Teradata's JDBC connector contains two jar files (tdgssconfig.jar and terajdbc4.jar) that must both be contained within the classpath. NiFi Database processors like ExecuteSQL or PutSQL use a connection pool such as DBCPConnectionPool which defines your JDBC connection to a database like Teradata. Follow the steps below to integrate Teradata JDBC connector into your DBCPConnectionPool:1) Download the Teradata connectors (tdgssconfig.jar and terajdbc4.jar) - you can download the Teradata v1.4.1 connector on http://hortonworks.com/downloads/2) Extract the jar files (tdgssconfig.jar and terajdbc4.jar) from hdp-connector-for-teradata-1.4.1.2.3.2.0-2950-distro.tar.gz and move these files to your NIFI_DIRECTORY/lib/*3) Restart NiFi4) Under your DBCPConnectionPool (Controller > Controller Services), Edit your existing DBCPConnectionPool (if your pool is active, disable it before editing) 5) Under the Configuration Controller Service > Properties, define the followingDatabase Connectio
Apache Kylin originIn today's era of big data, Hadoop has become the de facto standards, and a large number of tools one after another around the Hadoop platform to build, to address the needs of different scenarios.For example, Hadoop Hive is a data warehouse tools, data files stored on HDFS distributed file system can be mapped to a database table and provides SQL queries. Hive execution engine can be converted to SQL MapReduce task to run, ideally suited for data warehouse data analysis. Another example HBase is based on Hadoop, high availability, high performance, column-oriented, scalable distributed storage system, Hadoop HDFS architecture to provide high reliability of HBase underlying storage support.Although existing business analytical tools such as Tableau, etc. are here because of the lack of Hadoop-based distributed analysis engine. But they exist with significant limitations, such as difficult to extend horizontally, can not handle large scale data, but also the lack of s
su hdfshadoop fs -mkdir /udfhadoop fs -put urldetector-1.0-jar-with-dependencies.jar /udf/hadoop fs -put libs/url-detector-0.1.15.jar /udf/hadoop fs -chown -R hdfs /udfhadoop fs -chgrp -R hdfs /udfhadoop fs -chmod -R 775 /udfCreate Hadoop Directories and upload the two necessary libraries. CREATE FUNCTION urldetector as 'com.dataflowdeveloper.detection.URLDetector' USING JAR 'hdfs:///udf/urldetector-1.0-jar-with-dependencies.jar', JAR 'hdfs:///udf/url-detector-0.1.15.jar';Create Hive Function with those HDFS referenced JARsselect http_user_agent,urldetector(remote_host)asurls,remote_host from AccessLogs limit 100;Test the UDF via Hive QL@Description(name="urldetector", value="_FUNC_(string) - detectsurls")public final class URLDetector extends UDF{}Java Header for the UDFset hive.cli.print.header=true;add jar urldetector-1.0-jar-with-dependencies.jar;CREATE TEMPORARY FUNCTION urldetector as 'com.dataflowdeveloper.detection.URLDetector';select urldetector(description) from sample_07 lim
In general, you have following options when running R on Hortonworks Data Platform (HDP) -o RHadoop (rmr) - R program written in MapReduce paradigm. MapReduce is not a vendor specific API and any program written with MapReduce is portable across Hadoop distributions.https://github.com/RevolutionAnalytics/RHadoop/wiki/rmro Hadoop Streaming - R program written to make use of Hadoop Streaming but the program structure still aligns with MapReduce. Above benefit still applies.o RJDBC - This example does not require the R programs to be written using MapReduce and still remains 100% native R APIs without any third party packages.Here is a tutorial with a video, sample data and R script:http://hortonworks.com/hadoop-tutorial/using-revolution-r-enterprise-tutorial-hortonworks-sandbox/Using RJDBC, the R program can have Hadoop parallelize pre-processing and filtering. R submits a query to Hive or SparkSQL making use of distributed and parallel processing. Then uses existing R models, as is &
Objective The objective of this article is to provide an introduction to User-Defined Functions for spatial analysis in Hive.Credit This article is based on multiple ESRI resources referenced throughout the article. Thanks also to my colleague Artem Ervits for his contribution to the proof-of-concept that lead to this article.Spatial Types Spatial types are data types that store geometry data and they have associated functions or methods that are used to access and manipulate the data using Structured Query Language (SQL). Unlike Oracle, DB2, SQL Server, or PostGreSQL, Hive does not support yet a geometry native data type. The best approach is to store spatial data as text. That will not impact the use of UDFs available for Hive.ESRI Libraries The Esri Geometry API for Java includes geometry objects (e.g. points, lines, and polygons), spatial operations (e.g. intersects, buffer), and spatial indexing. By deploying the library (as a jar) within Hadoop, you are able to build custo
On Kerberos-secured clusters managed by Ambari versions prior to 2.0.0, the hdfs.headless.keytab file is deployed on all the nodes in the cluster. From Ambari version 2.0.0 onwards, this keytab file is not deployed by default on every node. If the Ranger HBase plugin is enabled and set up to write to HDFS, Ambari's RegionServer start up script tries to access the hdfs.headless.keytab file. If the host that the RegionServer is running on does not also have the HDFS client role assigned to it, the hdfs.headless.keytab file will be absent and the RegionServer will fail to start with an error such as this in Ambari: resource_management.core.exceptions.Fail: Execution of '/usr/bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab hdfs-examplecluster@KRBEXAMPLE.COM' returned 1. kinit: Key table file '/etc/security/keytabs/hdfs.headless.keytab' not found while getting initial credentials This problem is expected to be resolved with the release of Ambari 2.4.0, but until then, the work-
I have done data analysis for one of my project using below approach and hopefully it may help you understand underlying subject. Soon i'll post my project on data analysis and detail description on technology used Python(web scraping- data collection), Hadoop, Spark and R.Data analysis is a highly iterative and non-linear process, better reflected by a series of cyclic process, in which information is learned at each step, which then informs whether (and how) to refine, and redo, the step that was just performed, or whether (and how) to proceed to the next step.Setting the SceneData analysis is a study of subjective question and study even includes developing and executing a plan for collecting data, a data analysis presumes the data have already been collected. More specifically, a study includes the development of a hypothesis or question, the designing of the data collection process (or study protocol), the collection of the data, and the analysis and interpretation of the data.Act
I have worked with almost 20 to 25 applications. Whenever i start working first i have to understand each applications naming convention and i keep thinking why we all not follow single naming convention. As Hadoop is evolving rapidly therefore would like to share my naming convention so that may be if you come to my project will feel comfortable and so as I if you follow too.Database Names:If application serve to technology then database name would be like<APPID>_<TECHNOLOGY>_TBLS<APPID>_<TECHNOLOGY>_VIEWIf application serve to vendor then database name would be like<APPID>_<VENDORNAME>_TBLS<APPID>_<VENDORNAME>_VIEWIf database application further required to divide by module then database name would be like<APPLID>_<MODULE>_TBLS<APPLID>_<MODULE>_VIEWFact Table Names:TFXXX_<FREQUENCY>_<AGRT> Note: AGGRT is will not be there for the table stores lowest granularity table. It will be added only to aggregat
Short Description:Teragen and Terasort Performance testing on AWSArticleThis article should be used with extreme care. Do not use as benchmark. I performed this test to simply run a quick 1 Terabype teragen test on AWS to determine what type of performance I can get from mapreduce on AWS with VERY LITTLE configuration tweaking/tuningOn my github page here you will find the following: teragen scripthadoop,yarn,mapred,capacity scheduler configurations used during testingHardware: (Master & Datanode)1 Master, 3 Data nodesd2.4xlarge, 16vCPU, 122GB ram, (max) 12x2000 StorageTeraGen Results:1hrs, 6mins, 38secJob Counters:Terasort Results:1hrs, 34mins, 20secTeravalidate Results:25mins, 27sec
Two simple steps do direct access custom banana dashboards:1- Copy your_custom_dashboard.json file to folder below in banana server (you can export .json from your banana UI): /opt/lucidworks-hdpsearch/solr/server/solr-webapp/webapp/banana/app/dashboards/2- Point your browser to URL like below:http://sandbox.hortonworks.com:8983/solr/banana/index.html#/dashboard/file/your_custom_dashboard.json
Follow the instructions here on how to download and import the vm into virtual boxOnce you have imported the vm select the vm and click on setting Then click on networkTo assign a IP in the attach to down drop list select "Bridge Adapter"Then under option Promiscuous Mode select "Allow All"Now start your vmOnce the machine is up verify you have a IP addressNow you have IP for your vm. have fun.
The release of version 1.0 marks another major milestone for Storm. Since becoming an Apache project in Sept 2013, much work has gone into maturing the feature set and also improving performance by reworking or tweaking various components. Some of the notable changes that contribute to improved performance are: Switch from ZeroMQ to Netty for inter-worker messaging. Employing batching in Disruptor queues (used for intra-worker messaging) Optimizations in the clojure code such as employing type hints and reducing expensive clojure lookups in perf sensitive areas. In this blog we shall take a look at performance improvements in Storm since its incubation into Apache. To quantify this, we shall compare the performance numbers of Storm v.0.9.0.1, which was the last pre-apache release, with the most recent Storm v1.0.1. Storm v.0.9.0.1 has also been used as a reference point for performance comparisons against Heron. Given the existence of recent efforts to benchmark Storm “at
Adding HDF (with Apache NiFi) to your HDP 2.5 Sandbox is very quick, painless and easy.Get the most recent Hortonworks DataFlow (download😞wget http://d3d0kdwqv675cq.cloudfront.net/HDF/centos6/1.x/updates/1.2.0.1/HDF-1.2.0.1-1.tar.gztar -xvf HDF-1.2.0.1-1.tar.gzcd HDF-1.2.0.1-1/nifi/Then change the port used by NiFi in the conf/nifi.properties file to:nifi.web.http.port=8090Install NiFi as a Linux Servicebin/nifi.sh installsudo service nifi startNiFi home: /opt/HDF-1.2.0.1-1/nifiBootstrap Config File: /opt/HDF-1.2.0.1-1/nifi/conf/bootstrap.conf2016-07-04 02:18:00,005 INFO [main] org.apache.nifi.bootstrap.Command Starting Apache NiFi...2016-07-04 02:18:00,006 INFO [main] org.apache.nifi.bootstrap.Command Working Directory: /opt/HDF-1.2.0.1-1/nifiYou can check the status of single NiFi server via status command:[root@sandbox nifi]# sudo service nifi statusnifi.sh: JAVA_HOME not set; results may varyJava home:NiFi home: /opt/HDF-1.2.0.1-1/nifiBootstrap Config File: /opt/HDF-1.2.0.1-1/nifi
Using Yahoo Kafka ManagerGit clone the project (you need Java 8 to build). Then use SBT to do a clean distribution.This will take a while as it downloads a lot of jars.<code>kafka-manager.zkhosts="sandbox.hortonworks.com:2181" The build will produce a Zip file, unzip it, update configuration file (conf/application.conf) and then you can run it.../kafka-manager/target/universal/kafka-manager-1.3.0.8.zipunzip ../kafka-manager/target/universal/kafka-manager-1.3.0.8.zipkafka-manager-1.3.0.8 git:(master) ✗ vi conf/application.confkafka-manager-1.3.0.8 git:(master) ✗ bin/kafka-manager -Dconfig.file=conf/application.confAccess the Kafka Manager from Chromehttp://localhost:9000/ Running Kafka Manager Resourceshttps://github.com/yahoo/kafka-managerhttp://edbaker.weebly.com/blog/install-and-evaluation-of-yahoos-kafka-managerhttp://chennaihug.org/knowledgebase/yahoo-kafka-manager/https://cwiki.apache.org/confluence/display/KAFKA/EcosystemToolsFor Testing Kafka with a command-line client
From the Sandbox as Root/usr/hdp/current/kafka-broker/bin/kafka-topics.sh--create --zookeeper sandbox.hortonworks.com:2181 --replication-factor 1--partitions 1 --topic peopleTest The Topic[root@sandbox kafka]# /usr/hdp/current/kafka-broker/bin/kafka-console-consumer.sh --topic people --zookeeper sandbox.hortonworks.com:2181{metadata.broker.list=sandbox.hortonworks.com:6667, request.timeout.ms=30000, client.id=console-consumer-10628, security.protocol=PLAINTEXT}Resources:https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_secure-kafka-ambari/content/ch_secure-kafka-create-topics.htmlhttps://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_secure-kafka-ambari/content/ch_secure-kafka-produce-events.html
In order to submit jobs to Spark, so called "fat jars" (containing all dependencies) are quite useful. If you develop your code in Scala, "sbt" (http://www.scala-sbt.org) is a great choice to build your project. The following relies on the newest version, sbt 0.13 For fat jars you first need "sbt-assembly" (https://github.com/sbt/sbt-assembly). Assuming you have the standard sbt folder structure, the easiest way is to add a file "assembly.sbt" into the "project" folder containing one line addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3") The project structure now looks like (most probably without the "target" folder which will be created upon building the project) MyProject+-- build.sbt+-- project| +-- assembly.sbt+-- src| +-- main| +-- scala| +-- MyProject.scala+-- target For building Spark Kafka Streaming jobs on HDP 2.4.2, this is the build file "build.sbt" name := "MyProject"version := "0.1"scalaVersion := "2.10.6"resolvers += "Hortonworks
In HDP 2.5 Sandbox, I did a quick walk through.First thing I liked was the Visualization:The Data Explorer provided a nice query tool to view tables and graphs.The Data Visualization tab provides some nice graphing capabilities.After you run your queries you can look at the Tez results to see how it ran, it's a nice way to see what you may need to optimize.The Hive Ambari View is getting to be a very solid tool for working with Hive. From DDL (creating tables is easy) to viewing data, to updates and inserts.
We have Hive over Hbase table and lets say there are few columns with INT datatype, data loaded from Hive. Now if we would like to delete data based on values present in that particular column(INT), is not possible. It is because values are converted to Binary, even HBase API filter(SingleColumnValueFilter) would return wrong result if we query that particular column values from HBase. Problem to solve: How purge Hive INT datatype column data from HBase?This is the first textual series containing the resolution of above problem. Next series i'll create a small video on running code and cover other datatypes too.In such scenario we cant use standard API and unable to apply filters on binary column values, Solution :- Below JRuby program code.So you have already heard many advantages of storing data in HBase(specially binary block format) and create Hive table on top of that to query your data. I am not going to explain use case for this, why we required HBase over Hive but simple reason
Introduction This article continues where part 1 left off. It describes a few more configuration settings that can be enabled in CDP, HDP, CDH, or Apache Hadoop clusters to help the NameNode scale better. Audience This article is for Hadoop administrators who are familiar with HDFS and its components. If you are using Ambari or Cloudera Manager you should know how to manage services and configurations. It is assumed that you have read part 1 of the article. RPC Handler Count The Hadoop RPC server consists of a single RPC queue per port and multiple handler (worker) threads that dequeue and process requests. If the number of handlers is insufficient, then the RPC queue starts building up and eventually overflows. You may start seeing task failures and eventually job failures and unhappy users. It is recommended that the RPC handler count be set to 20 * log2(Cluster Size) with an upper limit of 200. e.g. for a 250 node cluster you should initialize this to 20 * log2(250) = 160. The RPC h
Query JSON using Spark Imagine you are ingesting JSON msgs but each one has different tag names or even a different structure. This is very common because JSON is a flexible nested structure. However we commonly interact with data in a flat table like structure using SQL. The decision becomes to either parse the dynamic data into a physical schema (on write) or apply a schema at runtime (on read). Ultimately the decision will likely be made based on the number of writes vs reads. However there is one major advantage to using Spark to apply schema on read to JSON events, it alleviates the parsing step. Typically you have to hand code all the tags in the JSON msgs and map each one to a schema column. This may require meeting with upstream teams or third parties to get the DDL/xsd or schema definition. It also doesn't protect you from msgs you haven't seen or new tags being added to existing JSON structures. Sparks schema on read handles all of this as well as flattens the structur
This tutorial will show how to export data out of hbase table into csv format. We will use airport data from american statical association available here. Assume you have a sandbox up and running lets start. First ssh into your sandbox and switch user to hdfssudo su - hdfsThen grab the airport data by issues a wgetwget http://stat-computing.org/dataexpo/2009/airports.csvFor my example the file is located/home/hdfs/airports.csvNow lets create a hbase table called "airports" with column family "info". Do this in hbase shellNow that the table is created lets load it. Get out of hbase shell. as user hdfs run the following to load the tablehbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.separator=, -Dimporttsv.columns="HBASE_ROW_KEY,info:iata,info:airport,info:city,info:country,info:lat,info:long" airports hdfs://sandbox.hortonworks.com:/tmp/airports.csvThat will kick off map reduce job to load airport table in hbase. once that is done you can do a quick verify in hbase
ObjectiveDeploy a 4-node HDP 2.4.2 cluster with Apache Ambari 2.2.2, Vagrant and VirtualBox on OS X host. This is helpful for development and proof of concepts.ScopeThis approach has been tested on OS X host, but it should work on all supported Vagrant and VirtualBox environments.Pre-requisitesMinimum 9 GB of RAM for the HDP 2.4.2 clusterDownload and install Vagrant for your host OS: https://www.vagrantup.com/downloads.htmlDownload and install VirtualBox for your host OS: https://www.virtualbox.org/wiki/DownloadsDownload and install git client for your hostOpen a command shell and change to the folder where you plan to clone the github repositoryClone the following git repositorygit clone https://github.com/cstanca1/hdp2_4_2-vagrant.gitCreate and Start VMsChange directory to /hdp_2.4.2-vagrant, the folder that includes Vagrantfile and create a /data folder: mkdir dataThis /data folder will be needed for guest VMs to share with the host. Vagrant (via Vagrantfile) is configured to use Ce
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.