- 博客(28)
- 收藏
- 关注
原创 IDEA本地运行hadoop程序成功,集群运行找不到自定义的Mapper类
错误如下:解决方案是在主类JobMain中添加如下: job.setJarByClass(JobMain.class);然后再生成jar包运行即可!
2020-12-30 16:47:29
556
1
原创 Ubuntu环境配置相关问题
环境:Ubuntu16.04问题描述:搭建Hadoop环境时,刚开始只在/etc/profile下配置了环境,结果关闭终端再开启终端或者切换用户后,hadoop version,不能识别hadoop命令,也即是/etc/profile并没有对所有用户生效,并且存在bug。解决办法:既然不能一次配置,全部用户生效,就对每个用户挨着配置,先对root用户配置,切换到root用户下:su rootgedit ~/.bashrc把环境变量配置进去,然后重启即可。如:#hadoop envi
2020-12-11 20:12:53
147
原创 Artifact filter:war exploded 出错问题
使用filter,启动tomcat时,报如下错误:查看日志信息发现:可知为JDK版本问题,修改JDK版本即可,我修改为了JDK1.8,完美解决问题
2020-11-13 10:56:32
941
原创 解决javax.servlet.ServletException: Servlet execution threw an exception
问题如图:解决办法:导入commons-collections-3.2.2.jar
2020-11-10 20:00:01
1511
原创 HTTP Status 500 – Internal Server Error 问题解决办法
问题如图:产生原因:把引入的jar包的文件夹的名、名字定义为了libs。解决办法:把文件夹名字改为lib即可。该文件夹放在WEB-INF下。Tomcat的规定???
2020-11-07 22:44:40
2391
原创 DruidDataSourceFactory.createDataSource Cannot find declaration to go to 解决方法
使用Druid数据连接池时,发现DruidDataSourceFactory.createDataSourceCannot find declaration to go to,可是明明已经导入jar包了,并且之前也使用过该jar包,并没有报错,观察之前的代码发现,原来在jar包中存在两个DruidDataSourceFactory类,而此次导入jar包路径不对,所以报错。正确的jar包导入路径为:import com.alibaba.druid.pool.DruidDataSourceFactor.
2020-11-07 21:19:38
3855
原创 hadoop程序在web界面观察不到作业运行情况的问题
在IDEA本地连接hadoop运行的时候,在web界面是观察不到的,需要打包成jar包,传递到集群上再Hadoop jar xx.jar运行才可以在web界面观察到作业运行情况。
2020-11-04 18:33:36
921
原创 解决因分辨率出错从而引发的进不去Ubuntu进不去桌面问题
系统:Ubuntu18.04 搭建了cuda环境起因:误按服务器重启按钮,然后分辨率发生错误分辨率解决办法: 起初直接就打算在设置里面修改分辨率,结果发现no dispaly(这大概率就是说明显卡驱动存在了问题,然而刚开始并没有意识到),搜索解决方案,无外乎是用Xrandr命令,或者是修改配置文件,然而都没有什么用,才想起来显卡驱动或许出现了问题,于是nvidai-smi果然不能正确显示。 然后查看显卡信息,nvidia官网上下载配套驱动,禁用nouveau,禁用X-window...
2020-10-30 10:33:22
1007
原创 Haddop访问不了loaclhost:9870
环境: Ubuntu18.04 Hadoop:3.2.1关闭防火墙 : 查看 防火墙状态: sudo ufw statussudo ufw enable sudo ufw disable(也可以开启防火墙下,允许访问9870端口)修改配置文件:hdfs-site.xml添加:<property> <name>dfs.http.address</name> <value>localhost:9870</va...
2020-10-04 13:52:16
842
原创 Ubuntu18.04安装百度网盘客户端
官网上下载百度网盘linux客户端,选择下载deb版本http://yun.baidu.com/download然后在安装包目录下打开终端,输入命令:$sudo dpkg -i 安装包.deb即可-i 选项是 intsall
2020-09-18 09:39:29
1380
1
原创 Ubuntu终端man pthread_creat报错的解决办法
终端下输入man pthread_creat,报错无pthread_creat的手册页条目解决办法:sudo apt-get install glibc-docsudo apt-get install manpages-posix-dev
2020-08-13 18:12:44
262
原创 PAT(甲)1092 To Buy or Not to Buy (20 分)
Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. However the owner of the shop would only sel...
2019-08-22 21:50:20
135
原创 PAT(甲)1134 Vertex Cover (25 分)
Avertex coverof a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of the set. Now given a graph with several vertex sets, you are supposed to tell if e...
2019-08-20 21:55:08
114
原创 PAT(甲) 1121 Damn Single (25 分)
"Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken care of.Input Specification:Each inpu...
2019-08-18 21:27:03
116
原创 PAT(甲) 1102 Invert a Binary Tree (25 分)
The following is from Max Howell @twitter:Google: 90% of our engineers use the software you wrote (Homebrew), but you can't invert a binary tree on a whiteboard so fuck off.Now it's your turn to...
2019-06-26 20:55:42
110
原创 PAT(甲) 1062 Talent and Virtue (25 分)
About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outstanding in both talent and virt...
2019-05-29 21:01:33
120
原创 PAT(甲) 1050 String Subtraction (20 分)
Given two stringsS1andS2,S=S1−S2is defined to be the remaining string after taking all the characters inS2fromS1. Your task is simply to calculateS1−S2for any given s...
2019-05-20 21:58:46
166
原创 PAT(甲) 1035 Password (20 分)
To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish1(one) froml(L...
2019-05-18 20:38:07
89
原创 PAT(甲)1036 Boys vs Girls (25 分)
This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.Input Specification:Each input file contains one t...
2019-05-17 22:03:54
111
原创 PAT(乙)1023 组个最小数
给定数字 0-9 各若干个。你可以以任意顺序排列这些数字,但必须全部使用。目标是使得最后得到的数尽可能小(注意 0 不能做首位)。例如:给定两个 0,两个 1,三个 5,一个 8,我们得到的最小的数就是 10015558。现给定数字,请编写程序输出能够组成的最小的数。输入格式:输入在一行中给出 10 个非负整数,顺序表示我们拥有数字 0、数字 1、……数字 9 的个数。整数间用一个空格...
2019-03-27 20:51:48
92
原创 PAT(乙)1021 个位数统计
给定一个k位整数N=dk−110k−1+⋯+d1101+d0(0≤di≤9,i=0,⋯,k−1,dk−1>0),请编写程序统计每种不同的个位数字出现的次数。例如:给定N=100311,则有 2 个 0,3 个 1,和 1 个 3。输入格式:每个输入包含 1 个测试用例,即一个不超过 1000 位的正整数N。输出格式:对...
2019-03-27 20:28:28
131
原创 PAT(乙)1017 A除以B
本题要求计算A/B,其中A是不超过 1000 位的正整数,B是 1 位正整数。你需要输出商数Q和余数R,使得A=B×Q+R成立。输入格式:输入在一行中依次给出A和B,中间以 1 空格分隔。输出格式:在一行中依次输出Q和R,中间以 1 空格分隔。输入样例:123456789050987654321 7输出样例:17636684...
2019-03-21 21:06:18
126
原创 PAT(乙)1009 说反话
给定一句英语,要求你编写程序,将句中所有单词的顺序颠倒输出。输入格式:测试输入包含一个测试用例,在一行内给出总长度不超过 80 的字符串。字符串由若干单词和若干空格组成,其中单词是由英文字母(大小写有区分)组成的字符串,单词之间用 1 个空格分开,输入保证句子末尾没有多余的空格。输出格式:每个测试用例的输出占一行,输出倒序后的句子。输入样例:Hello World Her...
2019-03-20 21:56:59
132
原创 1006 换个格式输出整数
让我们用字母B来表示“百”、字母S表示“十”,用12...n来表示不为零的个位数字n(<10),换个格式来输出任一个不超过 3 位的正整数。例如234应该被输出为BBSSS1234,因为它有 2 个“百”、3 个“十”、以及个位的 4。输入格式:每个测试输入包含1个测试用例,给出正整数n(<1000)。输出格式:每个测试用例的输出占一行,用规定的格式输出...
2019-03-20 21:25:55
106
原创 解决编译C++程序时to_string()未声明等相关问题
#include <iostream>#include <string>using namespace std;int main() { string s; cin >> s; int sum = 0; string str[10] = {"ling", "yi", "er", "san", "si", "wu", "li...
2019-03-20 21:00:12
8195
2
原创 把变量定义在循环体内和循环体外的疑惑
#include<iostream>int main(){ int n,sum=0; int S2 = 1; scanf("%d",&n); for(int i=1;i<=n;i++) { for(int j = 1;j<=i;j++) { S2=S2*j; ...
2018-09-17 20:48:35
1711
原创 C语言中的EOF
EOF 一般出现在 while ...EOF中输入时,如果题目没有给定输入的结束条件,那么就默认读取到文件末尾。 scanf函数是有返回值的,返回值为其成功读入的参数的个数,如scanf("%d",&n)成功读入一个整数,那么scanf返回值为1.读入失败只会出现在读取文件到达文件末尾导致无法读取时,这时scanf函数会返回-1而不是0,C语言中使用EOF(即End Of File)...
2018-02-13 10:03:58
534
原创 1001 害死人不偿命的(3n+1)猜想(15)
最近新学了C++,看了第一周和第二周的少部分PAT网站上的配套的C++课程,所以来刷PAT乙级,练练手!如有不足之处,还望指教! 【抱拳】1001. 害死人不偿命的(3n+1)猜想 (15)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard
2016-12-09 14:40:17
529
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人