<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[剃刀的狗窝]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>https://blog.xiaofanqie.fun/</link><generator>Ghost 0.7</generator><lastBuildDate>Fri, 23 Oct 2026 12:19:59 GMT</lastBuildDate><atom:link href="https://blog.xiaofanqie.fun/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[立信数据的3.75标准]]></title><description><![CDATA[<p>懂业务 <br>
高质量 <br>
中台思考 <br>
向其他业务线推中台思考  </p>]]></description><link>https://blog.xiaofanqie.fun/un/</link><guid isPermaLink="false">1218fa81-ce3e-4e4b-92b0-c66ecf7addd1</guid><dc:creator><![CDATA[jamesxia4]]></dc:creator><pubDate>Thu, 27 Jun 2019 10:03:21 GMT</pubDate><content:encoded><![CDATA[<p>懂业务 <br>
高质量 <br>
中台思考 <br>
向其他业务线推中台思考  </p>]]></content:encoded></item><item><title><![CDATA[对上沟通的方式（周报、晋升）]]></title><description><![CDATA[<p>1 做事大的框架（负责什么，每件事情固定板块） <br>
2 每件事情：解决什么问题价值是什么，进展是什么，有什么问题风险需要什么帮助，应对策略是什么，下一步怎么做，时间安排与预期对比 <br>
3 +一些重点表现的东西</p>

<p>参考 悟迷、松皓</p>

<p>解决什么问题 <br>
用什么方法 <br>
有什么特点  </p>

<p>辣条，返璞的PPT</p>]]></description><link>https://blog.xiaofanqie.fun/dui-shang-gou-tong-de-fang-shi-zhou-bao-jin-sheng/</link><guid isPermaLink="false">01308a50-dea3-4d5b-a231-de9362a38f56</guid><dc:creator><![CDATA[jamesxia4]]></dc:creator><pubDate>Thu, 06 Sep 2018 12:32:33 GMT</pubDate><content:encoded><![CDATA[<p>1 做事大的框架（负责什么，每件事情固定板块） <br>
2 每件事情：解决什么问题价值是什么，进展是什么，有什么问题风险需要什么帮助，应对策略是什么，下一步怎么做，时间安排与预期对比 <br>
3 +一些重点表现的东西</p>

<p>参考 悟迷、松皓</p>

<p>解决什么问题 <br>
用什么方法 <br>
有什么特点  </p>

<p>辣条，返璞的PPT</p>]]></content:encoded></item><item><title><![CDATA[Ghost博客加入七牛云图床]]></title><description><![CDATA[<p>修改对应部分，supervisor里面重启就行</p>

<pre><code class="language-json">storage: {  
            provider: 'qiniu',
            bucketname: '你的桶名',
            ACCESS_KEY: 'AK',
            SECRET_KEY: 'SK',
            root: '/image/',
            prefix: 'http://7xp8ho.com1.z0.glb.clouddn.com'
        }
</code></pre>]]></description><link>https://blog.xiaofanqie.fun/ghostbo-ke-jia-ru-qi-niu-yun-tu-chuang/</link><guid isPermaLink="false">2b0de6b5-1dac-4b1f-92ef-a528b8a9989d</guid><dc:creator><![CDATA[jamesxia4]]></dc:creator><pubDate>Wed, 30 May 2018 08:57:45 GMT</pubDate><content:encoded><![CDATA[<p>修改对应部分，supervisor里面重启就行</p>

<pre><code class="language-json">storage: {  
            provider: 'qiniu',
            bucketname: '你的桶名',
            ACCESS_KEY: 'AK',
            SECRET_KEY: 'SK',
            root: '/image/',
            prefix: 'http://7xp8ho.com1.z0.glb.clouddn.com'
        }
