`
文章列表

hive日常

    博客分类:
  • hive
1、sql select ROUND(RAND()*1000,0) from dual;    生成随机数   2、hive创建临时表 create TEMPORARY table up_speed select a.place,a.quart,a.year,a.kwh/b.kwh-1 as elec_speed_up from  (select c.place,c.year,c.quart,sum(c.kwh) as kwh from user_h_growth c group by place,quart,year) a JOIN (select d.place,d.year ...

java日常

1、 System.currentTimeMillis(),获得系统当前时间戳   2、 注意 deleteCharAt只删一个字符,subString才是截取······还犯这种错误   3、
13/11/07 08:45:08 INFO mapred.JobClient: Task Id : attempt_201311070843_0001_r_000000_0, Status : FAILEDjava.lang.RuntimeException: java.lang.NoSuchMethodException: 忘了将一个程序中的map reduce方法改成static java.lang.NoSuchMethodException: DataJoin$TaggedWritable.<init>() 第二个job忘了job2.setJarByClass(Mr ...
[root@RedHat mnt]# cd /opt/cdrom/Packages/ [root@RedHat Packages]# yum install google-chrome-stable_current_i386.rpm  Loaded plugins: refresh-packagekit, rhnplugin This system is not registered with RHN. RHN support will be disabled. base                                                     ...
正则匹配符错误 把你的里面的\全部替换为\\即可   但!“ \" ” 不换   "/<div class=\"breadcrumb[^\"]*\">.*?<\\/a><\\/span>/is"

hbase运行jar包ing

 开始时是因为jar包中的hbase-site配置文件和集群的不吻合。。改一下 /home/aaa/tmp 全部删放过去,解压  jar -xvf aaa_mr.jar  cp /etc/hbase/conf/hbase-site.xml ./ cd conf/cp /etc/hbase/conf/hbase-site.xml ./
. 编译 WordCount.java  2. 打成 WordCount.jar包 上传的hdfs。。3. hadoop jar WordCount.jar ***.**.MainClass /**/input /***/output 问题一直提示  Not a valid JAR: /usr/***/***/wordcount.jar   问题是:执行jar包的时候应该是用本地jar包,而不是hdfs上的,所以写出hdfs路径是不对的   我在执行hbase官方说明中的一个例子,是用mapreduce连接hbase进行数据读写的一个程序。报了以下错误:Exception in th ...
hive:MoveTask 2014-02-14 14:58 680人阅读 评论(1) 收藏 举报 hive 运行SQL时出了个错: SQL: INSERT OVERWRITE DIRECTORY 'result/testConsole' select count(1) from nutable;  错误信息: Failed with exception Unable to rename: hdfs://indigo:8020/tmp/hive-root/hive_2013-08-22_17-35-05_006_3570546713731431770/-ext- ...
  vi /etc/ssh/sshd_config,找到Port 22,然后将端口22改为你想要的端口号,重启SSH服务:/etc/init.d/sshd restart 即可,然后测试ssh连接:  ssh localhost -p 你的端口号,连接成功。   如果你希望保险起见,不至于因为一个端口连接不了(比如受到攻击)而不能使用ssh连接,那么你可以使用多个ssh连接端口,还是在配置文件/etc/ssh/sshd_config中修改,运行vi /etc/ssh/sshd_config,找到Port 端口号地方,然后在下面添加一行:Port 23,这样就又增加了一个新的连接端口,重 ...
 首先说明一下intern函数的作用:先检查常量池里有没有相同Unicode的常量,没有则添加,然后返回此String的引用。  String str1 = "Hello"; String str2 = new String("Hello"); System.out.println(str1==str2.intern());    System.out.printl ...

1204工作

hadoop reducer回滚原因分析   这个就要看你出现回滚是在哪个级别的reducer了。当map执行成功之后,hadoop会启动reducer对应到整个job,会有reduce阶段,这个如果失败了肯定不可能成功的吧。然后如果你设置了跑10个reduce,那么hadoop会把map的输出结果划分为10份,对应由10个reduce task来处理。一般来说肯定也是要10个task都成功才会判断mr成功了的。但是10个 reduce task不一定真的只跑10个物理任务,如果slot有多,那么每个task可能有多个
一般是.bash_profile 配置出错了。   或者是没有source .bash_profile       #HADOOP export HADOOP_HOME=/home/zjq/hadoop-1.2.1 export PATH=$HADOOP_HOME/bin:$PATH

有关JSoup

    java-jsoup解析html页面的内容 http://blog.csdn.net/zzq900503/article/details/10071307     java-httpclient通过title实现从baidu爬取相关网页链接 http://blog.csdn.net/zzq900503/article/details/10006751   有关失效链接的操作 http://segmentfault.com/blog/rainystars/1190000000415113   该类的API http://jsoup.org/apidocs/ ...

1127工作

做了有关网页内容的匹配工作:        有几种方法:           1、最土的 indexof,substring,这种上学时的小打小闹明显不适合工作中使用,只解析了十几个页面就字符串下标越界了,有时只处理了3个就越界了。。所以 ...

1126工作

1、如在jar包中调用,需要在命令中添加路径,然后再把东西传上去 HADOOP_CLASSPATH="/usrb/hive/*:/usrb/hiveb/*:/usrb/hbase/*:/usrb/hbaseb/*:b/jsoup-1.7.3.jar"   2、执行普通的java jar包 java -jar xxx.jar 注意添加main方法,否则 no main manifest attribute, in test.jar   3、 rz -y -be 放本地东西到虚拟机
Global site tag (gtag.js) - Google Analytics