history

spark 查看 job history 日志

痞子三分冷 提交于 2019-12-06 04:20:02
SPARK_HOME/conf 下: spark-defaults.conf 增加如下内容 Spark .eventLog.enabled true spark.eventLog.dir hdfs://master:8020/var/log/spark spark.eventLog.compress true spark-env.sh 增加如下内容 export SPARK_HISTORY_OPTS=”-Dspark.history.ui.port=18080 -Dspark.history.retainedApplications=3 -Dspark.history.fs.logDirectory=hdfs:/master:8020/var/log/spark” 启动start-history-server.sh SPARK_HOME/conf 下: 执行 ./start-history-server.sh spark job history web: master:18080 这样在spark任务运行完成之后,就可以通过web页面查看日志了 history server相关的配置参数描述 spark.history.updateInterval   默认值:10   以秒为单位,更新日志相关信息的时间间隔 spark.history.retainedApplications  

where does 0x come from? [duplicate]

萝らか妹 提交于 2019-12-06 02:31:29
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: Why are Hexadecimal Prefixed as 0x? I just saw a comment a friend of mine made: 3x12=36 2x12=24 1x12=12 0x12=18 Which made me wonder.. Why did they choose 0x as prefix for hexadecimal numbers? Is there any history behind this decision? 回答1: I think, because x comes from hex and 0 is to indicate that it is a number. 回答2: 0x means the number is probably hexadecimal. This applies in C/C++, and probalby other

Python object history

懵懂的女人 提交于 2019-12-06 00:54:01
I am trying to come up with a way to keep track of various re-incarnations of an object in Python. For example, I would like to have a class for, say, a room. This room could start its existence as a 'kitchen', and then, at any given point in time, become a 'study'. I want to be able to track (or log) all these various phases in the life of my room. So, I came up with this, and am wondering if there is a better way to do this. Or maybe I'm missing something. From what I can tell, though, it appears to work for my purposes. class room(): def __init__(self,current="Any", history = []): self

html 5 history restores some changes and not others?

纵然是瞬间 提交于 2019-12-05 21:06:05
I'm new to using the html 5 history object. I tried the following code: <!DOCTYPE html> <html> <head> <script type="text/javascript"> history.pushState({somethinggoeshere:'but what?'}, 'Does a title go here?', '?begin=true'); window.addEventListener('popstate', function(event) { console.log('popstate fired!'); console.log(event.state); }); function dosomething() { document.getElementById('box').style.display = 'block'; document.getElementById('iframe').src = 't2.html'; history.pushState({somethinggoeshere:'but what?'}, 'Does a title go here?', '?complete=true'); } </script> </head> <body> <a

【转】Spark History Server 架构原理介绍

时间秒杀一切 提交于 2019-12-05 18:22:08
【From】 https://blog.csdn.net/u013332124/article/details/88350345 Spark History Server 是spark内置的一个http服务,通过sbin/sbin/start-history-server.sh启动。History Server启动后,会监听一个端口,同时启动两个定时任务线程,分别用来解析eventLog日志文件和清理过期的eventLog日志文件。 Spark History Server启动后,我们可以直接在浏览器输入 http://ip:port 访问。一般默认端口是18080 一、eventLog日志文件以及相关参数 eventLog日志文件介绍 eventLog需要将配置spark.eventLog.enabled设置为true来开启,默认是关闭的。 开启这个配置后,当我们提交spark job到集群中运行时,之后spark job在运行过程中会不断的一些运行信息写到相关的日志文件中。具体的eventLog存放目录由配置spark.eventLog.dir决定的。 Spark job在运行中,会调用EventLoggingListener#logEvent()来输出eventLog内容。spark代码中定义了各种类型的事件,一旦某个事件触发,就会构造一个类型的Event

Origin of “://” in many URI syntaxes [closed]

僤鯓⒐⒋嵵緔 提交于 2019-12-05 14:43:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 10 years ago . Anybody knows where the " :// " or the " // " comes from in most URIs syntaxes? For instance, why isn't it written like " http:www.example.com "? 回答1: a1kmm's answer is good for specific application to URLs, but if you're curious as to the semantic origin of the double slash, take a look at this article: http:/

【Keras-MLP】MNIST