</code></pre>]]></content:encoded></item><item><title><![CDATA[消息中心相关故障排查思路]]></title><description><![CDATA[<h2 id="">背景</h2>

<p>今天要发一个大版本，发现Scheduler调不通线下的机器</p>

<h2 id="">排查思路</h2>

<ul>
<li>先检查应用启动日志是否正常</li>
<li>找<code>msgbroker</code>关键字，看相关jar是否正常加载</li>
<li>到日志<code>msgbroker/common-default</code>去观察连接是否正常</li>
<li>【如果有必要】去DRM配置页面看客户端是否已链接，再次确认机器ip是否一致</li>
<li>到<a href="http://zutil.alipay.net/home.htm">zutil</a>去看消息投递过程</li>
</ul>

<h2 id="">总结</h2>

<p>先考虑应用以及相关模块是否正常加载，再通过日志与消息投递排查工具排查链路调用情况</p>]]></description><link>https://blog.xiaofanqie.fun/xiao-xi-zhong-xin-xiang-guan-gu-zhang-pai-cha-si-lu/</link><guid isPermaLink="false">8752d8dd-b63e-44a4-b447-603ab4979082</guid><dc:creator><![CDATA[jamesxia4]]></dc:creator><pubDate>Wed, 23 May 2018 09:03:58 GMT</pubDate><content:encoded><![CDATA[<h2 id="">背景</h2>

<p>今天要发一个大版本，发现Scheduler调不通线下的机器</p>

<h2 id="">排查思路</h2>

<ul>
<li>先检查应用启动日志是否正常</li>
<li>找<code>msgbroker</code>关键字，看相关jar是否正常加载</li>
<li>到日志<code>msgbroker/common-default</code>去观察连接是否正常</li>
<li>【如果有必要】去DRM配置页面看客户端是否已链接，再次确认机器ip是否一致</li>
<li>到<a href="http://zutil.alipay.net/home.htm">zutil</a>去看消息投递过程</li>
</ul>

<h2 id="">总结</h2>

