Take a look at the problem of sparkstreaming because data validation with Redis is causing incorrect results

Source: Internet
Author: User

Say Business First,

In the Flatmap phase, the current indicator will be in Redis to verify whether the data is a new user, if it is a new user, then statistics, statistics will add the new user to our Redis container ...

This business is actually very simple ... But the pit itself is, flatmap after the RDD, will be used by two different action ...

And then... I have found that the second action is never a new user in statistics .....

Don't you know the reason why you see the problem? I took a day off to find out why.

Because Flatmap is a transform, each action is executed. And I do two action so Flatmap will execute two times, the result is the second execution, certainly a new user will not have ah ...

Good pit

Good pit

The pit is killing me ....

Take a look at the problem of sparkstreaming because data validation with Redis is causing incorrect results

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.