-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API adjustments for the first preview.
- Loading branch information
Showing
4 changed files
with
157 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace Knet.Kudu.Client | ||
{ | ||
public class TableInfo | ||
{ | ||
/// <summary> | ||
/// The table name. | ||
/// </summary> | ||
public string TableName { get; } | ||
|
||
/// <summary> | ||
/// The table Id. | ||
/// </summary> | ||
public string TableId { get; } | ||
|
||
public TableInfo(string tableName, string tableId) | ||
{ | ||
TableName = tableName; | ||
TableId = tableId; | ||
} | ||
|
||
public override string ToString() => TableName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Knet.Kudu.Client.Connection; | ||
using Knet.Kudu.Client.Protocol.Master; | ||
|
||
namespace Knet.Kudu.Client | ||
{ | ||
public class TabletServerInfo | ||
{ | ||
public string TsUuid { get; } | ||
|
||
public int MillisSinceHeartbeat { get; } | ||
|
||
public string Location { get; } | ||
|
||
public TabletServerState State { get; } | ||
|
||
public IReadOnlyList<HostAndPort> RpcAddresses { get; } | ||
|
||
public IReadOnlyList<HostAndPort> HttpAddresses { get; } | ||
|
||
public string SoftwareVersion { get; } | ||
|
||
public bool HttpsEnabled { get; } | ||
|
||
public DateTimeOffset StartTime { get; } | ||
|
||
public TabletServerInfo( | ||
string tsUuid, | ||
int millisSinceHeartbeat, | ||
string location, | ||
TabletServerState state, | ||
IReadOnlyList<HostAndPort> rpcAddresses, | ||
IReadOnlyList<HostAndPort> httpAddresses, | ||
string softwareVersion, | ||
bool httpsEnabled, | ||
DateTimeOffset startTime) | ||
{ | ||
TsUuid = tsUuid; | ||
MillisSinceHeartbeat = millisSinceHeartbeat; | ||
Location = location; | ||
State = state; | ||
RpcAddresses = rpcAddresses; | ||
HttpAddresses = httpAddresses; | ||
SoftwareVersion = softwareVersion; | ||
HttpsEnabled = httpsEnabled; | ||
StartTime = startTime; | ||
} | ||
} | ||
|
||
public enum TabletServerState | ||
{ | ||
/// <summary> | ||
/// Default value for backwards compatibility. | ||
/// </summary> | ||
Unknown = TServerStatePB.UnknownState, | ||
/// <summary> | ||
/// No state for the tserver. | ||
/// </summary> | ||
None = TServerStatePB.None, | ||
/// <summary> | ||
/// New replicas are not added to the tserver, and failed replicas on | ||
/// the tserver are not re-replicated. | ||
/// </summary> | ||
MaintenanceMode = TServerStatePB.MaintenanceMode, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters