本文整理汇总了C#中HBaseClient.ExecuteWithVirtualNetworkLoadBalancing方法的典型用法代码示例。如果您正苦于以下问题:C# HBaseClient.ExecuteWithVirtualNetworkLoadBalancing方法的具体用法?C# HBaseClient.ExecuteWithVirtualNetworkLoadBalancing怎么用?C# HBaseClient.ExecuteWithVirtualNetworkLoadBalancing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HBaseClient
的用法示例。
在下文中一共展示了HBaseClient.ExecuteWithVirtualNetworkLoadBalancing方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestExecuteWithVirtualNetworkLoadBalancingTwoArgs
public void TestExecuteWithVirtualNetworkLoadBalancingTwoArgs()
{
int numServers = 4;
int numFailures = 3;
var client = new HBaseClient(numServers);
var arg1Value = "arg1";
var arg2Value = "arg2";
int count = 0;
Func<string, string, string, Task> f = (arg1, arg2, endpoint) =>
{
Assert.AreEqual(arg1Value, arg1);
Assert.AreEqual(arg2Value, arg2);
count++;
if (count < numFailures)
{
throw new TimeoutException();
}
return NoOpTask();
};
client.ExecuteWithVirtualNetworkLoadBalancing(f, arg1Value, arg2Value);
Assert.AreEqual(count, numFailures);
}
示例2: TestExecuteWithVirtualNetworkLoadBalancing
public void TestExecuteWithVirtualNetworkLoadBalancing()
{
int numServers = 4;
int numFailures = 3;
var client = new HBaseClient(numServers);
int count = 0;
Func<string, Task> f = (endpoint) =>
{
count++;
if (count < numFailures)
{
throw new TimeoutException();
}
return NoOpTask();
};
client.ExecuteWithVirtualNetworkLoadBalancing(f);
Assert.AreEqual(count, numFailures);
}