Skip to content

Commit

Permalink
Cassandra pr bug fixes (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawankashyapollion committed Jan 23, 2025
1 parent d1526f5 commit 75da86c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ public void processElement(ProcessContext c) throws Exception {

record.setShard(qualifiedShard);
String finalKeyString = tableName + "_" + keysJsonStr + "_" + qualifiedShard;
Long finalKey = finalKeyString.hashCode() % maxConnectionsAcrossAllShards;
Long finalKey =
finalKeyString.hashCode() % maxConnectionsAcrossAllShards; // The total parallelism is
// maxConnectionsAcrossAllShards
c.output(KV.of(finalKey, record));

} catch (Exception e) {
Expand Down

0 comments on commit 75da86c

Please sign in to comment.