Skip to content

Commit

Permalink
minor fix to datafinder project
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Jones committed Feb 5, 2024
1 parent edf3c2c commit 5a45184
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ZDataFinder/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// See https://aka.ms/new-console-template for more information
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Options;
using Orleans.Configuration;
using OrleansShardedStorageProvider;
using OrleansShardedStorageProvider.Models;
using OrleansShardedStorageProvider.Providers;
using OrleansShardedStorageProvider.Storage;
using System.Diagnostics;
using ZDataFinder;
using ZDataFinder.Config;
Expand Down Expand Up @@ -45,7 +50,14 @@
var serviceId = "OrleansBasics";
var grainName = "smalldata";
var grainId = "1F";
AzureShardedGrainBase agb = new AzureShardedGrainBase(serviceId, options);


ClusterOptions cSettings = new ClusterOptions();
cSettings.ServiceId = serviceId;
IOptions<ClusterOptions> cOpts = Options.Create(cSettings);


AzureShardedGrainStorageBase agb = new AzureShardedGrainStorageBase(cOpts, options);

var key = $"{serviceId}{agb.GetKeyStringSeparator()}{grainName}_{grainId}";
var storageNumberFromKey = agb.GetShardNumberFromKey(key);
Expand Down

0 comments on commit 5a45184

Please sign in to comment.