Any suggestions here please I basically need an ability to look up *name -> index* and *index -> name* in the code
-VG On Fri, Jul 22, 2016 at 6:40 PM, VG <vlin...@gmail.com> wrote: > Hi All, > > I am really confused how to proceed further. Please help. > > I have a dataset created as follows: > Dataset<Row> b = sqlContext.sql("SELECT bid, name FROM business"); > > Now I need to map each name with a unique index and I did the following > JavaPairRDD<Row, Long> indexedBId = business.javaRDD() > .zipWithIndex(); > > In later part of the code I need to change a datastructure and update name > with index value generated above . > I am unable to figure out how to do a look up here.. > > Please suggest /. > > If there is a better way to do this please suggest that. > > Regards > VG > >