<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>awakeBird</title>
    <description></description>
    <link>https://cui1994.github.io/</link>
    <atom:link href="https://cui1994.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Wed, 12 Aug 2020 09:19:02 +0000</pubDate>
    <lastBuildDate>Wed, 12 Aug 2020 09:19:02 +0000</lastBuildDate>
    <generator>Jekyll v3.9.0</generator>
    
      <item>
        <title>Java 对象序列化时的问题</title>
        <description>
&lt;img src=&quot;https://i.loli.net/2020/08/12/Fzqo36fPehUgWHc.png&quot; alt=&quot;image.png&quot; /&gt;

以 Jackson 为例，展示几个 Java 对象序列化时容易忽略的问题。

</description>
        <pubDate>Wed, 12 Aug 2020 00:00:00 +0000</pubDate>
        <link>https://cui1994.github.io/2020/08/12/jackson/</link>
        <guid isPermaLink="true">https://cui1994.github.io/2020/08/12/jackson/</guid>
        
        <category>jackson</category>
        
        <category>序列化</category>
        
        
        <category>Java</category>
        
      </item>
    
      <item>
        <title>MySQL 主键 auto_increment 机制</title>
        <description>&lt;img src=&quot;https://i.loli.net/2020/07/28/L5JYE4pTbq1eOZc.png&quot; alt=&quot;image.png&quot; /&gt;

前些日子对接数仓服务，在某天写入元信息时突然报了一波失败，失败信息为主键重复。
&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Duplicate entry &lt;span class=&quot;s1&quot;&gt;'67'&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;key &lt;span class=&quot;s1&quot;&gt;'PRIMARY'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;MySQL error.&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
由于数仓服务是为我们业务部门独立搭建的服务，定位为”联合运维”，迫不得已共同排查问题。过程中了解到数仓的设计，也让我大跌眼镜。

</description>
        <pubDate>Tue, 28 Jul 2020 00:00:00 +0000</pubDate>
        <link>https://cui1994.github.io/2020/07/28/mysqlincrease/</link>
        <guid isPermaLink="true">https://cui1994.github.io/2020/07/28/mysqlincrease/</guid>
        
        <category>MySQL</category>
        
        
        <category>问题排查</category>
        
      </item>
    
      <item>
        <title>MySQL 存储 DAG 简单工程实践</title>
        <description>
&lt;img src=&quot;https://i.loli.net/2020/04/16/2UV6RXvYxuAyB7l.jpg&quot; alt=&quot;208-800x300.jpg&quot; /&gt;

项目中需要使用 DAG 结构表示离线任务、数据源血缘关系及数据流向，采用 MySQL 来存储 DAG 数据结构并完成增删改查等常规功能。这里对 MySQL 存储、操作、遍历 DAG 图的方法进行记录。

</description>
        <pubDate>Tue, 21 Apr 2020 00:00:00 +0000</pubDate>
        <link>https://cui1994.github.io/2020/04/21/mysqldag/</link>
        <guid isPermaLink="true">https://cui1994.github.io/2020/04/21/mysqldag/</guid>
        
        <category>DAG</category>
        
        <category>数据结构</category>
        
        
        <category>数据结构</category>
        
      </item>
    
      <item>
        <title>一个 Protostuff 序列化问题</title>
        <description>
&lt;img src=&quot;https://i.loli.net/2019/09/27/edshNbA8Vn3aKOq.jpg&quot; alt=&quot;596-800x300.jpg&quot; /&gt;

记录一个由于 Protostuff 序列化缺陷导致 RPC 调用失败的问题。

</description>
        <pubDate>Thu, 16 Apr 2020 00:00:00 +0000</pubDate>
        <link>https://cui1994.github.io/2020/04/16/protostuffbug/</link>
        <guid isPermaLink="true">https://cui1994.github.io/2020/04/16/protostuffbug/</guid>
        
        <category>protostuff</category>
        
        <category>序列化</category>
        
        
        <category>问题排查</category>
        
      </item>
    
      <item>
        <title>Postman 请求跨域问题</title>
        <description>