<p>先考虑应用以及相关模块是否正常加载，再通过日志与消息投递排查工具排查链路调用情况</p>]]></content:encoded></item><item><title><![CDATA[Alipay Tracer的编码要点]]></title><description><![CDATA[<h3 id="">背景</h3>

<ul>
<li>一个分布式RPC调用，需要在被调用端记录调用过程中的TraceId以及其他上下文信息</li>
</ul>

<h3 id="">编码要点</h3>

<ul>
<li>如果打点的位置在被调用端的主线程，直接用TracerContextUtil拿TraceId即可</li>
<li>如果被调用端在被调用过程中起了一个子线程并且需要在子线程中记录TraceId，那么就需要通过在主线程中建一个final对象做一下过渡，将Tracer上下文带入子线程，比如下面代码中的AbstractLogContext。然后在子线程内部去set这个上线文，这样就可以在子线程内部拿到TraceId了</li>
</ul>

<pre><code class="language-java">@Override
    public void checkCorrectness(final QueryParameter queryParam, final QueryParameterDTO queryParameter,
            final OlapQueryModel queryModel, final IcubeRouteResultDTO icubeRouteResult, final String queryIcubeSql,
            final List&lt;Map&lt;String, Object&gt;&gt; icubeQueryResult) {
        final AbstractLogContext ctx = AbstractLogContext.get();
        final SoasUserInfo userInfo = UserInfoHolder.</code></pre>]]></description><link>https://blog.xiaofanqie.fun/alipay-tracerde-bian-ma-yao-dian/</link><guid isPermaLink="false">68fc465e-1c21-4cd6-9ee2-97f6bbffd679</guid><dc:creator><![CDATA[jamesxia4]]></dc:creator><pubDate>Fri, 11 May 2018 03:25:41 GMT</pubDate><content:encoded><![CDATA[<h3 id="">背景</h3>

<ul>
<li>一个分布式RPC调用，需要在被调用端记录调用过程中的TraceId以及其他上下文信息</li>
</ul>

<h3 id="">编码要点</h3>

<ul>
<li>如果打点的位置在被调用端的主线程，直接用TracerContextUtil拿TraceId即可</li>
<li>如果被调用端在被调用过程中起了一个子线程并且需要在子线程中记录TraceId，那么就需要通过在主线程中建一个final对象做一下过渡，将Tracer上下文带入子线程，比如下面代码中的AbstractLogContext。然后在子线程内部去set这个上线文，这样就可以在子线程内部拿到TraceId了</li>
</ul>

<pre><code class="language-java">@Override
    public void checkCorrectness(final QueryParameter queryParam, final QueryParameterDTO queryParameter,
            final OlapQueryModel queryModel, final IcubeRouteResultDTO icubeRouteResult, final String queryIcubeSql,
            final List&lt;Map&lt;String, Object&gt;&gt; icubeQueryResult) {
        final AbstractLogContext ctx = AbstractLogContext.get();
        final SoasUserInfo userInfo = UserInfoHolder.getUserInfo();
        // 用异步方式进行检查
        correctThreadPool.submit(new Runnable() {
            @Override
            public void run() {
                try {
                    AbstractLogContext.set(ctx);
                    UserInfoHolder.setUserInfo(userInfo);

                    LogUtil.info(logger, "checkCorrectness start");

                    // 判断前置条件
                    // 1. check DRM 开关
                    if (!AlisisDynamicConfigUtil.isCheckIcubeCorrectness()) {
                        LogUtil.info(logger, "checkCorrectness drm close");
                        return;
                    }

                    // 2. 结果集大小小于limit 并且 小于 MAX_COMPARE_SIZE
                    if (queryParam.getLimit() == null || CollectionUtils.size(icubeQueryResult) &gt;= queryParam
                            .getLimit() || CollectionUtils.size(icubeQueryResult) &gt; MAX_COMPARE_SIZE) {
                        LogUtil.info(logger, "checkCorrectness limit queryLimit={0}, resultSize={1}",
                                queryParam.getLimit(), CollectionUtils.size(icubeQueryResult));
                        return;
                    }

                    // 3. 数据版本 不一致
                    Dataset dataset = queryParam.getDynamicCube().getDataset();
                    DSDTO dsInfo = connectionInfoProcesser.getDSInfo(dataset.getFacTable().getDsId());
                    OdpsTableVO tableByQueryOdps = odpsMetaDataService.getTableByQueryOdps(dsInfo.getConnectUrl(),
                            dsInfo.getProject(), dataset.getFacTable().getName());
                    LogUtil.info(logger, "getTableByQueryOdps: {0}", JSON.toJSONString(tableByQueryOdps));
                    Date icubeTime = icubeRouteResult.getCuboidSelect().getCuboid().getSourceTableCurrentModifiedTime();
                    Date odpsTime = null;
                    if (tableByQueryOdps != null) {
                        odpsTime = tableByQueryOdps.getDataModifyTime();
                    }

                    if (icubeTime == null || odpsTime == null
                            || !icubeTime.equals(odpsTime)) {
                        LogUtil.info(logger, "checkCorrectness data version icubeVersion={0}, odpsVersion={1}",
                                icubeTime, odpsTime);
                        return;
                    }

                    // 判断加速的数据版本是否一致
                    String icubeDsId = icubeRouteResult.getCuboidSelect().getCuboid().getBuildTableModel()
                            .getFactTable()
                            .getDsId();
                    String icubeTableName = icubeRouteResult.getCuboidSelect().getCuboid().getBuildTableModel()
                            .getFactTable()
                            .getTableName();
                    TableConnInfo tableInfo = new TableConnInfo();
                    tableInfo.setDsId(icubeDsId);
                    tableInfo.setTableName(icubeTableName);
                    List&lt;TableConnInfo&gt; tableList = new ArrayList&lt;&gt;();
                    tableList.add(tableInfo);
                    List&lt;TableSpeedupInfo&gt; speedupStatus = speedupManageService.getSpeedupStatus(tableList);
                    if (CollectionUtils.isNotEmpty(speedupStatus)) {
                        TableSpeedupInfo speedupDO = speedupStatus.get(0);
                        if (speedupDO.isSpeedupReady()) {
                            Date speedupVersion = speedupDO.getOdpsDataTime();
                            if (speedupVersion == null || !speedupVersion.equals(odpsTime)) {
                                LogUtil.info(logger,
                                        "checkCorrectness data version speedupVersion={0}, odpsVersion={1}",
                                        speedupVersion, odpsTime);
                                return;
                            }
                        }
                    }

                    // 查询ODPS数据
                    ContextUtil.setQueryFlag(QueryTypeEnum.SQL_GENERATION_ORIGINAL_ONLY.ordinal());
                    queryParameter.setQueryFlag(QueryTypeEnum.SQL_GENERATION_ORIGINAL_ONLY.ordinal());
                    String newQueryId = queryModel.getQueryConfigInfo().getQueryId()
                            + CORRECTNESS_CHECK_QUERY_ID_SUFFIX;
                    queryModel.getQueryConfigInfo().setQueryId(newQueryId);
                    QueryResultModel queryResultModel = queryHandler.queryForRawData(queryModel,
                            queryParameter, false);
                    if (queryResultModel == null) {
                        LogUtil.info(logger, "checkCorrectness query odps result null");
                        return;
                    }
                    List&lt;Map&lt;String, Object&gt;&gt; dataList = queryResultModel.getResultData();

                    // 后置处理
                    QueryUtils.convertDataTypeForOdps(dataList, queryParam, queryResultModel.getResultModel());

                    try {
                        LogUtil.info(logger, "checkCorrectness doCompare");
                        doCompare(dataList, icubeQueryResult);
                        LogUtil.info(logger, "checkCorrectness doCompare success");
                    } catch (IllegalArgumentException e) {
                        LogUtil.error(e, logger, "checkCorrectness faild, icubeSql=#{0}#, odpsSql=#{1}#", queryIcubeSql,
                                queryResultModel.getResultModel().getSqlText());
                        StringBuilder sb = new StringBuilder();
                        sb.append("checkCorrectness faild: ");
                        sb.append("[").append(TracerContextUtil.getTraceId()).append("]");
                        sb.append(e.getMessage()).append("\n");
                        sb.append("用户 ").append(UserInfoHolder.getUserInfo().getUserName());
                        sb.append("工号 ").append(UserInfoHolder.getUserId());
                        sb.append(" @ ").append(EnvUtil.getHostName()).append("\n");
                        sb.append("icubeSql: ").append(queryIcubeSql).append("\n");
                        sb.append("odpsSql: ").append(queryResultModel.getResultModel().getSqlText());
                        exceptionNotifyService.notifyIcube(sb.toString());
                    }
                } catch (Exception e) {
                    LogUtil.error(e, logger, "checkCorrectness error");
                }
            }
        });
    }
</code></pre>]]></content:encoded></item><item><title><![CDATA[阿里云Ubuntu 14.04.2 LTS 修复libc6]]></title><description><![CDATA[<p>用apt-get装任何包都提示以下错误</p>

<pre><code>root@iZu107n65nyZ:~# apt-get dist-upgrade  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
You might want to run 'apt-get -f install' to correct these.  
The following packages have unmet dependencies:  
 libc-bin : Depends: libc6 (&lt; 2.20) but 2.24-12 is installed
 libc-dev-bin : Depends: libc6 (&lt; 2.20)</code></pre>]]></description><link>https://blog.xiaofanqie.fun/a-li-yun-ubuntu-14-04-2-lts-xiu-fu-libc6/</link><guid isPermaLink="false">a2b0bc66-23ca-4cb2-befb-0b1a34adc363</guid><dc:creator><![CDATA[jamesxia4]]></dc:creator><pubDate>Sun, 11 Feb 2018 09:30:23 GMT</pubDate><content:encoded><![CDATA[<p>用apt-get装任何包都提示以下错误</p>

