-
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
[FileCopy based bootstrap] GetMetadata Api #2991
base: master
Are you sure you want to change the base?
Conversation
@@ -110,7 +110,7 @@ public static class LocalChannelRequest implements NetworkRequest { | |||
private long startTimeInMs; | |||
private int processorId; | |||
|
|||
LocalChannelRequest(RequestInfo requestInfo, int processorId) { | |||
public LocalChannelRequest(RequestInfo requestInfo, int processorId) { |
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.
Revert this diff
logInfos.size(), logInfos, ServerErrorCode.No_Error); | ||
|
||
// TODO: Add metrics for this operation | ||
Histogram dummyHistogram = new Histogram(new Reservoir() { |
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.
Fix this histogram and add metrics for this api
requestResponseChannel.sendResponse(response, request, serverNetworkResponseMetrics); | ||
} | ||
|
||
private List<LogInfo> convertStoreToProtocolLogInfo(List<com.github.ambry.store.LogInfo> logSegments) { |
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.
Figure out if there is a better place to keep this conversion util.
@@ -484,6 +494,30 @@ public void startup() throws InstantiationException { | |||
} | |||
} | |||
|
|||
private void testGetMetadataApi() { |
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.
Test code. To be reverted.
@@ -229,7 +230,8 @@ public AmbryServerRequestsTest(boolean validateRequestOnStoreState, boolean enab | |||
|
|||
@Parameterized.Parameters | |||
public static List<Object[]> data() { | |||
return Arrays.asList(new Object[][]{{false, false}, {true, false}, {false, true}, {true, true}}); | |||
// return Arrays.asList(new Object[][]{{false, false}, {true, false}, {false, true}, {true, true}}); | |||
return Arrays.asList(new Object[][]{{false, false}}); |
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.
Revert this.
@@ -1645,6 +1647,17 @@ public void healthCheckTest() throws InterruptedException, StoreException, IOExc | |||
setPropertyToAmbryRequests(currentProperties, "disk.manager.disk.healthcheck.enabled", "false"); | |||
} | |||
|
|||
@Test | |||
public void fileCopyGetMetaDataRequestTest() throws IOException, InterruptedException { |
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.
Tests TBA.
@@ -326,7 +328,8 @@ public void start() throws StoreException { | |||
} | |||
metrics.storeStartFailure.inc(); | |||
String err = String.format("Error while starting store for dir %s due to %s", dataDir, e.getMessage()); | |||
throw new StoreException(err, e, StoreErrorCodes.Initialization_Error); | |||
// [Dw-remove] | |||
// throw new StoreException(err, e, StoreErrorCodes.Initialization_Error); |
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.
Revert this.
List<FileInfo> sealedLogsAndMetaDataFiles = getLogSegments(includeActiveLogSegment); | ||
if (null != sealedLogsAndMetaDataFiles) { | ||
for (FileInfo E : sealedLogsAndMetaDataFiles) { | ||
logger.info("[Dw] LS file: {} size: {}", E.getFileName(), E.getFileSize()); |
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.
Fix logging statements. Remove Dw prefix.
@@ -195,6 +196,9 @@ void start(boolean shouldRemoveUnexpectedDirs) throws InterruptedException { | |||
Thread thread = Utils.newThread("store-startup-" + partitionAndStore.getKey(), () -> { | |||
try { | |||
partitionAndStore.getValue().start(); | |||
// [Dw remove] | |||
// logger.info("[Dw] PrintUtil for PartitionId: " + partitionAndStore.getKey().getId()); | |||
// partitionAndStore.getValue().printAndReturnFiles(); |
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.
Revert this diff.
No description provided.