Before, for service id sid
, om1 config will be like:
ozone.om.address.sid.om1=0.0.0.0
ozone.om.address.sid.om2=om2
ozone.om.address.sid.om3=om3
import os | |
import sys | |
pid = os.getpid() | |
with open(f"/proc/{pid}/status") as fp: | |
for line in fp.readlines(): | |
if line.startswith("Cap"): | |
print(line.strip()) |
diff --git a/instrumentation/net/http/otelhttp/example/server/server.go b/instrumentation/net/http/otelhttp/example/server/server.go | |
index 7389c267..f128042b 100644 | |
--- a/instrumentation/net/http/otelhttp/example/server/server.go | |
+++ b/instrumentation/net/http/otelhttp/example/server/server.go | |
@@ -19,6 +19,7 @@ import ( | |
"io" | |
"log" | |
"net/http" | |
+ "sync" |
import java.util.function.Function; | |
import java.lang.Long; | |
class Bench { | |
public static void main(String[] args) { | |
bench("noop ", (l) -> ""); | |
bench("Long.toHexString()", (l) -> Long.toHexString(l)); | |
bench("byteString.... ", (l) -> sfy(l)); | |
bench("String.format(...)", (l) -> String.format("%016X", l)); |
class HelloWorld { | |
public static void main(String[] args) { | |
bench1(); | |
bench2(); | |
} | |
static void bench1() { | |
long repeat = 1000000000L; | |
long start = java.lang.System.currentTimeMillis(); | |
for (long i = 0; i < repeat; i++) { |
InitiateMultipartUpload -> UploadPart (xN) -> CompleteMultipartUpload
+-> AbortMultipartUpload
getClientProtocol(config, serviceId)
している https://github.com/apache/ozone/blob/f2406c4b4eb2b1295d06ec379cfe684ed9a16637/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneClientFactory.java#L243new RpcClient(config, serviceId)
している https://github.com/apache/ozone/blob/f2406c4b4eb2b1295d06ec379cfe684ed9a16637/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java#L154 OmTransport omTransport = OmTransportFactory.create(conf, ugi, omServiceId);
# | |
# 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 |
#!/usr/bin/python | |
# @lint-avoid-python-3-compatibility-imports | |
# | |
# zfsslower Trace slow ZFS operations. | |
# For Linux, uses BCC, eBPF. | |
# | |
# USAGE: zfsslower [-h] [-j] [-p PID] [min_ms] | |
# | |
# This script traces common ZFS file operations: reads, writes, opens, and | |
# syncs. It measures the time spent in these operations, and prints details |
import sys | |
def char(i): | |
''' | |
0-9A-Z => sp(decimal) | |
''' | |
if i >= 0 and i <= 9: | |
return chr(ord('0')+i) | |
elif i < 36: | |
return chr(ord('A')+i-10) |