&lt;img src=&quot;https://i.loli.net/2019/10/22/FnbuQgsiy9exDXo.jpg&quot; alt=&quot;90-800x300.jpg&quot; /&gt;

在调试调用公共网关服务时出现了很奇怪的现象，用 Postman 请求接口会提示跨域。
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Invalid CORS request
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
而将请求 cURL code 原样复制出来使用 curl 命令请求则会正常返回。

</description>
        <pubDate>Tue, 22 Oct 2019 00:00:00 +0000</pubDate>
        <link>https://cui1994.github.io/2019/10/22/postmanheader/</link>
        <guid isPermaLink="true">https://cui1994.github.io/2019/10/22/postmanheader/</guid>
        
        <category>Postman</category>
        
        
        <category>问题排查</category>
        
      </item>
    
      <item>
        <title>优雅地在 Java 中进行 Thrift 调用</title>
        <description>
&lt;img src=&quot;https://i.loli.net/2019/08/03/j2eB1Wf5KZ4piHn.jpg&quot; alt=&quot;907-800x300.jpg&quot; /&gt;

项目需要引入 Thrift Client 进行第三方调用，引入的过程本身是很简单的，但写的时候还是尽量抽象一些公共逻辑，避免过多的重复代码，这里记录一种比较优雅的方式。

</description>
        <pubDate>Sat, 03 Aug 2019 00:00:00 +0000</pubDate>
        <link>https://cui1994.github.io/2019/08/03/javathriftclient/</link>
        <guid isPermaLink="true">https://cui1994.github.io/2019/08/03/javathriftclient/</guid>
        
        <category>Java</category>
        
        <category>Thrift</category>
        
        
        <category>Java</category>
        
      </item>
    
      <item>
        <title>MySQL localhost 无法访问问题</title>
        <description>
&lt;img src=&quot;https://i.loli.net/2019/07/31/5d412043e82c417014.jpg&quot; alt=&quot;622-800x300.jpg&quot; /&gt;

线下开发时需要在一台机器上部署 MySQL，并创建不同权限的 user 给其他机器使用，操作通常很简单，在部署机上使用 root 用户登录，创建用户并授予访问权限，方式如下：
&lt;div class=&quot;language-sql highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;CREATE&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;USER&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'test'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'%'&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;IDENTIFIED&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;BY&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'abcd1234'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;GRANT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;ALL&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;PRIVILEGES&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;ON&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;TO&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'test'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'%'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;FLUSH&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;PRIVILEGES&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
这里 host 用通配符 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%&lt;/code&gt; 表示该用户可以从任意主机访问数据库。操作执行之后从其他主机就可以访问当前数据库了，看起来没问题，直到我在本机使用 localhost 访问数据库报错：
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ERROR 1045 (28000): Access denied for user 'test'@'localhost' (using password: YES)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Wed, 31 Jul 2019 00:00:00 +0000</pubDate>
        <link>https://cui1994.github.io/2019/07/31/mysqllocalhost/</link>
        <guid isPermaLink="true">https://cui1994.github.io/2019/07/31/mysqllocalhost/</guid>
        
        <category>MySQL</category>
        
        
        <category>问题排查</category>
        
      </item>
    
      <item>
        <title>初次接触数据开发的一点感悟</title>
        <description>
&lt;img src=&quot;https://i.loli.net/2019/07/25/5d396d3f6d8ba42282.jpg&quot; alt=&quot;367-800x300.jpg&quot; /&gt;
先说点废话，已经三个多月没有更新博客了，原因是换了份工作，从准备、面试到最终入职也折腾了蛮久。结果还是理想的，拿到了几家一线厂的 offer，最终选择了百度（虽然在走下坡路，但怎么说也是国内一流大厂）。工作内容也终于逃离了业务，转为了中台赋能，平台开发，随之而来的是工作方式上的转变，也在慢慢适应。