China☆狼群 提交于 2019-12-05 08:51:47
文章目录 1 下载MNIST数据集 1.1 导入Keras及相关模块 1.2 读取 MNIST 数据集 1.3 查看MNIST数据 2 显示data 2.1 显示单个training images and label 2.2 显示多项training images and label 3 Image pre-processing 3.1 把图片变成向量并转化为Float 3.2 把图片的数字标准化(normalize) 4 Label pre-processing 5 Multilayer Perceptron 256 5.1 Build Model 5.2 查看模型摘要 5.3 Training process 5.4 可视化训练过程 5.5 评估准确率 5.6 进行预测 5.7 Confusion Matrix 5.8 建立真实值与预测值的 Data Frame 6 Multilayer Perceptron 1000 6.1 Data processing and Build Model 6.2 查看模型 6.3 Training 6.4 可视化训练过程 6.5 评估模型 7 Multilayer Perceptron 加 DropOut 7.1 Build Model 7.2 Training process 7.3 评估模型 8 Multilayer Perceptron

cat ~/.bash_history

偶尔善良 提交于 2019-12-05 07:40:15
7.history命令 history命令用于显示历史执行过的命令,格式为“history [-c]”。 history命令应该是作者最喜欢的命令。执行history命令能显示出当前用户在本地计算机中执行过的最近1000条命令记录。如果觉得1000不够用,还可以自定义/etc/profile文件中的HISTSIZE变量值。在使用history命令时,如果使用-c参数则会清空所有的命令历史记录。还可以使用“!编码数字”的方式来重复执行某一次的命令。总之,history命令有很多有趣的玩法等待您去开发。 [root@linuxprobe ~]# history 1 tar xzvf VMwareTools-9.9.0-2304977.tar.gz 2 cd vmware-tools-distrib/ 3 ls 4 ./vmware-install.pl -d 5 reboot 6 df -h 7 cd /run/media/ 8 ls 9 cd root/ 10 ls 11 cd VMware\ Tools/ 12 ls 13 cp VMwareTools-9.9.0-2304977.tar.gz /home 14 cd /home 15 ls 16 tar xzvf VMwareTools-9.9.0-2304977.tar.gz 17 cd vmware-tools-distrib

梯度下降法

孤街醉人 提交于 2019-12-05 03:01:07
简介 梯度下降法是迭代法的一种,可以用于求解最小二乘问题(线性和非线性都可以),在求解机器学习算法的模型参数,梯度下降是最常采用的方法之一,在求解损失函数的最小值时,可以通过梯度下降法来一步步的迭代求解 不是一个机器学习算法 是一种基于搜索的最优化方法 最小化损失函数 最大化一个效用函数(梯度上升法) 模型 $J=\theta ^{2}+b$   定义了一个损失函数以后,参数 $\theta $ 对应的损失函数 $J$ 的值对应的示例图,需要找到使得损失函数值 $J$ 取得最小值对应的 $\theta $ 首先随机取一个 $\theta $,对 $\theta $求导乘 $\eta $,得到一个导数gradient 将之前的 $\theta $ 存为last_theta 将 $\theta $减去$\eta $*gradient得到的值存入 $\theta $ 将 $\theta $与last_theta分别代入公式后得到两个函数值相减,如果小于指定的一个极小值,则说明已找到了最小的 $\theta $,否则重复第1个步聚,对 $\theta $ 求导,依次完成,直到差值小于极小值 $\eta $ 超参数的作用 $\eta $ 称为学习率也称为步长 $\eta $ 的取值影响获得最优解的速度 $\eta $ 取值不合适,可能得不到最优解 $\eta $ 是梯度下降的一个超参数

Linux 记录history到文件

不想你离开。 提交于 2019-12-05 02:40:58
在linux下面,为了保证服务器安全,通常会记录所敲命令的历史记录,但是记录为1000条,并且退出重新登录后,之前的变会没有了,通过编辑 /etc/bashrc 文件记录历史命令到日志文件下面,并已登录来源 IP ,登录用户名,登录时间命名日志文件名字 查看默认的history 编辑/etc/bashrc 编辑 /etc/bashrc 文件,加入以下内容,也可以放在 /etc/profile 文件里 # vim /etc/bashrc USER_IP=$(echo -e "\033[31m\033[1m`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'`\033[0m") IP=$(who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g') USER=$(whoami) USER_NAME=`echo -e "\033[36m\033[1m$(whoami) \033[0m"` HISTFILESIZE=100000 HISTSIZE=4096 HISTTIMEFORMAT="%F %T $USER_IP $USER_NAME " if [ "$USER_IP" = "" ] then USER_IP=`hostname` fi if [ !