hadoop 客户端能否利用机架感知的优势?

Can a hadoop client leverage the benefit of rack awareness?

我有 10 台使用 akka 流进行数据摄取的摄取机器。 我有一个包含 50 个节点的 Hadoop 集群,以及 运行 个使用 Spark Streaming 的管道。 Hadoop 集群使用 10 台机器生成的数据来生成报告。 我可以利用这 10 台机器的机架感知能力而不将它们添加为 Hadoop 集群的一部分吗?

当我说机架感知时,我的意思是如果这些机器与 Hadoop 数据节点在同一个机架中,那么使用机架感知,我希望每个摄取机器将数据上传到它最近的数据节点而不是随机方式,所以这样我的网络流量就会减少。

如果可以,请告诉我。

如果我正确理解了您的设置,这应该会自动发生。根据HDFS Architecture:

For the common case, when the replication factor is three, HDFS’s placement policy is to put one replica on the local machine if the writer is on a datanode, otherwise on a random datanode in the same rack as that of the writer, another replica on a node in a different (remote) rack, and the last on a different node in the same remote rack.

(如果您的摄取节点不是集群数据节点,则突出显示与您的案例相关的内容。)