// 变量
var x = 6
// 常量
val x = 6
// 显式类型
var x:Double = 6
mmap是lazy加载数据进内存的. 在映射内存的时候, 不会引起任何I/O. 加载的时候I/O会有readahead, 这个可以由madvise调整; 内存的分配是按page为单位添加内存, 可以由下面代码得到证明.
import sun.misc.Unsafe;
import sun.nio.ch.DirectBuffer;
import java.io.File;
import java.io.RandomAccessFile;
import java.lang.reflect.Field;
import java.nio.ByteBuffer;
在页面左边有一个Nav, Tools里面的Local logs可以看到NodeManager
本身的日志. 这个日志是由HttpServer
提供的标准servlets. 对应的还有 /static
, /stacks
, /logLevel
, /metrics
, /jmx
, /conf
等众多servlet.由于这个HttpServer
是hadoop-common提供的,所以所有hadoop页面都会有这几个servlet.
Application日志由AppBlock
渲染. 没看到列出Application所有的Containers的页面. RMAppAttempt
接口里也没有提供这种方法. 事实上RMAppAttempt
有一个Set getRanNodes()
的接口, 如果页面渲染Application申请过的节点, 那也可以通过ApplicationId从该节点NodeManager页面找到对应的Container日志。但目前没有提供,运维起来不好查错. Set getRanNodes()
接口的值是通过RMAppAttemptImpl.ContainerAcquiredTransition
得到, 不知道Yarn为什么不直接把事件的Container存下来,而是存NodeId.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ netstat -s | |
Ip: | |
7222283184 total packets received | |
0 forwarded | |
0 incoming packets discarded | |
7222283182 incoming packets delivered | |
7226682964 requests sent out | |
1 outgoing packets dropped | |
Icmp: | |
21 ICMP messages received |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java [kernel.kallsyms] [k] pvclock_clocksource_read | |
| | |
--- pvclock_clocksource_read | |
| | |
|--98.10%-- xen_clocksource_get_cycles | |
| ktime_get_ts | |
| posix_ktime_get_ts | |
| SyS_clock_gettime | |
| system_call_fastpath | |
| 0x7fff910847d2 |
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:338)
at org.apache.cassandra.utils.concurrent.WaitQueue$AbstractSignal.awaitUntil(WaitQueue.java:307)
at org.apache.cassandra.utils.concurrent.SimpleCondition.await(SimpleCondition.java:63)
at org.apache.cassandra.service.ReadCallback.await(ReadCallback.java:90)
at org.apache.cassandra.service.ReadCallback.get(ReadCallback.java:100)
at org.apache.cassandra.service.AbstractReadExecutor.get(AbstractReadExecutor.java:139)
at org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:1338)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you 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 |