You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by william <kh...@qq.com> on 2014/07/21 07:53:45 UTC

回复: which kind of BlockId should I use?

thank you Aaron




------------------ 原始邮件 ------------------
发件人: "Aaron Davidson";<il...@gmail.com>;
发送时间: 2014年7月21日(星期一) 中午1:40
收件人: "user"<us...@spark.apache.org>; 

主题: Re: which kind of BlockId should I use?



Hm, this is not a public API, but you should theoretically be able to use TestBlockId if you like. Internally, we just use the BlockId's natural hashing and equality to do lookups and puts, so it should work fine. However, since it is in no way public API, it may change even in maintenance releases.
 

On Sun, Jul 20, 2014 at 10:25 PM, william <kh...@qq.com> wrote:
 When spark is 0.7.3, I use SparkEnv.get.blockManager.getLocal("model") and SparkEnv.get.blockManager.put("model", buf, StorageLevel.MEMORY_ONLY, false) to cached model object

When I porting to spark 1.0.1, I found  SparkEnv.get.blockManager.getLocal & ‍SparkEnv.get.blockManager.put's APIs changed to use BlockId instead of String. 
 

And BlockId has 5 concrete class, which one should I use? None of them have a string input parameter.‍‍
 

Thx