Home Common Problem What are hive built-in functions?

What are hive built-in functions?

Feb 26, 2021 pm 12:02 PM
hive built-in functions

hive built-in functions: 1. User-defined functions to process data; 2. Used to solve the need to input one line and output multiple lines [(On-to-many mapping)]; 3. User-defined aggregation Function, operates on multiple data rows and produces one data row.

What are hive built-in functions?

#The operating environment of this article: Windows 7 system, Dell G3 computer.

hive built-in function:

Definition:

UDF (User-Defined-Function), user-defined function pair The data is processed.

UDTF (User-Defined Table-Generating Functions) is used to solve the requirement of inputting one line and outputting multiple lines (On-to-many mapping).

UDAF (User Defined Aggregation Function) is a user-defined aggregation function that operates on multiple data rows and generates one data row.

Usage:

1. The UDF function can be directly applied to the select statement, format the query structure, and then output the content.

2. When writing UDF functions, you need to pay attention to the following points:

a) Custom UDF needs to inherit org.apache.hadoop.hive.ql.UDF.

b) Need to implement the evaluate function.

c) The evaluate function supports overloading.

hive’s local mode:

Most Hadoop jobs require the complete scalability provided by hadoop to process big data. However, sometimes the amount of input data to hive is very small. In this case, the time consumed to execute the task for the query may be much longer than the actual job execution time. For most of these situations, Hive can handle all tasks on a single machine through local mode. For small data sets, the execution time is significantly reduced.

In this way, operations with a relatively small amount of data can be executed locally, which is much faster than submitting tasks to the cluster for execution.

Configure the following parameters to enable Hive’s local mode:

hive> set hive.exec.mode.local.auto=true;(默认为false)
Copy after login

What are hive built-in functions?

Only when a job meets the following conditions can it truly use local mode:

1. The input data size of the job must be smaller than the parameter: hive.exec.mode.local.auto.inputbytes.max (default 128MB)

2. The number of maps of the job must be smaller than the parameter: hive.exec.mode .local.auto.tasks.max (default 4)

  3. The reduce number of job must be 0 or 1

Related free learning recommendations: php programming(Video)

The above is the detailed content of What are hive built-in functions?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Use Hive in Go language to implement efficient data warehouse Use Hive in Go language to implement efficient data warehouse Jun 15, 2023 pm 08:52 PM

In recent years, data warehouses have become an integral part of enterprise data management. Directly using the database for data analysis can meet simple query needs, but when we need to perform large-scale data analysis, a single database can no longer meet the needs. At this time, we need to use a data warehouse to process massive data. Hive is one of the most popular open source components in the data warehouse field. It can integrate the Hadoop distributed computing engine and SQL queries and support parallel processing of massive data. At the same time, in Go language, use

Getting Started with PHP: PHP and Hive Getting Started with PHP: PHP and Hive May 20, 2023 am 08:33 AM

PHP is a widely used server-side programming language that is used in almost all industries. In this article, we will explore the special role of PHP in big data processing. Under certain circumstances, PHP can collaborate with ApacheHive to achieve real-time data processing and analysis. First, let’s introduce Hive. Hive is a Hadoop-based data warehouse solution. It can map structured data into SQL queries and execute the queries as MapReduce tasks.

PHP implements open source Hive big data analysis platform PHP implements open source Hive big data analysis platform Jun 18, 2023 pm 02:47 PM

As data processing becomes more and more important, big data analysis becomes more and more common. However, many companies may not want to spend a lot of money on a business analytics platform. Open source solutions offer these companies a viable option. In this article, we will discuss how to implement the open source Hive big data analysis platform using PHP. Hive is a Hadoop-based data warehouse system that can query and manage large-scale data sets on Hadoop through SQL. It uses the SQL-like HiveQL language to query

Microsoft releases fix for Behavior:Win32/Hive.ZY error in Windows Defender Microsoft releases fix for Behavior:Win32/Hive.ZY error in Windows Defender Apr 28, 2023 pm 04:01 PM

A Microsoft official confirmed widespread reports that Google Chrome, ChromiumEdge, Discord and several other applications were flagged as "Behavior:Win32/Hive.ZY" by Microsoft's built-in antivirus software "WindowsDefender". The tech giant confirmed in a statement that it is working on a fix that will be rolled out to everyone in the next few hours. So what exactly is "Behavior:Win32/Hive.ZY"? According to a document posted on Microsoft's security portal, any file marked "Behavior:Win32/Hive.ZY" is

Python program using built-in function to reverse elements of array Python program using built-in function to reverse elements of array Sep 06, 2023 pm 03:49 PM

An array is a data structure used to store homogeneous elements in sequence. Stored elements are identified by index values ​​or keys. Python has no specific data structure to represent arrays. However, we can use List data structure or Numpy module to handle arrays. In the following article, we will learn how to reverse the elements of an array using python built-in functions. Reversing array elements means changing the order of array elements from front to back. Input-Output Scenarios Now let us look at some input-output scenarios to understand the inversion of array elements. Inputarray:[3,5,1,4,0,2]Outputarray:[2,0,4,1,5,3]The order or arrangement of the input array elements is reversed. Use the built-in

Centos7 installation and configuration Hive tutorial. Centos7 installation and configuration Hive tutorial. Feb 19, 2024 pm 02:21 PM

When installing and configuring Hive on CentOS7, you can follow these steps: Make sure Java is installed: First, make sure Java is installed on CentOS7. You can check whether Java is installed using the following command: java-version If Java is not installed, please install the appropriate Java version according to your needs. Download Hive: Visit the official website of ApacheHive () and download the latest stable version of Hive. Decompress the Hive compressed package: Use the following command to decompress the Hive compressed package: tarxvfzhive-x.x.x.tar.gz This will decompress Hive to the current directory. Configure environment variables: open the terminal,

Microsoft Exchange Server attacked by Hive's 'windows.exe” ransomware Microsoft Exchange Server attacked by Hive's 'windows.exe” ransomware Apr 16, 2023 pm 01:28 PM

While keeping software updated and only downloading files from trusted sources are standard cybersecurity practices, given the recent increase in malware attacks, it's clear that more education is needed in this area. To that end, the Varonis forensics team has provided some guidance on how attackers using Hive ransomware are targeting Microsoft Exchange Server in their latest series of attacks. For those who don’t know, Hive follows a ransomware-as-a-service model. Although Microsoft is targeting E in 2021 for known vulnerabilities,

How to fix Windows Defender behavior: Win32/Hive.ZY alert How to fix Windows Defender behavior: Win32/Hive.ZY alert May 06, 2023 am 08:04 AM

Many Windows 11 and 10 users are troubled by seeing warning notifications from Windows Defender stating that the threat "Behavior: Win32/Hive.ZY" has been detected. According to reports, this Windows Defender warning or alert is triggered when users try to open some commonly used applications such as Google Chrome or Chromium Edge, Whatsapp, Discord, and Spotify. Even if you have blocked this threat on your PC, it will pop up with a message MicrosoftDefenderAntivi the next time you open this affected application