@Metrics(about="Metrics for WASB", context="azureFileSystem") @InterfaceAudience.Public @InterfaceStability.Evolving public final class AzureFileSystemInstrumentation extends Object implements MetricsSource
Modifier and Type | Field and Description |
---|---|
static String |
METRIC_TAG_ACCOUNT_NAME |
static String |
METRIC_TAG_CONTAINTER_NAME |
static String |
METRIC_TAG_FILESYSTEM_ID |
static String |
WASB_BYTES_READ |
static String |
WASB_BYTES_WRITTEN |
static String |
WASB_CLIENT_ERRORS |
static String |
WASB_DIRECTORIES_CREATED |
static String |
WASB_DIRECTORIES_DELETED |
static String |
WASB_DOWNLOAD_LATENCY |
static String |
WASB_DOWNLOAD_RATE |
static String |
WASB_FILES_CREATED |
static String |
WASB_FILES_DELETED |
static String |
WASB_RAW_BYTES_DOWNLOADED |
static String |
WASB_RAW_BYTES_UPLOADED |
static String |
WASB_SERVER_ERRORS |
static String |
WASB_UPLOAD_LATENCY |
static String |
WASB_UPLOAD_RATE |
static String |
WASB_WEB_RESPONSES |
Constructor and Description |
---|
AzureFileSystemInstrumentation(Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
blockDownloaded(long latency)
Indicate that we just downloaded a block and record its latency.
|
void |
blockUploaded(long latency)
Indicate that we just uploaded a block and record its latency.
|
void |
clientErrorEncountered()
Indicate that we just encountered a client-side error.
|
void |
currentDownloadBytesPerSecond(long bytesPerSecond)
Record the current bytes-per-second download rate seen.
|
void |
currentUploadBytesPerSecond(long bytesPerSecond)
Record the current bytes-per-second upload rate seen.
|
void |
directoryCreated()
Indicate that we just created a directory through WASB.
|
void |
directoryDeleted()
Indicate that we just deleted a directory through WASB.
|
void |
fileCreated()
Indicate that we just created a file through WASB.
|
void |
fileDeleted()
Indicate that we just deleted a file through WASB.
|
long |
getBlockDownloadLatency()
Get the current rolling average of the download latency.
|
long |
getBlockUploadLatency()
Get the current rolling average of the upload latency.
|
long |
getCurrentMaximumDownloadBandwidth()
Get the current maximum download bandwidth.
|
long |
getCurrentMaximumUploadBandwidth()
Get the current maximum upload bandwidth.
|
long |
getCurrentWebResponses()
Gets the current number of web responses obtained from Azure Storage.
|
UUID |
getFileSystemInstanceId()
The unique identifier for this file system in the metrics.
|
void |
getMetrics(MetricsCollector builder,
boolean all)
Get metrics from the metrics source
|
MetricsInfo |
getMetricsRegistryInfo()
Get the metrics registry information.
|
void |
rawBytesDownloaded(long numberOfBytes)
Indicate that we just downloaded some data to Azure storage.
|
void |
rawBytesUploaded(long numberOfBytes)
Indicate that we just uploaded some data to Azure storage.
|
void |
serverErrorEncountered()
Indicate that we just encountered a server-caused error.
|
void |
setAccountName(String accountName)
Sets the account name to tag all the metrics with.
|
void |
setContainerName(String containerName)
Sets the container name to tag all the metrics with.
|
void |
updateBytesReadInLastSecond(long currentBytesRead)
Sets the current gauge value for how many bytes were read in the last
second.
|
void |
updateBytesWrittenInLastSecond(long currentBytesWritten)
Sets the current gauge value for how many bytes were written in the last
second.
|
void |
webResponse()
Indicate that we just got a web response from Azure Storage.
|
public static final String METRIC_TAG_FILESYSTEM_ID
public static final String METRIC_TAG_ACCOUNT_NAME
public static final String METRIC_TAG_CONTAINTER_NAME
public static final String WASB_WEB_RESPONSES
public static final String WASB_BYTES_WRITTEN
public static final String WASB_BYTES_READ
public static final String WASB_RAW_BYTES_UPLOADED
public static final String WASB_RAW_BYTES_DOWNLOADED
public static final String WASB_FILES_CREATED
public static final String WASB_FILES_DELETED
public static final String WASB_DIRECTORIES_CREATED
public static final String WASB_DIRECTORIES_DELETED
public static final String WASB_UPLOAD_RATE
public static final String WASB_DOWNLOAD_RATE
public static final String WASB_UPLOAD_LATENCY
public static final String WASB_DOWNLOAD_LATENCY
public static final String WASB_CLIENT_ERRORS
public static final String WASB_SERVER_ERRORS
public AzureFileSystemInstrumentation(Configuration conf)
public UUID getFileSystemInstanceId()
public MetricsInfo getMetricsRegistryInfo()
public void setAccountName(String accountName)
accountName
- The account name.public void setContainerName(String containerName)
containerName
- The container name.public void webResponse()
public long getCurrentWebResponses()
public void fileCreated()
public void fileDeleted()
public void directoryCreated()
public void directoryDeleted()
public void updateBytesWrittenInLastSecond(long currentBytesWritten)
currentBytesWritten
- The number of bytes.public void updateBytesReadInLastSecond(long currentBytesRead)
currentBytesRead
- The number of bytes.public void currentUploadBytesPerSecond(long bytesPerSecond)
bytesPerSecond
- The bytes per second.public void currentDownloadBytesPerSecond(long bytesPerSecond)
bytesPerSecond
- The bytes per second.public void rawBytesUploaded(long numberOfBytes)
numberOfBytes
- The raw number of bytes uploaded (including overhead).public void rawBytesDownloaded(long numberOfBytes)
numberOfBytes
- The raw number of bytes downloaded (including overhead).public void blockUploaded(long latency)
latency
- The latency in milliseconds.public void blockDownloaded(long latency)
latency
- The latency in milliseconds.public void clientErrorEncountered()
public void serverErrorEncountered()
public long getBlockUploadLatency()
public long getBlockDownloadLatency()
public long getCurrentMaximumUploadBandwidth()
public long getCurrentMaximumDownloadBandwidth()
public void getMetrics(MetricsCollector builder, boolean all)
MetricsSource
getMetrics
in interface MetricsSource
builder
- to contain the resulting metrics snapshotall
- if true, return all metrics even if unchanged.Copyright © 2018 Apache Software Foundation. All rights reserved.