说回正题，我所在的组定位是数据中台，服务于两百人的业务团队，有自己的数据平台，也承担一部分离线数据分析的职能，刚入职为了熟悉业务被安排两个 BI 相关的需求，这里谈谈这一个月数据开发的一些感悟。

</description>
        <pubDate>Fri, 26 Jul 2019 00:00:00 +0000</pubDate>
        <link>https://cui1994.github.io/2019/07/26/bi/</link>
        <guid isPermaLink="true">https://cui1994.github.io/2019/07/26/bi/</guid>
        
        <category>大数据</category>
        
        <category>hive</category>
        
        <category>BI</category>
        
        
        <category>杂谈</category>
        
      </item>
    
      <item>
        <title>关于分层的一些探索</title>
        <description>
&lt;img src=&quot;https://i.loli.net/2019/07/24/5d37f0aa98cd852733.jpg&quot; alt=&quot;188-800x300.jpg&quot; /&gt;
在应对复杂项目设计时，分层几乎是必须用到的手段，那回想自己启动一个新项目时是如何确定分层的呢？是直接 copy 前人项目骨架，还是参照现有的理论模型（&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MVC&lt;/code&gt;、&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;DDD&lt;/code&gt;、&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CQRS&lt;/code&gt;等）进行实现呢？其实，分层作为偏方法论的一种设计，不同的人有不同的理解，即使采用相同的分层模型，对模型中一些概念的认知也存在偏差，这篇文章也是简单谈谈我对分层模型的初步探索。

</description>
        <pubDate>Wed, 24 Jul 2019 00:00:00 +0000</pubDate>
        <link>https://cui1994.github.io/2019/07/24/layer/</link>
        <guid isPermaLink="true">https://cui1994.github.io/2019/07/24/layer/</guid>
        
        <category>DDD</category>
        
        <category>MVC</category>
        
        <category>分层架构</category>
        
        
        <category>服务架构</category>
        
      </item>
    
      <item>
        <title>我对影视作品的理解</title>
        <description>
&lt;img src=&quot;https://i.loli.net/2019/07/24/5d38099900bad54452.jpg&quot; alt=&quot;pnfpd253gzd.jpg&quot; /&gt;
写这篇文章的缘由是前几天刚补完刷爆盆友圈的《爱，死亡和机器人》，这部 Netflix 的新作由 18 个短片构成，除了个别剧集质量略显一般，其他大部分短片都兼具艺术性与故事性，表现出上乘的质量。于是，我随了一波大流，把这份现代影视工业的硕果分享给好友，当他问起我好看在哪里时，我却尬住了，它好像哪儿哪儿都好，只是要把这些好的地方说出来并不是件易事。我突然很佩服那些活跃在各个公众号里的影评人，第一时间就能把新片新剧的长处短处分析的头头是道，而我等普通群众呢，真的是「奈何本屌没文化，一句牛逼行天下」。我并不想成为很专业的影评人，一来影视相关的专业技能确实不够，二来文字能力也一般般，&lt;strong&gt;但我也不满足做个稀里糊涂的观众，以致于想分享好东西的时候都只能「这片子牛逼嗷，看就完事儿了铁汁」&lt;/strong&gt;。我觉得每个人对于影视作品应该都是有自己的理解的，毕竟从小到大看了那么多，只是需要一些沉淀和积累。于是，我把自己看过的、喜欢的影视作品又重新捡了起来，发现想法还挺多的，有了这篇文章。

</description>
        <pubDate>Mon, 08 Apr 2019 00:00:00 +0000</pubDate>
        <link>https://cui1994.github.io/2019/04/08/myvideos/</link>
        <guid isPermaLink="true">https://cui1994.github.io/2019/04/08/myvideos/</guid>
        
        <category>电影</category>
        
        <category>电视</category>
        
        
        <category>杂谈</category>
        
      </item>
    
  </channel>
</rss>
