-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename BlobStorageService to RestRequestService #1342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after these comments are addressed.
* and generates a response. The information received from the scaling layer should be enough to perform these | ||
* functions. | ||
* <p/> | ||
* RestRequestService defines a service that handles {@RestRequest}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{@link RestRequest}s
@@ -40,12 +40,12 @@ | |||
private boolean isRunning = false; | |||
private VerifiableProperties failureProperties = null; | |||
|
|||
private BlobStorageService blobStorageService = null; | |||
private RestRequestService _restRequestService = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not use _ before member variables since its not used elsewhere in ambry open source.
@@ -191,17 +191,17 @@ public FrontendMetrics(MetricRegistry metricRegistry) { | |||
// RestRequestMetricsGroup | |||
// DELETE | |||
deleteBlobMetricsGroup = | |||
new RestRequestMetricsGroup(AmbryBlobStorageService.class, "DeleteBlob", false, true, metricRegistry); | |||
new RestRequestMetricsGroup(FrontendRestRequestService.class, "DeleteBlob", false, true, metricRegistry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder that this changes a lot of metric names so setup in closed source wrapper also have to be adjusted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure.
@@ -854,7 +854,7 @@ public void onCompletion(final GetBlobResult routerResult, Exception routerExcep | |||
response = new ByteBufferReadableStreamChannel(ByteBuffer.wrap(blobInfo.getUserMetadata())); | |||
} else { | |||
restResponseChannel.setHeader(Headers.CONTENT_LENGTH, 0); | |||
response = new ByteBufferReadableStreamChannel(AmbryBlobStorageService.EMPTY_BUFFER); | |||
response = new ByteBufferReadableStreamChannel(FrontendRestRequestService.EMPTY_BUFFER); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this PR, but could you change this to just be EMPTY_BUFFER
since its in the same class.
@@ -54,7 +54,7 @@ | |||
private final Logger logger = LoggerFactory.getLogger(getClass()); | |||
|
|||
private AsyncResponseHandler asyncResponseHandler = null; | |||
private BlobStorageService blobStorageService = null; | |||
private RestRequestService _restRequestService = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove underscore
@@ -72,7 +72,7 @@ | |||
private final JmxReporter reporter; | |||
private final AccountService accountService; | |||
private final Router router; | |||
private final BlobStorageService blobStorageService; | |||
private final RestRequestService _restRequestService; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove underscore
@@ -73,7 +73,7 @@ | |||
*/ | |||
public class NettyMessageProcessorTest { | |||
private final InMemoryRouter router; | |||
private final BlobStorageService blobStorageService; | |||
private final RestRequestService _restRequestService; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove underscore
* All the operations that need to be performed by the Ambry storage server are supported here. | ||
*/ | ||
public class ServerBlobStorageService implements BlobStorageService { | ||
private static final Logger logger = LoggerFactory.getLogger(ServerBlobStorageService.class); | ||
public class StorageServerRestRequestService implements RestRequestService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just StorageRestRequestService
Codecov Report
@@ Coverage Diff @@
## master #1342 +/- ##
=========================================
Coverage ? 72.06%
Complexity ? 6527
=========================================
Files ? 478
Lines ? 37349
Branches ? 4718
=========================================
Hits ? 26917
Misses ? 9172
Partials ? 1260
Continue to review full report at Codecov.
|
Rename BlobStorageService to RestRequestService, for
---DO NOT COMMIT MESSAGE BELOW---
grep 'BlobStorage|blobStorage' -r . | grep -v 'Azure|Binary file|AzureCloud'
./docs/release-notes.md: - Making sure ordering of tests does not matter for BlobStorage tests (#773)
./docs/release-notes.md: - Rewriting AmbryBlobStorageService to make callbacks cleaner (#250)
./docs/release-notes.md: - Wiring in IdConverter and SecurityService into AmbryBlobStorageService (#248)
./docs/release-notes.md: - Making sure ordering of tests does not matter for BlobStorage tests (#773)
./docs/release-notes.md: - Rewriting AmbryBlobStorageService to make callbacks cleaner (#250)
./docs/release-notes.md: - Wiring in IdConverter and SecurityService into AmbryBlobStorageService (#248)
./ambry.iws: ambryBlobStorageService
./ambry.iws: AmbryBlobStorageService
./ambry.iws: BlobStorage
./ambry.iws:
./ambry.iws:
./ambry.iws:
./.git/logs/HEAD:a8014eb1ebac94cd6994337819c4973108d3ee1c 13f05671e7e37eac7af1d6847e6f0edc4404cdeb Ze Mao zemao@linkedin.com 1576612062 -0800 commit: Rename BlobStorageService to RestRequestService
./.git/logs/refs/heads/master:a8014eb1ebac94cd6994337819c4973108d3ee1c 13f05671e7e37eac7af1d6847e6f0edc4404cdeb Ze Mao zemao@linkedin.com 1576612062 -0800 commit: Rename BlobStorageService to RestRequestService
[zemao@zemao-mn1]:ambry(master) $ git log