|
@@ -18,248 +18,504 @@
|
|
|
|
|
|
package org.apache.hadoop.fs.s3a;
|
|
|
|
|
|
-import org.apache.hadoop.fs.StorageStatistics.CommonStatisticNames;
|
|
|
-
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
+import org.apache.hadoop.classification.InterfaceStability;
|
|
|
+import org.apache.hadoop.fs.s3a.statistics.StatisticTypeEnum;
|
|
|
+import org.apache.hadoop.fs.statistics.StoreStatisticNames;
|
|
|
+import org.apache.hadoop.fs.statistics.StreamStatisticNames;
|
|
|
+
|
|
|
+import static org.apache.hadoop.fs.s3a.statistics.StatisticTypeEnum.TYPE_COUNTER;
|
|
|
+import static org.apache.hadoop.fs.s3a.statistics.StatisticTypeEnum.TYPE_DURATION;
|
|
|
+import static org.apache.hadoop.fs.s3a.statistics.StatisticTypeEnum.TYPE_GAUGE;
|
|
|
+import static org.apache.hadoop.fs.s3a.statistics.StatisticTypeEnum.TYPE_QUANTILE;
|
|
|
+
|
|
|
/**
|
|
|
* Statistic which are collected in S3A.
|
|
|
- * These statistics are available at a low level in {@link S3AStorageStatistics}
|
|
|
- * and as metrics in {@link S3AInstrumentation}
|
|
|
+ * Counter and duration statistics are published in
|
|
|
+ * {@link S3AFileSystem#getStorageStatistics()}.
|
|
|
+ * and as metrics in {@link S3AInstrumentation}.
|
|
|
+ * <p>
|
|
|
+ * Where possible, stream names come from {@link StreamStatisticNames}
|
|
|
+ * and {@link StoreStatisticNames}
|
|
|
+ * </p>
|
|
|
*/
|
|
|
+@InterfaceStability.Unstable
|
|
|
public enum Statistic {
|
|
|
|
|
|
+ /* Low-level duration counters */
|
|
|
+ ACTION_EXECUTOR_ACQUIRED(
|
|
|
+ StoreStatisticNames.ACTION_EXECUTOR_ACQUIRED,
|
|
|
+ "Executor acquired.",
|
|
|
+ TYPE_DURATION),
|
|
|
+ ACTION_HTTP_HEAD_REQUEST(
|
|
|
+ StoreStatisticNames.ACTION_HTTP_HEAD_REQUEST,
|
|
|
+ "HEAD request.",
|
|
|
+ TYPE_DURATION),
|
|
|
+ ACTION_HTTP_GET_REQUEST(
|
|
|
+ StoreStatisticNames.ACTION_HTTP_GET_REQUEST,
|
|
|
+ "GET request.",
|
|
|
+ TYPE_DURATION),
|
|
|
+
|
|
|
+ /* FileSystem Level statistics */
|
|
|
DIRECTORIES_CREATED("directories_created",
|
|
|
- "Total number of directories created through the object store."),
|
|
|
+ "Total number of directories created through the object store.",
|
|
|
+ TYPE_COUNTER),
|
|
|
DIRECTORIES_DELETED("directories_deleted",
|
|
|
- "Total number of directories deleted through the object store."),
|
|
|
+ "Total number of directories deleted through the object store.",
|
|
|
+ TYPE_COUNTER),
|
|
|
FILES_COPIED("files_copied",
|
|
|
- "Total number of files copied within the object store."),
|
|
|
+ "Total number of files copied within the object store.",
|
|
|
+ TYPE_COUNTER),
|
|
|
FILES_COPIED_BYTES("files_copied_bytes",
|
|
|
- "Total number of bytes copied within the object store."),
|
|
|
+ "Total number of bytes copied within the object store.",
|
|
|
+ TYPE_COUNTER),
|
|
|
FILES_CREATED("files_created",
|
|
|
- "Total number of files created through the object store."),
|
|
|
+ "Total number of files created through the object store.",
|
|
|
+ TYPE_COUNTER),
|
|
|
FILES_DELETED("files_deleted",
|
|
|
- "Total number of files deleted from the object store."),
|
|
|
+ "Total number of files deleted from the object store.",
|
|
|
+ TYPE_COUNTER),
|
|
|
FILES_DELETE_REJECTED("files_delete_rejected",
|
|
|
- "Total number of files whose delete request was rejected"),
|
|
|
+ "Total number of files whose delete request was rejected",
|
|
|
+ TYPE_COUNTER),
|
|
|
FAKE_DIRECTORIES_CREATED("fake_directories_created",
|
|
|
- "Total number of fake directory entries created in the object store."),
|
|
|
+ "Total number of fake directory entries created in the object store.",
|
|
|
+ TYPE_COUNTER),
|
|
|
FAKE_DIRECTORIES_DELETED("fake_directories_deleted",
|
|
|
- "Total number of fake directory deletes submitted to object store."),
|
|
|
- IGNORED_ERRORS("ignored_errors", "Errors caught and ignored"),
|
|
|
- INVOCATION_COPY_FROM_LOCAL_FILE(CommonStatisticNames.OP_COPY_FROM_LOCAL_FILE,
|
|
|
- "Calls of copyFromLocalFile()"),
|
|
|
- INVOCATION_CREATE(CommonStatisticNames.OP_CREATE,
|
|
|
- "Calls of create()"),
|
|
|
- INVOCATION_CREATE_NON_RECURSIVE(CommonStatisticNames.OP_CREATE_NON_RECURSIVE,
|
|
|
- "Calls of createNonRecursive()"),
|
|
|
- INVOCATION_DELETE(CommonStatisticNames.OP_DELETE,
|
|
|
- "Calls of delete()"),
|
|
|
- INVOCATION_EXISTS(CommonStatisticNames.OP_EXISTS,
|
|
|
- "Calls of exists()"),
|
|
|
- INVOCATION_GET_DELEGATION_TOKEN(CommonStatisticNames.OP_GET_DELEGATION_TOKEN,
|
|
|
- "Calls of getDelegationToken()"),
|
|
|
- INVOCATION_GET_FILE_CHECKSUM(CommonStatisticNames.OP_GET_FILE_CHECKSUM,
|
|
|
- "Calls of getFileChecksum()"),
|
|
|
- INVOCATION_GET_FILE_STATUS(CommonStatisticNames.OP_GET_FILE_STATUS,
|
|
|
- "Calls of getFileStatus()"),
|
|
|
- INVOCATION_GLOB_STATUS(CommonStatisticNames.OP_GLOB_STATUS,
|
|
|
- "Calls of globStatus()"),
|
|
|
- INVOCATION_IS_DIRECTORY(CommonStatisticNames.OP_IS_DIRECTORY,
|
|
|
- "Calls of isDirectory()"),
|
|
|
- INVOCATION_IS_FILE(CommonStatisticNames.OP_IS_FILE,
|
|
|
- "Calls of isFile()"),
|
|
|
- INVOCATION_LIST_FILES(CommonStatisticNames.OP_LIST_FILES,
|
|
|
- "Calls of listFiles()"),
|
|
|
- INVOCATION_LIST_LOCATED_STATUS(CommonStatisticNames.OP_LIST_LOCATED_STATUS,
|
|
|
- "Calls of listLocatedStatus()"),
|
|
|
- INVOCATION_LIST_STATUS(CommonStatisticNames.OP_LIST_STATUS,
|
|
|
- "Calls of listStatus()"),
|
|
|
- INVOCATION_MKDIRS(CommonStatisticNames.OP_MKDIRS,
|
|
|
- "Calls of mkdirs()"),
|
|
|
- INVOCATION_OPEN(CommonStatisticNames.OP_OPEN,
|
|
|
- "Calls of open()"),
|
|
|
- INVOCATION_RENAME(CommonStatisticNames.OP_RENAME,
|
|
|
- "Calls of rename()"),
|
|
|
- OBJECT_COPY_REQUESTS("object_copy_requests", "Object copy requests"),
|
|
|
- OBJECT_DELETE_REQUESTS("object_delete_requests", "Object delete requests"),
|
|
|
- OBJECT_DELETE_OBJECTS("object_delete_objects",
|
|
|
- "Objects deleted in delete requests"),
|
|
|
- OBJECT_LIST_REQUESTS("object_list_requests",
|
|
|
- "Number of object listings made"),
|
|
|
- OBJECT_CONTINUE_LIST_REQUESTS("object_continue_list_requests",
|
|
|
- "Number of continued object listings made"),
|
|
|
- OBJECT_METADATA_REQUESTS("object_metadata_requests",
|
|
|
- "Number of requests for object metadata"),
|
|
|
- OBJECT_MULTIPART_UPLOAD_INITIATED("object_multipart_initiated",
|
|
|
- "Object multipart upload initiated"),
|
|
|
- OBJECT_MULTIPART_UPLOAD_ABORTED("object_multipart_aborted",
|
|
|
- "Object multipart upload aborted"),
|
|
|
- OBJECT_PUT_REQUESTS("object_put_requests",
|
|
|
- "Object put/multipart upload count"),
|
|
|
- OBJECT_PUT_REQUESTS_COMPLETED("object_put_requests_completed",
|
|
|
- "Object put/multipart upload completed count"),
|
|
|
- OBJECT_PUT_REQUESTS_ACTIVE("object_put_requests_active",
|
|
|
- "Current number of active put requests"),
|
|
|
- OBJECT_PUT_BYTES("object_put_bytes", "number of bytes uploaded"),
|
|
|
- OBJECT_PUT_BYTES_PENDING("object_put_bytes_pending",
|
|
|
- "number of bytes queued for upload/being actively uploaded"),
|
|
|
- OBJECT_SELECT_REQUESTS("object_select_requests",
|
|
|
- "Count of S3 Select requests issued"),
|
|
|
- STREAM_ABORTED("stream_aborted",
|
|
|
- "Count of times the TCP stream was aborted"),
|
|
|
- STREAM_BACKWARD_SEEK_OPERATIONS("stream_backward_seek_operations",
|
|
|
- "Number of executed seek operations which went backwards in a stream"),
|
|
|
- STREAM_CLOSED("stream_closed", "Count of times the TCP stream was closed"),
|
|
|
- STREAM_CLOSE_OPERATIONS("stream_close_operations",
|
|
|
- "Total count of times an attempt to close a data stream was made"),
|
|
|
- STREAM_FORWARD_SEEK_OPERATIONS("stream_forward_seek_operations",
|
|
|
- "Number of executed seek operations which went forward in a stream"),
|
|
|
- STREAM_OPENED("stream_opened",
|
|
|
- "Total count of times an input stream to object store was opened"),
|
|
|
- STREAM_READ_EXCEPTIONS("stream_read_exceptions",
|
|
|
- "Number of exceptions invoked on input streams"),
|
|
|
- STREAM_READ_FULLY_OPERATIONS("stream_read_fully_operations",
|
|
|
- "Count of readFully() operations in streams"),
|
|
|
- STREAM_READ_OPERATIONS("stream_read_operations",
|
|
|
- "Count of read() operations in streams"),
|
|
|
- STREAM_READ_OPERATIONS_INCOMPLETE("stream_read_operations_incomplete",
|
|
|
- "Count of incomplete read() operations in streams"),
|
|
|
- STREAM_READ_VERSION_MISMATCHES("stream_read_version_mismatches",
|
|
|
- "Count of version mismatches encountered while reading streams"),
|
|
|
- STREAM_SEEK_BYTES_BACKWARDS("stream_bytes_backwards_on_seek",
|
|
|
- "Count of bytes moved backwards during seek operations"),
|
|
|
- STREAM_SEEK_BYTES_READ("stream_bytes_read",
|
|
|
- "Count of bytes read during seek() in stream operations"),
|
|
|
- STREAM_SEEK_BYTES_SKIPPED("stream_bytes_skipped_on_seek",
|
|
|
- "Count of bytes skipped during forward seek operation"),
|
|
|
- STREAM_SEEK_OPERATIONS("stream_seek_operations",
|
|
|
- "Number of seek operations during stream IO."),
|
|
|
- STREAM_CLOSE_BYTES_READ("stream_bytes_read_in_close",
|
|
|
- "Count of bytes read when closing streams during seek operations."),
|
|
|
- STREAM_ABORT_BYTES_DISCARDED("stream_bytes_discarded_in_abort",
|
|
|
- "Count of bytes discarded by aborting the stream"),
|
|
|
- STREAM_WRITE_FAILURES("stream_write_failures",
|
|
|
- "Count of stream write failures reported"),
|
|
|
- STREAM_WRITE_BLOCK_UPLOADS("stream_write_block_uploads",
|
|
|
- "Count of block/partition uploads completed"),
|
|
|
- STREAM_WRITE_BLOCK_UPLOADS_ACTIVE("stream_write_block_uploads_active",
|
|
|
- "Count of block/partition uploads completed"),
|
|
|
- STREAM_WRITE_BLOCK_UPLOADS_COMMITTED("stream_write_block_uploads_committed",
|
|
|
- "Count of number of block uploads committed"),
|
|
|
- STREAM_WRITE_BLOCK_UPLOADS_ABORTED("stream_write_block_uploads_aborted",
|
|
|
- "Count of number of block uploads aborted"),
|
|
|
-
|
|
|
- STREAM_WRITE_BLOCK_UPLOADS_PENDING("stream_write_block_uploads_pending",
|
|
|
- "Gauge of block/partitions uploads queued to be written"),
|
|
|
- STREAM_WRITE_BLOCK_UPLOADS_DATA_PENDING(
|
|
|
- "stream_write_block_uploads_data_pending",
|
|
|
- "Gauge of block/partitions data uploads queued to be written"),
|
|
|
- STREAM_WRITE_TOTAL_TIME("stream_write_total_time",
|
|
|
- "Count of total time taken for uploads to complete"),
|
|
|
- STREAM_WRITE_TOTAL_DATA("stream_write_total_data",
|
|
|
- "Count of total data uploaded in block output"),
|
|
|
- STREAM_WRITE_QUEUE_DURATION("stream_write_queue_duration",
|
|
|
- "Total queue duration of all block uploads"),
|
|
|
-
|
|
|
- // S3guard committer stats
|
|
|
+ "Total number of fake directory deletes submitted to object store.",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ IGNORED_ERRORS("ignored_errors", "Errors caught and ignored",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_COPY_FROM_LOCAL_FILE(
|
|
|
+ StoreStatisticNames.OP_COPY_FROM_LOCAL_FILE,
|
|
|
+ "Calls of copyFromLocalFile()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_CREATE(
|
|
|
+ StoreStatisticNames.OP_CREATE,
|
|
|
+ "Calls of create()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_CREATE_NON_RECURSIVE(
|
|
|
+ StoreStatisticNames.OP_CREATE_NON_RECURSIVE,
|
|
|
+ "Calls of createNonRecursive()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_DELETE(
|
|
|
+ StoreStatisticNames.OP_DELETE,
|
|
|
+ "Calls of delete()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_EXISTS(
|
|
|
+ StoreStatisticNames.OP_EXISTS,
|
|
|
+ "Calls of exists()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_GET_DELEGATION_TOKEN(
|
|
|
+ StoreStatisticNames.OP_GET_DELEGATION_TOKEN,
|
|
|
+ "Calls of getDelegationToken()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_GET_FILE_CHECKSUM(
|
|
|
+ StoreStatisticNames.OP_GET_FILE_CHECKSUM,
|
|
|
+ "Calls of getFileChecksum()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_GET_FILE_STATUS(
|
|
|
+ StoreStatisticNames.OP_GET_FILE_STATUS,
|
|
|
+ "Calls of getFileStatus()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_GLOB_STATUS(
|
|
|
+ StoreStatisticNames.OP_GLOB_STATUS,
|
|
|
+ "Calls of globStatus()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_IS_DIRECTORY(
|
|
|
+ StoreStatisticNames.OP_IS_DIRECTORY,
|
|
|
+ "Calls of isDirectory()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_IS_FILE(
|
|
|
+ StoreStatisticNames.OP_IS_FILE,
|
|
|
+ "Calls of isFile()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_LIST_FILES(
|
|
|
+ StoreStatisticNames.OP_LIST_FILES,
|
|
|
+ "Calls of listFiles()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_LIST_LOCATED_STATUS(
|
|
|
+ StoreStatisticNames.OP_LIST_LOCATED_STATUS,
|
|
|
+ "Calls of listLocatedStatus()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_LIST_STATUS(
|
|
|
+ StoreStatisticNames.OP_LIST_STATUS,
|
|
|
+ "Calls of listStatus()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_MKDIRS(
|
|
|
+ StoreStatisticNames.OP_MKDIRS,
|
|
|
+ "Calls of mkdirs()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_OPEN(
|
|
|
+ StoreStatisticNames.OP_OPEN,
|
|
|
+ "Calls of open()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ INVOCATION_RENAME(
|
|
|
+ StoreStatisticNames.OP_RENAME,
|
|
|
+ "Calls of rename()",
|
|
|
+ TYPE_COUNTER),
|
|
|
+
|
|
|
+ /* Object IO */
|
|
|
+ OBJECT_COPY_REQUESTS(StoreStatisticNames.OBJECT_COPY_REQUESTS,
|
|
|
+ "Object copy requests",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ OBJECT_DELETE_REQUEST(StoreStatisticNames.OBJECT_DELETE_REQUEST,
|
|
|
+ "Object delete requests",
|
|
|
+ TYPE_DURATION),
|
|
|
+ OBJECT_BULK_DELETE_REQUEST(StoreStatisticNames.OBJECT_BULK_DELETE_REQUEST,
|
|
|
+ "Object bulk delete requests",
|
|
|
+ TYPE_DURATION),
|
|
|
+ OBJECT_DELETE_OBJECTS(StoreStatisticNames.OBJECT_DELETE_OBJECTS,
|
|
|
+ "Objects deleted in delete requests",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ OBJECT_LIST_REQUEST(StoreStatisticNames.OBJECT_LIST_REQUEST,
|
|
|
+ "Count of object listings made",
|
|
|
+ TYPE_DURATION),
|
|
|
+ OBJECT_CONTINUE_LIST_REQUESTS(
|
|
|
+ StoreStatisticNames.OBJECT_CONTINUE_LIST_REQUEST,
|
|
|
+ "Count of continued object listings made",
|
|
|
+ TYPE_DURATION),
|
|
|
+ OBJECT_METADATA_REQUESTS(
|
|
|
+ StoreStatisticNames.OBJECT_METADATA_REQUESTS,
|
|
|
+ "Count of requests for object metadata",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ OBJECT_MULTIPART_UPLOAD_INITIATED(
|
|
|
+ StoreStatisticNames.OBJECT_MULTIPART_UPLOAD_INITIATED,
|
|
|
+ "Object multipart upload initiated",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ OBJECT_MULTIPART_UPLOAD_ABORTED(
|
|
|
+ StoreStatisticNames.OBJECT_MULTIPART_UPLOAD_ABORTED,
|
|
|
+ "Object multipart upload aborted",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ OBJECT_PUT_REQUESTS(
|
|
|
+ StoreStatisticNames.OBJECT_PUT_REQUEST,
|
|
|
+ "Object put/multipart upload count",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ OBJECT_PUT_REQUESTS_COMPLETED(
|
|
|
+ StoreStatisticNames.OBJECT_PUT_REQUEST_COMPLETED,
|
|
|
+ "Object put/multipart upload completed count",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ OBJECT_PUT_REQUESTS_ACTIVE(
|
|
|
+ StoreStatisticNames.OBJECT_PUT_REQUEST_ACTIVE,
|
|
|
+ "Current number of active put requests",
|
|
|
+ TYPE_GAUGE),
|
|
|
+ OBJECT_PUT_BYTES(
|
|
|
+ StoreStatisticNames.OBJECT_PUT_BYTES,
|
|
|
+ "number of bytes uploaded",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ OBJECT_PUT_BYTES_PENDING(
|
|
|
+ StoreStatisticNames.OBJECT_PUT_BYTES_PENDING,
|
|
|
+ "number of bytes queued for upload/being actively uploaded",
|
|
|
+ TYPE_GAUGE),
|
|
|
+ OBJECT_SELECT_REQUESTS(
|
|
|
+ StoreStatisticNames.OBJECT_SELECT_REQUESTS,
|
|
|
+ "Count of S3 Select requests issued",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_ABORTED(
|
|
|
+ StreamStatisticNames.STREAM_READ_ABORTED,
|
|
|
+ "Count of times the TCP stream was aborted",
|
|
|
+ TYPE_COUNTER),
|
|
|
+
|
|
|
+ /* Stream Reads */
|
|
|
+ STREAM_READ_BYTES(
|
|
|
+ StreamStatisticNames.STREAM_READ_BYTES,
|
|
|
+ "Bytes read from an input stream in read() calls",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_BYTES_DISCARDED_ABORT(
|
|
|
+ StreamStatisticNames.STREAM_READ_BYTES_DISCARDED_ABORT,
|
|
|
+ "Count of bytes discarded by aborting an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_BYTES_READ_CLOSE(
|
|
|
+ StreamStatisticNames.STREAM_READ_BYTES_DISCARDED_CLOSE,
|
|
|
+ "Count of bytes read and discarded when closing an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_CLOSED(
|
|
|
+ StreamStatisticNames.STREAM_READ_CLOSED,
|
|
|
+ "Count of times the TCP stream was closed",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_CLOSE_OPERATIONS(
|
|
|
+ StreamStatisticNames.STREAM_READ_CLOSE_OPERATIONS,
|
|
|
+ "Total count of times an attempt to close an input stream was made",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_EXCEPTIONS(
|
|
|
+ StreamStatisticNames.STREAM_READ_EXCEPTIONS,
|
|
|
+ "Count of exceptions raised during input stream reads",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_FULLY_OPERATIONS(
|
|
|
+ StreamStatisticNames.STREAM_READ_FULLY_OPERATIONS,
|
|
|
+ "Count of readFully() operations in an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_OPENED(
|
|
|
+ StreamStatisticNames.STREAM_READ_OPENED,
|
|
|
+ "Total count of times an input stream to object store data was opened",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_OPERATIONS(
|
|
|
+ StreamStatisticNames.STREAM_READ_OPERATIONS,
|
|
|
+ "Count of read() operations in an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_OPERATIONS_INCOMPLETE(
|
|
|
+ StreamStatisticNames.STREAM_READ_OPERATIONS_INCOMPLETE,
|
|
|
+ "Count of incomplete read() operations in an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_VERSION_MISMATCHES(
|
|
|
+ StreamStatisticNames.STREAM_READ_VERSION_MISMATCHES,
|
|
|
+ "Count of version mismatches encountered while reading an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_SEEK_BACKWARD_OPERATIONS(
|
|
|
+ StreamStatisticNames.STREAM_READ_SEEK_BACKWARD_OPERATIONS,
|
|
|
+ "Count of executed seek operations which went backwards in a stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_SEEK_BYTES_BACKWARDS(
|
|
|
+ StreamStatisticNames.STREAM_READ_SEEK_BYTES_BACKWARDS,
|
|
|
+ "Count of bytes moved backwards during seek operations"
|
|
|
+ + " in an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_SEEK_BYTES_DISCARDED(
|
|
|
+ StreamStatisticNames.STREAM_READ_SEEK_BYTES_DISCARDED,
|
|
|
+ "Count of bytes read and discarded during seek() in an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_SEEK_BYTES_SKIPPED(
|
|
|
+ StreamStatisticNames.STREAM_READ_SEEK_BYTES_SKIPPED,
|
|
|
+ "Count of bytes skipped during forward seek operations"
|
|
|
+ + " an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_SEEK_FORWARD_OPERATIONS(
|
|
|
+ StreamStatisticNames.STREAM_READ_SEEK_FORWARD_OPERATIONS,
|
|
|
+ "Count of executed seek operations which went forward in"
|
|
|
+ + " an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_SEEK_OPERATIONS(
|
|
|
+ StreamStatisticNames.STREAM_READ_SEEK_OPERATIONS,
|
|
|
+ "Count of seek operations in an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_SEEK_POLICY_CHANGED(
|
|
|
+ StreamStatisticNames.STREAM_READ_SEEK_POLICY_CHANGED,
|
|
|
+ "Count of times the seek policy was dynamically changed"
|
|
|
+ + " in an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_READ_TOTAL_BYTES(
|
|
|
+ StreamStatisticNames.STREAM_READ_TOTAL_BYTES,
|
|
|
+ "Total count of bytes read from an input stream",
|
|
|
+ TYPE_COUNTER),
|
|
|
+
|
|
|
+ /* Stream Write statistics */
|
|
|
+
|
|
|
+ STREAM_WRITE_EXCEPTIONS(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_EXCEPTIONS,
|
|
|
+ "Count of stream write failures reported",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_WRITE_EXCEPTIONS_COMPLETING_UPLOADS(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_EXCEPTIONS_COMPLETING_UPLOADS,
|
|
|
+ "Count of failures when finalizing a multipart upload",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_WRITE_BLOCK_UPLOADS(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_BLOCK_UPLOADS,
|
|
|
+ "Count of block/partition uploads completed",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_WRITE_BLOCK_UPLOADS_ACTIVE(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_BLOCK_UPLOADS_ACTIVE,
|
|
|
+ "Count of block/partition uploads active",
|
|
|
+ TYPE_GAUGE),
|
|
|
+ STREAM_WRITE_BLOCK_UPLOADS_COMMITTED(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_BLOCK_UPLOADS_COMMITTED,
|
|
|
+ "Count of number of block uploads committed",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_WRITE_BLOCK_UPLOADS_ABORTED(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_BLOCK_UPLOADS_ABORTED,
|
|
|
+ "Count of number of block uploads aborted",
|
|
|
+ TYPE_COUNTER),
|
|
|
+
|
|
|
+ STREAM_WRITE_BLOCK_UPLOADS_PENDING(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_BLOCK_UPLOADS_PENDING,
|
|
|
+ "Gauge of block/partitions uploads queued to be written",
|
|
|
+ TYPE_GAUGE),
|
|
|
+ STREAM_WRITE_BLOCK_UPLOADS_BYTES_PENDING(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_BLOCK_UPLOADS_BYTES_PENDING,
|
|
|
+ "Gauge of data queued to be written",
|
|
|
+ TYPE_GAUGE),
|
|
|
+ STREAM_WRITE_TOTAL_TIME(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_TOTAL_TIME,
|
|
|
+ "Count of total time taken for uploads to complete",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_WRITE_TOTAL_DATA(StreamStatisticNames.STREAM_WRITE_TOTAL_DATA,
|
|
|
+ "Count of total data uploaded",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_WRITE_BYTES(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_BYTES,
|
|
|
+ "Count of bytes written to output stream"
|
|
|
+ + " (including all not yet uploaded)",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STREAM_WRITE_QUEUE_DURATION(
|
|
|
+ StreamStatisticNames.STREAM_WRITE_QUEUE_DURATION,
|
|
|
+ "Total queue duration of all block uploads",
|
|
|
+ TYPE_DURATION),
|
|
|
+
|
|
|
+ /* committer stats */
|
|
|
COMMITTER_COMMITS_CREATED(
|
|
|
"committer_commits_created",
|
|
|
- "Number of files to commit created"),
|
|
|
+ "Count of files to commit created",
|
|
|
+ TYPE_COUNTER),
|
|
|
COMMITTER_COMMITS_COMPLETED(
|
|
|
"committer_commits_completed",
|
|
|
- "Number of files committed"),
|
|
|
+ "Count of files committed",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ COMMITTER_COMMIT_JOB(
|
|
|
+ "committer_commit_job",
|
|
|
+ "Duration Tracking of time to commit an entire job",
|
|
|
+ TYPE_DURATION),
|
|
|
COMMITTER_JOBS_SUCCEEDED(
|
|
|
"committer_jobs_completed",
|
|
|
- "Number of successful jobs"),
|
|
|
+ "Count of successful jobs",
|
|
|
+ TYPE_COUNTER),
|
|
|
COMMITTER_JOBS_FAILED(
|
|
|
"committer_jobs_failed",
|
|
|
- "Number of failed jobs"),
|
|
|
+ "Count of failed jobs",
|
|
|
+ TYPE_COUNTER),
|
|
|
COMMITTER_TASKS_SUCCEEDED(
|
|
|
"committer_tasks_completed",
|
|
|
- "Number of successful tasks"),
|
|
|
+ "Count of successful tasks",
|
|
|
+ TYPE_COUNTER),
|
|
|
COMMITTER_TASKS_FAILED(
|
|
|
"committer_tasks_failed",
|
|
|
- "Number of failed tasks"),
|
|
|
+ "Count of failed tasks",
|
|
|
+ TYPE_COUNTER),
|
|
|
COMMITTER_BYTES_COMMITTED(
|
|
|
"committer_bytes_committed",
|
|
|
- "Amount of data committed"),
|
|
|
+ "Amount of data committed",
|
|
|
+ TYPE_COUNTER),
|
|
|
COMMITTER_BYTES_UPLOADED(
|
|
|
"committer_bytes_uploaded",
|
|
|
- "Number of bytes uploaded duing commit operations"),
|
|
|
+ "Count of bytes uploaded duing commit operations",
|
|
|
+ TYPE_COUNTER),
|
|
|
COMMITTER_COMMITS_FAILED(
|
|
|
- "committer_commits_failed",
|
|
|
- "Number of commits failed"),
|
|
|
+ "committer_commits"+ StoreStatisticNames.SUFFIX_FAILURES,
|
|
|
+ "Count of commits failed",
|
|
|
+ TYPE_COUNTER),
|
|
|
COMMITTER_COMMITS_ABORTED(
|
|
|
"committer_commits_aborted",
|
|
|
- "Number of commits aborted"),
|
|
|
+ "Count of commits aborted",
|
|
|
+ TYPE_COUNTER),
|
|
|
COMMITTER_COMMITS_REVERTED(
|
|
|
"committer_commits_reverted",
|
|
|
- "Number of commits reverted"),
|
|
|
+ "Count of commits reverted",
|
|
|
+ TYPE_COUNTER),
|
|
|
COMMITTER_MAGIC_FILES_CREATED(
|
|
|
"committer_magic_files_created",
|
|
|
- "Number of files created under 'magic' paths"),
|
|
|
+ "Count of files created under 'magic' paths",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ COMMITTER_MATERIALIZE_FILE(
|
|
|
+ "committer_materialize_file",
|
|
|
+ "Duration Tracking of time to materialize a file in job commit",
|
|
|
+ TYPE_DURATION),
|
|
|
+ COMMITTER_STAGE_FILE_UPLOAD(
|
|
|
+ "committer_stage_file_upload",
|
|
|
+ "Duration Tracking of files uploaded from a local staging path",
|
|
|
+ TYPE_DURATION),
|
|
|
|
|
|
- // S3guard stats
|
|
|
+ /* S3guard stats */
|
|
|
S3GUARD_METADATASTORE_PUT_PATH_REQUEST(
|
|
|
"s3guard_metadatastore_put_path_request",
|
|
|
- "S3Guard metadata store put one metadata path request"),
|
|
|
+ "S3Guard metadata store put one metadata path request",
|
|
|
+ TYPE_COUNTER),
|
|
|
S3GUARD_METADATASTORE_PUT_PATH_LATENCY(
|
|
|
"s3guard_metadatastore_put_path_latency",
|
|
|
- "S3Guard metadata store put one metadata path latency"),
|
|
|
- S3GUARD_METADATASTORE_INITIALIZATION("s3guard_metadatastore_initialization",
|
|
|
- "S3Guard metadata store initialization times"),
|
|
|
+ "S3Guard metadata store put one metadata path latency",
|
|
|
+ TYPE_QUANTILE),
|
|
|
+ S3GUARD_METADATASTORE_INITIALIZATION(
|
|
|
+ "s3guard_metadatastore_initialization",
|
|
|
+ "S3Guard metadata store initialization times",
|
|
|
+ TYPE_COUNTER),
|
|
|
S3GUARD_METADATASTORE_RECORD_DELETES(
|
|
|
"s3guard_metadatastore_record_deletes",
|
|
|
- "S3Guard metadata store records deleted"),
|
|
|
+ "S3Guard metadata store records deleted",
|
|
|
+ TYPE_COUNTER),
|
|
|
S3GUARD_METADATASTORE_RECORD_READS(
|
|
|
"s3guard_metadatastore_record_reads",
|
|
|
- "S3Guard metadata store records read"),
|
|
|
+ "S3Guard metadata store records read",
|
|
|
+ TYPE_COUNTER),
|
|
|
S3GUARD_METADATASTORE_RECORD_WRITES(
|
|
|
"s3guard_metadatastore_record_writes",
|
|
|
- "S3Guard metadata store records written"),
|
|
|
+ "S3Guard metadata store records written",
|
|
|
+ TYPE_COUNTER),
|
|
|
S3GUARD_METADATASTORE_RETRY("s3guard_metadatastore_retry",
|
|
|
- "S3Guard metadata store retry events"),
|
|
|
+ "S3Guard metadata store retry events",
|
|
|
+ TYPE_COUNTER),
|
|
|
S3GUARD_METADATASTORE_THROTTLED("s3guard_metadatastore_throttled",
|
|
|
- "S3Guard metadata store throttled events"),
|
|
|
+ "S3Guard metadata store throttled events",
|
|
|
+ TYPE_COUNTER),
|
|
|
S3GUARD_METADATASTORE_THROTTLE_RATE(
|
|
|
"s3guard_metadatastore_throttle_rate",
|
|
|
- "S3Guard metadata store throttle rate"),
|
|
|
+ "S3Guard metadata store throttle rate",
|
|
|
+ TYPE_QUANTILE),
|
|
|
S3GUARD_METADATASTORE_AUTHORITATIVE_DIRECTORIES_UPDATED(
|
|
|
"s3guard_metadatastore_authoritative_directories_updated",
|
|
|
- "S3Guard metadata store authoritative directories updated from S3"),
|
|
|
-
|
|
|
- STORE_IO_THROTTLED("store_io_throttled", "Requests throttled and retried"),
|
|
|
- STORE_IO_THROTTLE_RATE("store_io_throttle_rate",
|
|
|
- "Rate of S3 request throttling"),
|
|
|
-
|
|
|
- DELEGATION_TOKENS_ISSUED("delegation_tokens_issued",
|
|
|
- "Number of delegation tokens issued"),
|
|
|
-
|
|
|
- MULTIPART_INSTANTIATED(
|
|
|
- "multipart_instantiated",
|
|
|
- "Multipart Uploader Instantiated"),
|
|
|
- MULTIPART_PART_PUT(
|
|
|
- "multipart_part_put",
|
|
|
- "Multipart Part Put Operation"),
|
|
|
- MULTIPART_PART_PUT_BYTES(
|
|
|
- "multipart_part_put_bytes",
|
|
|
- "Multipart Part Put Bytes"),
|
|
|
+ "S3Guard metadata store authoritative directories updated from S3",
|
|
|
+ TYPE_COUNTER),
|
|
|
+
|
|
|
+
|
|
|
+ /* General Store operations */
|
|
|
+ STORE_IO_REQUEST(StoreStatisticNames.STORE_IO_REQUEST,
|
|
|
+ "requests made of the remote store",
|
|
|
+ TYPE_COUNTER),
|
|
|
+
|
|
|
+ STORE_IO_RETRY(StoreStatisticNames.STORE_IO_RETRY,
|
|
|
+ "retried requests made of the remote store",
|
|
|
+ TYPE_COUNTER),
|
|
|
+
|
|
|
+ STORE_IO_THROTTLED(
|
|
|
+ StoreStatisticNames.STORE_IO_THROTTLED,
|
|
|
+ "Requests throttled and retried",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ STORE_IO_THROTTLE_RATE(
|
|
|
+ StoreStatisticNames.STORE_IO_THROTTLE_RATE,
|
|
|
+ "Rate of S3 request throttling",
|
|
|
+ TYPE_QUANTILE),
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Delegation Token Operations.
|
|
|
+ */
|
|
|
+ DELEGATION_TOKEN_ISSUED(
|
|
|
+ StoreStatisticNames.DELEGATION_TOKEN_ISSUED,
|
|
|
+ "Count of delegation tokens issued",
|
|
|
+ TYPE_DURATION),
|
|
|
+
|
|
|
+ /* Multipart Upload API */
|
|
|
+
|
|
|
+ MULTIPART_UPLOAD_INSTANTIATED(
|
|
|
+ StoreStatisticNames.MULTIPART_UPLOAD_INSTANTIATED,
|
|
|
+ "Multipart Uploader Instantiated",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ MULTIPART_UPLOAD_PART_PUT(
|
|
|
+ StoreStatisticNames.MULTIPART_UPLOAD_PART_PUT,
|
|
|
+ "Multipart Part Put Operation",
|
|
|
+ TYPE_COUNTER),
|
|
|
+ MULTIPART_UPLOAD_PART_PUT_BYTES(
|
|
|
+ StoreStatisticNames.MULTIPART_UPLOAD_PART_PUT_BYTES,
|
|
|
+ "Multipart Part Put Bytes",
|
|
|
+ TYPE_COUNTER),
|
|
|
MULTIPART_UPLOAD_ABORTED(
|
|
|
- "multipart_upload_aborted",
|
|
|
- "Multipart Upload Aborted"),
|
|
|
+ StoreStatisticNames.MULTIPART_UPLOAD_ABORTED,
|
|
|
+ "Multipart Upload Aborted",
|
|
|
+ TYPE_COUNTER),
|
|
|
MULTIPART_UPLOAD_ABORT_UNDER_PATH_INVOKED(
|
|
|
- "multipart_upload_abort_under_path_invoked",
|
|
|
- "Multipart Upload Abort Udner Path Invoked"),
|
|
|
+ StoreStatisticNames.MULTIPART_UPLOAD_ABORT_UNDER_PATH_INVOKED,
|
|
|
+ "Multipart Upload Abort Unner Path Invoked",
|
|
|
+ TYPE_COUNTER),
|
|
|
MULTIPART_UPLOAD_COMPLETED(
|
|
|
- "multipart_upload_completed",
|
|
|
- "Multipart Upload Completed"),
|
|
|
+ StoreStatisticNames.MULTIPART_UPLOAD_COMPLETED,
|
|
|
+ "Multipart Upload Completed",
|
|
|
+ TYPE_COUNTER),
|
|
|
MULTIPART_UPLOAD_STARTED(
|
|
|
- "multipart_upload_started",
|
|
|
- "Multipart Upload Started");
|
|
|
+ StoreStatisticNames.MULTIPART_UPLOAD_STARTED,
|
|
|
+ "Multipart Upload Started",
|
|
|
+ TYPE_COUNTER);
|
|
|
+
|
|
|
|
|
|
+ /**
|
|
|
+ * A map used to support the {@link #fromSymbol(String)} call.
|
|
|
+ */
|
|
|
private static final Map<String, Statistic> SYMBOL_MAP =
|
|
|
new HashMap<>(Statistic.values().length);
|
|
|
static {
|
|
@@ -268,14 +524,28 @@ public enum Statistic {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Statistic(String symbol, String description) {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Statistic definition.
|
|
|
+ * @param symbol name
|
|
|
+ * @param description description.
|
|
|
+ * @param type type
|
|
|
+ */
|
|
|
+ Statistic(String symbol, String description, StatisticTypeEnum type) {
|
|
|
this.symbol = symbol;
|
|
|
this.description = description;
|
|
|
+ this.type = type;
|
|
|
}
|
|
|
|
|
|
+ /** Statistic name. */
|
|
|
private final String symbol;
|
|
|
+
|
|
|
+ /** Statistic description. */
|
|
|
private final String description;
|
|
|
|
|
|
+ /** Statistic type. */
|
|
|
+ private final StatisticTypeEnum type;
|
|
|
+
|
|
|
public String getSymbol() {
|
|
|
return symbol;
|
|
|
}
|
|
@@ -302,4 +572,12 @@ public enum Statistic {
|
|
|
public String toString() {
|
|
|
return symbol;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * What type is this statistic?
|
|
|
+ * @return the type.
|
|
|
+ */
|
|
|
+ public StatisticTypeEnum getType() {
|
|
|
+ return type;
|
|
|
+ }
|
|
|
}
|