| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>Source code</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta name="description" content="source: package: org.apache.hadoop.hbase.trace, class: HBaseSemanticAttributes, enum: RpcSystem"> |
| <meta name="generator" content="javadoc/SourceToHTMLConverter"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body class="source-page"> |
| <main role="main"> |
| <div class="source-container"> |
| <pre><span class="source-line-no">001</span><span id="line-1">/*</span> |
| <span class="source-line-no">002</span><span id="line-2"> * Licensed to the Apache Software Foundation (ASF) under one</span> |
| <span class="source-line-no">003</span><span id="line-3"> * or more contributor license agreements. See the NOTICE file</span> |
| <span class="source-line-no">004</span><span id="line-4"> * distributed with this work for additional information</span> |
| <span class="source-line-no">005</span><span id="line-5"> * regarding copyright ownership. The ASF licenses this file</span> |
| <span class="source-line-no">006</span><span id="line-6"> * to you under the Apache License, Version 2.0 (the</span> |
| <span class="source-line-no">007</span><span id="line-7"> * "License"); you may not use this file except in compliance</span> |
| <span class="source-line-no">008</span><span id="line-8"> * with the License. You may obtain a copy of the License at</span> |
| <span class="source-line-no">009</span><span id="line-9"> *</span> |
| <span class="source-line-no">010</span><span id="line-10"> * http://www.apache.org/licenses/LICENSE-2.0</span> |
| <span class="source-line-no">011</span><span id="line-11"> *</span> |
| <span class="source-line-no">012</span><span id="line-12"> * Unless required by applicable law or agreed to in writing, software</span> |
| <span class="source-line-no">013</span><span id="line-13"> * distributed under the License is distributed on an "AS IS" BASIS,</span> |
| <span class="source-line-no">014</span><span id="line-14"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> |
| <span class="source-line-no">015</span><span id="line-15"> * See the License for the specific language governing permissions and</span> |
| <span class="source-line-no">016</span><span id="line-16"> * limitations under the License.</span> |
| <span class="source-line-no">017</span><span id="line-17"> */</span> |
| <span class="source-line-no">018</span><span id="line-18">package org.apache.hadoop.hbase.trace;</span> |
| <span class="source-line-no">019</span><span id="line-19"></span> |
| <span class="source-line-no">020</span><span id="line-20">import io.opentelemetry.api.common.AttributeKey;</span> |
| <span class="source-line-no">021</span><span id="line-21">import io.opentelemetry.semconv.SemanticAttributes;</span> |
| <span class="source-line-no">022</span><span id="line-22">import java.nio.ByteBuffer;</span> |
| <span class="source-line-no">023</span><span id="line-23">import java.util.List;</span> |
| <span class="source-line-no">024</span><span id="line-24">import org.apache.yetus.audience.InterfaceAudience;</span> |
| <span class="source-line-no">025</span><span id="line-25"></span> |
| <span class="source-line-no">026</span><span id="line-26">/**</span> |
| <span class="source-line-no">027</span><span id="line-27"> * The constants in this class correspond with the guidance outlined by the OpenTelemetry <a href=</span> |
| <span class="source-line-no">028</span><span id="line-28"> * "https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/trace/semantic_conventions">Semantic</span> |
| <span class="source-line-no">029</span><span id="line-29"> * Conventions</a>.</span> |
| <span class="source-line-no">030</span><span id="line-30"> */</span> |
| <span class="source-line-no">031</span><span id="line-31">@InterfaceAudience.Private</span> |
| <span class="source-line-no">032</span><span id="line-32">public final class HBaseSemanticAttributes {</span> |
| <span class="source-line-no">033</span><span id="line-33"> public static final AttributeKey<String> DB_SYSTEM = SemanticAttributes.DB_SYSTEM;</span> |
| <span class="source-line-no">034</span><span id="line-34"> public static final String DB_SYSTEM_VALUE = SemanticAttributes.DbSystemValues.HBASE;</span> |
| <span class="source-line-no">035</span><span id="line-35"> public static final AttributeKey<String> DB_CONNECTION_STRING =</span> |
| <span class="source-line-no">036</span><span id="line-36"> SemanticAttributes.DB_CONNECTION_STRING;</span> |
| <span class="source-line-no">037</span><span id="line-37"> public static final AttributeKey<String> DB_USER = SemanticAttributes.DB_USER;</span> |
| <span class="source-line-no">038</span><span id="line-38"> public static final AttributeKey<String> DB_NAME = SemanticAttributes.DB_NAME;</span> |
| <span class="source-line-no">039</span><span id="line-39"> public static final AttributeKey<String> DB_OPERATION = SemanticAttributes.DB_OPERATION;</span> |
| <span class="source-line-no">040</span><span id="line-40"> public static final AttributeKey<String> TABLE_KEY = AttributeKey.stringKey("db.hbase.table");</span> |
| <span class="source-line-no">041</span><span id="line-41"> /**</span> |
| <span class="source-line-no">042</span><span id="line-42"> * For operations that themselves ship one or more operations, such as {@link Operation#BATCH} and</span> |
| <span class="source-line-no">043</span><span id="line-43"> * {@link Operation#CHECK_AND_MUTATE}.</span> |
| <span class="source-line-no">044</span><span id="line-44"> */</span> |
| <span class="source-line-no">045</span><span id="line-45"> public static final AttributeKey<List<String>> CONTAINER_DB_OPERATIONS_KEY =</span> |
| <span class="source-line-no">046</span><span id="line-46"> AttributeKey.stringArrayKey("db.hbase.container_operations");</span> |
| <span class="source-line-no">047</span><span id="line-47"> public static final AttributeKey<List<String>> REGION_NAMES_KEY =</span> |
| <span class="source-line-no">048</span><span id="line-48"> AttributeKey.stringArrayKey("db.hbase.regions");</span> |
| <span class="source-line-no">049</span><span id="line-49"> public static final AttributeKey<String> RPC_SYSTEM = SemanticAttributes.RPC_SYSTEM;</span> |
| <span class="source-line-no">050</span><span id="line-50"> public static final AttributeKey<String> RPC_SERVICE = SemanticAttributes.RPC_SERVICE;</span> |
| <span class="source-line-no">051</span><span id="line-51"> public static final AttributeKey<String> RPC_METHOD = SemanticAttributes.RPC_METHOD;</span> |
| <span class="source-line-no">052</span><span id="line-52"> public static final AttributeKey<String> SERVER_NAME_KEY =</span> |
| <span class="source-line-no">053</span><span id="line-53"> AttributeKey.stringKey("db.hbase.server.name");</span> |
| <span class="source-line-no">054</span><span id="line-54"> public static final AttributeKey<String> NET_PEER_NAME = SemanticAttributes.NET_PEER_NAME;</span> |
| <span class="source-line-no">055</span><span id="line-55"> public static final AttributeKey<Long> NET_PEER_PORT = SemanticAttributes.NET_PEER_PORT;</span> |
| <span class="source-line-no">056</span><span id="line-56"> public static final AttributeKey<Boolean> ROW_LOCK_READ_LOCK_KEY =</span> |
| <span class="source-line-no">057</span><span id="line-57"> AttributeKey.booleanKey("db.hbase.rowlock.readlock");</span> |
| <span class="source-line-no">058</span><span id="line-58"> public static final AttributeKey<String> WAL_IMPL = AttributeKey.stringKey("db.hbase.wal.impl");</span> |
| <span class="source-line-no">059</span><span id="line-59"></span> |
| <span class="source-line-no">060</span><span id="line-60"> public static final AttributeKey<String> EXCEPTION_TYPE = SemanticAttributes.EXCEPTION_TYPE;</span> |
| <span class="source-line-no">061</span><span id="line-61"> public static final AttributeKey<String> EXCEPTION_MESSAGE = SemanticAttributes.EXCEPTION_MESSAGE;</span> |
| <span class="source-line-no">062</span><span id="line-62"> public static final String EXCEPTION_EVENT_NAME = SemanticAttributes.EXCEPTION_EVENT_NAME;</span> |
| <span class="source-line-no">063</span><span id="line-63"></span> |
| <span class="source-line-no">064</span><span id="line-64"> /**</span> |
| <span class="source-line-no">065</span><span id="line-65"> * Indicates the amount of data was read into a {@link ByteBuffer} of type</span> |
| <span class="source-line-no">066</span><span id="line-66"> * {@link ByteBuffer#isDirect() direct}.</span> |
| <span class="source-line-no">067</span><span id="line-67"> */</span> |
| <span class="source-line-no">068</span><span id="line-68"> public static final AttributeKey<Long> DIRECT_BYTES_READ_KEY =</span> |
| <span class="source-line-no">069</span><span id="line-69"> AttributeKey.longKey("db.hbase.io.direct_bytes_read");</span> |
| <span class="source-line-no">070</span><span id="line-70"> /**</span> |
| <span class="source-line-no">071</span><span id="line-71"> * Indicates the amount of data was read into a {@link ByteBuffer} not of type</span> |
| <span class="source-line-no">072</span><span id="line-72"> * {@link ByteBuffer#isDirect() direct}.</span> |
| <span class="source-line-no">073</span><span id="line-73"> */</span> |
| <span class="source-line-no">074</span><span id="line-74"> public static final AttributeKey<Long> HEAP_BYTES_READ_KEY =</span> |
| <span class="source-line-no">075</span><span id="line-75"> AttributeKey.longKey("db.hbase.io.heap_bytes_read");</span> |
| <span class="source-line-no">076</span><span id="line-76"> /**</span> |
| <span class="source-line-no">077</span><span id="line-77"> * Indicates the {@link org.apache.hadoop.hbase.io.compress.Compression.Algorithm} used to encode</span> |
| <span class="source-line-no">078</span><span id="line-78"> * an HFile.</span> |
| <span class="source-line-no">079</span><span id="line-79"> */</span> |
| <span class="source-line-no">080</span><span id="line-80"> public static final AttributeKey<String> COMPRESSION_ALGORITHM_KEY =</span> |
| <span class="source-line-no">081</span><span id="line-81"> AttributeKey.stringKey("db.hbase.io.hfile.data_block_encoding");</span> |
| <span class="source-line-no">082</span><span id="line-82"> /**</span> |
| <span class="source-line-no">083</span><span id="line-83"> * Indicates the {@link org.apache.hadoop.hbase.io.encoding.DataBlockEncoding} algorithm used to</span> |
| <span class="source-line-no">084</span><span id="line-84"> * encode this HFile.</span> |
| <span class="source-line-no">085</span><span id="line-85"> */</span> |
| <span class="source-line-no">086</span><span id="line-86"> public static final AttributeKey<String> DATA_BLOCK_ENCODING_KEY =</span> |
| <span class="source-line-no">087</span><span id="line-87"> AttributeKey.stringKey("db.hbase.io.hfile.data_block_encoding");</span> |
| <span class="source-line-no">088</span><span id="line-88"> /**</span> |
| <span class="source-line-no">089</span><span id="line-89"> * Indicates the {@link org.apache.hadoop.hbase.io.crypto.Cipher} used to encrypt this HFile.</span> |
| <span class="source-line-no">090</span><span id="line-90"> */</span> |
| <span class="source-line-no">091</span><span id="line-91"> public static final AttributeKey<String> ENCRYPTION_CIPHER_KEY =</span> |
| <span class="source-line-no">092</span><span id="line-92"> AttributeKey.stringKey("db.hbase.io.hfile.encryption_cipher");</span> |
| <span class="source-line-no">093</span><span id="line-93"> /**</span> |
| <span class="source-line-no">094</span><span id="line-94"> * Indicates the {@link org.apache.hadoop.hbase.util.ChecksumType} used to encode this HFile.</span> |
| <span class="source-line-no">095</span><span id="line-95"> */</span> |
| <span class="source-line-no">096</span><span id="line-96"> public static final AttributeKey<String> CHECKSUM_KEY =</span> |
| <span class="source-line-no">097</span><span id="line-97"> AttributeKey.stringKey("db.hbase.io.hfile.checksum_type");</span> |
| <span class="source-line-no">098</span><span id="line-98"> /**</span> |
| <span class="source-line-no">099</span><span id="line-99"> * Indicates the name of the HFile accessed.</span> |
| <span class="source-line-no">100</span><span id="line-100"> */</span> |
| <span class="source-line-no">101</span><span id="line-101"> public static final AttributeKey<String> HFILE_NAME_KEY =</span> |
| <span class="source-line-no">102</span><span id="line-102"> AttributeKey.stringKey("db.hbase.io.hfile.file_name");</span> |
| <span class="source-line-no">103</span><span id="line-103"> /**</span> |
| <span class="source-line-no">104</span><span id="line-104"> * Indicated the type of read.</span> |
| <span class="source-line-no">105</span><span id="line-105"> */</span> |
| <span class="source-line-no">106</span><span id="line-106"> public static final AttributeKey<String> READ_TYPE_KEY =</span> |
| <span class="source-line-no">107</span><span id="line-107"> AttributeKey.stringKey("db.hbase.io.hfile.read_type");</span> |
| <span class="source-line-no">108</span><span id="line-108"> /**</span> |
| <span class="source-line-no">109</span><span id="line-109"> * Identifies an entry in the Block Cache.</span> |
| <span class="source-line-no">110</span><span id="line-110"> */</span> |
| <span class="source-line-no">111</span><span id="line-111"> public static final AttributeKey<String> BLOCK_CACHE_KEY_KEY =</span> |
| <span class="source-line-no">112</span><span id="line-112"> AttributeKey.stringKey("db.hbase.io.hfile.block_cache_key");</span> |
| <span class="source-line-no">113</span><span id="line-113"></span> |
| <span class="source-line-no">114</span><span id="line-114"> /**</span> |
| <span class="source-line-no">115</span><span id="line-115"> * These values represent the different IO read strategies HBase may employ for accessing</span> |
| <span class="source-line-no">116</span><span id="line-116"> * filesystem data.</span> |
| <span class="source-line-no">117</span><span id="line-117"> */</span> |
| <span class="source-line-no">118</span><span id="line-118"> public enum ReadType {</span> |
| <span class="source-line-no">119</span><span id="line-119"> // TODO: promote this to the FSReader#readBlockData API. Or somehow instead use Scan.ReadType.</span> |
| <span class="source-line-no">120</span><span id="line-120"> POSITIONAL_READ,</span> |
| <span class="source-line-no">121</span><span id="line-121"> SEEK_PLUS_READ,</span> |
| <span class="source-line-no">122</span><span id="line-122"> }</span> |
| <span class="source-line-no">123</span><span id="line-123"></span> |
| <span class="source-line-no">124</span><span id="line-124"> /**</span> |
| <span class="source-line-no">125</span><span id="line-125"> * These are values used with {@link #DB_OPERATION}. They correspond with the implementations of</span> |
| <span class="source-line-no">126</span><span id="line-126"> * {@code org.apache.hadoop.hbase.client.Operation}, as well as</span> |
| <span class="source-line-no">127</span><span id="line-127"> * {@code org.apache.hadoop.hbase.client.CheckAndMutate}, and "MULTI", meaning a batch of multiple</span> |
| <span class="source-line-no">128</span><span id="line-128"> * operations.</span> |
| <span class="source-line-no">129</span><span id="line-129"> */</span> |
| <span class="source-line-no">130</span><span id="line-130"> public enum Operation {</span> |
| <span class="source-line-no">131</span><span id="line-131"> APPEND,</span> |
| <span class="source-line-no">132</span><span id="line-132"> BATCH,</span> |
| <span class="source-line-no">133</span><span id="line-133"> CHECK_AND_MUTATE,</span> |
| <span class="source-line-no">134</span><span id="line-134"> COPROC_EXEC,</span> |
| <span class="source-line-no">135</span><span id="line-135"> DELETE,</span> |
| <span class="source-line-no">136</span><span id="line-136"> GET,</span> |
| <span class="source-line-no">137</span><span id="line-137"> INCREMENT,</span> |
| <span class="source-line-no">138</span><span id="line-138"> PUT,</span> |
| <span class="source-line-no">139</span><span id="line-139"> SCAN,</span> |
| <span class="source-line-no">140</span><span id="line-140"> }</span> |
| <span class="source-line-no">141</span><span id="line-141"></span> |
| <span class="source-line-no">142</span><span id="line-142"> /**</span> |
| <span class="source-line-no">143</span><span id="line-143"> * These are values used with {@link #RPC_SYSTEM}. Only a single value for now; more to come as we</span> |
| <span class="source-line-no">144</span><span id="line-144"> * add tracing over our gateway components.</span> |
| <span class="source-line-no">145</span><span id="line-145"> */</span> |
| <span class="source-line-no">146</span><span id="line-146"> public enum RpcSystem {</span> |
| <span class="source-line-no">147</span><span id="line-147"> HBASE_RPC,</span> |
| <span class="source-line-no">148</span><span id="line-148"> }</span> |
| <span class="source-line-no">149</span><span id="line-149"></span> |
| <span class="source-line-no">150</span><span id="line-150"> private HBaseSemanticAttributes() {</span> |
| <span class="source-line-no">151</span><span id="line-151"> }</span> |
| <span class="source-line-no">152</span><span id="line-152">}</span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| </pre> |
| </div> |
| </main> |
| </body> |
| </html> |