<pre><code>root@iZu107n65nyZ:~# apt-get dist-upgrade  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
You might want to run 'apt-get -f install' to correct these.  
The following packages have unmet dependencies:  
 libc-bin : Depends: libc6 (&lt; 2.20) but 2.24-12 is installed
 libc-dev-bin : Depends: libc6 (&lt; 2.20) but 2.24-12 is installed
 libc-l10n : Breaks: locales (&lt; 2.21-1) but 2.13+git20120306-12.1 is installed
 libc6 : Breaks: locales (&lt; 2.24) but 2.13+git20120306-12.1 is installed
 libc6-dev : Depends: libc6 (= 2.19-0ubuntu6.6) but 2.24-12 is installed
 nscd : Depends: init-system-helpers (&gt;= 1.18~) but 1.14 is installed
</code></pre>

<p>解决方案:</p>

<pre><code class="language-bash">aptitude update

aptitude install libc6-dev  
</code></pre>

<p>参考:
<a href="http://forums.debian.net/viewtopic.php?f=5&amp;t=71511">传送门</a>
这篇文章里提到aptitude比apt-get聪明，一般能解决这类问题</p>

<p>但是一定要记得快照！！！！！！动内核不快照死路一条</p>

<p>以上错误怀疑是升级nodejs过程中带来的问题</p>]]></content:encoded></item><item><title><![CDATA[Mockito用法]]></title><description><![CDATA[<pre><code class="language-java">ClassName object = mock(ClassName.class);  
doReturn(返回值).when(对象).方法(any(参数));  
</code></pre>

<h2 id="">例子</h2>

<pre><code class="language-java">import static org.mockito.Mockito.*;

IcubeCompositeService icubeCompositeService = mock(IcubeCompositeService.class);        doReturn(true).when(icubeCompositeService).addIcubeDefination(any(IcubeDefinitionModel  
                .class));
</code></pre>]]></description><link>https://blog.xiaofanqie.fun/mockitoyong-fa/</link><guid isPermaLink="false">af227c20-b5f8-40f2-8de5-afd2601dcea3</guid><dc:creator><![CDATA[jamesxia4]]></dc:creator><pubDate>Wed, 29 Nov 2017 08:57:47 GMT</pubDate><content:encoded><![CDATA[<pre><code class="language-java">ClassName object = mock(ClassName.class);  
doReturn(返回值).when(对象).方法(any(参数));  
</code></pre>

