WARN org.apache.commons.httpclient.HttpMethodBase - Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
intlimit=getParams().getIntParameter(HttpMethodParams.BUFFER_WARN_TRIGGER_LIMIT,1024*1024);if((contentLength==-1)||(contentLength>limit)){LOG.warn("Going to buffer response body of large or unknown size. "+"Using getResponseBodyAsStream instead is recommended.");}
问题出在这个AWS账户下的VPC的DHCP options的配置。因为是比较早期使用的share的AWS账户,所以下面的网络配置比较复杂,配置有Direct Connect 连往其他数据中心,以及很多VPC Peering。不知道因为什么原因,这个微服务部署的Cloudformation template里面选择了包含google DNS 8.8.8.8和8.8.8.4的DHCP Options。我们都知道对于在Akamai上注册的服务service.mycompany.com来说,如:
1234
~> host service.mycompany.com
service.mycompany.com is an alias for mycompany.generic.edgekey.net.
mycompany.generic.edgekey.net is an alias for e8888.g.akamaiedge.net.
e8888.g.akamaiedge.net has address 104.116.190.24
commit eb0b56b19017ab5c16c745e6da39c53126924ed6
Author: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri Aug 1 22:57:55 2014 +0200
Simplify serialize.h's exception handling
Remove the 'state' and 'exceptmask' from serialize.h's stream
implementations, as well as related methods.
As exceptmask always included 'failbit', and setstate was always
called with bits = failbit, all it did was immediately raise an
exception. Get rid of those variables, and replace the setstate
with direct exception throwing (which also removes some dead
code).
As a result, good() is never reached after a failure (there are
only 2 calls, one of which is in tests), and can just be replaced
by !eof().
fail(), clear(n) and exceptions() are just never called. Delete
them.
```
业务相关的代码修改,可以将story ID加在最前面,方便issue track。
为了让大家统一提交的格式,可以新建一个提交的template,配置git[使用](https://robots.thoughtbot.com/better-commit-messages-with-a-gitmessage-template)。 过程如下:
1. 在`~/.gitconfig`中加入下面的内容:
```
[commit]
template = ~/.gitmessage
新建~/.gitmessage这个template文件并且填入自定义模板:
12345678
Brief here:
Reason to change:
*
Way to change:
*
配置完成后在项目中做修改,git ci -a就可以在模板的基础上修改了。
举一个项目中的一个例子,里面包含了业务需求的github issue的链接:
1234567
commit 2196e866261dee6d7c17f266cc15987f
Author: Alex Jin <alex.jin@example.com>
Date: Wed Aug 17 13:24:41 2016 +0800
Make trend bigger and modify link color. :pear: Luke
* Reason to change:
see [lob/project#208]
Akamai提供了Sample Client去调用API,除了clone client的repo,还可以直接使用docker,直接运行docker run -it akamaiopen/api-kickstart /bin/bash既可。
生成新的client请求的token。首先在Luna Control Center选择CONFIGURE => Manage APIs进入Open API 管理页面。在Luna APIs下面添加新的collection,然后在该collection添加新的client,就可以拿到新的tokens,点击右上角的导出按钮,就可以将其导出到一个文本文件中,如名为api-kickstart.txt的文件。
root@16119b2d4eb8:/opt/examples/python# python diagnostic_tools.py
Requesting locations that support the diagnostic-tools API.
There are 72 locations that can run dig in the Akamai Network
We will make our call from Adelaide, Australia
; <<>> DiG 9.8.1-P1 <<>> developer.akamai.com -t A
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12919
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 8, ADDITIONAL: 8
;; QUESTION SECTION:
;developer.akamai.com. IN A
;; ANSWER SECTION:
developer.akamai.com. 300 IN CNAME san-developer.akamai.com.edgekey.net.
san-developer.akamai.com.edgekey.net. 21600 IN CNAME e4777.dscx.akamaiedge.net.
e4777.dscx.akamaiedge.net. 20 IN A 23.4.164.144
;; AUTHORITY SECTION:
dscx.akamaiedge.net. 4000 IN NS n6dscx.akamaiedge.net.
...............