Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
fakefeik committed Dec 1, 2021
1 parent d286997 commit 7b51923
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,34 +115,34 @@ private static TimeGuid[] GetTimeGuidNames(IEnumerable<RawColumn> rawColumns)
private static TimeBasedColumn[] RandomColumnsByTimestamp(int count)
{
var now = Timestamp.Now;
return Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
return MoreEnumerable.DistinctBy(Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
{
Timestamp = now.Ticks,
Name = new TimeGuid(TimeGuidBitsLayout.Format(now + ThreadLocalRandom.Instance.NextTimeSpan(TimeSpan.FromDays(1)), 0, new byte[6])),
Value = new byte[0],
}).DistinctBy(x => x.Name).Take(count).ToArray();
}), x => x.Name).Take(count).ToArray();
}

private static TimeBasedColumn[] RandomColumnsByClockSequence(int count)
{
var now = Timestamp.Now;
return Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
return MoreEnumerable.DistinctBy(Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
{
Timestamp = now.Ticks,
Name = new TimeGuid(TimeGuidBitsLayout.Format(now, ThreadLocalRandom.Instance.NextUshort(TimeGuidBitsLayout.MinClockSequence, TimeGuidBitsLayout.MaxClockSequence + 1), new byte[6])),
Value = new byte[0],
}).DistinctBy(x => x.Name).Take(count).ToArray();
}), x => x.Name).Take(count).ToArray();
}

private static TimeBasedColumn[] RandomColumnsByNode(int count)
{
var now = Timestamp.Now;
return Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
return MoreEnumerable.DistinctBy(Enumerable.Range(0, int.MaxValue).Select(x => new TimeBasedColumn
{
Timestamp = now.Ticks,
Name = new TimeGuid(TimeGuidBitsLayout.Format(now, 0, ThreadLocalRandom.Instance.NextBytes(6))),
Value = new byte[0],
}).DistinctBy(x => x.Name).Take(count).ToArray();
}), x => x.Name).Take(count).ToArray();
}

private IColumnFamilyConnectionImplementation cfConnection;
Expand Down

0 comments on commit 7b51923

Please sign in to comment.