<h2 id="">例子</h2>

<pre><code class="language-java">import static org.mockito.Mockito.*;

IcubeCompositeService icubeCompositeService = mock(IcubeCompositeService.class);        doReturn(true).when(icubeCompositeService).addIcubeDefination(any(IcubeDefinitionModel  
                .class));
</code></pre>]]></content:encoded></item><item><title><![CDATA[欢迎使用 Ghost 博客系统]]></title><description><![CDATA[<p>Yeah，博客上线了！这篇文章的目的是向你介绍 Ghost 编辑器并帮你快速上手。通过 <code>&lt;your blog URL&gt;/ghost/</code> 链接就可以登录系统后台管理你的博客内容了。当你进入后台，你就能看到左侧文章列表处列出的这篇文章，右侧就是这篇文章的预览效果。点击预览栏右上角的铅笔图标就能进入内容编辑页面。 </p>

<h2 id="">快速入门</h2>

<p>Ghost 使用 Markdown 语法书写内容。简单来说，Markdown 就是一种简化的书写格式！</p>

<p>用 Markdown 语法写作是很容易的。在编辑界面的左侧就是你写作的地方。在你认为需要的时候，可以使用以下这些语法来格式化你的内容。例如下面这个无序列表：</p>

<ul>
<li>Item number one</li>
<li>Item number two
<ul><li>A nested item</li></ul></li>
<li>A final item</li>
</ul>

<p>还可以是有序列表：</p>

<ol>
<li>Remember to buy some milk</li></ol>]]></description><link>https://blog.xiaofanqie.fun/welcome-to-ghost/</link><guid isPermaLink="false">7b17504b-0ddf-4f5e-93d9-aa6b1d6b21d9</guid><category><![CDATA[系统简介]]></category><dc:creator><![CDATA[jamesxia4]]></dc:creator><pubDate>Thu, 06 Jul 2017 11:26:55 GMT</pubDate><content:encoded><![CDATA[<p>Yeah，博客上线了！这篇文章的目的是向你介绍 Ghost 编辑器并帮你快速上手。通过 <code>&lt;your blog URL&gt;/ghost/</code> 链接就可以登录系统后台管理你的博客内容了。当你进入后台，你就能看到左侧文章列表处列出的这篇文章，右侧就是这篇文章的预览效果。点击预览栏右上角的铅笔图标就能进入内容编辑页面。 </p>

