Re: Reg:Sequence id generation

2012-06-07 Thread abhishek dodda
Actually trying to code this using map reduce program. On Thu, Jun 7, 2012 at 6:22 AM, shashwat shriparv wrote: > Try something like this : > > > public class MyUniqueNumber > { >    private static MyUniqueNumber myUniqueNumber; >    int number; >    int seedValue=365432; //custom seed value to b

Re: Reg:Sequence id generation

2012-06-07 Thread abhishek dodda
Actually trying to look how we can write a mapreduce program. On Thu, Jun 7, 2012 at 7:12 AM, Harsh J wrote: > Ashish - Note though that Twitter's Snowflake is only roughly > sequential in generation. > > Abhishek - Do you really require proper sequence IDs? Why not just > keep and work with time

Re: Reg:Sequence id generation

2012-06-07 Thread Harsh J
Ashish - Note though that Twitter's Snowflake is only roughly sequential in generation. Abhishek - Do you really require proper sequence IDs? Why not just keep and work with timestamps? On Thu, Jun 7, 2012 at 6:57 PM, Ashish wrote: > Can try snowflake https://github.com/twitter/snowflake > > On

Re: Reg:Sequence id generation

2012-06-07 Thread Ashish
Can try snowflake https://github.com/twitter/snowflake On Thu, Jun 7, 2012 at 6:20 PM, abhishek dodda wrote: > Hi all, > > I have a scenario where all my tables are in DB2 and after dumping > them into HDFS. > A unique sequence id (or) unique identifier an extra column should be > added at beginn

Re: Reg:Sequence id generation

2012-06-07 Thread shashwat shriparv
or some string + timestamp+ lastrow +1 On Thu, Jun 7, 2012 at 6:52 PM, shashwat shriparv wrote: > Try something like this : > > > public class MyUniqueNumber > { > private static MyUniqueNumber myUniqueNumber; > int number; > int seedValue=365432; //custom seed value to begin with >

Re: Reg:Sequence id generation

2012-06-07 Thread shashwat shriparv
Try something like this : public class MyUniqueNumber { private static MyUniqueNumber myUniqueNumber; int number; int seedValue=365432; //custom seed value to begin with private MyUniqueNumber(){ //Singleton !!! number=seedValue; //init to zero } public static My

Re: Reg:Sequence id generation

2012-06-07 Thread abhishek dodda
Hi all, I have a scenario where all my tables are in DB2 and after dumping them into HDFS. A unique sequence id (or) unique identifier an extra column should be added at beginning or at the end of the table can anyone help me on this please. Thanks Regards Abhi.