Table of Contents
hadoop pig bincond matches
注意事项
输出
Home Database Mysql Tutorial Hadoop Pig Bincond Matches

Hadoop Pig Bincond Matches

Jun 07, 2016 pm 04:30 PM
hadoop pig

hadoop pig bincond matches bincond不知道怎么样译成中文,感觉和条件表示示是一样的,前面还可以加 not 注意事项 bincond 后,是没有模式的,须自己指定模式 matches 的正则与 java 的正则完全符合 bincond前面可以加逻辑条件,如 not %default inputstr '/

hadoop pig bincond matches

bincond不知道怎么样译成中文,感觉和条件表示示是一样的,前面还可以加 not

注意事项

  1. bincond 后,是没有模式的,须自己指定模式

  2. matches 的正则与 java 的正则完全符合

  3. bincond前面可以加逻辑条件,如 not

    <code> %default inputstr '/data/proxy/project/udf/pig/raw/log*'
     --加载原始日志--
     AA = LOAD '$inputstr' USING kload.KoudaiLoader('platform,requesturl,imei,openudid,mac') AS(platform, requesturl, imei, openudid, mac);
     --过滤后台进程请求--
     AB = FILTER AA BY not backFilter();
     --格式化用户ukey--
     AC = FOREACH AB GENERATE  flatten(kload.KoudFormateUkey(platform,mac,imei,openudid)) AS(platform,ukey),requesturl;
     ACITEM = FOREACH AC GENERATE platform,ukey,(requesturl matches '.*(?i)getItemInfo.*'? 'itempg':requesturl) as requesturl;
     ACLIST = FOREACH ACITEM GENERATE platform,ukey,(requesturl matches '.*(?i)(getMyStreetProducts|queryRecommendItems|dailyTop|queryIShoppingSimple|categorySearch|list
     ThemeItem|checkProduct|listAllGroupCombines|getAppsByGroup_v2).*'? 'listpg':requesturl) as requesturl;
     ACLAST = FOREACH ACLIST GENERATE platform,ukey,(requesturl matches '.*(?i)taoke.*'? 'taokepg':requesturl) as requesturl;
     --这里取了反作操,如果不匹配
     ACOTHER = FOREACH ACLAST GENERATE platform,ukey,(not requesturl matches '.*(?i)(itempg|taokepg|listpg).*'? 'otherpg':requesturl) as requesturl;
     dump ACOTHER;
    </code>
    Copy after login

输出

<code>    (android,90:C1:15:6C:B3:C1_358943040907312,listpg)
    (android,B4:98:42:68:8C:DF_867083011351846,otherpg)
    (iphone,38:48:4C:1C:CD:70_4BB2D0811DCFF387291405433667E27BCAAB290D,otherpg)
    (android,B0:AA:36:C3:B2:07_864048013754035,otherpg)
    (iphone,C8:6F:1D:27:0C:71_DE6D3F93F6F1AF6E657E216CBD0CC7E590EC1BE4,taokepg)
    (android,98:0C:82:AF:72:3A_357474047931510,otherpg)
</code>
Copy after login
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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

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)

Java Errors: Hadoop Errors, How to Handle and Avoid Java Errors: Hadoop Errors, How to Handle and Avoid Jun 24, 2023 pm 01:06 PM

Java Errors: Hadoop Errors, How to Handle and Avoid When using Hadoop to process big data, you often encounter some Java exception errors, which may affect the execution of tasks and cause data processing to fail. This article will introduce some common Hadoop errors and provide ways to deal with and avoid them. Java.lang.OutOfMemoryErrorOutOfMemoryError is an error caused by insufficient memory of the Java virtual machine. When Hadoop is

Using Hadoop and HBase in Beego for big data storage and querying Using Hadoop and HBase in Beego for big data storage and querying Jun 22, 2023 am 10:21 AM

With the advent of the big data era, data processing and storage have become more and more important, and how to efficiently manage and analyze large amounts of data has become a challenge for enterprises. Hadoop and HBase, two projects of the Apache Foundation, provide a solution for big data storage and analysis. This article will introduce how to use Hadoop and HBase in Beego for big data storage and query. 1. Introduction to Hadoop and HBase Hadoop is an open source distributed storage and computing system that can

How to use PHP and Hadoop for big data processing How to use PHP and Hadoop for big data processing Jun 19, 2023 pm 02:24 PM

As the amount of data continues to increase, traditional data processing methods can no longer handle the challenges brought by the big data era. Hadoop is an open source distributed computing framework that solves the performance bottleneck problem caused by single-node servers in big data processing through distributed storage and processing of large amounts of data. PHP is a scripting language that is widely used in web development and has the advantages of rapid development and easy maintenance. This article will introduce how to use PHP and Hadoop for big data processing. What is HadoopHadoop is

Explore the application of Java in the field of big data: understanding of Hadoop, Spark, Kafka and other technology stacks Explore the application of Java in the field of big data: understanding of Hadoop, Spark, Kafka and other technology stacks Dec 26, 2023 pm 02:57 PM

Java big data technology stack: Understand the application of Java in the field of big data, such as Hadoop, Spark, Kafka, etc. As the amount of data continues to increase, big data technology has become a hot topic in today's Internet era. In the field of big data, we often hear the names of Hadoop, Spark, Kafka and other technologies. These technologies play a vital role, and Java, as a widely used programming language, also plays a huge role in the field of big data. This article will focus on the application of Java in large

How to install Hadoop in linux How to install Hadoop in linux May 18, 2023 pm 08:19 PM

1: Install JDK1. Execute the following command to download the JDK1.8 installation package. wget--no-check-certificatehttps://repo.huaweicloud.com/java/jdk/8u151-b12/jdk-8u151-linux-x64.tar.gz2. Execute the following command to decompress the downloaded JDK1.8 installation package. tar-zxvfjdk-8u151-linux-x64.tar.gz3. Move and rename the JDK package. mvjdk1.8.0_151//usr/java84. Configure Java environment variables. echo'

Introduction to the three core components of hadoop Introduction to the three core components of hadoop Mar 13, 2024 pm 05:54 PM

The three core components of Hadoop are: Hadoop Distributed File System (HDFS), MapReduce and Yet Another Resource Negotiator (YARN).

Data processing engines in PHP (Spark, Hadoop, etc.) Data processing engines in PHP (Spark, Hadoop, etc.) Jun 23, 2023 am 09:43 AM

In the current Internet era, the processing of massive data is a problem that every enterprise and institution needs to face. As a widely used programming language, PHP also needs to keep up with the times in data processing. In order to process massive data more efficiently, PHP development has introduced some big data processing tools, such as Spark and Hadoop. Spark is an open source data processing engine that can be used for distributed processing of large data sets. The biggest feature of Spark is its fast data processing speed and efficient data storage.

Using Hadoop Hbase for big data storage in Java API development Using Hadoop Hbase for big data storage in Java API development Jun 18, 2023 am 10:44 AM

With the increasing demand for data in modern society, the ability to process massive data has become a hot topic in the computer field. In this field, the two open source software Hadoop and Hbase play a very important role. They are widely used for big data storage, processing and analysis. This article mainly introduces the use of HadoopHbase for big data storage in JavaAPI development. What is Hadoop and HbaseHadoop is a high-level application developed by Apache

See all articles