Skip to content

Instantly share code, notes, and snippets.

View yangl's full-sized avatar
🎯
Focusing

YANGLiiN yangl

🎯
Focusing
View GitHub Profile
package com.sf.springbootstrap;
import com.google.common.collect.Maps;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.googlecode.aviator.*;
import java.util.Map;
import java.util.Set;
import lombok.extern.slf4j.Slf4j;
  1. 修改其依赖zk下/bk-ledgers/cookies/10.206.128.154:3181中的journalDir&ledgerDirs,如下:
    4
    bookieHost: "10.206.128.158:3181"
    journalDir: "/app/data/bookkeeper/journal"
    ledgerDirs: "1\t/app/data/bookkeeper/ledgers"
    instanceId: "dcbf9ead-9834-46a6-931c-cafd13ba4831"
    
  2. 分别修改journalDir&ledgerDirs目录下的的VERSION内容中的journalDir&ledgerDirs ,如下:
/**
* Copyright (c) Dell Inc., or its subsidiaries. All Rights Reserved.
*
* Licensed 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
*/
package io.pravega.segmentstore.storage.impl.bookkeeper;
@yangl
yangl / TLA+.md
Created March 11, 2021 13:58
TLA+ specification for the BookKeeper replication protocol

In terms of tools, thinking processes, setup... you really need to start by learning about TLA+. I couldn't explain how it changes your engineering mindset/workflow better than Leslie Lamport himself. So if you're interested in this kind of thing then I highly recommend watching the TLA+ video course by Leslie Lamport: https://www.youtube.com/channel/UCajiu4Cj_GHOX0if3Up-eRA. I personally had to watch it more than once to understand some points.

Leslie Lamport also wrote a book which has been helpful to me: https://lamport.azurewebsites.net/tla/book.html. The book will require a

  1. 只在当前项目生效

在项目build.gradle文件内修改/添加 repositories 配置

repositories {
    maven {
        url 'https://maven.aliyun.com/repository/public/'
    }
    maven {
 url 'https://maven.aliyun.com/repository/gradle-plugin/'
@yangl
yangl / BookKeeper DistributionSchedule.QuorumCoverageSet.java
Last active March 3, 2021 03:40
Apache BookKeeper quorum ack LAC 关键代码
interface QuorumCoverageSet {
/**
* Add a bookie to the result set.
*
* @param bookieIndexHeardFrom Bookie we've just heard from
*/
void addBookie(int bookieIndexHeardFrom, int rc);
/**
* check if all quorum in the set have had the action performed for it.
@yangl
yangl / oracle jdk.md
Last active March 27, 2024 05:03
Oracle JDK究竟从哪个版本开始收费? JDK 8u202(含)及之前的版本都可以免费使用,之后的版本商业用途收费!
@yangl
yangl / aliyun.sh
Last active June 14, 2020 08:56
干掉aliyun监控
[root@dexter-proxy bin]# crontab -l
*/1 * * * * sh /usr/bin/aliyun.sh
[root@dexter-proxy bin]# cat /usr/bin/aliyun.sh
#!/bin/bash
rm -rf /usr/local/aegis
for A in $(ps aux | grep -i aliyun | grep -v grep | awk '{print $2}')
do
kill -9 $A;
done