Skip to content

Commit

Permalink
remove redundant this references
Browse files Browse the repository at this point in the history
  • Loading branch information
anliu committed Dec 8, 2014
1 parent 2b8e84a commit 0dba5c6
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Microsoft.HBase.Client/HBaseClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public async Task<ScannerInformation> CreateScannerAsync(string tableName, Scann
IRetryPolicy retryPolicy = _retryPolicyFactory.Create();
try
{
using (HttpWebResponse response = await PostRequestAsync(tableName + "/scanner", scannerSettings, this.RestEndpointBase ?? WebRequester.RestEndpointBaseZero))
using (HttpWebResponse response = await PostRequestAsync(tableName + "/scanner", scannerSettings, RestEndpointBase ?? WebRequester.RestEndpointBaseZero))
{
if (response.StatusCode != HttpStatusCode.Created)
{
Expand Down Expand Up @@ -164,7 +164,7 @@ public async Task<bool> CreateTableAsync(TableSchema schema)
IRetryPolicy retryPolicy = _retryPolicyFactory.Create();
try
{
using (HttpWebResponse webResponse = await PutRequestAsync(schema.name + "/schema", schema, this.RestEndpointBase))
using (HttpWebResponse webResponse = await PutRequestAsync(schema.name + "/schema", schema, RestEndpointBase))
{
if (webResponse.StatusCode == HttpStatusCode.Created)
{
Expand Down Expand Up @@ -224,7 +224,7 @@ public async Task DeleteTableAsync(string table)
IRetryPolicy retryPolicy = _retryPolicyFactory.Create();
try
{
using (HttpWebResponse webResponse = await DeleteRequestAsync<TableSchema>(table + "/schema", null, this.RestEndpointBase))
using (HttpWebResponse webResponse = await DeleteRequestAsync<TableSchema>(table + "/schema", null, RestEndpointBase))
{
if (webResponse.StatusCode != HttpStatusCode.OK)
{
Expand Down Expand Up @@ -283,7 +283,7 @@ public async Task<CellSet> GetCellsAsync(string tableName, string rowKey)
IRetryPolicy retryPolicy = _retryPolicyFactory.Create();
try
{
return await GetRequestAndDeserializeAsync<CellSet>(tableName + "/" + rowKey, this.RestEndpointBase);
return await GetRequestAndDeserializeAsync<CellSet>(tableName + "/" + rowKey, RestEndpointBase);
}
catch (Exception e)
{
Expand Down Expand Up @@ -317,7 +317,7 @@ public async Task<StorageClusterStatus> GetStorageClusterStatusAsync()
IRetryPolicy retryPolicy = _retryPolicyFactory.Create();
try
{
return await GetRequestAndDeserializeAsync<StorageClusterStatus>("/status/cluster", this.RestEndpointBase);
return await GetRequestAndDeserializeAsync<StorageClusterStatus>("/status/cluster", RestEndpointBase);
}
catch (Exception e)
{
Expand Down Expand Up @@ -354,7 +354,7 @@ public async Task<TableInfo> GetTableInfoAsync(string table)
IRetryPolicy retryPolicy = _retryPolicyFactory.Create();
try
{
return await GetRequestAndDeserializeAsync<TableInfo>(table + "/regions", this.RestEndpointBase);
return await GetRequestAndDeserializeAsync<TableInfo>(table + "/regions", RestEndpointBase);
}
catch (Exception e)
{
Expand Down Expand Up @@ -392,7 +392,7 @@ public async Task<TableSchema> GetTableSchemaAsync(string table)
IRetryPolicy retryPolicy = _retryPolicyFactory.Create();
try
{
return await GetRequestAndDeserializeAsync<TableSchema>(table + "/schema", this.RestEndpointBase);
return await GetRequestAndDeserializeAsync<TableSchema>(table + "/schema", RestEndpointBase);
}
catch (Exception e)
{
Expand Down Expand Up @@ -426,7 +426,7 @@ public org.apache.hadoop.hbase.rest.protobuf.generated.Version GetVersion()
IRetryPolicy retryPolicy = _retryPolicyFactory.Create();
try
{
return await GetRequestAndDeserializeAsync<org.apache.hadoop.hbase.rest.protobuf.generated.Version>("version", this.RestEndpointBase);
return await GetRequestAndDeserializeAsync<org.apache.hadoop.hbase.rest.protobuf.generated.Version>("version", RestEndpointBase);
}
catch (Exception e)
{
Expand Down Expand Up @@ -459,7 +459,7 @@ public async Task<TableList> ListTablesAsync()
IRetryPolicy retryPolicy = _retryPolicyFactory.Create();
try
{
return await GetRequestAndDeserializeAsync<TableList>("", this.RestEndpointBase);
return await GetRequestAndDeserializeAsync<TableList>("", RestEndpointBase);
}
catch (Exception e)
{
Expand Down Expand Up @@ -500,7 +500,7 @@ public async Task ModifyTableSchemaAsync(string table, TableSchema schema)
IRetryPolicy retryPolicy = _retryPolicyFactory.Create();
try
{
using (HttpWebResponse webResponse = await PostRequestAsync(table + "/schema", schema, this.RestEndpointBase))
using (HttpWebResponse webResponse = await PostRequestAsync(table + "/schema", schema, RestEndpointBase))
{
if (webResponse.StatusCode != HttpStatusCode.OK || webResponse.StatusCode != HttpStatusCode.Created)
{
Expand Down Expand Up @@ -557,7 +557,7 @@ public async Task<CellSet> ScannerGetNextAsync(ScannerInformation scannerInfo)
{
using (
HttpWebResponse webResponse =
await GetRequestAsync(scannerInfo.TableName + "/scanner" + scannerInfo.ScannerId, this.RestEndpointBase ?? WebRequester.RestEndpointBaseZero))
await GetRequestAsync(scannerInfo.TableName + "/scanner" + scannerInfo.ScannerId, RestEndpointBase ?? WebRequester.RestEndpointBaseZero))
{
if (webResponse.StatusCode == HttpStatusCode.OK)
{
Expand Down Expand Up @@ -604,7 +604,7 @@ public async Task StoreCellsAsync(string table, CellSet cells)
try
{
// note the fake row key to insert a set of cells
using (HttpWebResponse webResponse = await PutRequestAsync(table + "/somefalsekey", cells, this.RestEndpointBase))
using (HttpWebResponse webResponse = await PutRequestAsync(table + "/somefalsekey", cells, RestEndpointBase))
{
if (webResponse.StatusCode != HttpStatusCode.OK)
{
Expand Down

0 comments on commit 0dba5c6

Please sign in to comment.