哈希如何在配置单元配置中工作? [英] How hashing works in bucketing for hive?

查看:77
本文介绍了哈希如何在配置单元配置中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Java中HashMap的哈希原理,所以想知道当我们将数据存储到各种存储桶中时,哈希对Hive的作用.

I know the hashing principal for HashMap in Java, so wanted to know that how the hashing works for the Hive while we bucketing the data in various bucket.

推荐答案

我最近不得不挖掘一些Hive源代码来自己解决这个问题.这是我发现的:

I recently had to dig into some Hive source code to figure this out for myself. Here's what I found:

对于整数字段,类似版本. html#hashCode()"rel =" noreferrer> Java的String hashCode .对多个值进行哈希处理时,哈希是

For an integer field, the hash is just the integer value. For a string, it uses a similar version of Java's String hashCode. When hashing multiple values, the hash is a similar version of Java’s List hashCode.

这篇关于哈希如何在配置单元配置中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