暂时,我使用-v
param之类的/rootfs/shared_dir:/docker/docker_file
.
我的容器在文件夹中创建了一些数据文件,我希望与我的系统共享该文件夹.
另外,我想限制docker容器中的IO速度.我怎样才能做到这一点?
我的系统是
Linux in28-051 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
但是我们公司的机器禁用了 nat 表,所以当我运行 docker -d 时,问题是
root@XXXXX:~# docker -d
INFO[0000] +job init_networkdriver()
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
Unable to enable network bridge NAT: iptables failed: iptables --wait -t nat -I POSTROUTING -s 172.17.42.1/16 ! -o docker0 -j MASQUERADE: iptables v1.4.21: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
(exit …
Run Code Online (Sandbox Code Playgroud) 例如,我将-Xmx设置为40G。我预计我的java处理器不会使用超过40G。
我的程序在 cms-gc 上运行良好。
但是当我更改为具有相同内存的 G1 gc 时(甚至多了 15% 的内存)。
它总是被 oom 杀手杀死。
我发现了一些这样的文章:Why does my Java process Consumer more memory than Xmx?
其表达的是:
G1 is especially known for its
excessive appetite for additional memory, so be aware of this.
Run Code Online (Sandbox Code Playgroud)
所以我想知道,如何限制 g1 gc 使用的内存以及为什么 g1 使用这么多额外的内存
据我了解,我是d3js的新手。
// links is an array and id is unique key
var pathData = paths.data(links, function(d) {return d.id;});
pathData.enter().append('').attr() ...
// in there will be delete all the duplicate items
pathData.exit().remove();
Run Code Online (Sandbox Code Playgroud)
但是在我的代码中,它重新创建了一个节点。
这是我的完整代码http://jsfiddle.net/yunfanyunfan/URpfB/34/
单击该行,将出现很多行,因为重复的节点不会删除。
我正在尝试学习Java 8 Stream,当我尝试将一些函数转换为java8来练习时.我遇到了一个问题.
我很好奇如何将跟随代码转换为java流格式.
/*
* input example:
* [
{
"k1": { "kk1": 1, "kk2": 2},
"k2": {"kk1": 3, "kk2": 4}
}
{
"k1": { "kk1": 10, "kk2": 20},
"k2": {"kk1": 30, "kk2": 40}
}
]
* output:
* {
"k1": { "kk1": 11, "kk2": 22},
"k2": {"kk1": 33, "kk2": 44}
}
*
*
*/
private static Map<String, Map<String, Long>> mergeMapsValue(List<Map<String, Map<String, Long>>> valueList) {
Set<String> keys_1 = valueList.get(0).keySet();
Set<String> keys_2 = valueList.get(0).entrySet().iterator().next().getValue().keySet();
Map<String, Map<String, Long>> result = new …
Run Code Online (Sandbox Code Playgroud)