Skip to content

Commit 02a2c17

Browse files
committed
Maded random id assigned to persons span only the positive integer values
1 parent 0637f75 commit 02a2c17

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/main/java/ldbc/snb/datagen/generator/PersonGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private Person generateUser() {
7676
short numTags = ((short) randomTagPowerLaw.getValue(randomFarm.get(RandomGeneratorFarm.Aspect.NUM_TAG)));
7777
person.interests(Dictionaries.tagMatrix.getSetofTags(randomFarm.get(RandomGeneratorFarm.Aspect.TOPIC), randomFarm.get(RandomGeneratorFarm.Aspect.TAG_OTHER_COUNTRY), person.mainInterest(), numTags));
7878
person.universityLocationId(Dictionaries.universities.getRandomUniversity(randomFarm, person.countryId()));
79-
person.randomId(randomFarm.get(RandomGeneratorFarm.Aspect.RANDOM).nextLong() % 100);
79+
person.randomId(randomFarm.get(RandomGeneratorFarm.Aspect.RANDOM).nextInt(Integer.MAX_VALUE) % 100);
8080

8181
person.firstName(Dictionaries.names.getRandomGivenName(randomFarm.get(RandomGeneratorFarm.Aspect.NAME),
8282
person.countryId(),

src/main/java/ldbc/snb/datagen/hadoop/RandomKeySetter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ public class RandomKeySetter implements HadoopFileKeyChanger.KeySetter<TupleKey>
1010
public TupleKey getKey(Object object ) {
1111
Person person = (Person)object;
1212
return new TupleKey(person.randomId(),person.accountId());
13-
// return new TupleKey(person.maxNumKnows(),person.accountId());
1413
}
1514
}
1615

0 commit comments

Comments
 (0)