查看更多Apache Pig的教程请点击这里。
如果一个Pig job是map-only的job,并且其输入文件数很多的话,那么输出的文件数也会同样多,此时,如果每个文件大小又比较小的话,长久下去就会对Haodoop NameNode造成很大压力。我们可以通过给Pig job添加一个reduce过程来减少输出文件数。
阅读更多
本文展示了如何用Python训练一个简单的神经网络模型,保存为模型文件,并且用TensorFlow-Serving的Docker镜像把它加载起来,提供在线服务的过程。
环境:Ubuntu 16.04 LTS,TensorFlow 1.14.0,Python 3.6.8
阅读更多
查看更多Apache Pig的教程请点击这里。
运行Pig脚本时报错:
Error before Pig is launched
----------------------------
ERROR 2997: Encountered IOException. org.apache.pig.tools.parameters.ParseException: Encountered "<EOF>" at line 1, column 8.
Was expecting one of:
<IDENTIFIER> ...
<OTHER> ...
<LITERAL> ...
<SHELLCMD> ...
java.io.IOException: org.apache.pig.tools.parameters.ParseException: Encountered "<EOF>" at line 1, column 8.
Was expecting one of:
<IDENTIFIER> ...
<OTHER> ...
<LITERAL> ...
<SHELLCMD> ...
at org.apache.pig.impl.PigContext.doParamSubstitution(PigContext.java:408)
at org.apache.pig.Main.runParamPreprocessor(Main.java:783)
at org.apache.pig.Main.run(Main.java:446)
at org.apache.pig.Main.main(Main.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: org.apache.pig.tools.parameters.ParseException: Encountered "<EOF>" at line 1, column 8.
现在(2019.07) Anaconda官网上下载到的Anaconda安装包,已经对应的是Python 3.7版本了,如果想要安装Python 3.6版,那么有如下几种方法:
阅读更多
最近WordPress管理后台提示我升级WordPress版本到5.2.1,但由于5.2.1最低要求的PHP版本是5.6,我使用的PHP比这个版本还低,因此只能升级PHP版本,同时又考虑到现在PHP 7比较主流,因此我从PHP 5.4直接升到了PHP 7。
阅读更多
最近我的Ubuntu台式机每隔两三天就会进入一种硬盘狂读+点击鼠标无反应的死机状态,由于SSD已经用了很多年,我非常担心它会随时挂掉,导致数据丢失的惨剧发生,于是我提前预防,买了块同品牌、同容量的SSD来替换它。但是从头开始重装系统+配置各种软件的过程实在太痛苦了,所以我决定做一次全盘复制,这样就能省去很多时间。
阅读更多
在Ubuntu下,除了浏览器之外,为了能在系统全局层面上自动使用代理访问那些“不存在的网站”,有一个常用的做法就是,在Chrome的SwitchyOmega插件里的“自动切换”情景模式下“导出PAC”,得到一个PAC文件,放在磁盘的某个路径下(假设为:/home/codelast/OmegaProfile__.pac),然后在Ubuntu系统的网络设置里如下设置:
阅读更多
Ubuntu不知道什么原因,不能用 apt-get install 安装任何软件了,并且在屏幕上输出海量错误信息,非常迷惑人,例如下面这一例:
insserv: Starting vpnagentd_init depends on plymouth and therefore on system facility `$all' which can not be true!insserv: There is a loop between service vpnagentd_init and mountkernfs if startedinsserv: loop involving service mountkernfs at depth 1insserv: Starting vpnagentd_init depends on plymouth and therefore on system facility `$all' which can not be true!......
insserv: Starting vpnagentd_init depends on plymouth and therefore on system facility `$all' which can not be true!insserv: There is a loop between service vpnagentd_init and dns-clean if startedinsserv: loop involving service dns-clean at depth 1......
insserv: Starting vpnagentd_init depends on plymouth and therefore on system facility `$all' which can not be true!insserv: exiting now without changing boot order!update-rc.d: error: insserv rejected the script headerdpkg: error processing package binfmt-support (--configure):subprocess installed post-installation script returned error exit status 1No apport report written because MaxReports is reached alreadyProcessing triggers for initramfs-tools (0.122ubuntu8.10) ...update-initramfs: Generating /boot/initrd.img-4.13.0-32-genericErrors were encountered while processing:udevgrub-commongrub2-commongrub-pc-bingrub-pcresolvconfbinfmt-supportE: Sub-process /usr/bin/dpkg returned an error code (1)
OS:Ubuntu 16.04.3 LTS
JDK:1.8.0_60
Selenium:3.0.0
Chrome:61.0.3163.100
本文描述了用JAVA编程控制Selenium时,遇到的“failed to change window state to maximized, current state is normal”错误的解决方法。
阅读更多
微软于2017年6月底发布了一个主要用于嵌入式系统(例如,树莓派,ARM Cortex-M0等)的机器学习库ELL(Embedded Learning Library,嵌入式学习库),旨在把部分云端的机器学习计算转移到嵌入式设备上进行。
本系列文章记录了在树莓派3代上把ELL demo跑起来的过程中遇到的各种问题以及解决办法。