intellij 加载 bazel 项目刚开始就报错:cannot run program bazel error=2
解决:在 settings 中的 other settings -> bazel settings 将 bazel binary location 改为 /usr/local/bin/bazel 即可。
2018年5月28日星期一
2018年5月23日星期三
设置maven镜像源
由于国内网络原因,官方maven镜像源经常无法访问,全局设置maven镜像源:
vim ~/.m2/settings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
将maven源修改为阿里云的镜像源。
vim ~/.m2/settings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
将maven源修改为阿里云的镜像源。
2018年4月28日星期六
migration-tooling项目的问题
国内的https://repo1.maven.org/maven2/连不上了,导致我们使用的https://github.com/bazelbuild/migration-tooling项目都无法运行。
解决方法:
在migration-tooling项目根目录的WORKSPACE文件最前面添加:
maven_server(
name = "default",
url = "http://maven.aliyun.com/nexus/content/groups/public/",
)
全局搜索项目中的MAVEN_CENTRAL_URL,将https://repo1.maven.org/maven2/替换为http://maven.aliyun.com/nexus/content/groups/public/
然后就可以正常运行bazel run //generate_workspace -- --xxx 了。
解决方法:
在migration-tooling项目根目录的WORKSPACE文件最前面添加:
maven_server(
name = "default",
url = "http://maven.aliyun.com/nexus/content/groups/public/",
)
全局搜索项目中的MAVEN_CENTRAL_URL,将https://repo1.maven.org/maven2/替换为http://maven.aliyun.com/nexus/content/groups/public/
然后就可以正常运行bazel run //generate_workspace -- --xxx 了。
2018年4月25日星期三
spark history server 配置
参考 Spark入门 - History Server配置使用:http://callmesurprise.github.io/2016/11/13/Spark%E5%85%A5%E9%97%A8%20-%20history%20server/
同时需要把 spark.history.fs.cleaner.enabled 设置为 true,默认每天清理一次,最多保留七天的日志。参考:http://wxmimperio.tk/2016/01/22/Spark-JobHistory-Monitoring/
其他可以参考官方文档。
同时需要把 spark.history.fs.cleaner.enabled 设置为 true,默认每天清理一次,最多保留七天的日志。参考:http://wxmimperio.tk/2016/01/22/Spark-JobHistory-Monitoring/
其他可以参考官方文档。
linux中查看glibc版本
centos:
rpm -qa | grep glibc
rpm -qi glibc 进一步查看
ubuntu:
ls -l /lib/i386-linux-gnu/libc.so.6 或 ls -l /lib/x86_64-linux-gnu/libc.so.6
apt-cache show libc6 进一步查看
rpm -qa | grep glibc
rpm -qi glibc 进一步查看
ubuntu:
ls -l /lib/i386-linux-gnu/libc.so.6 或 ls -l /lib/x86_64-linux-gnu/libc.so.6
apt-cache show libc6 进一步查看
2018年4月24日星期二
supervisor stop时同时杀掉子进程
在supervisor配置中设置 stopsignal = INT,stop时候子进程也会被杀掉,否则子进程不会被杀掉而变成僵尸进程。如果配置城 stopsignal = KILL,还需要配置 stopasgroup = true; killasgroup = true。
还没具体弄明白 stopsignal,以后有时间研究。
还没具体弄明白 stopsignal,以后有时间研究。
2018年4月10日星期二
xgboost学习
一篇翻译的还不错的博文:http://d0evi1.com/xgboost/ (xgboost code insight)
xgboost调参:https://xgboost.readthedocs.io/en/latest/how_to/param_tuning.html
以后有时间更新一下自己的总结。
xgboost调参:https://xgboost.readthedocs.io/en/latest/how_to/param_tuning.html
以后有时间更新一下自己的总结。
订阅:
博文 (Atom)