-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Hadoop 16961. ABFS: Adding metrics to AbfsInputStream #2076
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7d1f920
HADOOP-16961. ABFS: Adding metrics to AbfsInputStream
eee59b8
HADOOP-16961. AbfsInputStreamStatistics via AbfsInputStreamContext an…
e07bd4a
HADOOP-16961. Review Comments, Statistics Readability with closed str…
da482ca
HADOOP-16961. null statistics test with no errors and bytesReadFromBu…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
93 changes: 93 additions & 0 deletions
93
...azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStreamStatistics.java
This file contains hidden or 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,93 @@ | ||
| /** | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.hadoop.fs.azurebfs.services; | ||
|
|
||
| import org.apache.hadoop.classification.InterfaceStability; | ||
|
|
||
| /** | ||
| * Interface for statistics for the AbfsInputStream. | ||
| */ | ||
| @InterfaceStability.Unstable | ||
| public interface AbfsInputStreamStatistics { | ||
| /** | ||
| * Seek backwards, incrementing the seek and backward seek counters. | ||
| * | ||
| * @param negativeOffset how far was the seek? | ||
| * This is expected to be negative. | ||
| */ | ||
| void seekBackwards(long negativeOffset); | ||
|
|
||
| /** | ||
| * Record a forward seek, adding a seek operation, a forward | ||
| * seek operation, and any bytes skipped. | ||
| * | ||
| * @param skipped number of bytes skipped by reading from the stream. | ||
| * If the seek was implemented by a close + reopen, set this to zero. | ||
| */ | ||
| void seekForwards(long skipped); | ||
|
|
||
| /** | ||
| * Record a forward or backward seek, adding a seek operation, a forward or | ||
| * a backward seek operation, and number of bytes skipped. | ||
| * | ||
| * @param seekTo seek to the position. | ||
| * @param currentPos current position. | ||
| */ | ||
| void seek(long seekTo, long currentPos); | ||
|
|
||
| /** | ||
| * Increment the bytes read counter by the number of bytes; | ||
| * no-op if the argument is negative. | ||
| * | ||
| * @param bytes number of bytes read. | ||
| */ | ||
| void bytesRead(long bytes); | ||
|
|
||
| /** | ||
| * Record the total bytes read from buffer. | ||
| * | ||
| * @param bytes number of bytes that are read from buffer. | ||
| */ | ||
| void bytesReadFromBuffer(long bytes); | ||
|
|
||
| /** | ||
| * Records the total number of seeks done in the buffer. | ||
| */ | ||
| void seekInBuffer(); | ||
|
|
||
| /** | ||
| * A {@code read(byte[] buf, int off, int len)} operation has started. | ||
| * | ||
| * @param pos starting position of the read. | ||
| * @param len length of bytes to read. | ||
| */ | ||
| void readOperationStarted(long pos, long len); | ||
|
|
||
| /** | ||
| * Records a successful remote read operation. | ||
| */ | ||
| void remoteReadOperation(); | ||
|
|
||
| /** | ||
| * Makes the string of all the AbfsInputStream statistics. | ||
| * @return the string with all the statistics. | ||
| */ | ||
| @Override | ||
| String toString(); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.