Пример #1
0
 public HBaseClient(ClusterCredentials credentials, RequestOptions globalRequestOptions = null,
                    ILoadBalancer loadBalancer = null)
 {
     _globalRequestOptions = globalRequestOptions ?? RequestOptions.GetDefaultOptions();
     _globalRequestOptions.Validate();
     if (credentials != null) // gateway mode
     {
         _requester = new GatewayWebRequester(credentials);
     }
     else // vnet mode
     {
         _requester = new VNetWebRequester(loadBalancer);
     }
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HBaseClient" /> class.
 /// </summary>
 /// <remarks>
 /// To find the cluster vnet domain visit:
 /// https://azure.microsoft.com/en-us/documentation/articles/hdinsight-hbase-provision-vnet/
 /// </remarks>
 /// <param name="numRegionServers">The number of region servers in the cluster.</param>
 /// <param name="clusterDomain">The fully-qualified domain name of the cluster.</param>
 public HBaseClient(int numRegionServers, string clusterDomain = null)
     : this(null, RequestOptions.GetDefaultOptions(),
            new LoadBalancerRoundRobin(numRegionServers, clusterDomain))
 {
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HBaseClient" /> class.
 /// </summary>
 /// <param name="credentials">The credentials.</param>
 public HBaseClient(ClusterCredentials credentials)
     : this(credentials, RequestOptions.GetDefaultOptions())
 {
 }