Giter Site home page Giter Site logo

Comments (3)

JerryLead avatar JerryLead commented on September 17, 2024

对,我这里可能没有说清楚,其实我的意思是:如果很难或者不能在上某个类型上定义正确的partition(),那么这个类型不能当作Key使用。Hadoop里面也是一样,一些自定的class可以当作key使用,但如果无法在上面定义partition(),那么就不能当作key。

from sparkinternals.

lqian avatar lqian commented on September 17, 2024

那段注释是java数组的hashcode是基于数组的标示符而不是基于数组内容(元素),使用array作为分区键会产生不可预料不正确的结果。其实不光是数组,map作为分区键也不合适。这个东西可以引申一下,如果作为分区键的class很难产生value一致排序的分区,则不适合做分区键

from sparkinternals.

JerryLead avatar JerryLead commented on September 17, 2024

@lqian 谢谢建议,下次修改时加上

from sparkinternals.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.