<h2 id="">快速入门</h2>

<p>Ghost 使用 Markdown 语法书写内容。简单来说，Markdown 就是一种简化的书写格式！</p>

<p>用 Markdown 语法写作是很容易的。在编辑界面的左侧就是你写作的地方。在你认为需要的时候，可以使用以下这些语法来格式化你的内容。例如下面这个无序列表：</p>

<ul>
<li>Item number one</li>
<li>Item number two
<ul><li>A nested item</li></ul></li>
<li>A final item</li>
</ul>

<p>还可以是有序列表：</p>

<ol>
<li>Remember to buy some milk  </li>
<li>Drink the milk  </li>
<li>Tweet that I remembered to buy the milk, and drank it</li>
</ol>

<h3 id="">链接</h3>

<p>如果要链接其它页面，可以直接把页面的 URL 粘贴过来，例如 <a href="http://www.ghostchina.com">http://www.ghostchina.com</a> - 会被自动识别为链接。但是，如果你想自定义链接文本，可以像这样： <a href="http://www.ghostchina.com">Ghost 中文网</a>。很简单吧！</p>

<h3 id="">图片</h3>

<p>插入图片也没问题！前提是你事先知道图片的 URL，然后像下面这样：</p>

<p><img src="http://static.ghostchina.com/image/3/fe/34a9831916be9db1381ecb320491e.png" alt="The Ghost Logo"></p>

<p>如果图片在本地的硬盘里怎么办？也很简单！像下面这样书写就能为图片预留一个位置，然后你可以继续写作，回头再通过拖拽的方式把图片上传到服务器上。</p>

<h3 id="">引用</h3>

<p>有些时候我们需要引用别人说的话，可以这样：</p>

<blockquote>
  <p>Wisdomous - it's definitely a word.</p>
</blockquote>

<h3 id="">代码</h3>

<p>或许你是个码农，需要贴一些代码到文章里，可以通过两个引号（Tab 键上面的那个键）加入行内代码 <code>&lt;code&gt;</code>。如果需要加入大段的代码，可以在代码前加 4 个空格缩进，这就是 Markdown 的语法。</p>

<pre><code>.awesome-thing {
    display: block;
    width: 100%;
}
</code></pre>

<h3 id="">分割线</h3>

<p>在任一新行输入 3 个或更多的短横线（减号）就是一条分隔线了。</p>

<hr>

<h3 id="">高级用法</h3>

<p>Markdown 还有一个特别用法，就是在你需要的时候可以直接书写 HTML 代码。</p>

<p><input type="text" placeholder="这是个输入框！"></p>

<p>只要掌握了上面的这些介绍，你就已经入门了！继续写作吧！</p>]]></content:encoded></item></channel></rss>