Dive into the community: get started with the basics, connect with peers, share your feedback, and discover helpful technical articles.
Recently active
Errororg.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.Underlying cause: java.sql.SQLException : Access denied for user 'hive'@'node1.hortonworks.com' (using password: YES)SQL Error code: 1045org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version. at org.apache.hive.beeline.HiveSchemaHelper.getConnectionToMetastore(HiveSchemaHelper.java:80) at org.apache.hive.beeline.HiveSchemaTool.getConnectionToMetastore(HiveSchemaTool.java:133) at org.apache.hive.beeline.HiveSchemaTool.testConnectionToMetastore(HiveSchemaTool.java:187) at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:291) at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:277) at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:526) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(
In this case increasing the Ulimit of number of processes to the Druid user will fix this issue.This Article explains more the issue and best way to fix such issue.Exception stack.2018-04-02T23:41:56,827 ERROR [main] io.druid.cli.CliBroker-Errorwhen starting up.Failing.java.lang.OutOfMemoryError: unable to create newnative thread at java.lang.Thread.start0(NativeMethod)~[?:1.8.0_40]at java.lang.Thread.start(Thread.java:714)~[?:1.8.0_40]at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)~[?:1.8.0_40]at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368)~[?:1.8.0_40]at org.jboss.netty.util.internal.DeadLockProofWorker.start(DeadLockProofWorker.java:38)~[netty-3.10.6.Final.jar:?]at org.jboss.netty.channel.socket.nio.AbstractNioSelector.openSelector(AbstractNioSelector.java:368)~[netty-3.10.6.Final.jar:?]at org.jboss.netty.channel.socket.nio.AbstractNioSelector.<init>(AbstractNioSelector.java:100)~[netty-3.10.6.Final.jar:?]at or
Reading and writing files to a MapR cluster (version 6) is simple, using the standard PutFile or GetFile, utilizing the MapR NFS. If you've searched high and low on how to do this, you've likely read articles and GitHub projects specifying steps. I've tried these steps without success, meaning whats out there is too complicated or out-dated to solve NiFi reading/writing to MapR. You don't need to re-compile the HDFS processors with the MapR dependencies, just follow the steps below:1) Install the MapR client on each NiFi node#Install syslinux (for rpm install)sudo yum install syslinux#Download the RPM for your OS http://package.mapr.com/releases/v6.0.0/redhat/ rpm -Uvh mapr-client-6.0.0.20171109191718.GA-1.x86_64.rpm#Configure the mapr client connecting with the cldb/opt/mapr/server/configure.sh -c -N ryancicak.com -C cicakmapr0.field.hortonworks.com:7222 -genkeys -secure#Once you have the same users/groups on your OS (as MapR), you will be able to use maprlogin password (allowing y
I want to easily integrate Apache Spark jobs with my Apache NiFi flows. Fortunately with the release of HDF 3.1, I can do that via Apache NiFi's ExecuteSparkInteractive processor.First step, let me set up a Centos 7 cluster with HDF 3.1, follow the well-written guide here.With the magic of time lapse photography, instantly we have a new cluster of goodness:It is important to note the new NiFi Registry for doing version control and more. We also get the new Kafka 1.0, updated SAM and the ever important updated Schema Registry.The star of the show today tis Apache NiFi 1.5 here. My first step is to Add a Controller Service (LivySessionController).Then we add the Apache Livy Server, you can find this in your Ambari UI. It is by default port 8999. For my session, I am doing Python, so I picked pyspark. You can also pick pyspark3 for Python 3 code, spark for Scala, and sparkr for R.To execute my Python job, you can pass the code in from a previous processor to the ExecuteSparkInt
PROBLEM: In hive, on oracle metastore following error is observed for table creation,java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column ROOT CAUSE: Issue looks to be due to large number of columns in this table. RESOLUTION: Currently hive will we store column stats in a table while we store the accuracy in another table (table properites). The best way is to store both the column stats and its accuracy in the same table. This involves modification of schema.As a workaround we can change the column type to CLOB.
DevOps: Backups Part 2Apache NiFi Registry Rest API Docshttps://nifi.apache.org/docs/nifi-registry-docs/rest-api/index.htmlGithub:https://github.com/tspannhw/BackupRegistry
http://iotfusion.net/session/enterprise-iiot-edge-processing-with-apache-nifi-minifi-and-deep-learning/Join me for this live in Philly on April 5, 2018.Sending Data to an Advanced Analytics Platform like https://www.zoomdata.com/ is childsplay. I added that as a live stream via REST while I am sending the JSON to be converted to AVRO then ORC for storage and Hive queries.As part of the ingest we store the images and make a current image for display.See: https://community.hortonworks.com/articles/182850/vision-thing.html https://community.hortonworks.com/content/kbentry/182984/vision-thing-part-2-processing-capturing-and-displ.html An Overview of a Flow to Ingest Both Apache MXNet + SenseHat Data plus multiple rows of TensorFlow dataIf TensorFlow json data, split it into individual JSON recordsThis is how to split an array of JSON that doesn't have a top element.Reference:https://community.hortonworks.com/articles/182850/vision-thing.htmlGithub:https://github.com/tspannhw/OpenSource
Properly Size IndexUnderstanding what to index often requires deep business domain expertise on the data. This yields better indexing strategy and increases accuracy for searching data. Not all data will be indexed but for an organization who's acquiring brand new data, this requires indexing all data until it is understood what value it brings to the business. What this means is that data needs to be re-indexed so it is a good practice to store raw data somewhere cheap, often in HDFS or in the cloud object storage. Tuning for SpeedThis starts with monitoring QTime. It provides performance metrics on how fast the request was received, query parsing and actual search. This doesn't include the time it took to send back the response to the client which depends on heavily on how big the payload and how fast the network I/O is. Sorting works best with short valued properties like price, age, etc but doesn't on tokenized values like date, long field type values and others. For range queries,
An article on the challenges and solutions to predicting machine failures in the field. The full details can be found here: https://github.com/kirkhas/zeppelin-notebooks/tree/master/Preventive_maintenanceStep #1 Feature SelectionStep #2 GeolocationStep #3 - Scythe is a time-series library authored by Kirk Haslbeck for these purposes- Needed to Resample the data into trips or route segments (Scythe Resample)- Needed to Step Interpolate the miles since last service to be 4K, 5K and less continuous regression Step #4 - Indexing and OneHotEncoding to the Rescue. Found a relationship of a particular "Make" that was more problematic than most.Roc Curve - A near perfect model
PARTITIONS IN HIVE Hive tables are organized and stored as partitions. It helps improve the query performance. By default, Hive stores each partitions data in a separate folder under the table’s locations in the file system. Hive also provides support for individually setting the location of each partition. This allows users to store hive partitioned data in different locations. Let us take an example of a hive table called student with the four columns - id, name, dept and year and partitioned on the year column. Let’s say we insert data into this table for the years 2009 and 2011. By default, the hive table data is stored under the hive metastore directory in HDFS specified by the parameter $hive.metastore.warehouse.dir in hive-default.xml. Fig.1 shows the two partition folders under the student directory in the hive metastore. Fig.1. Partitions in default location in Warehouse. Now, let us say we want to add a partition for the year 2018 but store the data in a different l
As discussed in my previous article Using Pre-defined Security Groups with Cloudbreak, the preferred method for managing security for hostgroups in Cloudbreak is to use the native interface from your cloud provider. For Openstack, one of the easiest ways to do it is to use the openstack CLI. My Openstack environment uses a self-signed certificate and is only accessible through a VPN, so I have to use the --insecure flag to ignore the certificate errors. Before you can use the CLI commands, you have to know your Openstack login parameters. This includes username and password, but also the URL of the security endpoint, project name, etc. For mine, I have a script that puts these values in environment variables, but they can be specified on the openstack command line if desired. export OS_USERNAME=john.whitmoreexport OS_PASSWORD='xxxxxxxxxxxxxx'export OS_SYSTEM_SCOPE=Projectexport OS_USER_DOMAIN_NAME=Defaultexport OS_AUTH_URL=http://###.###.###.###:5000/v3export OS_IDENTITY_API_VER
Goal: Ingest Geospatial data (ais data in CSV format) by using GeoMesa HBase after GeoMesa HBase is installed and configured. Follow install-and-configure-geomesa-hbase-and-geoserver if GeoMesa HBase is not installed151001000015660,1001001,-1,55.476868,-25.874775,0.4,50,-999.9,511,2015-10-01 06:14:33,1151001000015661,1001001,-1,55.476868,-25.874775,0.4,50,-999.9,511,2015-10-01 06:14:34,1151002008706375,1001001,-1,55.82175,-26.442037,0.7,40,-999.9,511,2015-10-02 05:12:46,1151002008706376,1001001,-1,55.82175,-26.442037,0.7,40,-999.9,511,2015-10-02 05:12:47,1Create GeoMesa SimpleFeatureType (sft) configuration file as below in ais_data_conf.sftgeomesa.sfts.ais-data = { attributes = [ { name = "arkposid", type = "Long", index = true } { name = "mmsi", type = "Integer", index = false } { name = "navigationalstatus", type = "Integer", index = false } { name = "coords", type = "Point", index = true, srid = 4326, default = true
Vision Thing: Part 2: Processing, Capturing and Displaying Live Image Feeds with Apache NiFi, MiniFi, OpenCV, Python, MXNetAs part of processing live webcam images from devices I want to display the last one ingested to see what's going on. Those same images run through Apache MXNet, NVidia TensorRT and OpenCV for analysis.I wanted to list all the images that I have stored on my NiFi server sent by Jetson TX1 device. So I went old school and have Apache NiFi server up some simple CGI script. It lists images and wraps them in HTML.index.sh ls /opt/demo/images2/ | /opt/demo/buildpage.shbuildpage.sh#!/bin/shecho '<html><head><meta http-equiv="refresh" content="60"> <title>NiFi List Images</title> </head> <body> <p> <br> <b>List Images</b> <br><br>'sed 's/^.*/<a target="_new" href="http:\/\/princeton1\.field\.hortonworks\.com\:9099\?img_name\=&">&<\/a><br\/>/'echo '</body>&
NOTE: This was recorded before everything kicked off with Facebook and Cambridge Analytica. Interesting timing.https://roaringelephant.org/2018/03/27/episode-80-big-data-tracking/ Last June, Wolfie Christl published a 93 page report Corporate Surveillance in Everyday Life using big data tracking. Apart from the massive pdf that can be downloaded on the net, an extensive summary can be found on the Cracked Labs website.In this episode we go over the content and give our views on the subject.Podcast: Play in new window | Download (Duration: 51:25 — 35.6MB)If you want to follow along with us while we are discussing the different point in the onlin earticle, here is the link: http://crackedlabs.org/en/corporate-surveillancePlease use the Contact Form on this blog or our twitter feed to send us your questions, or to suggest future episode topics you would like us to cover.
Open 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 one I use my custom Web Camera processor to ingest web camera images via Apache NiFi on an OSX laptop equipped with two webcameras.This will let you ingest as many images as you need for security, motion detection or fun.Custom Processor:https://github.com/tspannhw/GetWebCameraMy processor is a thin wrapper on an awesome Java library: http://webcam-capture.sarxos.pl/See: https://github.com/sarxos/webcam-capture/blob/master/webcam-capture/src/example/java/TakePictureExample.javaTo use the processor, you can clone my github project or download the prebuilt NAR and install to your nifi/lib directory and restart your NiFi server.It is easy to use. Add the processor to your workflow at the start to ingest images from your webcam.The processor takes two properties: imagefilename and
AD (After Druid)In my opinion, Druid creates a new analytic service that I term the real-time EDW. In traditional EDWs the process of getting from the EDW to an optimized OLAP could take hours depending on the size of the EDW. Having a cube take six or more hours was not unusual for a lot of companies. The process also tended to be brittle and needed to be closely monitored.In addition to real-time, Druid also facilitates long-term analytics which effectively provides a Lambda architecture for your data warehouse. Data streams into Druid and is held in-memory for a configurable amount of time. While in-memory the data can be queried and visualized. After a period of time the data is then passed to long-term (historical) storage as segments on HDFS. These segments can also be part of the same visualization as the real-time data. As mentioned previously, all data in Druid contains a timestamp. The other data elements consist of the same properties as traditional EDWs: dimensions and mea
Good design goes mostly unnoticed. If a user interface works well, you simply complete a task and move on to the next. That time when something doesn't work as expected, or you think why do I have to do it this way, is when the design becomes much more noticeable. The following is a look back over recent months at some notable UI/UX improvements that have recently made or will be soon making their way to Apache NiFi. They vary a lot in size and complexity, but overall they contribute equally to make NiFi better by design.More Control Over Restricted Components New access policies were introduced for more fine-grain control of user interactions with restricted components. For example, permissions can be granted around reading of or writing to a file system, executing code, and keytab file access. Good to know – all new policies introduced are subcategories of the one previously in place, so a user holding a restricted component policy will receive all new ones. Administrators wi
Druid is an OLAP solution for streaming event data as well as OLAP for long-term storage. All Druid data requires a timestamp. Druid’s storage architecture is based off the timestamp similar to how HBase stores by key. Following are some key benefits of Druid:Real-time EDW on event data (time-series)Long-term storage leveraging HDFSHigh availabilityExtremely performant querying over large data setsAggregation and IndexingHigh-level of data compressionHive integrationDruid provides a specific solution for specific problems that could not be handled by any other technology. With that being said, there are instances where Druid may not be a good fit:Data without a timestampNo need for real-time streamingNormalized (transactional) data (no joins in Druid)Small data setsNo need for aggregating measuresNon-BI queries like Spark or streaming lookupsWhy Druid?BD (Before Druid)In traditional EDWs data is broken into dimensional tables and fact tables. Dimensions describe an object. For example
Now that we have the baseline configuration in place for KnoxSSO, as documented in part I of the series, we are ready to configure single sign-on for Ranger. This is a nice convenience for administrators that live in both Ambari and Ranger as part of their daily platform activities. It is also a security improvement relative to local passwords.To configure Ranger for KnoxSSO, we'll need the public key for Knox. Recall that there are a few ways to obtain this, we'll use the following.openssl s_client -connect ${knoxserver}:8443 < /dev/null | openssl x509 -out /tmp/knox.crtYou'll want to copy the base64 data between BEGIN CERTIFICATE and END CERTIFICATE lines.We're now ready to configure Ranger:All we need to configure is the Knox SSO provider URL and the SSO public key. The SSO public key is the copied data we just discussed from the Knox certificate.The SSO provider URL is the URL we configured in part I that corresponds to the Knox SSO topology.Now let's try to log in to Ranger usi
In this article we will see how to produce messages using a simple python script and consume messages using ConsumeMQTT processor and put them in HDFS using PutHDFSNote: I'm using CentOS 7 and HDP 2.6.3 for this article.1) Install MQTT sudo yum -y install epel-releasesudo yum -y install mosquitto.2) Start MQTT sudo systemctl start mosquittosudo systemctl enable mosquitto.3) Install paho-mqtt python libraryyum install python-pippip install paho-mqtt.4) Configure MQTT password for the user.I have created a sample user 'aditya' and set the password to 'test'[root@test-instance-4 ~]# useradd aditya[root@test-instance-4 ~]# sudo mosquitto_passwd -c /etc/mosquitto/passwd adityaPassword:Reenter password:.5) Disable anonymous login to MQTT Open the file (/etc/mosquitto/mosquitto.conf ) and add the below entries and restart mosquittoallow_anonymous falsepassword_file /etc/mosquitto/passwd sudo systemctl restart mosquitto.6) Design the NiFi flow to consume messages and put into hdfsConfigure MQT
There are many ways to integrate Apache NiFi and Apache Spark. We can call Apache Spark Streaming via S2S (Apache NiFi's Site to Site) or Kafka. If you want to execute a regular Apache Spark job, you can do that via Apache Livy which is included in HDP 2.6+. This is how Apache Zeppelin integrates with Apache Spark, so it's secure and a reasonable approach.I use this approach when I want to use Spark to process part of my process in the middle of an Apache NiFi flow.Syntax for Calling a Job This job is stored in HDFS as /apps/logs*jar with the class name com.dataflowdeveloper.logs.Logs. Schema For Apache Livy Status Messages { "type": "record", "name": "livystatus", "fields": [ { "name": "id", "type": [ "null", "int" ] }, { "name": "state", "type": [ "null", "string" ] }, { "name": "appId", "type": [ "null", "string" ] }, { "name": "driverLogUrl", "type": [ "null", "string" ] }, { "name": "sparkUiUrl", "type": [ "null
Introduction:When I start thinking about a leading opensource cloud computing platform, Openstack comes into a picture. OpenStack controls a large pools of compute, storage, and networking resources throughout a datacenter. Openstack has gained a very high popularity in the technology market. It introduces a new services and features in every release cycle to address critical IT requirements. A very important requirement for any IT organization is to build a robust platform to perform data analytics with a large data sets. BigData is the latest buzzword in the IT Industry. This article primarily focusses on how Openstack plays a key role in addressing BigData usecase.Bigdata on Openstack!Now a days the data is generated everywhere and its volume is growing exponentially. Data is generated from web server, application server, database server in the form of user information, log files and system state information. Apart from this, a huge volume of data is generated from IoT devices like
What is Apache Ambari?Apache Ambari is an open-source software to install, manage and monitor Apache Hadoop family of components. It automates many of the basic actions performed and provides a simple and easy to use UI.How does Ambari work?Hadoop and its ecosystem of software are typically installed as a multi-node deployment. Ambari has a two level architecture of an Ambari Server and an Ambari agent. Ambari Server centrally manages all the agents and sends out operations to be performed on individual agents. Agents are installed by the server on each node (host) which in turn installs, configures and manages services in the agentWhat are Services?Services are the various components of the Hadoop ecosystem such as HDFS, YARN, Hive, HBase, Oozie, Druid, etc. One of the most popular open-source Hadoop distributions is the Hortonworks Data Platform (HDP)How is a stack like HDP installed by Ambari? Each version of HDP corresponds to a version of Ambari which supports the HDP version.The
Integration Apache OpenNLP 1.8.4 into Apache NiFi 1.5 For Real-Time Natural Language Processing of Live Data StreamsThis is an update to the existing processor. This one seems to work better and faster.VersionsApache OpenNLP 1.8.4 with Name, Location and Date Processing.I also improved the output format and added Date parsing.Example Outputnlp_location_1 Chinanlp_name_1 Andrew TurnerReleasehttps://github.com/tspannhw/nifi-nlp-processor/releases/tag/2.0InstallationDownload NAR here: https://github.com/tspannhw/nifi-nlp-processor/releases/tag/2.0Install nar file to /usr/hdf/current/nifi/lib/Create a model directory with permissions for nifi userDownload models (see below)Restart Apache NiFi via AmbariDownload Modelswget http://opennlp.sourceforge.net/models-1.5/en-ner-date.binwget http://opennlp.sourceforge.net/models-1.5/en-ner-location.binwget http://opennlp.sourceforge.net/models-1.5/en-ner-money.binwget http://opennlp.sourceforge.net/models-1.5/en-ner-organization.binwget http://op
Integrating TensorFlow 1.6 Image Labelling with HDF 3.1 and Apache NiFi 1.5This is community Apache NiFi custom processor that I have written with help from Simon Ball. This is after his original change, I converted the results to a different style and incorporated changes to Google's TensorFlow Label_Image in Java example. Images Supported as Flow FilesJPG, PNG, GIF VersionsUpdated TensorFlowProcessor to TF 1.6. SummaryI added more tests, did more clode cleanup, change the top 5 returned with cleaner naming. This processor has been tested in a few environments, please give it a try and let me know your results. The performance and stability seem quite good, hopefully enough for your use cases. You can also use the MiniFi C++ Agent's built-in C++ TensorFlow support if you wish to have fast local TensorFlow at the edge.JUNit Test for TensorFlow ProcessorHere is another flow where I am send an image to two Apache MXNet Model Servers and the local TensorFlow processor.This is an example o
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.