6.824 Lab2

Raft

Raft 是一个实现分布式共识的协议,主要解决的是分布式一致性的问题。

Overview

假设现在有一个 Raft 架构的服务。我们将这个服务分为三层,Client,Service,Raft。Client 层首先发送请求给 Service 层,然后 Service 层解析请求为command,将command发送给 Raft 层的 Leader。Leader 在一定时间内通知 Service 层 “apply” 包含这个command的日志,Service 层才可以将这条日志保存到状态机,进而返回对应的结果给 Client 层。并且因为 Raft 层不应该存储过多的 log,所以 Service 层还会将 applied 的 log 压缩成快照,以便快速应用。

6.824 Lab1

Lab1 MapReduce

Paper

MapReduce: Simplified Data Processing on Large Clusters

MapReduce 将分布式系统处理数据的细节(并行、容错、局部性优化、负载均衡等)隐藏起来,提供一套简化方案,解决了在多台机器处理大量逻辑简单的计算(分布式计算)实现复杂的问题。

6.824

MIT 6.824(现在好像变成了 6.5840

reference

schedule

go concurrency

PingCAP Raft

Wenzha Zhang

OneSizeFitsQuorum

Efficient debug and test

Debugging by Pretty Printing

Humans are visual creatures so it’s a good idea to make use of visual tools like colors or columns to encode different types of information.

  1. dslogs.py -> build pretty printer for logs
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/usr/bin/env python
import sys
import shutil
from typing import Optional, List, Tuple, Dict

import typer
from rich import print
from rich.columns import Columns
from rich.console import Console
from rich.traceback import install

# fmt: off
# Mapping from topics to colors
TOPICS = {
    "TIMR": "#9a9a99",
    "VOTE": "#67a0b2",
    "LEAD": "#d0b343",
    "TERM": "#70c43f",
    "LOG1": "#4878bc",
    "LOG2": "#398280",
    "CMIT": "#98719f",
    "PERS": "#d08341",
    "SNAP": "#FD971F",
    "DROP": "#ff615c",
    "CLNT": "#00813c",
    "TEST": "#fe2c79",
    "INFO": "#ffffff",
    "WARN": "#d08341",
    "ERRO": "#fe2626",
    "TRCE": "#fe2626",
    "FORC": "#3571a4",
    "HEAR": "#ffcf3e",
    "STAT": "#cf5fb4"
}
# fmt: on


def list_topics(value: Optional[str]):
    if value is None:
        return value
    topics = value.split(",")
    for topic in topics:
        if topic not in TOPICS:
            raise typer.BadParameter(f"topic {topic} not recognized")
    return topics


def main(
    file: typer.FileText = typer.Argument(None, help="File to read, stdin otherwise"),
    colorize: bool = typer.Option(True, "--no-color"),
    n_columns: Optional[int] = typer.Option(None, "--columns", "-c"),
    ignore: Optional[str] = typer.Option(None, "--ignore", "-i", callback=list_topics),
    just: Optional[str] = typer.Option(None, "--just", "-j", callback=list_topics),
):
    topics = list(TOPICS)

    # We can take input from a stdin (pipes) or from a file
    input_ = file if file else sys.stdin
    # Print just some topics or exclude some topics (good for avoiding verbose ones)
    if just:
        topics = just
    if ignore:
        topics = [lvl for lvl in topics if lvl not in set(ignore)]

    topics = set(topics)
    console = Console()
    width = console.size.width

    panic = False
    for line in input_:
        try:
            time, topic, *msg = line.strip().split(" ")
            # To ignore some topics
            if topic not in topics:
                continue

            msg = " ".join(msg)

            # Debug calls from the test suite aren't associated with
            # any particular peer. Otherwise we can treat second column
            # as peer id
            if topic != "TEST":
                i = int(msg[1])

            # Colorize output by using rich syntax when needed
            if colorize and topic in TOPICS:
                color = TOPICS[topic]
                msg = f"[{color}]{msg}[/{color}]"

            # Single column printing. Always the case for debug stmts in tests
            if n_columns is None or topic == "TEST":
                print(time, msg)
            # Multi column printing, timing is dropped to maximize horizontal
            # space. Heavylifting is done through rich.column.Columns object
            else:
                cols = ["" for _ in range(n_columns)]
                msg = "" + msg
                cols[i] = msg
                col_width = int(width / n_columns)
                cols = Columns(cols, width=col_width - 1, equal=True, expand=True)
                print(cols)
        except:
            # Code from tests or panics does not follow format
            # so we print it as is
            if line.startswith("panic"):
                panic = True
            # Output from tests is usually important so add a
            # horizontal line with hashes to make it more obvious
            if not panic:
                print("#" * console.width)
            print(line, end="")


if __name__ == "__main__":
    typer.run(main)
  1. dstest.py -> concurrency test
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
#!/usr/bin/env python

import itertools
import math
import signal
import subprocess
import tempfile
import shutil
import time
import os
import sys
import datetime
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor, wait, FIRST_COMPLETED
from dataclasses import dataclass
from pathlib import Path
from typing import List, Optional, Dict, DefaultDict, Tuple

import typer
import rich
from rich import print
from rich.table import Table
from rich.progress import (
    Progress,
    TimeElapsedColumn,
    TimeRemainingColumn,
    TextColumn,
    BarColumn,
    SpinnerColumn,
)
from rich.live import Live
from rich.panel import Panel
from rich.traceback import install

install(show_locals=True)


@dataclass
class StatsMeter:
    """
    Auxiliary classs to keep track of online stats including: count, mean, variance
    Uses Welford's algorithm to compute sample mean and sample variance incrementally.
    https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#On-line_algorithm
    """

    n: int = 0
    mean: float = 0.0
    S: float = 0.0

    def add(self, datum):
        self.n += 1
        delta = datum - self.mean
        # Mk = Mk-1+ (xk – Mk-1)/k
        self.mean += delta / self.n
        # Sk = Sk-1 + (xk – Mk-1)*(xk – Mk).
        self.S += delta * (datum - self.mean)

    @property
    def variance(self):
        return self.S / self.n

    @property
    def std(self):
        return math.sqrt(self.variance)


def print_results(results: Dict[str, Dict[str, StatsMeter]], timing=False):
    table = Table(show_header=True, header_style="bold")
    table.add_column("Test")
    table.add_column("Failed", justify="right")
    table.add_column("Total", justify="right")
    if not timing:
        table.add_column("Time", justify="right")
    else:
        table.add_column("Real Time", justify="right")
        table.add_column("User Time", justify="right")
        table.add_column("System Time", justify="right")

    for test, stats in results.items():
        if stats["completed"].n == 0:
            continue
        color = "green" if stats["failed"].n == 0 else "red"
        row = [
            f"[{color}]{test}[/{color}]",
            str(stats["failed"].n),
            str(stats["completed"].n),
        ]
        if not timing:
            row.append(f"{stats['time'].mean:.2f} ± {stats['time'].std:.2f}")
        else:
            row.extend(
                [
                    f"{stats['real_time'].mean:.2f} ± {stats['real_time'].std:.2f}",
                    f"{stats['user_time'].mean:.2f} ± {stats['user_time'].std:.2f}",
                    f"{stats['system_time'].mean:.2f} ± {stats['system_time'].std:.2f}",
                ]
            )
        table.add_row(*row)

    print(table)


def run_test(test: str, race: bool, timing: bool):
    test_cmd = ["go", "test", f"-run={test}"]
    if race:
        test_cmd.append("-race")
    if timing:
        test_cmd = ["time"] + test_cmd
    f, path = tempfile.mkstemp()
    start = time.time()
    proc = subprocess.run(test_cmd, stdout=f, stderr=f)
    runtime = time.time() - start
    os.close(f)
    return test, path, proc.returncode, runtime


def last_line(file: str) -> str:
    with open(file, "rb") as f:
        f.seek(-2, os.SEEK_END)
        while f.read(1) != b"\n":
            f.seek(-2, os.SEEK_CUR)
        line = f.readline().decode()
    return line


# fmt: off
def run_tests(
    tests: List[str],
    sequential: bool       = typer.Option(False,  '--sequential',      '-s',    help='Run all test of each group in order'),
    workers: int           = typer.Option(1,      '--workers',         '-p',    help='Number of parallel tasks'),
    iterations: int        = typer.Option(10,     '--iter',            '-n',    help='Number of iterations to run'),
    output: Optional[Path] = typer.Option(None,   '--output',          '-o',    help='Output path to use'),
    verbose: int           = typer.Option(0,      '--verbose',         '-v',    help='Verbosity level', count=True),
    archive: bool          = typer.Option(False,  '--archive',         '-a',    help='Save all logs intead of only failed ones'),
    race: bool             = typer.Option(False,  '--race/--no-race',  '-r/-R', help='Run with race checker'),
    loop: bool             = typer.Option(False,  '--loop',            '-l',    help='Run continuously'),
    growth: int            = typer.Option(10,     '--growth',          '-g',    help='Growth ratio of iterations when using --loop'),
    timing: bool           = typer.Option(False,   '--timing',          '-t',    help='Report timing, only works on macOS'),
    # fmt: on
):

    if output is None:
        timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
        output = Path(timestamp)

    if race:
        print("[yellow]Running with the race detector\n[/yellow]")

    if verbose > 0:
        print(f"[yellow] Verbosity level set to {verbose}[/yellow]")
        os.environ['VERBOSE'] = str(verbose)

    while True:

        total = iterations * len(tests)
        completed = 0

        results = {test: defaultdict(StatsMeter) for test in tests}

        if sequential:
            test_instances = itertools.chain.from_iterable(itertools.repeat(test, iterations) for test in tests)
        else:
            test_instances = itertools.chain.from_iterable(itertools.repeat(tests, iterations))
        test_instances = iter(test_instances)

        total_progress = Progress(
            "[progress.description]{task.description}",
            BarColumn(),
            TimeRemainingColumn(),
            "[progress.percentage]{task.percentage:>3.0f}%",
            TimeElapsedColumn(),
        )
        total_task = total_progress.add_task("[yellow]Tests[/yellow]", total=total)

        task_progress = Progress(
            "[progress.description]{task.description}",
            SpinnerColumn(),
            BarColumn(),
            "{task.completed}/{task.total}",
        )
        tasks = {test: task_progress.add_task(test, total=iterations) for test in tests}

        progress_table = Table.grid()
        progress_table.add_row(total_progress)
        progress_table.add_row(Panel.fit(task_progress))

        with Live(progress_table, transient=True) as live:

            def handler(_, frame):
                live.stop()
                print('\n')
                print_results(results)
                sys.exit(1)

            signal.signal(signal.SIGINT, handler)

            with ThreadPoolExecutor(max_workers=workers) as executor:

                futures = []
                while completed < total:
                    n = len(futures)
                    if n < workers:
                        for test in itertools.islice(test_instances, workers-n):
                            futures.append(executor.submit(run_test, test, race, timing))

                    done, not_done = wait(futures, return_when=FIRST_COMPLETED)

                    for future in done:
                        test, path, rc, runtime = future.result()

                        results[test]['completed'].add(1)
                        results[test]['time'].add(runtime)
                        task_progress.update(tasks[test], advance=1)
                        dest = (output / f"{test}_{completed}.log").as_posix()
                        if rc != 0:
                            print(f"Failed test {test} - {dest}")
                            task_progress.update(tasks[test], description=f"[red]{test}[/red]")
                            results[test]['failed'].add(1)
                        else:
                            if results[test]['completed'].n == iterations and results[test]['failed'].n == 0:
                                task_progress.update(tasks[test], description=f"[green]{test}[/green]")

                        if rc != 0 or archive:
                            output.mkdir(exist_ok=True, parents=True)
                            shutil.copy(path, dest)
 
                        if timing:
                            line = last_line(path)
                            real, _, user, _, system, _ = line.replace(' '*8, '').split(' ')
                            results[test]['real_time'].add(float(real))
                            results[test]['user_time'].add(float(user))
                            results[test]['system_time'].add(float(system))

                        os.remove(path)

                        completed += 1
                        total_progress.update(total_task, advance=1)

                        futures = list(not_done)

        print_results(results, timing)

        if loop:
            iterations *= growth
            print(f"[yellow]Increasing iterations to {iterations}[/yellow]")
        else:
            break


if __name__ == "__main__":
    typer.run(run_tests)
  1. configuration
1
2
3
# ~/.zshrc 
alias dslogs="python ~/.pyScript/dslogs.py"
alias dstest="python ~/.pyScript/dstest.py"
  • dslogs

VERBOSE=1 go test > out

RPC

RPC

Remote Procedure Call

特点

RPC 与 HTTP 并不是并列关系,RPC 是远程过程调用的规约,可以用 HTTP 进行信息的传输。

RPC 的主要目的是做到不同服务间调用方法像同一服务间调用本地方法一样。

大致流程是编码(protobuf),传输,接收,解码

go-zero 单体服务

go-zero

go-zero 简介

go-zero是一个能够快速生成 API,MODEL 和 RPC 的框架。

go-zero 项目结构(不含 RPC)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.
├── api
│   ├── etc
│   │   └── park-api.yaml
│   ├── internal
│   │   ├── config
│   │   │   └── config.go
│   │   ├── handler
│   │   │   ├── accessHandler.go
│   │   │   ├── deviceInfoHandler.go
│   │   │   ├── incomeHandler.go
│   │   │   ├── parkingLotHandler.go
│   │   │   ├── routes.go
│   │   │   ├── siteInfoHandler.go
│   │   │   ├── touristCarProvinceHandler.go
│   │   │   ├── touristFlowHandler.go
│   │   │   ├── userHandler.go
│   │   │   └── wechatHandler.go
│   │   ├── logic
│   │   │   ├── accessLogic.go
│   │   │   ├── deviceInfoLogic.go
│   │   │   ├── incomeLogic.go
│   │   │   ├── parkingLotLogic.go
│   │   │   ├── siteInfoLogic.go
│   │   │   ├── touristCarProvinceLogic.go
│   │   │   ├── touristFlowLogic.go
│   │   │   ├── userLogic.go
│   │   │   └── wechatLogic.go
│   │   ├── svc
│   │   │   └── serviceContext.go
│   │   └── types
│   │       └── types.go
│   ├── park.api
│   ├── park.go
│   └── park.md
├── genModel
│   ├── model
│   │   ├── accessModel.go
│   │   ├── accessModel_gen.go
│   │   ├── deviceInfoModel.go
│   │   ├── deviceInfoModel_gen.go
│   │   ├── incomeModel.go
│   │   ├── incomeModel_gen.go
│   │   ├── logErrModel.go
│   │   ├── logErrModel_gen.go
│   │   ├── parkingLotModel.go
│   │   ├── parkingLotModel_gen.go
│   │   ├── siteInfoModel.go
│   │   ├── siteInfoModel_gen.go
│   │   ├── touristCarProvinceModel.go
│   │   ├── touristCarProvinceModel_gen.go
│   │   ├── touristFlowModel.go
│   │   ├── touristFlowModel_gen.go
│   │   ├── userModel.go
│   │   ├── userModel_gen.go
│   │   ├── vars.go
│   │   ├── wechatModel.go
│   │   └── wechatModel_gen.go
│   └── resources
│       ├── genModel.sh
│       └── park.sql
├── go.mod
├── go.sum
└── model
    ├── accessModel.go
    ├── accessModel_gen.go
    ├── deviceInfoModel.go
    ├── deviceInfoModel_gen.go
    ├── incomeModel.go
    ├── incomeModel_gen.go
    ├── logErrModel.go
    ├── logErrModel_gen.go
    ├── parkingLotModel.go
    ├── parkingLotModel_gen.go
    ├── siteInfoModel.go
    ├── siteInfoModel_gen.go
    ├── touristCarProvinceModel.go
    ├── touristCarProvinceModel_gen.go
    ├── touristFlowModel.go
    ├── touristFlowModel_gen.go
    ├── userModel.go
    ├── userModel_gen.go
    ├── vars.go
    ├── wechatModel.go
    └── wechatModel_gen.go
  • api 文件夹用于存放外部调用,需要改动的是 *.api, etc/*.yaml, svc/serviceContext.go, logic/*,作用分别是生成 api 调用框架,写配置文件,将数据添加到 Context 供逻辑调用,逻辑实现。
  • genModel 文件夹用于生成数据库调用相关实现,需要改动的是resources/*.sql
  • model 文件夹用于添加额外的数据库调用逻辑(将genModel/model/*复制到 model 后开改!)

简单使用

通过 goctl 生成代码框架。

华为云公网部署

记一次华为云耀云服务器公网部署问题

开了安全组,用 caddy 部署了一个小网页来测试公网访问 sky

run-caddy

可以看到内网访问是正常的。也可以 ping 通

ping-cloud

根据华为云官网给出的指引排查了很久,绑定了弹性公网 ip,设置了安全组 Sys-FullAccess、ACL,都无法用浏览器访问。

小米 4A 千兆版刷 OpenWrt

摆烂,于是将目光看向了家里的小米 4a 千兆版路由器,准备刷个 Openwrt 玩一下。

恩山论坛逛了逛,感觉刷软路由和刷手机差不太多。

  1. 安装 Breed(闭源免费的 BootLoader,又称“不死鸟”,有了它就能肆无忌惮地刷各种第三方包了

如果你的路由器是小米 4A 千兆版,可以直接用恩山论坛的无脑直装 Breed;如果不是,也可以去Breed 官网下载路由器的适配包并自行搜索如何通过 Telnet 连接路由器并刷入 Breed。 Breed

Auto7zip

7-Zip 双击自动解压压缩文件

因为难以忍受 7zip 的右键解压操作,通过修改注册表以自动解压。

  1. 替换 D:\\000000000000\\7-Zipyour\\path\\to\\7-Zip
  2. 将代码塞进.reg 文件,双击即可。
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\7-Zip.001\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.001\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.001\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.7z\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.7z\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.7z\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.arj\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.arj\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.arj\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.bz2\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.bz2\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.bz2\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.bzip2\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.bzip2\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.bzip2\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.cab\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.cab\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.cab\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.cpio\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.cpio\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.cpio\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.deb\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.deb\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.deb\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.dmg\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.dmg\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.dmg\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.fat\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.fat\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.fat\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.gz\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.gz\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.gz\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.gzip\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.gzip\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.gzip\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.hfs\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.hfs\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.hfs\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.iso\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.iso\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.iso\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.lha\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.lha\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.lha\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.lzh\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.lzh\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.lzh\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.lzma\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.lzma\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.lzma\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.ntfs\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.ntfs\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.ntfs\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.rar\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.rar\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.rar\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.rpm\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.rpm\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.rpm\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.squashfs\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.squashfs\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.squashfs\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.swm\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.swm\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.swm\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.tar\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.tar\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.tar\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.taz\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.taz\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.taz\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.tbz\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.tbz\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.tbz\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.tbz2\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.tbz2\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.tbz2\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.tgz\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.tgz\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.tgz\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.tpz\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.tpz\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.tpz\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.txz\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.txz\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.txz\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.vhd\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.vhd\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.vhd\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.wim\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.wim\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.wim\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.xar\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.xar\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.xar\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.xz\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.xz\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.xz\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.z\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.z\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.z\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

[HKEY_CLASSES_ROOT\7-Zip.zip\shell]

@="extract"

[HKEY_CLASSES_ROOT\7-Zip.zip\shell\extract]

@="Extract to Folder"

[HKEY_CLASSES_ROOT\7-Zip.zip\shell\extract\command]

@="\"D:\\000000000000\\7-Zip\\7zG.exe\" x \"%1\" -o*"

reference