Re: avoid creating small objects

2015-08-14 Thread Reynold Xin
You can use mapPartitions to do that. On Friday, August 14, 2015, 周千昊 wrote: > I am thinking that creating a shared object outside the closure, use this > object to hold the byte array. > will this work? > > 周千昊 >于2015年8月14日周五 > 下午4:02写道: > >> Hi, >> All I want to do is that, >> 1. read

Re: avoid creating small objects

2015-08-14 Thread 周千昊
I am thinking that creating a shared object outside the closure, use this object to hold the byte array. will this work? 周千昊 于2015年8月14日周五 下午4:02写道: > Hi, > All I want to do is that, > 1. read from some source > 2. do some calculation to get some byte array > 3. write the byte arr